diff --git a/src/gui/interact/gen-node-location-query.hpp b/src/gui/interact/gen-node-location-query.hpp index 1ad2fb78a..b01acec98 100644 --- a/src/gui/interact/gen-node-location-query.hpp +++ b/src/gui/interact/gen-node-location-query.hpp @@ -179,17 +179,42 @@ namespace interact { return lib::transform (node.keys(), internedString); } + static Rec const& drillDown (Rec const& tree, UICoord const& path, size_t maxDepth, size_t& depth) { if (depth(), path, maxDepth, ++depth); + if (hasNode(tree, pathElm, depth)) + { + ++depth; + return drillDown (descendInto(tree,pathElm,depth), path, maxDepth, depth); + } } return tree; } + + /** does the guiding tree contain the element as requested by the UICoord path? + * @remark this function abstracts a special asymmetry of the tree representation: + * at `level==UIC_PERSP` (level 2), the perspective info is packed into the type + * meta attribute. This was done on purpose, to verify our design is able to + * handle such implementation intricacies, which we expect to encounter + * when navigating the widgets of a real-world UI toolkit set + */ + static bool + hasNode (Rec const& tree, const char* pathElm, size_t depth) + { + return depth==UIC_PERSP? pathElm == tree.getType() + : tree.hasAttribute(pathElm); + } + + static Rec const& + descendInto (Rec const& tree, const char* pathElm, size_t depth) + { + return depth==UIC_PERSP? tree // perspective info is attached as type at the parent node + : tree.get(pathElm).data.get(); + } }; diff --git a/src/gui/interact/ui-coord-resolver.hpp b/src/gui/interact/ui-coord-resolver.hpp index 20fcfe969..3ec89c2e0 100644 --- a/src/gui/interact/ui-coord-resolver.hpp +++ b/src/gui/interact/ui-coord-resolver.hpp @@ -105,7 +105,7 @@ namespace interact { /** evaluate to what extent a UIcoord spec matches the actual UI - * @return the depth to which the given spec is _"covered"_ by the actual UI + * @return the depth to which the given spec is _"covered"_ by the actual UI. * Can be zero, in which case the given coordinates can not be resolved * and addressed within the currently existing windows, panes and views. * @note this operation does not perform any _resolution_ or interpolation of wildcards, diff --git a/wiki/thinkPad.ichthyo.mm b/wiki/thinkPad.ichthyo.mm index 469a5ef6a..f1db8a75f 100644 --- a/wiki/thinkPad.ichthyo.mm +++ b/wiki/thinkPad.ichthyo.mm @@ -4577,7 +4577,7 @@ - + @@ -4617,7 +4617,74 @@ - + + + + + + +

+ Spezialbehandlung +

+

+ Perspektive +

+ + +
+ + + + + + + +

+ ...um zu prüfen, ob das allgemeine Design +

+

+ mit solchen Asymetrien umgehen kann, +

+

+ welche ziemlich sicher noch viel mehr +

+

+ bei der Navigation in einem realen GUI auftreten +

+ + +
+
+ + + + + + + + + + + + + + + + + + +

+ ...und ich hab mir letzte Woche noch solche Vorwürfe gemacht, +

+

+ daß ich mich wieder mal "akademisch" verspielt habe.... :-P +

+ + +
+ +
+