106#ifndef STAGE_INTERACT_UI_COORD_RESOLVER_H
107#define STAGE_INTERACT_UI_COORD_RESOLVER_H
127 using std::unique_ptr;
333 or unConst(
this)->pathResolution()
383 or unConst(
this)->pathResolution()
424 return std::move (*
this);
449 for (
size_t pos = 0; pos <
res_.
depth; ++pos )
461 return std::move (*
this);
482 return std::move (*
this);
500 return std::move (*
this);
513 uic_ = partialExtensionSpec;
518 auto newContent = partialExtensionSpec.
begin();
519 size_t extensionPos = newContent? partialExtensionSpec.
indexOf(*newContent) : coverable;
520 if (coverable > extensionPos)
522 "would overwrite positions %d to %d (incl)"}
524 % partialExtensionSpec
528 for ( ; newContent; ++newContent, ++extensionPos )
535 return std::move (*
this);
553 return std::move (*
this);
559 operator string()
const {
return string(this->
uic_); }
Access point to singletons and other kinds of dependencies designated by type.
Iteration source interface to abstract a data source, which then can be accessed through IterAdapter ...
size_t indexOf(Literal const &content) const
reverse lookup of actual path content
Token or Atom with distinct identity.
Interface to discover a backing structure for the purpose of path navigation and resolution.
virtual Literal determineAnchor(UICoord const &path)=0
make the real anchor point explicit.
virtual ChildIter getChildren(UICoord const &path, size_t pos)=0
get the sequence of child components at a designated position in the actual UI
static lib::Depend< LocationQuery > service
access point to global LocationQuery service implementation
virtual size_t determineCoverage(UICoord const &path)=0
evaluate to what extent a UIcoord spec matches the actual UI
decltype(TreeStructureNavigator::buildIterator(0)) ChildIter
virtual ~LocationQuery()
this is an interface
Interface to locate and move within a tree shaped structure.
virtual TreeStructureNavigator * expandChildren() const =0
expand into exploration of child elements at "current position".
static auto buildIterator(TreeStructureNavigator *source)
build a Lumiera Forward Iterator as front-end and managing Handle for a TreeStructureNavigator or sub...
virtual ~TreeStructureNavigator()
this is an interface
Query and mutate UICoord specifications in relation to actual UI topology.
bool isCovered() const
this path is completely covered by the currently existing UI structure;
bool isCoveredTotally() const
synonymous to isCovered()
bool pathResolution()
Since UICoord path specifications may contain gaps and wildcards, we may attempt to fill in these mis...
UICoordResolver(UICoord const &uic, LocationQuery &queryAPI)
UICoordResolver && existentiallyQuantify(size_t pos)
mutate to turn a wildcard into existentially quantified.
bool isAnchored() const
is this path explicitly anchored at an existing window?
bool canAnchor() const
determine if a mutation is possible to anchor the path explicitly
UICoordResolver && cover()
mutate the path to get it totally covered
size_t coverDepth() const
UICoordResolver && anchor()
mutate the window part of the path such as to make the anchorage explicit, if possible
UICoordResolver && extend(UICoord const &partialExtensionSpec)
mutate the path and extend it with components at fixed positions
UICoordResolver && extend(Literal pathExtension)
mutate the path to extend it while keeping it partially covered
UICoordResolver(UICoord &&uic, LocationQuery &queryAPI)
bool canCover() const
determine if a mutation is possible to get the path (partially) covered.
bool isCoveredPartially() const
is this path at least partially covered? A covered path describes an access path through widgets actu...
UICoordResolver && coverPartially()
mutate the path by resolving all wildcards to achieve partial coverage
void attempt_trivialResolution()
establish a trivial anchorage and coverage, if possible.
unique_ptr< UICoord > covfefe
Builder && overwrite(size_t depth, Literal newSpec)
Builder && window(Literal windowID)
change UI coordinate spec to define it to be rooted within the given window
Builder && truncateTo(size_t depth)
possibly shorten this path specification to a limited depth
Builder && append(Literal elm)
augment UI coordinates by appending a further component at the end.
Describe a location within the UI through structural/topological coordinates.
bool isPresent(size_t idx) const
A front-end for using printf-style formatting.
Singleton services and Dependency Injection.
Lumiera error handling (C++ interface).
Building tree expanding and backtracking evaluations within hierarchical scopes.
Extension module to build an opaque data source, accessible as Lumiera Forward Iterator.
auto explore(IT &&srcSeq)
start building a IterExplorer by suitably wrapping the given iterable source.
LumieraError< LERR_(INVALID)> Invalid
const Symbol UIC_ELIDED
indicate that a component is elided or irrelevant here
Lumiera GTK UI implementation root.
bool contains(MAP &map, typename MAP::key_type const &key)
shortcut for containment test on a map
OBJ * unConst(const OBJ *)
shortcut to save some typing when having to define const and non-const variants of member functions
Marker types to indicate a literal string and a Symbol.
A topological addressing scheme to designate structural locations within the UI.
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...