Lumiera  0.pre.03
»edit your freedom«
ui-manager.hpp
Go to the documentation of this file.
1 /*
2  UI-MANAGER.hpp - Global UI Manager
3 
4  Copyright (C)
5  2008, Joel Holdsworth <joel@airwebreathe.org.uk>
6  2017, Hermann Vosseler <Ichthyostega@web.de>
7 
8   **Lumiera** is free software; you can redistribute it and/or modify it
9   under the terms of the GNU General Public License as published by the
10   Free Software Foundation; either version 2 of the License, or (at your
11   option) any later version. See the file COPYING for further details.
12 
13 */
14 
15 
39 #ifndef STAGE_CTRL_UI_MANAGER_H
40 #define STAGE_CTRL_UI_MANAGER_H
41 
42 #include "stage/gtk-base.hpp"
43 #include "lib/nocopy.hpp"
44 
45 #include <functional>
46 #include <memory>
47 #include <string>
48 
49 
50 namespace stage {
51 
52  class UiBus;
53 
54 namespace workspace { class UiStyle; }
55 namespace timeline { class TimelineWidget; }
56 namespace ctrl {
57 
58  using std::unique_ptr;
59  using std::string;
60 
61  class GlobalCtx;
62  class Actions;
63  class Facade;
64 
65 
66 
70  {
71  protected:
73  ~ApplicationBase();
74  };
75 
76 
88  class UiManager
89  : public ApplicationBase
90  , public Gtk::UIManager
91  {
93 
94  unique_ptr<GlobalCtx> globals_;
95  unique_ptr<UiStyle> uiStyle_;
96  unique_ptr<Actions> actions_;
97  unique_ptr<Facade> facade_;
98 
99 
100  public:
107  UiManager (UiBus& bus);
108  ~UiManager ();
109 
114  void createApplicationWindow();
115 
120  void performMainLoop();
121 
125  void terminateUI();
126 
127 
128  using Operation = std::function<void(void)>;
132  void schedule (Operation&& task);
133 
134 
138  void updateWindowFocusRelatedActions();
139 
140  void allowCloseWindow (bool yes);
141 
142  void configureStyle (timeline::TimelineWidget const&);
143 
144  private:
145 
146  };
147 
148 
149 
150 }}// namespace stage::ctrl
151 #endif /*STAGE_CTRL_UI_MANAGER_H*/
Any copy and copy construction prohibited.
Definition: nocopy.hpp:37
Backbone of the Lumiera GTK GUI.
Definition: ui-bus.hpp:150
Mix-Ins to allow or prohibit various degrees of copying and cloning.
Core timeline display (custom widget).
Lumiera GTK UI implementation root.
Definition: guifacade.cpp:37
The Lumiera UI framework and backbone object.
Definition: ui-manager.hpp:88
A set of basic GTK includes for the UI.
Framework initialisation base.
Definition: ui-manager.hpp:68
Manage global concerns regarding a coherent user interface.
Definition: ui-style.hpp:63