summaryrefslogtreecommitdiffstats
path: root/Window.h
blob: 00c447cd47fa5cc27998e30a4bc884eab385ec09 (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
56
#ifndef WINDOW_H_
#define WINDOW_H_

#include <gtk/gtk.h>
#include <gtk/gtkgl.h>
#include "UIManager.h"
#include "Drawer.h"
#include "SidebarManager.h"
#include "FileManager.h"
#include "EditManager.h"
#include "Level.h"


class WindowManager;


class Window {
  private:
    GtkWidget *window;
    
    UIManager uiManager;
    
    EditManager editor;
    
    Drawer drawer;
    SidebarManager sidebar;
    
    FileManager fileManager;
    
    WindowManager *manager;
    
    Level level;
    
    // prevent shallow copy
    Window(const Window &w);
    const Window& operator=(const Window &w);
    
    static gboolean deleteEvent(GtkWidget *widget, GdkEvent *event, Window *window);
  public:
    Window(GdkGLConfig *glconfig, WindowManager *manager);
    virtual ~Window();
    
    void show();
    void update();
    void handleAction(UIManager::Action action);
    
    EditManager& getEditManager() {
      return editor;
    }
    
    Level& getLevel() {
      return level;
    }
};

#endif /*WINDOW_H_*/