Lumiera  0.pre.03
»edit your freedom«
InteractionDirector Class Reference

#include "stage/interact/interaction-director.hpp"

Description

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::WorkspaceWindowgetWorkspaceWindow ()
 
TimelineGui injectTimeline (GenNode const &)
 
void populateContent_afterStart ()
 ask Session to push up structures for presentation
 

Private Attributes

Assets assets_
 
Service_GestureState gestureState_
 
ctrl::GlobalCtxglobalCtx_
 
Service_LocationQuery navigator_
 
unique_ptr< SpotLocatorspotLocator_
 
Timelines timelines_
 
unique_ptr< FocusTrackertracker_
 
State uiState_
 
unique_ptr< ViewLocatorviewLocator_
 

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_
 

Constructor & Destructor Documentation

◆ InteractionDirector()

Setup and initialise all representations of "global-ness".

Parameters
globalswiring to the circle of top-level UI managers (including ourselves)
Warning
this ctor is performed within the UI thread, yet prior to entering the GTK event loop. For this reason, all initialisation performed here must be wiring-only; any tasks requiring an actually operative UI will be scheduled, to run later when the UI is fully operative.

Definition at line 101 of file interaction-director.cpp.

References InteractionDirector::populateContent_afterStart().

+ Here is the call graph for this function:

Member Function Documentation

◆ buildMutator()

void buildMutator ( lib::diff::TreeMutator::Handle  )
overrideprivatevirtual

set up a binding to allow some top-level UI state to be treated as part of the session model

See also
tree-mutator.hpp

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().

+ Here is the call graph for this function:

◆ newProject()

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.

◆ saveSnapshot()

void saveSnapshot ( )

Save a snapshot of the current project's contents and the UI state.

Note
any command issued against a session will always be logged in the project's log. A snapshot is a marked reference point and additionally includes a capture of UI state into the project.

Definition at line 181 of file interaction-director.cpp.

◆ forkProject()

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.

Note
any commands issued since saving the last snapshot will be retained at least in the existing project's log (unless the old project is replaced / rewritten)

Definition at line 201 of file interaction-director.cpp.

◆ editSetup()

void editSetup ( )

Edit global configuration and setup.

This action will launch the project setup UI, which allows to adjust configuration

  • for this installation of Lumiera
  • for the current project
  • for this user's session in this project
    Todo:
    4/2017 not yet implemented, delegate to the AssetControler, which represents all global aspects of the application, session and project

Definition at line 217 of file interaction-director.cpp.

◆ openFile()

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.

◆ render()

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.

Todo:
4/2017 not yet implemented, and it is not clear how to access the functionality. Do we send a command? Or do we access the Play-Out subsystem directly, to create some kind of dedicated player instance?

Definition at line 249 of file interaction-director.cpp.

◆ newSequence()

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.

Todo:
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 269 of file interaction-director.cpp.

◆ newTrack()

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)

Todo:

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.

◆ injectTimeline()

TimelineGui injectTimeline ( GenNode const &  spec)
private

allocate a new TimelineWidget and attach it as child.

Remarks
assuming the structure of the diff is adequate, we'll first create a proxy to manage this timeline. Then we use some service to find a suitable location to house a TimelineWidget. And finally we trigger creation of the widget, which in turn creates a TimelineController attached to the UI-Bus

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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:
+ Inheritance diagram for InteractionDirector:
+ Collaboration diagram for InteractionDirector:

The documentation for this class was generated from the following files: