summaryrefslogtreecommitdiffstats
path: root/SidebarToolbox.h
diff options
context:
space:
mode:
authorneoraider <devnull@localhost>2007-12-04 22:35:01 +0100
committerneoraider <devnull@localhost>2007-12-04 22:35:01 +0100
commitd389dce3ef4f1342a2f91926a9dcd02b452c6045 (patch)
treec3a7a88afd02cb3cdc88a987e227badcc6095b0c /SidebarToolbox.h
parentecf40f86dfa6aa623bf31494125f3702f9fa0298 (diff)
downloadzoomedit-d389dce3ef4f1342a2f91926a9dcd02b452c6045.tar
zoomedit-d389dce3ef4f1342a2f91926a9dcd02b452c6045.zip
zoomedit: Got SidebarToolbox working.
Diffstat (limited to 'SidebarToolbox.h')
-rw-r--r--SidebarToolbox.h23
1 files changed, 15 insertions, 8 deletions
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 <gtk/gtk.h>
+#include <map>
#include <list>
-#include <set>
+#include "EditManager.h"
#include "Sidebar.h"
#include "Tool.h"
-class SidebarToolbox : Sidebar
-{
+class SidebarToolbox : Sidebar {
private:
GtkWidget *widget;
- std::list<GtkWidget*> buttonBoxes;
- std::set<Tool*> tools;
+ std::list<Tool*> tools;
+ std::map<Tool*, GtkWidget*> 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_*/