Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
GestureState Class Reference

#include "stage/interact/gesture-state.hpp"

Description

Holder for InteractionState dedicated to UI gestures and complex interactions.

Todo:

write type comment...

WIP-WIP as of 3/2021

as of 3/2021 the whole scheme for addressing gestures and actual state implementations is rather just guesswork ///////////////////////////////////TODO do we need a translation unit interaction-state.cpp (otherwise delete it!)

Definition at line 67 of file gesture-state.hpp.

Public Types

enum  Action {
  DRAG ,
  UNKNOWN
}
 
enum  Scope {
  ON_TIMELINE ,
  OTHER
}
 

Public Member Functions

 GestureState ()
 
 ~GestureState ()
 
InteractionStategetStateFor (Action action, Scope qualifier)
 Decode the classification of the kind of interaction and gesture, and thus translate to a concrete InteractionState implementation.
 

Private Attributes

unique_ptr< DragRelocateControllerdragRelocate_
 

Additional Inherited Members

- Private Member Functions inherited from NonCopyable
 ~NonCopyable ()=default
 
 NonCopyable ()=default
 
 NonCopyable (NonCopyable const &)=delete
 
NonCopyableoperator= (NonCopyable const &)=delete
 

Constructor & Destructor Documentation

◆ GestureState()

Definition at line 61 of file gesture-state.cpp.

◆ ~GestureState()

Definition at line 59 of file gesture-state.cpp.

Member Enumeration Documentation

◆ Action

enum Action
Enumerator
DRAG 
UNKNOWN 

Definition at line 77 of file gesture-state.hpp.

◆ Scope

enum Scope
Enumerator
ON_TIMELINE 
OTHER 

Definition at line 81 of file gesture-state.hpp.

Member Function Documentation

◆ getStateFor()

InteractionState & getStateFor ( Action  action,
Scope  qualifier 
)

Decode the classification of the kind of interaction and gesture, and thus translate to a concrete InteractionState implementation.

Returns
reference to the actual UI state with respect to the specific gesture requested, which can then e.g. be used to wire a specific UI widget to become responsive to this kind of gesture.
Todo:
as of 4/2021, interactions and UI state handling can be considered an early draft; since the UI needs to be fleshed out in more detail in order to decide on a proper organisation and possibly flexible configuration. In the meantime, we use some hard wired mappings to actual InteractionState implementations

Definition at line 76 of file gesture-state.cpp.

References GestureState::DRAG, GestureState::dragRelocate_, and GestureState::ON_TIMELINE.

Member Data Documentation

◆ dragRelocate_

unique_ptr<DragRelocateController> dragRelocate_
private

Definition at line 70 of file gesture-state.hpp.

Referenced by GestureState::getStateFor().

+ Inheritance diagram for GestureState:
+ Collaboration diagram for GestureState:

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