Lumiera  0.pre.03
»edit your freedom«
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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>
40 using util::_Fmt;
41 
42 //using std::map;
43 //using std::string;
44 
45 //using util::contains;
46 //using util::isnil;
47 
48 namespace stage {
49 namespace 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 
61  GestureState::GestureState()
62  : dragRelocate_{new DragRelocateController{}}
63  { }
64 
65 
66 
67 
68 
76  GestureState::getStateFor (Action action, Scope qualifier)
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
InteractionState & getStateFor(Action action, Scope qualifier)
Decode the classification of the kind of interaction and gesture, and thus translate to a concrete In...
Sub-Service of the InteractionDirector: Hold and maintain InteractionState.
Front-end for printf-style string template interpolation.
A front-end for using printf-style formatting.
Abstract foundation for context dependent UI interactions.
Derived specific exceptions within Lumiera&#39;s exception hierarchy.
Definition: error.hpp:190
Lumiera GTK UI implementation root.
Definition: guifacade.cpp:37
Gesture controller for dragging objects within the Timeline display.
A set of basic GTK includes for the UI.
Concrete implementation of a dragging gesture to relocate an UI entity.