Lumiera  0.pre.03
»edit your freedom«
ElementAccess Class Referenceabstract

#include "stage/model/element-access.hpp"

Description

Interface: access UI elements by navigating the UI topology.

See also
stage::interact::Navigator
ElementAccess_test

Definition at line 86 of file element-access.hpp.

Public Member Functions

virtual ~ElementAccess ()
 this is an interface
 
template<class TAR >
lib::Result< TAR & > access (UICoord const &destination)
 Navigate the UI topology to access the designated component. More...
 
UICoord locate_or_create (UICoord const &destination, size_t limitCreation=LUMIERA_MAX_ORDINAL_NUMBER)
 Navigate to the designated component, possibly create the element and parents. More...
 

Classes

struct  TypeConverter
 

Protected Types

using RawResult = lib::Variant< Types< model::Tangible *, Gtk::Widget * > >
 

Protected Member Functions

virtual RawResult performAccessTo (UICoord::Builder &, size_t limitCreation)=0
 

Additional Inherited Members

- Private Member Functions inherited from NonCopyable
 NonCopyable (NonCopyable const &)=delete
 
NonCopyableoperator= (NonCopyable const &)=delete
 

Member Function Documentation

◆ access()

lib::Result< TAR & > access ( UICoord const &  destination)
inline

Navigate the UI topology to access the designated component.

Template Parameters
TARtype of result element expected at the designated location
Returns
suitably converted direct (language) reference to the desired element wrapped as result proxy
Note
when access was not possible because either the element does not exist, or is not convertible to the desired target type, the result proxy is empty and convertible to bool(false)

Definition at line 172 of file element-access.hpp.

◆ locate_or_create()

UICoord locate_or_create ( UICoord const &  destination,
size_t  limitCreation = LUMIERA_MAX_ORDINAL_NUMBER 
)
inline

Navigate to the designated component, possibly create the element and parents.

Parameters
limitCreationlimit on the number of similar UI elements that can be created within a scope. A value of zero prohibits creating of new elements.
Returns
location of the actual element to use, as UI-coordinates.
Note
when access was not possible because the element could not been created, the indicated location returned is an empty coordinate spec.

Definition at line 190 of file element-access.hpp.

◆ performAccessTo()

virtual RawResult performAccessTo ( UICoord::Builder ,
size_t  limitCreation 
)
protectedpure virtual

drill down according to coordinates, maybe create element

Implemented in TestElementAccess, and ElemAccessDir.

+ Inheritance diagram for ElementAccess:
+ Collaboration diagram for ElementAccess:

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