![]() |
Lumiera 0.pre.04
»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.
Public Member Functions | |
| DragRelocateController () | |
Private Types | |
| using | Observer = lib::InPlaceBuffer< GestureObserver, OBSERVER_BUFF_SIZ, InactiveObserver > |
Private Member Functions | |
| void | linkTrigger (Subject &subject, Symbol cmdID) override |
| Hook up a trigger signal to initiate a specific interaction gesture. | |
| bool | watchButton (GdkEventButton *button_event) noexcept |
| bool | maybeActivate (Symbol cmdID, Subject &subject, GdkEventMotion *motion_event) |
| Gesture detection state logic. | |
| bool | isActive () |
| bool | isAnchored () |
| void | anchor (Symbol cmdID, Subject &subject, GdkEventMotion *motion_event) |
| void | probeActivation (GdkEventMotion *motion_event) |
| void | initGestureTracking (Symbol cmdID, Subject &subject) |
| void | doTrackGesture (GdkEventMotion *motion_event) |
| void | doCompleteGesture () |
| void | resetState () |
Private Attributes | |
| bool | buttonPressed_ = false |
| Subject * | subject_ = nullptr |
| bool | isInFormation_ = false |
| gdouble | anchorX_ = 0.0 |
| gdouble | anchorY_ = 0.0 |
| Observer | observer_ |
Additional Inherited Members | |
Protected Member Functions inherited from InteractionState | |
| virtual | ~InteractionState () |
| this is an interface | |
|
inline |
Definition at line 242 of file drag-relocate-controller.hpp.
|
private |
Definition at line 105 of file drag-relocate-controller.hpp.
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.
References Subject::exposeWidget(), DragRelocateController::maybeActivate(), ON_EXCEPTION_RETURN, and DragRelocateController::watchButton().
Here is the call graph for this function:
|
inlineprivatenoexcept |
Definition at line 128 of file drag-relocate-controller.hpp.
References DragRelocateController::buttonPressed_, DragRelocateController::doCompleteGesture(), DragRelocateController::isActive(), and DragRelocateController::resetState().
Referenced by DragRelocateController::linkTrigger().
Here is the call graph for this function:
Here is the caller graph for this function:Gesture detection state logic.
Definition at line 147 of file drag-relocate-controller.hpp.
References DragRelocateController::anchor(), DragRelocateController::buttonPressed_, DragRelocateController::doTrackGesture(), DragRelocateController::initGestureTracking(), DragRelocateController::isActive(), DragRelocateController::isAnchored(), and DragRelocateController::probeActivation().
Referenced by DragRelocateController::linkTrigger().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineprivate |
Definition at line 176 of file drag-relocate-controller.hpp.
References DragRelocateController::isInFormation_, and DragRelocateController::subject_.
Referenced by DragRelocateController::maybeActivate(), and DragRelocateController::watchButton().
Here is the caller graph for this function:
|
inlineprivate |
Definition at line 183 of file drag-relocate-controller.hpp.
References DragRelocateController::subject_.
Referenced by DragRelocateController::maybeActivate().
Here is the caller graph for this function:Definition at line 189 of file drag-relocate-controller.hpp.
References DragRelocateController::anchorX_, and DragRelocateController::anchorY_.
Referenced by DragRelocateController::maybeActivate().
Here is the caller graph for this function:
|
inlineprivate |
Definition at line 203 of file drag-relocate-controller.hpp.
References DragRelocateController::anchorX_, DragRelocateController::anchorY_, and DragRelocateController::isInFormation_.
Referenced by DragRelocateController::maybeActivate().
Here is the caller graph for this function:Definition at line 210 of file drag-relocate-controller.hpp.
References Subject::buildGestureObserver(), and DragRelocateController::observer_.
Referenced by DragRelocateController::maybeActivate().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineprivate |
Definition at line 216 of file drag-relocate-controller.hpp.
References DragRelocateController::anchorX_, and DragRelocateController::anchorY_.
Referenced by DragRelocateController::maybeActivate().
Here is the caller graph for this function:
|
inlineprivate |
Definition at line 226 of file drag-relocate-controller.hpp.
References DragRelocateController::observer_.
Referenced by DragRelocateController::watchButton().
Here is the caller graph for this function:
|
inlineprivate |
Definition at line 232 of file drag-relocate-controller.hpp.
References DragRelocateController::anchorX_, DragRelocateController::anchorY_, DragRelocateController::isInFormation_, DragRelocateController::observer_, InPlaceBuffer< BA, siz, DEFAULT >::reset(), and DragRelocateController::subject_.
Referenced by DragRelocateController::watchButton().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 99 of file drag-relocate-controller.hpp.
Referenced by DragRelocateController::maybeActivate(), and DragRelocateController::watchButton().
|
private |
Definition at line 100 of file drag-relocate-controller.hpp.
Referenced by DragRelocateController::isActive(), DragRelocateController::isAnchored(), and DragRelocateController::resetState().
|
private |
Definition at line 101 of file drag-relocate-controller.hpp.
Referenced by DragRelocateController::isActive(), DragRelocateController::probeActivation(), and DragRelocateController::resetState().
|
private |
Definition at line 102 of file drag-relocate-controller.hpp.
Referenced by DragRelocateController::anchor(), DragRelocateController::doTrackGesture(), DragRelocateController::probeActivation(), and DragRelocateController::resetState().
|
private |
Definition at line 103 of file drag-relocate-controller.hpp.
Referenced by DragRelocateController::anchor(), DragRelocateController::doTrackGesture(), DragRelocateController::probeActivation(), and DragRelocateController::resetState().
|
private |
Definition at line 107 of file drag-relocate-controller.hpp.
Referenced by DragRelocateController::doCompleteGesture(), DragRelocateController::initGestureTracking(), and DragRelocateController::resetState().
Inheritance diagram for DragRelocateController:
Collaboration diagram for DragRelocateController: