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)
5  2017, Hermann Vosseler <Ichthyostega@web.de>
6 
7   **Lumiera** is free software; you can redistribute it and/or modify it
8   under the terms of the GNU General Public License as published by the
9   Free Software Foundation; either version 2 of the License, or (at your
10   option) any later version. See the file COPYING for further details.
11 
12 */
13 
14 
44 #ifndef STAGE_INTERACT_INTERACTION_DIRECTOR_H
45 #define STAGE_INTERACT_INTERACTION_DIRECTOR_H
46 
49 #include "lib/depend-inject.hpp"
50 
51 //#include <string>
52 #include <vector>
53 #include <memory>
54 
55 
56 namespace stage {
57 
58  class UiBus;
59 
60 namespace ctrl {
61  class GlobalCtx;
62  class UiState;
63 }
64 namespace setting {
65  class AssetController;
66 }
67 namespace timeline {
68  class TimelineController;
69 }
70 namespace workspace {
71  class WorkspaceWindow;
72 }
73 namespace interact {
74 
75  using lib::diff::GenNode;
76 //using std::string;
77  using std::unique_ptr;
78 
79 //class Actions;
80  class LocationQuery;
81 
82  class Navigator;
83  class SpotLocator;
84  class FocusTracker;
85  class ViewLocator;
86 
87  class GestureState;
88 
89  using timeline::TimelineGui;
90 
91 
92 
98  : public model::Controller
99  {
100  ctrl::GlobalCtx& globalCtx_;
101 
102  // == exposed for Dependency-Incection ==
105 
106 
107  // == global Services ==
108  Service_GestureState gestureState_;
109  unique_ptr<ViewLocator> viewLocator_;
110  unique_ptr<SpotLocator> spotLocator_;
111  Service_LocationQuery navigator_;
112  unique_ptr<FocusTracker> tracker_;
113 
114  // == Model globals ==
115  using Timelines = std::vector<TimelineGui>;
116  using Assets = unique_ptr<setting::AssetController>;
117  using State = unique_ptr<ctrl::UiState>;
118 
119  State uiState_;
120  Assets assets_;
121  Timelines timelines_;
122 
123 
128  void buildMutator (lib::diff::TreeMutator::Handle) override;
129 
131  void populateContent_afterStart();
132 
133  static constexpr auto DELAY_AFTER_GUI_START_in_ms = 100;
134 
135  public:
138 
139  // == Menu actions ==
140  void newProject();
141  void saveSnapshot();
142  void forkProject();
143  void editSetup();
144  void openFile();
145  void render();
146 
147  void newSequence();
148  void newTrack();
149 
150  private:
151  workspace::WorkspaceWindow& getWorkspaceWindow();
152  TimelineGui injectTimeline (GenNode const&);
153  };
154 
155 
156 
157 }}// namespace stage::workspace
158 #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:104
Top-level controller to establish a link between the model and transient user interaction state (focu...
Lumiera GTK UI implementation root.
Definition: guifacade.cpp:37
The main Lumiera workspace window.
A global circle of top-level UI management facilities.
Definition: global-ctx.hpp:70
Common Abstraction of all sub-controller, coordinated by the UI-Bus.
Global cross-cutting navigation within user interface space.
Definition: navigator.hpp:58
generic data element node within a tree
Definition: gen-node.hpp:222