52#ifndef STAGE_INTERACT_GEN_NODE_LOCATION_QUERY_H
53#define STAGE_INTERACT_GEN_NODE_LOCATION_QUERY_H
98 :
tree_(
std::forward<REC>(backingStructure))
114 if (not
tree_.hasAttribute(
string{path.getWindow()}))
137 "element %s at pos %d in path %s is in "
138 "contradiction to actual UI structure"}
172 if (depth<maxDepth and path.
isPresent(depth))
175 if (
hasNode (tree, pathElm, depth))
194 return depth==
UIC_PERSP? pathElm == tree.getType()
195 : tree.hasAttribute(pathElm);
203 : tree.get(pathElm).data.get<Rec>();
218 auto internedString = [](
string const& id) ->
Literal
223 :
buildNavigator (node, depth, transformIterator (node.keys(), internedString));
260 Pos pos = PAR::firstResult();
268 PAR::nextResult (pos);
277 : PAR{forward<IT> (rawChildIter)}
Token or Atom with distinct identity.
Standard implementation of the IterSource interface: a wrapped "Lumiera Forward Iterator".
object-like record of data.
Helper to navigate a tree topology represented as GenNode tree.
virtual Pos firstResult() override
GenNodeNavigator(Rec const &node, size_t depth, IT &&rawChildIter)
virtual TreeStructureNavigator * expandChildren() const override
virtual void nextResult(Pos &pos) override
Test/Diagnostics: implementation of the LocationQuery-API based on a abstract topological structure g...
virtual Literal determineAnchor(UICoord const &path) override
resolve Anchor against GenNode tree
GenNodeLocationQuery(REC &&backingStructure)
static bool hasNode(Rec const &tree, CStr pathElm, size_t depth)
does the guiding tree contain the element as requested by the UICoord path?
Literal resolveElm(UICoord const &path, size_t depth)
static TreeStructureNavigator * childNavigator(Rec const &node, size_t depth)
virtual size_t determineCoverage(UICoord const &path) override
evaluate to what extent a UIcoord spec matches the structure given as GenNode tree
Rec const & drillDown(Rec const &tree, UICoord const &path, size_t maxDepth, size_t &depth)
Literal getCurrentWindow()
static TreeStructureNavigator * buildNavigator(Rec const &node, size_t depth, IT &&rawIterator)
type rebinding helper to pick up the concrete child iterator type IT
static Rec const & descendInto(Rec const &tree, size_t depth, CStr pathElm)
within tree at level depth descend into the child element designated by pathElm
virtual ChildIter getChildren(UICoord const &path, size_t pos) override
get the sequence of child IDs at a designated position in the backing GenNode tree
Interface to discover a backing structure for the purpose of path navigation and resolution.
decltype(TreeStructureNavigator::buildIterator(0)) ChildIter
Interface to locate and move within a tree shaped structure.
static auto buildIterator(TreeStructureNavigator *source)
build a Lumiera Forward Iterator as front-end and managing Handle for a TreeStructureNavigator or sub...
Describe a location within the UI through structural/topological coordinates.
Literal getWindow() const
bool isPresent(size_t idx) const
A front-end for using printf-style formatting.
Lumiera error handling (C++ interface).
Generic building block for tree shaped (meta)data structures.
Building tree expanding and backtracking evaluations within hierarchical scopes.
Extension module to build an opaque data source, accessible as Lumiera Forward Iterator.
IT::value_type pull_last(IT iter)
LumieraError< LERR_(STATE)> State
const Symbol UIC_FIRST_WINDOW
window spec to refer to the first window of the application
const Symbol UIC_CURRENT_WINDOW
window spec to refer to the current window
Lumiera GTK UI implementation root.
bool isnil(lib::time::Duration const &dur)
Marker types to indicate a literal string and a Symbol.
Evaluation of UI coordinates against a concrete window topology.
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...