67 PathArray::truncateTo(currDepth_);
72 setAt (
size_t depth,
Literal newSpec)
74 Literal* storage = PathArray::expandPosition (depth);
75 PathArray::setContent (storage, newSpec);
82 find_wildcardFree_suffix (
UICoord const& uic)
84 size_t pos = uic.size();
85 for ( ; 0 < pos; --pos)
87 Literal const& elm = uic[pos-1];
88 if (elm == Symbol::ANY or elm == Symbol::EMPTY)
123 return patt == Symbol::ANY
124 or patt == Symbol::EMPTY
126 or (isAnchored() and curr == res_.anchor and depth == UIC_WINDOW);
131 PathManipulator coverage;
132 const size_t coordDepth = this->uic_.size();
133 const size_t minSolutionDepth = find_wildcardFree_suffix (uic_);
135 auto searchAlgo = query_.getChildren (uic_, 0)
137 .filter ([&](
auto&
iter)
139 size_t depth =
iter.depth();
140 if (depth >= coordDepth)
145 wildMatch(patt,curr,depth))
147 coverage.setAt (depth,curr);
148 iter.expandChildren();
155 if (
iter.depth() < minSolutionDepth)
157 if (
iter.depth()+1 <= maxDepth)
159 maxDepth = 1 +
iter.depth();
162 .transform ([&](
auto&) ->
UICoord const&
164 return coverage.retrieveResult();
168 res_.isResolved =
true;
171 if (isnil (searchAlgo))
176 if (not res_.covfefe)
177 res_.covfefe.reset (
new UICoord {*searchAlgo});
179 *res_.covfefe = *searchAlgo;
183 ENSURE (res_.covfefe and res_.covfefe->size() >= 1);
184 res_.anchor = res_.covfefe->getWindow();
188 res_.depth = query_.determineCoverage(uic_);
189 if (res_.depth == 0 and res_.anchor)
193 return res_.covfefe->size() == uic_.size();
Describe a location within the UI through structural/topological coordinates.
bool filter(Placement< DummyMO > const &candidate)
a filter predicate to pick some objects from a resultset.
inline string literal This is a marker type to indicate that
Access point to singletons and other kinds of dependencies designated by type.
const Symbol UIC_ELIDED
indicate that a component is elided or irrelevant here
Token or Atom with distinct identity.
Lumiera GTK UI implementation root.
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...
Special UI-Coordinate builder to define the solution path step by step while we recurse down into the...
static lib::Depend< LocationQuery > service
access point to global LocationQuery service implementation
Evaluation of UI coordinates against a concrete window topology.
virtual ~TreeStructureNavigator()
this is an interface
virtual ~LocationQuery()
this is an interface
bool pathResolution()
Since UICoord path specifications may contain gaps and wildcards, we may attempt to fill in these mis...