70 #ifndef STAGE_INTERACT_UI_LOCATION_SOLVER_H 71 #define STAGE_INTERACT_UI_LOCATION_SOLVER_H 94 using LocationQueryAccess = std::function<LocationQuery&()>;
113 : pattern{move (locationPattern)}
114 , createParents{allowCreate}
117 : pattern{move (rr.pattern)}
118 , createParents{rr.createParents}
121 operator string()
const;
134 using Clauses = std::vector<LocationClause>;
142 this->append (move (firstRule));
145 : clauses_{move (rr.clauses_)}
152 clauses_.emplace_back (move (furtherRule));
158 iterator begin()
const {
return iterator{clauses_.begin(), clauses_.end()}; }
161 operator string()
const;
200 .append (move (secondRule));
206 ruleSet.append (move (furtherRule));
207 return move(ruleSet);
215 LocationClause::operator string()
const 217 return string{pattern}
218 + (createParents?
" create!":
"");
221 LocationRule::operator string()
const 224 + util::join(clauses_,
"\n\tOR ");
238 LocationQueryAccess getLocationQuery;
243 : getLocationQuery{accessor}
248 : getLocationQuery{[&]() ->
LocationQuery& {
return locationQueryService; }}
268 for (
auto& clause : rule)
272 if (depth+1 < clause.pattern.size()
273 or depth > clause.pattern.size())
278 preprocess (resolver, clause);
279 resolver.coverPartially();
281 if (not isnil(resolver)
282 and (clause.createParents
283 or resolver.isCoveredTotally()))
285 if (depth == clause.pattern.size())
288 resolver.append (elementTypeID);
289 return move (resolver);
293 if (clause.createParents and clause.pattern.isExplicit())
297 if (depth == clause.pattern.size())
298 return clause.pattern.append (elementTypeID);
300 return clause.pattern;
317 if (clause.createParents
318 and clause.pattern.isComplete())
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.
UICoordResolver && existentiallyQuantify(size_t pos)
mutate to turn a wildcard into existentially quantified. This means to assume (or require) that an el...
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.
inline string literal This is a marker type to indicate that
Mix-Ins to allow or prohibit various degrees of copying and cloning.
A single location specification to be matched and fulfilled.
Marker types to indicate a literal string and a Symbol.
Lumiera GTK UI implementation root.
A topological addressing scheme to designate structural locations within the UI.
Query and mutate UICoord specifications in relation to actual UI topology.
Interface to discover a backing structure for the purpose of path navigation and resolution.
Lumiera error handling (C++ interface).
A rule to determine some location by matching against the UI-tree.
Evaluation of UI coordinates against a concrete window topology.
Accessing a STL element range through a Lumiera forward iterator, An instance of this iterator adapte...
void preprocess(UICoordResolver &builder, LocationClause const &clause)
perform adjustments on the current pattern to support some very specific situations ...