Lumiera
0.pre.03
»edit your freedom«
|
Go to the source code of this file.
A framework for configuration of view access and allocation patterns.
Component views are building blocks of the Lumiera UI, and may, depending on their type, be instantiated or allocated according to specific rules and patterns. And these might vary in accordance to the desired working style. To give a typical example, at times it might be mandatory to use a single, external output for all kind of media playback, while other users prefer the classical editing application layout with two media viewers side by side. And yet another working style would be to use a stack of media viewers allocated on demand in MRU-fashion.
To specify those standard behaviour patterns, we provide a small internal DSL to spell out the default configuration in a (hopefully) self explanatory way.
Within this context, Allocation means...
The global access point to component views is the ViewLocator within InteractionDirector, which exposes a generic access- and management API to
Access to component views typically happens through the ViewLocator provided by the InteractionDirector. The implementation of view access in turn redirects access through the configured patterns.
Actually, the definitions and tokens used within the configuration DSL are implemented as functors. At implementation level, the basic specification tokens are bound to the corresponding operations within ViewLocator and PanelLocator. Thus, the "value" retrieved from the configuration is actually a functor, which provides the desired behaviour pattern
Definition in file view-spec-dsl.hpp.
#include "lib/error.hpp"
#include "lib/symbol.hpp"
#include "lib/depend.hpp"
#include "lib/meta/function.hpp"
#include "lib/meta/tuple-helper.hpp"
#include "lib/meta/function-closure.hpp"
#include "stage/interact/ui-location-solver.hpp"
#include "stage/interact/ui-coord.hpp"
#include <functional>
#include <utility>
#include <string>
Classes | |
class | AllocSpec< ARGS > |
A specification to describe the strategy for allocating (placing, retrieving) a component view. More... | |
struct | Descriptor< V > |
Generic Component View descriptors. More... | |
class | LocatorSpec< depth > |
A specification to describe the desired location of a component view within the Lumiera UI. More... | |
Typedefs | |
using | Allocator = std::function< UICoord(UICoord)> |
Allocator is a functor to resolve a given, desired location of a view within the UI, resulting in creation or allocation of the view – which happens as side-effect. The result of this invocation are the UI coordinates of an existing or newly created view. | |
using | Locator = std::function< UICoord(Literal)> |
Locator is a functor to resolve to a topological location in the UI-tree. More... | |
using | ViewSpec = LocatorSpec< UIC_VIEW > |
A specification to describe the desired location of a component view within the Lumiera UI. More... | |
Functions | |
template<class VIEW > | |
Descriptor< VIEW > & | viewSpec () |
Access point: Factory for "view specs". More... | |
Namespaces | |
stage | |
Lumiera GTK UI implementation root. | |
stage::idi | |
generic definitions for element ID and access. | |
stage::interact | |
UI interaction control. | |
struct stage::idi::Descriptor |