74 using lib::test::showSizeof;
104 verify_standardUsage();
107 verify_genericInvocation();
112 verify_basicProperties()
114 UNIMPLEMENTED (
"basic properties of the view spec DSL");
119 verify_standardUsage()
123 Rec dummyUiStructure = MakeRec()
127 .
set(
"parentLocation", MakeRec())
136 uint allocCounter = 0;
141 if (allocCounter < limit)
142 return target.tab(++allocCounter);
144 return target.tab(limit);
152 UICoord targetLocation = locate(
"viewID");
153 UICoord realView1 = alloc(targetLocation);
154 CHECK (1 == allocCounter);
155 CHECK (
string{realView1} ==
"UI:win-1[perspective]-parentLocation.viewID.#1");
157 UICoord realView2 = alloc(targetLocation);
158 CHECK (2 == allocCounter);
159 CHECK (
string{realView2} ==
"UI:win-1[perspective]-parentLocation.viewID.#2");
160 CHECK (realView2 != realView1);
162 UICoord realView3 = alloc(targetLocation);
163 CHECK (3 == allocCounter);
164 CHECK (
string{realView3} ==
"UI:win-1[perspective]-parentLocation.viewID.#3");
166 UICoord realView3b = alloc(targetLocation);
167 CHECK (3 == allocCounter);
168 CHECK (realView3b == realView3);
173 verify_alternatives()
175 UNIMPLEMENTED (
"querying and selection of location alternatives");
199 Rec dummyUiStructure = MakeRec()
203 .
set(
"parentLocation", MakeRec())
215 fakeAccessor->existingPath =
UICoord{
"win-1",
"perspective",
"parentLocation"};
216 CHECK (not fakeAccessor->response);
220 cout <<
"created view:" << view1.getID() << endl;
221 CHECK (fakeAccessor->response);
222 CHECK (contains (view1.getID(),
"DummyView"));
std::function< UICoord(UICoord)> Allocator
Allocator is a functor to resolve a given, desired location of a view within the UI, resulting in creation or allocation of the view – which happens as side-effect. The result of this invocation are the UI coordinates of an existing or newly created view.
Test/Diagnostics: implementation of the LocationQuery-API based on a abstract topological structure g...
Access or allocate a UI component view.
Describe a location within the UI through structural/topological coordinates.
Service to determine the location of an UI component view.
Implementation of the stage::interact::LocationQuery interface to work on a GenNode tree...
Access and allocation of UI component views.
A framework for configuration of view access and allocation patterns.
Generic Component View descriptors.
Per type specific configuration of instances created as service dependencies.
A specification to describe the desired location of a component view within the Lumiera UI...
void verify_genericInvocation()
Interface: access UI elements by navigating the UI topology.
V & get()
Access and possibly create just some component view of the desired type.
Builder && panel(Literal panelID)
augment UI coordinates to indicate a specific view to be used
Simple test class runner.
Lumiera GTK UI implementation root.
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...
A topological addressing scheme to designate structural locations within the UI.
Mock implementation of the model::ElementAccess interface for testing without actual UI...
A collection of frequently used helper functions to support unit testing.
MOC & triggerCreate()
trigger lazy service object instantiation
Unit test helper for access to UI elements without actually running an UI.
object-like record of data.
static Builder currentWindow()
Builder: start definition of UI-Coordinates rooted in the currentWindow
Configuration handle for temporarily shadowing a dependency by a test mock instance.
LocatorSpec< UIC_VIEW > ViewSpec
A specification to describe the desired location of a component view within the Lumiera UI...
bool contains(SEQ const &cont, typename SEQ::const_reference val)
shortcut for brute-force containment test in any sequential container
A specification to describe the strategy for allocating (placing, retrieving) a component view...