From fd3777de54641cc313a9d55da8b65db6e458133b Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Sat, 21 Oct 2017 23:47:27 +0200 Subject: [PATCH] Navigator: draft the trivial resolution case ...based on the abstract LocationQuery interface --- src/gui/interact/ui-coord-resolver.hpp | 12 ++++++++++-- src/gui/interact/ui-coord.hpp | 8 ++++---- wiki/thinkPad.ichthyo.mm | 17 +++++++++++++++++ 3 files changed, 31 insertions(+), 6 deletions(-) diff --git a/src/gui/interact/ui-coord-resolver.hpp b/src/gui/interact/ui-coord-resolver.hpp index 7e94f55ff..20fcfe969 100644 --- a/src/gui/interact/ui-coord-resolver.hpp +++ b/src/gui/interact/ui-coord-resolver.hpp @@ -138,7 +138,7 @@ namespace interact { const char* anchor = nullptr; size_t depth = 0; std::unique_ptr covfefe; - bool isComplete = false; + bool isResolved = false; }; struct ResolutionState @@ -229,10 +229,18 @@ namespace interact { private: + /** establish a trivial anchorage and coverage, if possible. + * @note when the UICoord contains wildcards or is incomplete, + * a full resolution with backtracking is necessary to + * determine anchorage and coverage + */ void attempt_trivialResolution() { - UNIMPLEMENTED ("if possible, establish a trivial anchorage and coverage right away"); + if (not uic_.isExplicit()) return; + res_.anchor = query_.determineAnchor (this->uic_); + res_.depth = query_.determineCoverage(this->uic_); + res_.isResolved = true; } /** @internal algorithm to resolve this UICoord path against the actual UI topology */ diff --git a/src/gui/interact/ui-coord.hpp b/src/gui/interact/ui-coord.hpp index 19b75dbb7..8f2816d76 100644 --- a/src/gui/interact/ui-coord.hpp +++ b/src/gui/interact/ui-coord.hpp @@ -466,12 +466,9 @@ namespace interact { class UICoord::Builder { + protected: UICoord uic_; - /** builder instances created by UICoord */ - friend class UICoord; - - protected: template explicit Builder (ARGS&& ...args) : uic_{std::forward (args)...} { } @@ -482,6 +479,9 @@ namespace interact { Builder& operator= (Builder const&) = delete; Builder& operator= (Builder &&) = delete; + /** builder instances created by UICoord */ + friend class UICoord; + public: /** @remark moving a builder instance is acceptable */ Builder (Builder &&) = default; diff --git a/wiki/thinkPad.ichthyo.mm b/wiki/thinkPad.ichthyo.mm index 636bfe717..cf26fba4e 100644 --- a/wiki/thinkPad.ichthyo.mm +++ b/wiki/thinkPad.ichthyo.mm @@ -4480,6 +4480,23 @@ + + + + + + + + + +

+ Zweck ist vor allem, meta-Specs wie firstWindow, currentWindow aufzulösen +

+ + +
+
+