From d389dce3ef4f1342a2f91926a9dcd02b452c6045 Mon Sep 17 00:00:00 2001 From: neoraider Date: Tue, 4 Dec 2007 21:35:01 +0000 Subject: zoomedit: Got SidebarToolbox working. --- SidebarToolbox.h | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'SidebarToolbox.h') diff --git a/SidebarToolbox.h b/SidebarToolbox.h index 4982502..46af985 100644 --- a/SidebarToolbox.h +++ b/SidebarToolbox.h @@ -2,23 +2,30 @@ #define SIDEBARTOOLBOX_H_ #include +#include #include -#include +#include "EditManager.h" #include "Sidebar.h" #include "Tool.h" -class SidebarToolbox : Sidebar -{ +class SidebarToolbox : Sidebar { private: GtkWidget *widget; - std::list buttonBoxes; - std::set tools; + std::list tools; + std::map buttons; + + int cols, rows; + + void updateRows(bool changed); // prevent shallow copy SidebarToolbox(const SidebarToolbox &w); const SidebarToolbox& operator=(const SidebarToolbox &w); + static void toolAction(GtkWidget *button, Tool *tool); + static void sizeAllocate(GtkWidget *widget, GtkAllocation *allocation, SidebarToolbox *toolbox); + public: SidebarToolbox(); virtual ~SidebarToolbox(); @@ -27,10 +34,10 @@ class SidebarToolbox : Sidebar return widget; } - void update(); + void addTool(Tool *tool); + void removeTool(Tool *tool); - bool addTool(Tool *tool); - bool removeTool(Tool *tool); + void update(); }; #endif /*SIDEBARTOOLBOX_H_*/ -- cgit v1.2.3