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) Lumiera.org
5  2017, Hermann Vosseler <Ichthyostega@web.de>
6 
7  This program is free software; you can redistribute it and/or
8  modify it under the terms of the GNU General Public License as
9  published by the Free Software Foundation; either version 2 of
10  the License, or (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program; if not, write to the Free Software
19  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 
21 * *****************************************************/
22 
23 
42 #include "stage/gtk-base.hpp"
49 #include "lib/depend.hpp"
50 #include "lib/symbol.hpp"
51 //#include "lib/util.hpp"
52 
53 //using util::cStr;
54 //using util::isnil;
55 using lib::Symbol;
56 //using stage::ctrl::PanelLocator;
57 //using stage::ctrl::WindowLocator;
59 
60 
61 namespace stage {
62  namespace error = lumiera::error;
63 
64 
65 
66  /* ==== definitions and concrete bindings for the View-Spec-DSL ==== */
67 
68  namespace idi { // Namespace for the actual ViewSpec DSL tokens
69 
70 
71  AllocSpec<uint> limitAllocation =[](UICoord target, uint limit)
72  {
73  lib::Depend<model::ElementAccess> rawElementAccessor;
74  return rawElementAccessor().locate_or_create (target, limit);
75  };
76 
77  }
78  namespace interact {
79 
80  const Symbol UIC_CURRENT_WINDOW{"currentWindow"};
81  const Symbol UIC_FIRST_WINDOW {"firstWindow"};
82  const Symbol UIC_ELIDED {"."};
83 
84 
85 
86 
87  ViewLocator::ViewLocator ()
88  : locResolver_{LocationQuery::service}
89  { }
90 
91  // dtors via smart-ptr invoked from here...
92  ViewLocator::~ViewLocator() { }
93 
94 
95 
96  /* === Service accessors within global context === */
97 
98  // PanelLocator&
99  // ViewLocator::panelLocator()
100  // {
101  // return windowLoc_.locatePanel();
102  // }
103 
104 
105 
106 
111 }}// 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:289
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:126
Marker types to indicate a literal string and a Symbol.
Lumiera GTK UI implementation root.
Definition: guifacade.cpp:46
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.