summaryrefslogtreecommitdiffstats
path: root/SidebarManager.h
blob: b8deb72ef4bd949428171c70f804b0a178b33b03 (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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#ifndef SIDEBARMANAGER_H_
#define SIDEBARMANAGER_H_

#include <gtk/gtk.h>
#include "Sidebar.h"
#include "SidebarToolbox.h"
#include "EditManager.h"
#include "ToolGrab.h"
#include "ToolAddRect.h"
#include "ToolAddPolygon.h"


class Window;


class SidebarManager {
  private:
    GtkWidget *sidebar, *toolLabel, *scrolledWindow, *viewport;
    
    SidebarToolbox sidebarToolbox;
    
    Sidebar *activeSidebar;
    
    Window *window;
    
    ToolGrab toolGrab;
    ToolAddRect toolAddRect;
    ToolAddPolygon toolAddPolygon;
    
    // prevent shallow copy
    SidebarManager(const SidebarManager &w);
    const SidebarManager& operator=(const SidebarManager &w);
    
  public:
    SidebarManager(Window *window);
    virtual ~SidebarManager();
    
    GtkWidget* getWidget() {
      return sidebar;
    }
    
    void resetTool() {
      sidebarToolbox.resetTool();
    }
    
    Tool* getActiveTool() {
      return &sidebarToolbox.getActiveTool();
    }
    
    void update();
};

#endif /*SIDEBARMANAGER_H_*/