diff --git a/src/gui/interact/interaction-director.cpp b/src/gui/interact/interaction-director.cpp index 750e35c4a..bba865b8b 100644 --- a/src/gui/interact/interaction-director.cpp +++ b/src/gui/interact/interaction-director.cpp @@ -35,6 +35,7 @@ #include "gui/interact/spot-locator.hpp" #include "gui/interact/navigator.hpp" #include "gui/interact/focus-tracker.hpp" +#include "gui/interact/ui-coord-resolver.hpp" #include "gui/dialog/preferences-dialog.hpp" #include "gui/dialog/render.hpp" #include "gui/workspace/workspace-window.hpp" @@ -85,7 +86,7 @@ namespace interact { , globalCtx_(globals) , viewLocator_{new ViewLocator{globals, [this]() -> LocationQuery& { return *navigator_; }}} , spotLocator_{new SpotLocator} - , navigator_{new Navigator{*spotLocator_, *viewLocator_}} + , navigator_{*spotLocator_, *viewLocator_} // Service exposed as Depend , tracker_{new FocusTracker{*navigator_}} , uiState_{new UiState{globals.uiBus_.getStateManager(), *tracker_}} , assets_{new AssetController{session::Root::getAssetID(), this->uiBus_}} diff --git a/src/gui/interact/interaction-director.hpp b/src/gui/interact/interaction-director.hpp index b75213dbf..952e1285c 100644 --- a/src/gui/interact/interaction-director.hpp +++ b/src/gui/interact/interaction-director.hpp @@ -55,6 +55,7 @@ //#include "gui/gtk-base.hpp" #include "gui/model/controller.hpp" +#include "lib/depend-inject.hpp" //#include //#include @@ -85,8 +86,10 @@ namespace interact { using std::unique_ptr; //class Actions; - class SpotLocator; + class LocationQuery; + class Navigator; + class SpotLocator; class FocusTracker; class ViewLocator; @@ -101,10 +104,14 @@ namespace interact { { ctrl::GlobalCtx& globalCtx_; + // == exposed to Depend on == + using Service_LocationQuery = lib::DependInject::ServiceInstance; + + // == global Services == unique_ptr viewLocator_; unique_ptr spotLocator_; - unique_ptr navigator_; + Service_LocationQuery navigator_; unique_ptr tracker_; // == Model globals == diff --git a/src/gui/interact/ui-location-solver.hpp b/src/gui/interact/ui-location-solver.hpp index a1f8c216c..98f9e41bf 100644 --- a/src/gui/interact/ui-location-solver.hpp +++ b/src/gui/interact/ui-location-solver.hpp @@ -21,7 +21,7 @@ */ -/** @file ui-location-resolver.hpp +/** @file ui-location-solver.hpp ** A solver to match incomplete coordinate specifications against the actual UI topology. ** Within the Lumiera UI, a _component view_ is typically _created or retrieved_ to live at some position ** within the tree-like topology of the interface. Such happens as a consequence of interaction or other @@ -58,7 +58,7 @@ ** As a minimum requirement, each LocationRule should be concluded with such a "catch-all" explicit ** create clause, which describes the standard location of the element in question. ** - ** @see UILocationResolver_test + ** @see UILocationSolver_test ** @see ViewSpecDSL_test ** @see UICoordResolver ** @see view-locator.hpp @@ -230,7 +230,7 @@ namespace interact { /** * Service to determine the location of an UI component view. * @see LocationRule - * @see UILocationResolver_test::simple_usage_example() + * @see UILocationSolver_test::simple_usage_example() */ class UILocationSolver : util::NonCopyable diff --git a/src/gui/interact/view-spec-dsl.hpp b/src/gui/interact/view-spec-dsl.hpp index 55978597f..413d95ac2 100644 --- a/src/gui/interact/view-spec-dsl.hpp +++ b/src/gui/interact/view-spec-dsl.hpp @@ -130,7 +130,7 @@ namespace interact { /** * 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 + * LocatorSpec is basically a set of [UI coordinates](\ref UICoord), with the additional possibility * of specifying several alternatives, with the intention to pick the first applicable one. * @tparam depth the level in the tree addressed by this locator * @remarks Locator is build from a DSL expression, which is basically a UICoord::Builder. @@ -232,7 +232,7 @@ namespace interact { "Additional parameters of the allocator function must match the AllocSpec template parameters"); - typedef Tuple ArgTuple; + using ArgTuple = Tuple; return [=](auto&&... args) -> Allocator { diff --git a/tests/gui/interact/ui-location-solver-test.cpp b/tests/gui/interact/ui-location-solver-test.cpp index da2841113..0e7ecab07 100644 --- a/tests/gui/interact/ui-location-solver-test.cpp +++ b/tests/gui/interact/ui-location-solver-test.cpp @@ -20,7 +20,7 @@ * *****************************************************/ -/** @file ui-location-resolver-test.cpp +/** @file ui-location-solver-test.cpp ** unit test \ref UILocationSolver_test */ @@ -75,7 +75,7 @@ namespace test { } - /** @test demonstrate the typical invocation and usage" */ + /** @test demonstrate the typical invocation and usage */ void simple_usage_example() { diff --git a/wiki/thinkPad.ichthyo.mm b/wiki/thinkPad.ichthyo.mm index 738aa9ba0..f86052263 100644 --- a/wiki/thinkPad.ichthyo.mm +++ b/wiki/thinkPad.ichthyo.mm @@ -10416,6 +10416,15 @@ + + + + + + + + + @@ -10423,6 +10432,11 @@ + + + + + @@ -28563,8 +28577,7 @@ explizit eine Template-Instaniierung triggern, und zwar für

- - +
@@ -28680,8 +28693,7 @@ Problem ist nun, diese umgeleiteten Funktionsdefinitionen können nur einen Typ (Template-Parameter) bekommen, und dieser Typ wiederum muß -- zumindest als abstrakter Platzhalter -- in allen TU sichtbar sein.

- - +
@@ -28737,8 +28749,7 @@ Allerdings erscheint es mir nicht sinnvoll, hier mit Tricksereien zu arbeiten!

- - +
@@ -28772,8 +28783,7 @@ da nur wenige Variable erstetzt werden müßten.

- - +