Lumiera
0.pre.03
»edit your freedom«
|
#include "stage/interact/interaction-director.hpp"
Top-level controller to establish a link between the model and transient user interaction state (focus, current window)
Definition at line 106 of file interaction-director.hpp.
Public Member Functions | |
InteractionDirector (ctrl::GlobalCtx &) | |
Setup and initialise all representations of "global-ness". More... | |
void | editSetup () |
Edit global configuration and setup. More... | |
void | forkProject () |
Continue evolution of the currently active project under a new identity. More... | |
void | newProject () |
setup a new editing project, possibly close the current one. More... | |
void | newSequence () |
Establish a pristine new sequence within the session. More... | |
void | newTrack () |
Establish a empty new track close to the current scope. More... | |
void | openFile () |
Select and open a file to perform a suitable operation. More... | |
void | render () |
Start a render process. More... | |
void | saveSnapshot () |
Save a snapshot of the current project's contents and the UI state. More... | |
Public Member Functions inherited from Tangible | |
virtual | ~Tangible () |
this is an interface | |
void | clearErr () |
invoke the hook to clear error markers More... | |
void | clearMsg () |
invoke the hook to clear notification messages More... | |
ID | getID () const |
void | installExpander (Expander::ProbeFun, Expander::ChangeFun) |
Configure the (optional) functionality to expand or collapse the UI-Element. More... | |
void | installRevealer (Revealer::RevealeItFun) |
Configure the (optional) functionality to bring the UI-Element into sight. More... | |
template<typename... ARGS> | |
void | invoke (Symbol cmdID, ARGS &&...) |
void | invoke (Symbol cmdID, Rec &&arguments) |
Perform a command or action, once the execution context has been established. More... | |
template<typename... ARGS> | |
void | invoke (Symbol cmdID, ARGS &&... args) |
convenience shortcut to issue a command with several arguments | |
void | mark (GenNode const &) |
generic handler for all incoming "state mark" messages | |
void | markErr (string error) |
push an error state tag to the element More... | |
void | markFlash () |
highlight the element visually to catch the user's attention More... | |
void | markMsg (string message) |
push a notification (or warning) message to the element. More... | |
operator LuidH () const | |
operator string () const | |
diagnostic representation. More... | |
void | reset () |
invoke the generic reset hook More... | |
void | slotCollapse () |
Collapse or minimise this element and remember the collapsed state. More... | |
void | slotExpand () |
Expand this element and remember the expanded state. More... | |
void | slotReveal () |
Cause the element to be brought into sight. More... | |
Public Member Functions inherited from DiffMutable | |
virtual | ~DiffMutable () |
this is an interface | |
Private Types | |
using | Assets = unique_ptr< setting::AssetController > |
using | Service_GestureState = lib::DependInject< GestureState >::ServiceInstance<> |
using | Service_LocationQuery = lib::DependInject< LocationQuery >::ServiceInstance< Navigator > |
using | State = unique_ptr< ctrl::UiState > |
using | Timelines = std::vector< TimelineGui > |
Private Member Functions | |
void | buildMutator (lib::diff::TreeMutator::Handle) override |
set up a binding to allow some top-level UI state to be treated as part of the session model More... | |
workspace::WorkspaceWindow & | getWorkspaceWindow () |
TimelineGui | injectTimeline (GenNode const &) |
void | populateContent_afterStart () |
ask Session to push up structures for presentation | |
Private Attributes | |
Assets | assets_ |
Service_GestureState | gestureState_ |
ctrl::GlobalCtx & | globalCtx_ |
Service_LocationQuery | navigator_ |
unique_ptr< SpotLocator > | spotLocator_ |
Timelines | timelines_ |
unique_ptr< FocusTracker > | tracker_ |
State | uiState_ |
unique_ptr< ViewLocator > | viewLocator_ |
Static Private Attributes | |
static constexpr auto | DELAY_AFTER_GUI_START_in_ms = 100 |
Additional Inherited Members | |
Public Types inherited from Tangible | |
using | ID = ctrl::BusTerm::ID |
using | LuidH = lib::hash::LuidH |
Protected Types inherited from Tangible | |
using | GenNode = lib::diff::GenNode |
using | Rec = lib::diff::Rec |
Protected Member Functions inherited from Controller | |
virtual void | doMark (GenNode const &mark) override |
default handler for all generic mark messages. More... | |
Protected Member Functions inherited from Tangible | |
Tangible (ID identity, ctrl::BusTerm &nexus) | |
virtual bool | doExpand (bool yes) |
generic default implementation of the expand/collapse functionality. More... | |
virtual void | doReveal () |
generic default implementation of the "reveal" functionality. More... | |
Protected Attributes inherited from Tangible | |
Expander | expand_ |
Revealer | reveal_ |
ctrl::BusTerm | uiBus_ |
InteractionDirector | ( | ctrl::GlobalCtx & | globals | ) |
Setup and initialise all representations of "global-ness".
globals | wiring to the circle of top-level UI managers (including ourselves) |
Definition at line 101 of file interaction-director.cpp.
References InteractionDirector::populateContent_afterStart().
|
overrideprivatevirtual |
set up a binding to allow some top-level UI state to be treated as part of the session model
Implements Tangible.
Definition at line 138 of file interaction-director.cpp.
References lib::diff::anonymous_namespace{tree-mutator-collection-binding.hpp}::collection(), InteractionDirector::injectTimeline(), and DataCap::isNested().
void newProject | ( | ) |
setup a new editing project, possibly close the current one.
This action launches the project setup UI, for the user to define the storage location and further parameters of the new project. A currently opened project will be deactivated asynchronously, without saving a snapshot, while retaining the last actions in the project's command log.
Definition at line 168 of file interaction-director.cpp.
void saveSnapshot | ( | ) |
Save a snapshot of the current project's contents and the UI state.
Definition at line 181 of file interaction-director.cpp.
void forkProject | ( | ) |
Continue evolution of the currently active project under a new identity.
From a user's point of view, this is the "save as..." action, but due to the nature of Lumiera's projects, it is in fact more complicated. Thus this action launches the project setup UI and preselects the "fork" option there. Optionally this allows to copy the project's history into the forked new project, or alternatively just to start with a snapshot. Another option there is to set up a new storage location, or to replace the existing project under a new name.
Definition at line 201 of file interaction-director.cpp.
void editSetup | ( | ) |
Edit global configuration and setup.
This action will launch the project setup UI, which allows to adjust configuration
Definition at line 217 of file interaction-director.cpp.
void openFile | ( | ) |
Select and open a file to perform a suitable operation.
This action will launch the fileOpen UI. Depending on the selected file's meaning, the actual operation will be either to integrate the data somehow into the current session, or to deactivate the current session and replace it with an other session persisted on storage.
Definition at line 234 of file interaction-director.cpp.
void render | ( | ) |
Start a render process.
This action will launch the render setup UI. Depending on the current Spot, a suitable object to render will be preselected, typically the current timeline.
Definition at line 249 of file interaction-director.cpp.
void newSequence | ( | ) |
Establish a pristine new sequence within the session.
The goal is to create a new playground for the user to add content. Actually, not only a new sequence is created, but also a new fork (track tree) and a new timeline to hold that sequence. And finally, this new timeline is opened for editing. This action invokes a command into the session, which in turn is responsible for figuring out all the contextual details sensibly.
Definition at line 269 of file interaction-director.cpp.
void newTrack | ( | ) |
Establish a empty new track close to the current scope.
Like for newSequence, the goal is to create a new empty workspace. But since a track can be attached anywhere within the fork (track tree), the currently active element is used to establish a current scope, which in turn is used as anchor to attach the new track in a sensible way, with a preference to add the new track as a sibling to the current scope. The actual details of this decision are delegated to the session, but the command invoked by this action does need a current element as argument, and this current element thus needs to be figured out from the context of invocation (current focus and possibly selection)
as of 3/2017 this is an initial draft: It is not clear yet, if this lookup of context will always be treated implicitly, or if it is better to have a public content discovery operation on InteractionDirector and pass the current element explicitly as argument
4/2017 using the session-root (=this) as anchor for the moment, but should actually figure out the current context dynamically... //////////////////////////////TICKET #1082 : actually access the interaction state to get "current scope"
Definition at line 293 of file interaction-director.cpp.
|
private |
allocate a new TimelineWidget and attach it as child.
Definition at line 348 of file interaction-director.cpp.
References stage::interact::anonymous_namespace{interaction-director.cpp}::verifyDiffStructure_and_extract_RootTrack().
Referenced by InteractionDirector::buildMutator().