Lumiera
0.pre.03
»edit your freedom«
|
#include "stage/interact/drag-relocate-controller.hpp"
Gesture controller for dragging objects within the Timeline display.
The gesture to drag an entity is triggered by observing mouse movements while a mouse key and possibly some modifier key is pressed. To recognise this condition, every possible subject for a drag gesture will be wired through the linkTrigger call into this controller. When #detectActivation is fulfilled for one specific subject, the corresponding context data will be tracked as state of the ongoing gesture in formation, maintained within the member fields of this controller.
Definition at line 96 of file drag-relocate-controller.hpp.
Private Types | |
using | Observer = lib::InPlaceBuffer< GestureObserver, OBSERVER_BUFF_SIZ, InactiveObserver > |
Private Member Functions | |
void | anchor (Symbol cmdID, Subject &subject, GdkEventMotion *motion_event) |
void | doCompleteGesture () |
void | doTrackGesture (GdkEventMotion *motion_event) |
void | initGestureTracking (Symbol cmdID, Subject &subject) |
bool | isActive () |
bool | isAnchored () |
void | linkTrigger (Subject &subject, Symbol cmdID) override |
Hook up a trigger signal to initiate a specific interaction gesture. More... | |
bool | maybeActivate (Symbol cmdID, Subject &subject, GdkEventMotion *motion_event) |
Gesture detection state logic. | |
void | probeActivation (GdkEventMotion *motion_event) |
void | resetState () |
bool | watchButton (GdkEventButton *button_event) noexcept |
Private Attributes | |
gdouble | anchorX_ = 0.0 |
gdouble | anchorY_ = 0.0 |
bool | buttonPressed_ = false |
bool | isInFormation_ = false |
Observer | observer_ |
Subject * | subject_ = nullptr |
Additional Inherited Members | |
Protected Member Functions inherited from InteractionState | |
virtual | ~InteractionState () |
this is an interface | |
Hook up a trigger signal to initiate a specific interaction gesture.
Within the concrete controller implementation for each gesture, the Subject interface shall be used to access an actual widget and to wire this widget's signals to a private implementation function within the concrete gesture controller. The purpose is then to observe this widget and to activate recognition of the gesture when applicable.
Subject | the subject of the interaction gesture; typically implemented by a controller or widget responsible for the UI entity involved. |
cmdID | the actual command to be issued on completion of the interaction |
Implements InteractionState.
Definition at line 110 of file drag-relocate-controller.hpp.