summaryrefslogtreecommitdiffstats
path: root/SidebarToolbox.cpp
blob: ed5e5daf860afb537e9670ab03dca922bc351d0c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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() {
}