diff --git a/src/gui/interact/view-locator.hpp b/src/gui/interact/view-locator.hpp index 4b9627f32..762245bbf 100644 --- a/src/gui/interact/view-locator.hpp +++ b/src/gui/interact/view-locator.hpp @@ -44,9 +44,7 @@ ** a topological tree structure of relevant entities (windows, panels, views,...) -- which is basically the ** service provided by the Navigator; yet this Navigator service can be abstracted into the gui::interact::LocationQuery ** API, and this abstraction allows to keep all the intricacies of navigating concrete UI widgets confined within the - ** implementation of the Navigator service. To enable this usage pattern, there is an access functor, to be found at - ** gui::interact::locationQuery, which will be installed when the UI starts and disabled on shutdown. This functor - ** can be exchanged for the purpose of unit testing. + ** implementation of the Navigator service. ** ** @todo WIP 9/2017 early draft ////////////////////////////////////////////////////////////TICKET #1104 ** diff --git a/src/gui/interact/view-spec-dsl.hpp b/src/gui/interact/view-spec-dsl.hpp index ea8bf6e28..8fd225877 100644 --- a/src/gui/interact/view-spec-dsl.hpp +++ b/src/gui/interact/view-spec-dsl.hpp @@ -116,6 +116,16 @@ namespace interact { + /** + * Locator is a functor to resolve to a topological location in the UI-tree. + * It takes a _viewID_ as argument, which actually is more of a typeID to designate + * the kind of view or UI widget, which shall be attached at or retrieved from the + * location resolved through the LocationRule. The latter is essentially what is + * embedded within the Locator functor + */ + using Locator = std::function; + + /** * A specification to describe the desired location of a component view within the Lumiera UI. * ViewSpec is basically a set of [UI coordinates](\ref UICoord), with the additional possibility @@ -137,7 +147,8 @@ namespace interact { : ViewSpec{UICoord(std::move (coordinates))} { } - operator UICoord() + UICoord + operator() (Literal componentID) { UNIMPLEMENTED ("resolve a view spec to yield explicit UI coordinates"); } diff --git a/tests/gui/interact/view-spec-dsl-test.cpp b/tests/gui/interact/view-spec-dsl-test.cpp index d05f50f8c..c0b8fd29f 100644 --- a/tests/gui/interact/view-spec-dsl-test.cpp +++ b/tests/gui/interact/view-spec-dsl-test.cpp @@ -100,23 +100,23 @@ namespace test { cout << showSizeof(limitAllocation) < - + @@ -3539,10 +3539,31 @@ + - + + + + + + + + + + + + + + + + + + + + + @@ -10168,10 +10189,68 @@ - + + + + + + + + +

+ was ist der Locator? +

+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+ Anwendung delegiert an einen Serivce +

+ + +
- + @@ -10542,6 +10621,19 @@
+ + + + + + + + + + + + +
@@ -10552,7 +10644,8 @@
- + + @@ -10610,6 +10703,12 @@
+ + + + + + @@ -10645,6 +10744,94 @@ + + + + + + + + + + + + + + + + + + + + + + +

+ wer interpretiert +

+

+ UI-Koordinaten +

+ + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + +

+ um eine Position zu kennzeichnen +

+ + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + @@ -21133,7 +21320,7 @@ - +