Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
gesture-state.cpp
Go to the documentation of this file.
1/*
2 GestureState - holder for interaction-state dedicated to specific gestures
3
4 Copyright (C)
5 2021, Hermann Vosseler <Ichthyostega@web.de>
6
7  **Lumiera** is free software; you can redistribute it and/or modify it
8  under the terms of the GNU General Public License as published by the
9  Free Software Foundation; either version 2 of the License, or (at your
10  option) any later version. See the file COPYING for further details.
11
12* *****************************************************************/
13
14
31#include "stage/gtk-base.hpp"
34#include "lib/format-string.hpp"
35//#include "lib/symbol.hpp"
36//#include "lib/util.hpp"
37
38//#include <string>
39//#include <map>
40using util::_Fmt;
41
42//using std::map;
43//using std::string;
44
45//using util::contains;
46//using util::isnil;
47
48namespace stage {
49namespace interact {
50
51 namespace error = lumiera::error;
52
53 namespace { // internal details
54
55 } // internal details
56
57
58
59 GestureState::~GestureState() { } // emit dtors of managed objects here....
60
62 : dragRelocate_{new DragRelocateController{}}
63 { }
64
65
66
67
68
77 {
78 if (DRAG==action and ON_TIMELINE==qualifier)
79 return *dragRelocate_;
80 else
81 throw error::State (_Fmt{"Unforeseen interaction state in Lumiera UI requested. "
82 "GestureState::getStateFor... Action=%d Scope=%d"}
83 % action
84 % qualifier);
85 }
86
87
88}} // namespace stage::interact
Gesture controller for dragging objects within the Timeline display.
InteractionState & getStateFor(Action action, Scope qualifier)
Decode the classification of the kind of interaction and gesture, and thus translate to a concrete In...
unique_ptr< DragRelocateController > dragRelocate_
Abstract foundation for context dependent UI interactions.
A front-end for using printf-style formatting.
Concrete implementation of a dragging gesture to relocate an UI entity.
Front-end for printf-style string template interpolation.
Sub-Service of the InteractionDirector: Hold and maintain InteractionState.
A set of basic GTK includes for the UI.
LumieraError< LERR_(STATE)> State
Definition error.hpp:209
Lumiera GTK UI implementation root.
Definition guifacade.cpp:37