Lumiera  0.pre.03
»edit your freedom«
Navigator Class Reference

#include "stage/interact/navigator.hpp"

Description

Global cross-cutting navigation within user interface space.

Todo:
initial draft as of 2/2017 – actual implementation has to be filled in
See also
UiCoordResolver

Definition at line 67 of file navigator.hpp.

Public Member Functions

 Navigator (SpotLocator &, ViewLocator &)
 
Literal determineAnchor (UICoord const &path) override final
 make the real anchor point explicit. More...
 
size_t determineCoverage (UICoord const &path) override final
 evaluate to what extent a UIcoord spec matches the actual UI More...
 
ChildIter getChildren (UICoord const &path, size_t pos) override final
 get the sequence of child components at a designated position in the actual UI More...
 
- Public Member Functions inherited from LocationQuery
virtual ~LocationQuery ()
 this is an interface
 

Private Attributes

SpotLocatorspotLocator_
 
ViewLocatorviewLocator_
 

Additional Inherited Members

- Public Types inherited from LocationQuery
using ChildIter = decltype(TreeStructureNavigator::buildIterator(0))
 
- Static Public Attributes inherited from LocationQuery
static lib::Depend< LocationQueryservice
 access point to global LocationQuery service implementation More...
 
- Private Member Functions inherited from NonCopyable
 NonCopyable (NonCopyable const &)=delete
 
NonCopyableoperator= (NonCopyable const &)=delete
 

Member Function Documentation

◆ determineAnchor()

Literal determineAnchor ( UICoord const &  path)
finaloverridevirtual

make the real anchor point explicit.

Parameters
pathan explicit UICoord spec to be anchored in the actual UI
Returns
explicit literal window name, where the path can be anchored Symbol::BOTTOM in case the given path can not be anchored currently.
Remarks
here "to anchor" means to match and thus "attach" the starting point of the UIcoord path, i.e. the window spec, with an actual top-level window existing in the current UI configuration and state. This operation either confirms existence of a window given by explicit ID, or it supplies the current meaning of the meta specs currentWindow and firstWindow, again in the form of an explicit window name

Implements LocationQuery.

Definition at line 65 of file navigator.cpp.

◆ determineCoverage()

size_t determineCoverage ( UICoord const &  path)
finaloverridevirtual

evaluate to what extent a UIcoord spec matches the actual UI

Returns
the depth to which the given spec is _"covered"_ by the actual UI. Can be zero, in which case the given coordinates can not be resolved and addressed within the currently existing windows, panes and views.
Remarks
a depth > 0 also implies that the path can be anchored.
Note
this operation does not perform any resolution or interpolation of wildcards, it just matches explicit UI component names.
See also
UICoordResolver for a facility to perform such a resolution and to navigate paths.

Implements LocationQuery.

Definition at line 72 of file navigator.cpp.

◆ getChildren()

LocationQuery::ChildIter getChildren ( UICoord const &  path,
size_t  pos 
)
finaloverridevirtual

get the sequence of child components at a designated position in the actual UI

Parameters
pathan explicit UIcoord spec, expected to be anchored and at least partially covered within the current configuration and state of the UI
posdepth where the given path shall be evaluated, starting with 0 at window level
Returns
an iterator to enumerate all child components actually existing in the current UI below the location designated by path and pos.
Remarks
the path is only evaluated up to (not including) the given depth. Especially when pos == 0, then the path is not evaluated and matched at all, rather just the current list of top-level windows is returned.
Exceptions
error::Statewhen navigating the given path touches a non-existing element

Implements LocationQuery.

Definition at line 79 of file navigator.cpp.

+ Inheritance diagram for Navigator:
+ Collaboration diagram for Navigator:

The documentation for this class was generated from the following files: