#ifndef SIDEBARTOOLBOX_H_ #define SIDEBARTOOLBOX_H_ #include #include #include #include "EditManager.h" #include "Sidebar.h" #include "Tool.h" #include "ToolSelector.h" class SidebarToolbox : Sidebar { private: GtkWidget *widget; std::list tools; std::map buttons; std::map buttonsRev; Tool *activeTool; ToolSelector toolSelector; int cols, rows; void updateRows(bool changed); void activateTool(Tool *tool); // prevent shallow copy SidebarToolbox(const SidebarToolbox &w); const SidebarToolbox& operator=(const SidebarToolbox &w); static void buttonToggled(GtkWidget *button, SidebarToolbox *toolbox); static void sizeAllocate(GtkWidget *widget, GtkAllocation *allocation, SidebarToolbox *toolbox); public: SidebarToolbox(EditManager *editManager); virtual ~SidebarToolbox(); GtkWidget* getWidget() { return widget; } void addTool(Tool *tool); void removeTool(Tool *tool); void update(); }; #endif /*SIDEBARTOOLBOX_H_*/