diff --git a/src/gui/interact/ui-coord.hpp b/src/gui/interact/ui-coord.hpp index 5d4d3018c..d313ca876 100644 --- a/src/gui/interact/ui-coord.hpp +++ b/src/gui/interact/ui-coord.hpp @@ -122,9 +122,9 @@ namespace interact { }; - extern Symbol UIC_CURRENT_WINDOW; ///< window spec to refer to the _current window_ @see view-locator.cpp - extern Symbol UIC_FIRST_WINDOW; ///< window spec to refer to the _first window_ of the application - extern Symbol UIC_ELIDED; ///< indicate that a component is elided or irrelevant here + extern const Symbol UIC_CURRENT_WINDOW; ///< window spec to refer to the _current window_ @see view-locator.cpp + extern const Symbol UIC_FIRST_WINDOW; ///< window spec to refer to the _first window_ of the application + extern const Symbol UIC_ELIDED; ///< indicate that a component is elided or irrelevant here diff --git a/src/gui/interact/view-locator.cpp b/src/gui/interact/view-locator.cpp index a2e85425b..414a183ae 100644 --- a/src/gui/interact/view-locator.cpp +++ b/src/gui/interact/view-locator.cpp @@ -63,9 +63,9 @@ namespace interact { /* ==== definitions and concrete bindings for the View-Spec-DSL ==== */ - Symbol UIC_CURRENT_WINDOW{"currentWindow"}; - Symbol UIC_FIRST_WINDOW {"firstWindow"}; - Symbol UIC_ELIDED {"."}; + const Symbol UIC_CURRENT_WINDOW{"currentWindow"}; + const Symbol UIC_FIRST_WINDOW {"firstWindow"}; + const Symbol UIC_ELIDED {"."}; diff --git a/tests/gui/interact/ui-coord-resolver-test.cpp b/tests/gui/interact/ui-coord-resolver-test.cpp index 235132727..852b314d1 100644 --- a/tests/gui/interact/ui-coord-resolver-test.cpp +++ b/tests/gui/interact/ui-coord-resolver-test.cpp @@ -429,6 +429,14 @@ namespace test { CHECK ("UI:currentWindow[*]-panelZ.*.tab" == string(r34)); CHECK ("UI:window-3[persp-C]-panelZ.thirdView.tab" == string(r34.cover())); // Note: rest of the path would also match on window-1, but currentWindow == window-3 + UICoordResolver r35 {UICoord::currentWindow().persp(UIC_ELIDED).panel("panelZ").tab("tab"), tree}; + CHECK ("UI:currentWindow[.]-panelZ.*.tab" == string(r35)); + CHECK ("UI:window-3[persp-C]-panelZ.thirdView.tab" == string(r35.cover())); // elided (existentially quantified) element interpolated similar to a wildcard + + UICoordResolver r36 {UICoord::currentWindow().panel(UIC_ELIDED).view("nonexisting"), tree}; + CHECK ("UI:currentWindow[*]-..nonexisting" == string(r36)); + CHECK ("UI:window-3[persp-C]-panelZ" == string(r36.cover())); // ...but elided counts as existing element and matches arbitrarily (-> contrast this to r44) + /* === trailing wildcards stripped automatically === */ UICoordResolver r41 {UICoord::window("window-2").append("*/*"), tree}; @@ -543,6 +551,19 @@ namespace test { UICoordResolver r4 {UICoord::currentWindow().tab(3).path("sub"), tree}; r4.coverPartially(); CHECK (isnil (r4)); + + /* === existentially quantified (elided) element constitutes partial coverage === */ + UICoordResolver r5 {UICoord::currentWindow().persp(UIC_ELIDED).panel("fantasy").view("fantomas"), tree}; + CHECK ("UI:currentWindow[.]-fantasy.fantomas" == string(r5)); + CHECK (1 == r5.coverDepth()); + r5.coverPartially(); + CHECK (not r5.isCovered()); + CHECK (2 == r5.coverDepth()); // Note side-effect of computing the coverage... + CHECK (r5.isCoveredPartially()); // it is known to be covered including "the" perspective + CHECK ("UI:window-2[persp-B]-fantasy.fantomas" == string(r5)); + r5.cover(); + CHECK ("UI:window-2[persp-B]" == string(r5)); + CHECK (2 == r5.coverDepth()); } diff --git a/wiki/thinkPad.ichthyo.mm b/wiki/thinkPad.ichthyo.mm index 3ffd294be..b27441f73 100644 --- a/wiki/thinkPad.ichthyo.mm +++ b/wiki/thinkPad.ichthyo.mm @@ -8538,7 +8538,7 @@ - + @@ -8550,8 +8550,9 @@ + - + @@ -8870,12 +8871,30 @@ - + - + + - - + + + + + + +

+ realer Pfad endet mit elided nach Wildcard +

+ +
+ + + + + + + +
@@ -8907,20 +8926,6 @@ - - - - - - -

- realer Pfad endet mit elided nach Wildcard -

- - -
- -