diff --git a/src/gui/interact/ui-coord-resolver.hpp b/src/gui/interact/ui-coord-resolver.hpp
index 570da619c..ae8daee5e 100644
--- a/src/gui/interact/ui-coord-resolver.hpp
+++ b/src/gui/interact/ui-coord-resolver.hpp
@@ -420,7 +420,7 @@ namespace interact {
}
- /** mutate the path to resolve all wildcards to achieve partial coverage
+ /** mutate the path by resolving all wildcards to achieve partial coverage
* - anchorage and all wildcards will be resolved against current UI
* - but an extraneous, uncovered, explicit suffix is retained
* @note if the coordinate spec can not be (partially) covered at all,
@@ -429,7 +429,31 @@ namespace interact {
UICoordResolver&&
coverPartially()
{
- UNIMPLEMENTED ("mutate to partial coverage, retaining extension");
+ if (isCoveredPartially() and not res_.covfefe)
+ {
+ ASSERT (res_.anchor);
+ window (res_.anchor); // just ensure the anchor info is explicit,
+ } // the rest is already in place and explicit
+ else if (canCover())
+ {
+ ASSERT (res_.isResolved);
+ REQUIRE (res_.covfefe);
+ REQUIRE (uic_.size() >= res_.covfefe->size());
+ res_.depth = res_.covfefe->size();
+ // possibly overwrite placeholders by explicitly resolved info...
+ for (size_t pos = 0; pos < res_.depth; ++pos )
+ overwrite (pos, (*res_.covfefe)[pos]);
+ res_.covfefe.reset();
+ }
+ else
+ {
+ ASSERT (res_.isResolved);
+ REQUIRE (res_.depth == 0);
+ REQUIRE (not res_.covfefe);
+ truncateTo (0);
+ }
+ ENSURE (empty() or (isCoveredPartially() and uic_.isExplicit()));
+ return std::move (*this); // no wildcards remain
}
diff --git a/tests/gui/interact/ui-coord-resolver-test.cpp b/tests/gui/interact/ui-coord-resolver-test.cpp
index 8d8aa5c36..235132727 100644
--- a/tests/gui/interact/ui-coord-resolver-test.cpp
+++ b/tests/gui/interact/ui-coord-resolver-test.cpp
@@ -486,16 +486,17 @@ namespace test {
/** @test resolve by matching, but retain an extraneous, uncovered extension.
- * This is a variation of the UICoordResolver::cover() operation, which resolves any
- * wildcards, while tolerating some additional elements behind the covered part,
- * as long as those are explicit. The typical use case is when we're about to
- * create a new UI element at a specific existing anchor location within the UI.
+ * This is a variation of the UICoordResolver::cover() operation, which likewise resolves
+ * any wildcards; but here we tolerate _additional elements below_ the covered part, as long
+ * as those are explicit. The typical use case is when we're about to create a new UI element
+ * at a specific existing anchor location within the UI. The extraneous uncovered part then
+ * describes those extra element yet to be created.
*/
void
verify_mutateCoverPartially()
{
GenNodeLocationQuery tree{MakeRec()
- .set("window-1"
+ .set("window-2"
, MakeRec()
.type("persp-B")
.set("panelY"
@@ -510,13 +511,16 @@ namespace test {
};
/* === explicitly given spec partially covered === */
- UICoordResolver r1 {UICoord{"window-1","persp-B","panelY","otherView","tab"}, tree};
+ UICoordResolver r1 {UICoord{"window-2","persp-B","panelY","otherView","tab"}, tree};
CHECK (3 == r1.coverDepth());
r1.coverPartially();
CHECK (not r1.isCovered());
CHECK (3 == r1.coverDepth());
- CHECK (r1.isCoveredPartially());
+ CHECK (r1.isCoveredPartially()); // is covered down to the "panelY"
CHECK ("UI:window-2[persp-B]-panelY.otherView.tab" == string(r1));
+ r1.cover();
+ CHECK (r1.isCovered()); // cover() retains the covered part only
+ CHECK ("UI:window-2[persp-B]-panelY" == string(r1));
/* === fill wildcard gap but retain uncovered extension === */
UICoordResolver r2 {UICoord::currentWindow().view("someView").tab(3).path("sub"), tree};
@@ -530,8 +534,8 @@ namespace test {
CHECK ("UI:window-2[persp-B]-panelY.someView" == string(r2));
/* === reject when gap can not be closed unambiguously === */
- UICoordResolver r3 {UICoord::currentWindow().view("otherView").tab(3).path("sub"), tree};
- CHECK (not r3.canCover());
+ UICoordResolver r3 {UICoord::currentWindow().view("someView").path("sub"), tree};
+ CHECK (not r3.canCover()); // NOTE: second gap here, tab info missing
r3.coverPartially();
CHECK (isnil (r3));
@@ -543,6 +547,7 @@ namespace test {
+
/** @test mutate given UI coordinates by anchoring them.
* This operation changes only the window part of the coordinate spec;
* it might use the result of a preceding coverage solution search or even
diff --git a/wiki/thinkPad.ichthyo.mm b/wiki/thinkPad.ichthyo.mm
index d13202e46..715c6687b 100644
--- a/wiki/thinkPad.ichthyo.mm
+++ b/wiki/thinkPad.ichthyo.mm
@@ -8938,20 +8938,20 @@
-
+
-
-
-
+
+
+
-
-
+
+
-
-
+
+
-
-
+
+
@@ -8989,18 +8989,18 @@
-
+
-
-
+
+
-
+
-
-
+
+
-
-
+
+
@@ -9900,13 +9900,13 @@
-
-
-
-
+
+
+
+
-
-
+
+
@@ -9919,18 +9919,18 @@
-
-
-
-
+
+
+
+
-
-
+
+
-
-
+
+
@@ -9950,19 +9950,56 @@
-
+
-
+
-
+
+
+
-
+
+
+
+
+
+
+
+ Komponente falls nötig anhängen
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ...das würde bedeuten, daß man sogar ein neues Hauptfenster erzeugt.
+
+
+ Also in diesem Fall würde überhaupt nichts mit dem existierenden UI matchen...
+