summaryrefslogtreecommitdiffstats
path: root/UIManager.h
blob: 2ec7d6b96dfe0613afcb3a425a54ee8e8cb69506 (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
#ifndef UIMANAGER_H_
#define UIMANAGER_H_

#include <gtk/gtk.h>


class Window;


class UIManager {
  private:
    static const gchar* const uiData;
    
    GtkUIManager *uiManager;
    Window *window;
    
    GtkActionGroup* createActions();
    
    static void handleAction(GtkAction *action, UIManager *uiManager);
    
    
  public:
    enum Action {
      SAVE, SAVE_AS, ZOOM_IN, ZOOM_OUT
    };
    
    UIManager(Window *window);
    virtual ~UIManager();
    
    GtkWidget* getMenu() {
      return gtk_ui_manager_get_widget(uiManager, "/ui/menubar");
    }
    
    GtkWidget* getToolbar() {
      return gtk_ui_manager_get_widget(uiManager, "/ui/toolbar1");
    }
    
    GtkAccelGroup* getAccels() {
      return gtk_ui_manager_get_accel_group(uiManager);
    }
};

#endif /*UIMANAGER_H_*/