65 using lib::test::showSizeof;
95 verify_standardUsage();
98 verify_genericInvocation();
103 verify_basicProperties()
105 UNIMPLEMENTED (
"basic properties of the view spec DSL");
110 verify_standardUsage()
114 Rec dummyUiStructure = MakeRec()
118 .
set(
"parentLocation", MakeRec())
127 uint allocCounter = 0;
132 if (allocCounter < limit)
133 return target.tab(++allocCounter);
135 return target.tab(limit);
143 UICoord targetLocation = locate(
"viewID");
144 UICoord realView1 = alloc(targetLocation);
145 CHECK (1 == allocCounter);
146 CHECK (
string{realView1} ==
"UI:win-1[perspective]-parentLocation.viewID.#1");
148 UICoord realView2 = alloc(targetLocation);
149 CHECK (2 == allocCounter);
150 CHECK (
string{realView2} ==
"UI:win-1[perspective]-parentLocation.viewID.#2");
151 CHECK (realView2 != realView1);
153 UICoord realView3 = alloc(targetLocation);
154 CHECK (3 == allocCounter);
155 CHECK (
string{realView3} ==
"UI:win-1[perspective]-parentLocation.viewID.#3");
157 UICoord realView3b = alloc(targetLocation);
158 CHECK (3 == allocCounter);
159 CHECK (realView3b == realView3);
164 verify_alternatives()
166 UNIMPLEMENTED (
"querying and selection of location alternatives");
190 Rec dummyUiStructure = MakeRec()
194 .
set(
"parentLocation", MakeRec())
206 fakeAccessor->existingPath =
UICoord{
"win-1",
"perspective",
"parentLocation"};
207 CHECK (not fakeAccessor->response);
211 cout <<
"created view:" << view1.getID() << endl;
212 CHECK (fakeAccessor->response);
213 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
Simplistic 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...