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) Lumiera.org
5  2008, Joel Holdsworth <joel@airwebreathe.org.uk>
6  2017, Hermann Vosseler <Ichthyostega@web.de>
7 
8  This program is free software; you can redistribute it and/or
9  modify it under the terms of the GNU General Public License as
10  published by the Free Software Foundation; either version 2 of
11  the License, or (at your option) any later version.
12 
13  This program is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  GNU General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with this program; if not, write to the Free Software
20  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 
22 */
23 
24 
48 #ifndef STAGE_CTRL_UI_MANAGER_H
49 #define STAGE_CTRL_UI_MANAGER_H
50 
51 #include "stage/gtk-base.hpp"
52 #include "lib/nocopy.hpp"
53 
54 #include <functional>
55 #include <memory>
56 #include <string>
57 
58 
59 namespace stage {
60 
61  class UiBus;
62 
63 namespace workspace { class UiStyle; }
64 namespace timeline { class TimelineWidget; }
65 namespace ctrl {
66 
67  using std::unique_ptr;
68  using std::string;
69 
70  class GlobalCtx;
71  class Actions;
72  class Facade;
73 
74 
75 
79  {
80  protected:
82  ~ApplicationBase();
83  };
84 
85 
97  class UiManager
98  : public ApplicationBase
99  , public Gtk::UIManager
100  {
101  using UiStyle = workspace::UiStyle;
102 
103  unique_ptr<GlobalCtx> globals_;
104  unique_ptr<UiStyle> uiStyle_;
105  unique_ptr<Actions> actions_;
106  unique_ptr<Facade> facade_;
107 
108 
109  public:
116  UiManager (UiBus& bus);
117  ~UiManager ();
118 
123  void createApplicationWindow();
124 
129  void performMainLoop();
130 
134  void terminateUI();
135 
136 
137  using Operation = std::function<void(void)>;
141  void schedule (Operation&& task);
142 
143 
147  void updateWindowFocusRelatedActions();
148 
149  void allowCloseWindow (bool yes);
150 
151  void configureStyle (timeline::TimelineWidget const&);
152 
153  private:
154 
155  };
156 
157 
158 
159 }}// namespace stage::ctrl
160 #endif /*STAGE_CTRL_UI_MANAGER_H*/
Any copy and copy construction prohibited.
Definition: nocopy.hpp:46
Backbone of the Lumiera GTK GUI.
Definition: ui-bus.hpp:159
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:46
The Lumiera UI framework and backbone object.
Definition: ui-manager.hpp:97
A set of basic GTK includes for the UI.
Framework initialisation base.
Definition: ui-manager.hpp:77
Manage global concerns regarding a coherent user interface.
Definition: ui-style.hpp:72