Lumiera  0.pre.03
»edit your freedom«
view-locator.cpp
Go to the documentation of this file.
1 /*
2  ViewLocator - access and allocation of UI component views
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 
33 #include "stage/gtk-base.hpp"
40 #include "lib/depend.hpp"
41 #include "lib/symbol.hpp"
42 //#include "lib/util.hpp"
43 
44 //using util::cStr;
45 //using util::isnil;
46 using lib::Symbol;
47 //using stage::ctrl::PanelLocator;
48 //using stage::ctrl::WindowLocator;
50 
51 
52 namespace stage {
53  namespace error = lumiera::error;
54 
55 
56 
57  /* ==== definitions and concrete bindings for the View-Spec-DSL ==== */
58 
59  namespace idi { // Namespace for the actual ViewSpec DSL tokens
60 
61 
62  AllocSpec<uint> limitAllocation =[](UICoord target, uint limit)
63  {
64  lib::Depend<model::ElementAccess> rawElementAccessor;
65  return rawElementAccessor().locate_or_create (target, limit);
66  };
67 
68  }
69  namespace interact {
70 
71  const Symbol UIC_CURRENT_WINDOW{"currentWindow"};
72  const Symbol UIC_FIRST_WINDOW {"firstWindow"};
73  const Symbol UIC_ELIDED {"."};
74 
75 
76 
77 
78  ViewLocator::ViewLocator ()
79  : locResolver_{LocationQuery::service}
80  { }
81 
82  // dtors via smart-ptr invoked from here...
83  ViewLocator::~ViewLocator() { }
84 
85 
86 
87  /* === Service accessors within global context === */
88 
89  // PanelLocator&
90  // ViewLocator::panelLocator()
91  // {
92  // return windowLoc_.locatePanel();
93  // }
94 
95 
96 
97 
102 }}// namespace stage::interact
Access and allocation of UI component views.
A framework for configuration of view access and allocation patterns.
Access point to singletons and other kinds of dependencies designated by type.
Definition: depend.hpp:280
Interface: access UI elements by navigating the UI topology.
Interface to discover and access raw UI elements in a cross cutting way.
const Symbol UIC_ELIDED
indicate that a component is elided or irrelevant here
Token or Atom with distinct identity.
Definition: symbol.hpp:117
Marker types to indicate a literal string and a Symbol.
Lumiera GTK UI implementation root.
Definition: guifacade.cpp:37
const Symbol UIC_CURRENT_WINDOW
window spec to refer to the current window
Access and query front-end to locate, access and place docking panels.
A solver to match incomplete coordinate specifications against the actual UI topology.
Singleton services and Dependency Injection.
Evaluation of UI coordinates against a concrete window topology.
const Symbol UIC_FIRST_WINDOW
window spec to refer to the first window of the application
A set of basic GTK includes for the UI.