Lumiera
0.pre.03
»edit your freedom«
|
#include "stage/interact/ui-coord.hpp"
Describe a location within the UI through structural/topological coordinates.
A UICoord specification is a sequence of Literal tokens, elaborating a path descending through the hierarchy of UI elements down to the specific UI element to refer.
Definition at line 138 of file ui-coord.hpp.
Public Member Functions | |
template<typename... ARGS> | |
UICoord (ARGS &&...args) | |
UI-Coordinates can be created explicitly by specifying a sequence of Literal tokens, which will be used to initialise and then normalise the underlying PathArray. More... | |
UICoord (UICoord &&)=default | |
UICoord (UICoord const &)=default | |
UICoord (UICoord &o) | |
UICoord (Builder &&builder) | |
shortcut to allow init from builder expression More... | |
Builder | append (Literal elmID) const |
string | getComp () const |
Literal | getPanel () const |
string | getPath () const |
Literal | getPersp () const |
Literal | getTab () const |
Literal | getView () const |
Literal | getWindow () const |
bool | isComplete () const |
bool | isExplicit () const |
bool | isExtendedBelow (UICoord const &parent) const |
Check if this coordinate spec can be seen as an extension of the given parent coordinates and thus reaches further down towards specific UI elements in comparison to the parent path This constitutes a partial order, since some paths might just be totally unrelated to each other and thus not comparable. More... | |
bool | isIncomplete () const |
bool | isPresent (size_t idx) const |
bool | isWildcard (size_t idx) const |
Builder | noTab () const |
operator string () const | |
UICoord & | operator= (UICoord const &)=default |
UICoord & | operator= (UICoord &&)=default |
Builder | panel (Literal panelID) const |
Builder | path (Literal pathDefinition) const |
convenience builder function so set a full path definition More... | |
iterator | pathSeq () const |
iterative access to the path sequence section | |
Builder | persp (Literal perspectiveID) const |
Builder | prepend (Literal elmID) const |
Builder | rebuild () const |
Builder | tab (Literal tabID) const |
Builder | tab (uint tabIdx) const |
Builder | view (Literal viewID) const |
Public Member Functions inherited from PathArray< UIC_INLINE_SIZE > | |
PathArray (ARGS &&...args) | |
PathArray (PathArray &&)=default | |
PathArray (PathArray const &)=default | |
PathArray (PathArray &o) | |
iterator | begin () const |
bool | empty () const |
iterator | end () const |
size_t | indexOf (Literal const &content) const |
reverse lookup of actual path content More... | |
size_t | leafLevel () const |
operator string () const | |
joins nonempty content, separated by slash | |
PathArray & | operator= (PathArray const &)=default |
PathArray & | operator= (PathArray &&)=default |
Literal const & | operator[] (size_t idx) const |
Array style indexed access. More... | |
size_t | size () const |
Static Public Member Functions | |
static Builder | currentWindow () |
Builder: start definition of UI-Coordinates rooted in the currentWindow More... | |
static Builder | firstWindow () |
Builder: start definition of UI-Coordinates rooted in the firstWindow | |
static Builder | window (Literal windowID) |
Builder: start definition of UI-Coordinates rooted in given window. More... | |
Classes | |
class | Builder |
Friends | |
class | Builder |
bool | operator!= (UICoord const &l, UICoord const &r) |
bool | operator< (UICoord const &l, UICoord const &r) |
bool | operator<= (UICoord const &l, UICoord const &r) |
bool | operator== (UICoord const &l, UICoord const &r) |
bool | operator> (UICoord const &l, UICoord const &r) |
bool | operator>= (UICoord const &l, UICoord const &r) |
Private Member Functions | |
Literal | accesComponent (UIPathElm idx) const |
size_t | findStartIdx () const |
void | setComponent (size_t idx, Literal newContent) |
void | setTailSequence (size_t idx, Literal newContent) |
replace / overwrite existing content starting at given index. More... | |
void | setTailSequence (size_t idx, std::vector< Literal > &pathElms) |
replace the existing path information with the given elements More... | |
Additional Inherited Members | |
Public Types inherited from PathArray< UIC_INLINE_SIZE > | |
using | const_iterator = lib::IterAdapter< Literal const *, PathArray const *> |
using | const_reference = Literal const & |
using | iterator = const_iterator |
using | reference = Literal & |
using | value_type = Literal |
Protected Member Functions inherited from PathArray< UIC_INLINE_SIZE > | |
Literal * | expandPosition (size_t idx) |
Literal * | getPosition (size_t idx) |
void | normalise () |
establish the contract of PathArray More... | |
void | setContent (Literal *pos, const char *val) |
void | truncateTo (size_t newSize) |
|
inlineexplicit |
UI-Coordinates can be created explicitly by specifying a sequence of Literal tokens, which will be used to initialise and then normalise the underlying PathArray.
Definition at line 154 of file ui-coord.hpp.
References UICoord::currentWindow(), UICoord::firstWindow(), UICoord::path(), UICoord::persp(), and UICoord::window().
shortcut to allow init from builder expression
Definition at line 667 of file ui-coord.hpp.
|
inlinestatic |
Builder: start definition of UI-Coordinates rooted in the currentWindow
Definition at line 678 of file ui-coord.hpp.
References UICoord::window().
Referenced by UICoord::UICoord().
|
inlinestatic |
Builder: start definition of UI-Coordinates rooted in given window.
Definition at line 691 of file ui-coord.hpp.
Referenced by UICoord::currentWindow(), UICoord::firstWindow(), and UICoord::UICoord().
|
inline |
Definition at line 704 of file ui-coord.hpp.
References UICoord::Builder.
Referenced by UICoord::UICoord().
|
inline |
convenience builder function so set a full path definition
Definition at line 745 of file ui-coord.hpp.
References UICoord::Builder.
Referenced by UICoord::UICoord().
|
inline |
Definition at line 215 of file ui-coord.hpp.
Referenced by UICoord::Builder::prepend().
|
inline |
Definition at line 234 of file ui-coord.hpp.
|
inline |
Check if this coordinate spec can be seen as an extension of the given parent coordinates and thus reaches further down towards specific UI elements in comparison to the parent path This constitutes a partial order, since some paths might just be totally unrelated to each other and thus not comparable.
Definition at line 271 of file ui-coord.hpp.
|
inlineprivate |
replace / overwrite existing content starting at given index.
idx | where to start adding content; storage will be expanded to accommodate |
newContent | either a single element, or several elements delimited by `'/' @note - a path sequence will be split at '/'` and the components interned
|
Definition at line 423 of file ui-coord.hpp.
Referenced by UICoord::Builder::path().
|
inlineprivate |
replace the existing path information with the given elements
idx
will be cleared Definition at line 463 of file ui-coord.hpp.
References PathArray< UIC_INLINE_SIZE >::expandPosition(), PathArray< UIC_INLINE_SIZE >::PathArray(), and PathArray< UIC_INLINE_SIZE >::setContent().
|
friend |
Definition at line 391 of file ui-coord.hpp.
Referenced by UICoord::path(), and UICoord::persp().