Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
cmd-context.cpp
Go to the documentation of this file.
1/*
2 CmdContext - interface to access command context binding services within the UI
3
4 Copyright (C)
5 2017, 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
28//#include "lib/util.hpp"
29//#include "lib/symbol.hpp"
30#include "lib/depend.hpp"
31//#include "include/logging.h"
35#include "lib/format-string.hpp"
36
37//#include <string>
38//#include <map>
39
40//using std::map;
41//using std::string;
42
43//using util::contains;
44//using util::isnil;
45using util::_Fmt;
46
47namespace stage {
48namespace interact {
49 namespace error = lumiera::error;
50
51 namespace { // internal details
53
54 inline InteractionState&
56 {
57 if ( GESTURE_dragReolcate == ctxID)
58 return gestures().getStateFor (GestureState::DRAG, GestureState::ON_TIMELINE);
59 throw error::Config (_Fmt{"Unknown Context-ID '%s' encountered in Gesture wiring."}
60 % ctxID);
61 }
62 } // internal details
63
64
65
66 Subject::~Subject() { } // Emit VTable here...
67
69
70
71
78 {
79
80 return CmdContext {selectStateImplementation(ctxID), cmdID};
81 }
82
83
84 void
90
91
92
99 CmdContext::Resolver::operator LuidH ()
100 {
101 REQUIRE (this->spec > 0); //note we can access the spec embedded in the Resolver struct
102 UNIMPLEMENTED ("forward the resolution operation, probably to InteractionDirector or similar...");
103 }
104
105
108}} // namespace stage::interact
Access point to singletons and other kinds of dependencies designated by type.
Definition depend.hpp:281
Token or Atom with distinct identity.
Definition symbol.hpp:120
Hash implementation based on a lumiera unique object id (LUID) When invoking the default ctor,...
Builder to define a binding to relate some entity or place within the UI with a specific from of inte...
static CmdContext of(Symbol cmdID, Symbol ctxID)
global static service accessor function.
InteractionState & iState_
void setupRelocateDrag()
Terminal builder operation: establish the infrastructure for the already defined participants to be i...
virtual ~GestureObserver()
this is an interface
Abstract foundation for context dependent UI interactions.
virtual void linkTrigger(Subject &, Symbol cmdID)=0
Hook up a trigger signal to initiate a specific interaction gesture.
virtual ~Subject()
this is an interface
A front-end for using printf-style formatting.
Abstraction: support for binding command invocation into an UI context.
Singleton services and Dependency Injection.
Front-end for printf-style string template interpolation.
Sub-Service of the InteractionDirector: Hold and maintain InteractionState.
LumieraError< LERR_(CONFIG), Invalid > Config
Definition error.hpp:212
InteractionState & selectStateImplementation(Symbol ctxID)
Lumiera GTK UI implementation root.
Definition guifacade.cpp:37
const Symbol GESTURE_dragReolcate
Hard wired key constants and basic definitions for communication with the GUI.