summaryrefslogtreecommitdiffstats
path: root/SidebarManager.h
blob: 4f1cd45b28b2bdb39162f6d6322901a241aa6d8e (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
54
55
#ifndef SIDEBARMANAGER_H_
#define SIDEBARMANAGER_H_

#include <gtk/gtk.h>
#include "Sidebar.h"
#include "SidebarToolbox.h"
#include "EditManager.h"
#include "ToolGrab.h"
#include "ToolRotate.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;
    ToolRotate toolRotate;
    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_*/