61 #ifndef STAGE_INTERACT_UI_LOCATION_SOLVER_H 62 #define STAGE_INTERACT_UI_LOCATION_SOLVER_H 85 using LocationQueryAccess = std::function<LocationQuery&()>;
104 : pattern{move (locationPattern)}
105 , createParents{allowCreate}
108 : pattern{move (rr.pattern)}
109 , createParents{rr.createParents}
112 operator string()
const;
125 using Clauses = std::vector<LocationClause>;
133 this->append (move (firstRule));
136 : clauses_{move (rr.clauses_)}
143 clauses_.emplace_back (move (furtherRule));
149 iterator begin()
const {
return iterator{clauses_.begin(), clauses_.end()}; }
152 operator string()
const;
191 .append (move (secondRule));
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 215 + util::join(clauses_,
"\n\tOR ");
229 LocationQueryAccess getLocationQuery;
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;
308 if (clause.createParents
309 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 ...