65 using lib::test::showSizeof;
105 UNIMPLEMENTED (
"basic properties of the view spec DSL");
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);
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"));
Configuration handle for temporarily shadowing a dependency by a test mock instance.
MOC & triggerCreate()
trigger lazy service object instantiation
Mutator && set(string const &key, X &&content)
object-like record of data.
A specification to describe the strategy for allocating (placing, retrieving) a component view.
Test/Diagnostics: implementation of the LocationQuery-API based on a abstract topological structure g...
Builder && panel(Literal panelID)
augment UI coordinates to indicate a specific view to be used
Describe a location within the UI through structural/topological coordinates.
Builder tab(Literal tabID) const
static Builder currentWindow()
Builder: start definition of UI-Coordinates rooted in the currentWindow
Service to determine the location of an UI component view.
Access or allocate a UI component view.
V & get()
Access and possibly create just some component view of the desired type.
void verify_basicProperties()
void verify_alternatives()
void verify_standardUsage()
void verify_genericInvocation()
Interface: access UI elements by navigating the UI topology.
Mock implementation of the model::ElementAccess interface for testing without actual UI.
Per type specific configuration of instances created as service dependencies.
Implementation of the stage::interact::LocationQuery interface to work on a GenNode tree.
AllocSpec< uint > limitAllocation
Generic Component View descriptors.
LocatorSpec< UIC_VIEW > ViewSpec
A specification to describe the desired location of a component view within the Lumiera UI.
std::function< UICoord(UICoord)> Allocator
Allocator is a functor to resolve a given, desired location of a view within the UI.
Lumiera GTK UI implementation root.
Test runner and basic definitions for tests.
bool contains(MAP &map, typename MAP::key_type const &key)
shortcut for containment test on a map
Simplistic test class runner.
#define LAUNCHER(_TEST_CLASS_, _GROUPS_)
Unit test helper for access to UI elements without actually running an UI.
A collection of frequently used helper functions to support unit testing.
A topological addressing scheme to designate structural locations within the UI.
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...
Access and allocation of UI component views.
A framework for configuration of view access and allocation patterns.