Lumiera  0.pre.03
»edit your freedom«
interaction-director.hpp
Go to the documentation of this file.
1 /*
2  INTERACTION-DIRECTOR.hpp - Global UI Manager
3 
4  Copyright (C) Lumiera.org
5  2017, Hermann Vosseler <Ichthyostega@web.de>
6 
7  This program is free software; you can redistribute it and/or
8  modify it under the terms of the GNU General Public License as
9  published by the Free Software Foundation; either version 2 of
10  the License, or (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program; if not, write to the Free Software
19  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 
21 */
22 
23 
53 #ifndef STAGE_INTERACT_INTERACTION_DIRECTOR_H
54 #define STAGE_INTERACT_INTERACTION_DIRECTOR_H
55 
58 #include "lib/depend-inject.hpp"
59 
60 //#include <string>
61 #include <vector>
62 #include <memory>
63 
64 
65 namespace stage {
66 
67  class UiBus;
68 
69 namespace ctrl {
70  class GlobalCtx;
71  class UiState;
72 }
73 namespace setting {
74  class AssetController;
75 }
76 namespace timeline {
77  class TimelineController;
78 }
79 namespace workspace {
80  class WorkspaceWindow;
81 }
82 namespace interact {
83 
84  using lib::diff::GenNode;
85 //using std::string;
86  using std::unique_ptr;
87 
88 //class Actions;
89  class LocationQuery;
90 
91  class Navigator;
92  class SpotLocator;
93  class FocusTracker;
94  class ViewLocator;
95 
96  class GestureState;
97 
98  using timeline::TimelineGui;
99 
100 
101 
107  : public model::Controller
108  {
109  ctrl::GlobalCtx& globalCtx_;
110 
111  // == exposed for Dependency-Incection ==
114 
115 
116  // == global Services ==
117  Service_GestureState gestureState_;
118  unique_ptr<ViewLocator> viewLocator_;
119  unique_ptr<SpotLocator> spotLocator_;
120  Service_LocationQuery navigator_;
121  unique_ptr<FocusTracker> tracker_;
122 
123  // == Model globals ==
124  using Timelines = std::vector<TimelineGui>;
125  using Assets = unique_ptr<setting::AssetController>;
126  using State = unique_ptr<ctrl::UiState>;
127 
128  State uiState_;
129  Assets assets_;
130  Timelines timelines_;
131 
132 
137  void buildMutator (lib::diff::TreeMutator::Handle) override;
138 
140  void populateContent_afterStart();
141 
142  static constexpr auto DELAY_AFTER_GUI_START_in_ms = 100;
143 
144  public:
147 
148  // == Menu actions ==
149  void newProject();
150  void saveSnapshot();
151  void forkProject();
152  void editSetup();
153  void openFile();
154  void render();
155 
156  void newSequence();
157  void newTrack();
158 
159  private:
160  workspace::WorkspaceWindow& getWorkspaceWindow();
161  TimelineGui injectTimeline (GenNode const&);
162  };
163 
164 
165 
166 }}// namespace stage::workspace
167 #endif /*STAGE_INTERACT_INTERACTION_DIRECTOR_H*/
smart-Handle as anchor point for "the UI representation" of a timeline.
Configuration handle to expose a service implementation through the Depend<SRV> front-end.
Per type specific configuration of instances created as service dependencies.
Anchor point and placeholder for the UI representation of a Timeline from the session.
A handle to allow for safe »remote implantation« of an unknown subclass into a given opaque InPlaceBu...
Definition: record.hpp:113
Top-level controller to establish a link between the model and transient user interaction state (focu...
Lumiera GTK UI implementation root.
Definition: guifacade.cpp:46
The main Lumiera workspace window.
A global circle of top-level UI management facilities.
Definition: global-ctx.hpp:79
Common Abstraction of all sub-controller, coordinated by the UI-Bus.
Global cross-cutting navigation within user interface space.
Definition: navigator.hpp:67
generic data element node within a tree
Definition: gen-node.hpp:231