84 Rec dummyUiStructure = MakeRec()
88 .
set(
"exclusivePanel", MakeRec())
103 CHECK (isnil (solver.solve (rule, UIC_VIEW,
"worldview")));
107 rule.append(
UICoord().panel(
"exclusivePanel"));
110 UICoord location = solver.solve (rule, UIC_VIEW,
"worldview");
111 CHECK (not isnil (location));
114 CHECK (
"UI:window-1[perspective]-exclusivePanel.worldview" ==
string(location));
119 CHECK (resolver.isCoveredPartially());
120 CHECK (not resolver.isCoveredTotally());
121 CHECK (UIC_VIEW == resolver.coverDepth());
152 .
set (
"up", MakeRec())
159 .
set (
"sink", MakeRec())
173 CHECK (isnil (solver.solve (r1, UIC_PATH,
"to/salvation")));
174 CHECK (isnil (solver.solve (r1, UIC_WINDOW,
"redemption")));
177 r1.append (
UICoord().path(
"down/to").create());
178 auto s1 = solver.solve(r1, UIC_PATH+2,
"hell");
179 CHECK (
"UI:win[A]-thePanel.theView.#5/down/to/hell" ==
string{s1});
184 CHECK ( isnil (solver.solve (r2, UIC_PATH+3,
"sink")));
187 CHECK ( isnil (solver.solve (r2, UIC_VIEW,
"theView")));
189 CHECK (not isnil (solver.solve (r2, UIC_PATH+1,
"any")));
190 CHECK (not isnil (solver.solve (r2, UIC_PATH+2,
"kitchen")));
196 CHECK (
"UI:win" ==
string{solver.solve (r31, UIC_WINDOW,
"wigwam")});
200 CHECK (
"UI:win" ==
string{solver.solve (r32, UIC_WINDOW,
"wigwam")});
204 CHECK (isnil (solver.solve (r33, UIC_WINDOW,
"wigwam")));
208 CHECK (
"UI:win" ==
string{solver.solve (r34, UIC_WINDOW,
"wigwam")});
212 CHECK (
"UI:windux" ==
string{solver.solve (r35, UIC_WINDOW,
"wigwam")});
217 CHECK (
"UI:win[A]" ==
string{solver.solve (r41, UIC_PERSP,
"x")});
218 CHECK (
"UI:win[A]-x" ==
string{solver.solve (r41, UIC_PANEL,
"x")});
222 CHECK (
"UI:win[A]" ==
string{solver.solve (r42, UIC_PERSP,
"x")});
223 CHECK (
"UI:win[A]-x" ==
string{solver.solve (r42, UIC_PANEL,
"x")});
227 CHECK (isnil (solver.solve (r43, UIC_PERSP,
"x")));
228 CHECK (isnil (solver.solve (r43, UIC_PANEL,
"x")));
232 CHECK (
"UI:win[Ω]" ==
string{solver.solve (r44, UIC_PERSP,
"x")});
233 CHECK (
"UI:win[Ω]-x" ==
string{solver.solve (r44, UIC_PANEL,
"x")});
237 LocationRule r51{
UICoord(
"firstWindow",
"A",
"thePanel",
"theView",
"#5",
"down",
"the",
"kitchen")};
238 CHECK (
"UI:win[A]-thePanel.theView.#5/down/the/kitchen" ==
string{solver.solve (r51, UIC_PATH+2,
"drain")});
239 CHECK (
"UI:win[A]-thePanel.theView.#5/down/the/kitchen/drain" ==
string{solver.solve (r51, UIC_PATH+3,
"drain")});
243 CHECK (
"UI:win[A]-thePanel.theView.#5/down/the/kitchen" ==
string{solver.solve (r52, UIC_PATH+2,
"drain")});
244 CHECK (
"UI:win[A]-thePanel.theView.#5/down/the/kitchen/drain" ==
string{solver.solve (r52, UIC_PATH+3,
"drain")});
248 CHECK (isnil (solver.solve (r53, UIC_PATH+2,
"drain")));
249 CHECK (isnil (solver.solve (r53, UIC_PATH+3,
"drain")));
253 CHECK (
"UI:win[A]-thePanel.theView.#5/down/the/drain" ==
string{solver.solve (r54, UIC_PATH+2,
"drain")});
254 CHECK (
"UI:win[A]-thePanel.theView.#5/down/the/drain/drain" ==
string{solver.solve (r54, UIC_PATH+3,
"drain")});
257 LocationRule r55{
UICoord(
"rearWindow",
"A",
"thePanel",
"theView",
"#5",
"down",
"the",
"kitchen")};
258 CHECK (isnil (solver.solve (r55, UIC_PATH+2,
"floor")));
259 CHECK (isnil (solver.solve (r55, UIC_PATH+3,
"floor")));
263 CHECK (
"UI:rearWindow[A]-thePanel.theView.#5/down/the/kitchen" ==
string{solver.solve (r56, UIC_PATH+2,
"floor")});
264 CHECK (
"UI:rearWindow[A]-thePanel.theView.#5/down/the/kitchen/floor" ==
string{solver.solve (r56, UIC_PATH+3,
"floor")});
269 CHECK (
"UI:win[A]-thePanel.theView.#5/down/the/kitchen" ==
string{solver.solve (r61, UIC_PATH+2,
"drain")});
272 CHECK (
"UI:win[A]-thePanel.theView.#5/down/the/kitchen/drain" ==
string{solver.solve (r61, UIC_PATH+3,
"drain")});
276 CHECK (
"UI:win[A]-thePanel.theView.#5/down/the/kitchen" ==
string{solver.solve (r62, UIC_PATH+2,
"window")});
279 CHECK (
"UI:win[A]-thePanel.theView.#5/down/the/kitchen/window" ==
string{solver.solve (r62, UIC_PATH+3,
"window")});
283 CHECK (isnil (solver.solve (r63, UIC_PATH+2,
"kitchen")));
287 CHECK (
"UI:win[A]-thePanel.theView.#5/down/the/road" ==
string{solver.solve (r64, UIC_PATH+2,
"drain")});
291 CHECK (isnil (solver.solve (r65, UIC_PATH+2,
"kitchen")));
295 CHECK (isnil (solver.solve (r66, UIC_PATH+2,
"kitchen")));
301 CHECK (
"UI:win[A]-thePanel.theView.#5/down/time" ==
string{solver.solve (r71, UIC_PATH+1,
"time")});
306 CHECK (
"UI:win[A]-thePanel.theView.#5/down/time" ==
string{solver.solve (r72, UIC_PATH+1,
"time")});
310 r73.append (
UICoord().path(
"down/"));
311 CHECK (
"UI:win[A]-thePanel.theView.#5/up/link" ==
string{solver.solve (r73, UIC_PATH+1,
"time")});
315 r74.append (
UICoord().path(
"down/"));
316 CHECK (
"UI:win[A]-thePanel.theView.#5/down/time" ==
string{solver.solve (r74, UIC_PATH+1,
"time")});
321 CHECK (
"UI:win[A]-thePanel.theView.#5/up/time" ==
string{solver.solve (r75, UIC_PATH+1,
"time")});
326 CHECK (
"UI:win[A]-thePanel.theView.#5/down/link" ==
string{solver.solve (r76, UIC_PATH+1,
"time")});
331 CHECK (isnil (solver.solve (r77, UIC_PATH+1,
"time")));
333 CHECK (
string{r77} ==
"=~ .. UI:?/up/link" 334 "\n OR UI:?/town/link create!");
352 std::unique_ptr<GenNodeLocationQuery> query;
365 location.
append (
UICoord().panel(
"asset").view(
"asset").create());
369 cout << location << endl;
377 .
set (
"viewer", MakeRec()));
378 CHECK (
"UI:win[edit]-viewer.video" ==
string{solver.solve (location, UIC_VIEW,
"video")});
385 .
set (
"viewer", MakeRec()))
389 .
set (
"viewer", MakeRec()));
390 CHECK (
"UI:woe[gloomy]-viewer.video" ==
string{solver.solve (location, UIC_VIEW,
"video")});
397 .
set (
"viewer", MakeRec()))
401 .
set (
"timeline", MakeRec()));
402 CHECK (
"UI:win[murky]-viewer.video" ==
string{solver.solve (location, UIC_VIEW,
"video")});
411 .
set(
"timeline", MakeRec()))
417 .
set (
"asset", MakeRec())
419 CHECK (
"UI:woe[asset]-panel.asset" ==
string{solver.solve (location, UIC_VIEW,
"video")});
423 // uiTree = MakeRec() 453 .
set (
"asset", MakeRec())
455 auto solution = solver.solve (location, UIC_TAB,
"video");
456 CHECK (
"UI:win[shady]-asset.asset.video" ==
string{solution});
465 .
set(
"timeline", MakeRec()))
469 solution = solver.solve (location, UIC_VIEW,
"video");
470 CHECK (
"UI:woe[shoddy]-viewer.video" ==
string{solution});
475 solution = solver.solve (location, UIC_TAB,
"engine");
476 CHECK (
"UI:meta[config]-infobox.inspect.engine" ==
string{solution});
LocationClause create()
interprets the current (inline) builder contents as create clause, which has the meaning "create a ne...
Test/Diagnostics: implementation of the LocationQuery-API based on a abstract topological structure g...
Describe a location within the UI through structural/topological coordinates.
Service to determine the location of an UI component view.
Builder persp(Literal perspectiveID) const
Implementation of the stage::interact::LocationQuery interface to work on a GenNode tree...
Builder path(Literal pathDefinition) const
convenience builder function so set a full path definition
Builder && persp(Literal perspectiveID)
augment UI coordinates to mandate a specific perspective to be active within the window ...
void simple_usage_example()
void verify_cornerCases()
Builder && append(Literal elm)
augment UI coordinates by appending a further component at the end.
const Symbol UIC_ELIDED
indicate that a component is elided or irrelevant here
Builder && panel(Literal panelID)
augment UI coordinates to indicate a specific view to be used
Simple test class runner.
Lumiera GTK UI implementation root.
A topological addressing scheme to designate structural locations within the UI.
Query and mutate UICoord specifications in relation to actual UI topology.
A collection of frequently used helper functions to support unit testing.
A solver to match incomplete coordinate specifications against the actual UI topology.
A rule to determine some location by matching against the UI-tree.
static Builder window(Literal windowID)
Builder: start definition of UI-Coordinates rooted in given window.
object-like record of data.
static Builder firstWindow()
Builder: start definition of UI-Coordinates rooted in the firstWindow
static Builder currentWindow()
Builder: start definition of UI-Coordinates rooted in the currentWindow
void verify_standardSituations()