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

#include "stage/interact/ui-location-solver.hpp"

Description

Service to determine the location of an UI component view.

See also
LocationRule
UILocationSolver_test::simple_usage_example()

Definition at line 226 of file ui-location-solver.hpp.

Public Member Functions

 UILocationSolver (LocationQueryAccess accessor)
 
 UILocationSolver (LocationQuery &locationQueryService)
 
UICoord solve (LocationRule const &rule, size_t depth, Literal elementTypeID)
 Solve for a location according to the given location rule. More...
 

Private Member Functions

void preprocess (UICoordResolver &builder, LocationClause const &clause)
 perform adjustments on the current pattern to support some very specific situations More...
 
- Private Member Functions inherited from NonCopyable
 NonCopyable (NonCopyable const &)=delete
 
NonCopyableoperator= (NonCopyable const &)=delete
 

Private Attributes

LocationQueryAccess getLocationQuery
 

Member Function Documentation

◆ solve()

UICoord solve ( LocationRule const &  rule,
size_t  depth,
Literal  elementTypeID 
)
inline

Solve for a location according to the given location rule.

Parameters
depthdesired kind of UI element (and thus the depth in the UI topology tree)
elementTypedesignator of the specific element to be created at that level
Returns
an explicit location, resolved against the current UI topology. May be empty
Remarks
the returned path is either empty (no solution exists), or it is "partially covered" by the existing UI; here, the "covered" part are the already existing UI elements, while the remaining, uncovered extension describes additional elements to be created. When the resolution process found an already existing UI element, the returned path is completely covered. The degree of coverage of a path can be found out with the help of a UICoordResolver, which also needs a LocationQuery (service) to discover the currently existing UI topology.

Definition at line 257 of file ui-location-solver.hpp.

◆ preprocess()

void preprocess ( UICoordResolver builder,
LocationClause const &  clause 
)
inlineprivate

perform adjustments on the current pattern to support some very specific situations

  • when we want to create a new panel (or re-use an existing of the same name), on top of an existing (but irrelevant) perspective, we mark this perspective as "just there". This allows to get a new path as solution, which is just covered up to and including that perspective; without special treatment, such a match would otherwise be rejected.

Definition at line 306 of file ui-location-solver.hpp.

References UICoordResolver::existentiallyQuantify().

+ Here is the call graph for this function:
+ Inheritance diagram for UILocationSolver:
+ Collaboration diagram for UILocationSolver:

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