61#ifndef STAGE_INTERACT_UI_LOCATION_SOLVER_H
62#define STAGE_INTERACT_UI_LOCATION_SOLVER_H
104 :
pattern{move (locationPattern)}
112 operator string()
const;
133 this->
append (move (firstRule));
143 clauses_.emplace_back (move (furtherRule));
152 operator string()
const;
191 .
append (move (secondRule));
194 inline LocationRule&&
197 ruleSet.
append (move (furtherRule));
198 return move(ruleSet);
206 LocationClause::operator string()
const
208 return string{pattern}
209 + (createParents?
" create!":
"");
212 LocationRule::operator string()
const
234 : getLocationQuery{accessor}
239 : getLocationQuery{[&]() ->
LocationQuery& {
return locationQueryService; }}
259 for (
auto& clause : rule)
263 if (depth+1 < clause.pattern.size()
264 or depth > clause.pattern.size())
269 preprocess (resolver, clause);
270 resolver.coverPartially();
272 if (not isnil(resolver)
273 and (clause.createParents
274 or resolver.isCoveredTotally()))
276 if (depth == clause.pattern.size())
279 resolver.append (elementTypeID);
280 return move (resolver);
284 if (clause.createParents and clause.pattern.isExplicit())
288 if (depth == clause.pattern.size())
289 return clause.pattern.append (elementTypeID);
291 return clause.pattern;
Accessing a STL element range through a Lumiera forward iterator, An instance of this iterator adapte...
Interface to discover a backing structure for the purpose of path navigation and resolution.
A rule to determine some location by matching against the UI-tree.
lib::RangeIter< Clauses::const_iterator > iterator
LocationRule && append(LocationClause &&furtherRule)
LocationRule(LocationClause &&firstRule)
LocationRule(LocationRule &&rr)
std::vector< LocationClause > Clauses
Query and mutate UICoord specifications in relation to actual UI topology.
UICoordResolver && existentiallyQuantify(size_t pos)
mutate to turn a wildcard into existentially quantified.
LocationClause create()
interprets the current (inline) builder contents as create clause, which has the meaning "create a ne...
Describe a location within the UI through structural/topological coordinates.
Service to determine the location of an UI component view.
UILocationSolver(LocationQuery &locationQueryService)
LocationQueryAccess getLocationQuery
void preprocess(UICoordResolver &builder, LocationClause const &clause)
perform adjustments on the current pattern to support some very specific situations
UILocationSolver(LocationQueryAccess accessor)
UICoord solve(LocationRule const &rule, size_t depth, Literal elementTypeID)
Solve for a location according to the given location rule.
Any copy and copy construction prohibited.
Lumiera error handling (C++ interface).
std::function< LocationQuery &()> LocationQueryAccess
Lumiera GTK UI implementation root.
string join(COLL &&coll, string const &delim=", ")
enumerate a collection's contents, separated by delimiter.
Mix-Ins to allow or prohibit various degrees of copying and cloning.
A single location specification to be matched and fulfilled.
LocationClause(LocationClause &&rr)
LocationClause(UICoord &&locationPattern, bool allowCreate=false)
Marker types to indicate a literal string and a Symbol.
Evaluation of UI coordinates against a concrete window topology.
A topological addressing scheme to designate structural locations within the UI.