summaryrefslogtreecommitdiffstats
path: root/SidebarToolbox.cpp
diff options
context:
space:
mode:
authorneoraider <devnull@localhost>2007-11-30 16:04:01 +0100
committerneoraider <devnull@localhost>2007-11-30 16:04:01 +0100
commitdd27a62566f9f0c42d9eebe6ad8023b69a741ca6 (patch)
tree741e79bb8958551529ff3b760db74a4ce557607f /SidebarToolbox.cpp
parent16377d108420614231ac82bda3a9340b9c5ec665 (diff)
downloadzoomedit-dd27a62566f9f0c42d9eebe6ad8023b69a741ca6.tar
zoomedit-dd27a62566f9f0c42d9eebe6ad8023b69a741ca6.zip
zoomedit: Began toolbox.
Diffstat (limited to 'SidebarToolbox.cpp')
-rw-r--r--SidebarToolbox.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/SidebarToolbox.cpp b/SidebarToolbox.cpp
new file mode 100644
index 0000000..ed5e5da
--- /dev/null
+++ b/SidebarToolbox.cpp
@@ -0,0 +1,31 @@
+#include "SidebarToolbox.h"
+
+SidebarToolbox::SidebarToolbox()
+{
+ widget = gtk_vbox_new(FALSE, 0);
+ g_object_ref_sink(G_OBJECT(widget));
+}
+
+SidebarToolbox::~SidebarToolbox()
+{
+ g_object_unref(G_OBJECT(widget));
+}
+
+bool SidebarToolbox::addTool(Tool *tool) {
+ bool ret = tools.insert(tool).second;
+
+ update();
+
+ return ret;
+}
+
+bool SidebarToolbox::removeTool(Tool *tool) {
+ bool ret = (tools.erase(tool) > 0);
+
+ update();
+
+ return ret;
+}
+
+void SidebarToolbox::update() {
+}