summaryrefslogtreecommitdiffstats
path: root/SidebarToolbox.cpp
diff options
context:
space:
mode:
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() {
+}