88#ifndef STAGE_INTERACT_VIEW_SPEC_DSL_H
89#define STAGE_INTERACT_VIEW_SPEC_DSL_H
133 template<
size_t depth>
144 return locationSolver().solve (
rules_, depth, componentID);
146 ,
rules_{move (ruleToDetermineLocation)}
157 operator string()
const
195 template<
typename... ARGS>
197 :
public std::function<Allocator(ARGS&&...)>
213 using Ret = _Fun<FUN>::Ret;
214 using Args = _Fun<FUN>::Args;
215 using Arg1 = Split<Args>::Head;
216 using FurtherArgs = Split<Args>::Tail;
218 static_assert (std::is_convertible<UICoord, Arg1>::value,
219 "Allocator function must accept UICoordinates (where to create/locate) as first argument");
220 static_assert (std::is_convertible<Ret, UICoord>::value,
221 "Allocator function must produce UICoordinates (of the actually allocated UI element)");
222 static_assert (std::is_convertible<FurtherArgs, Types<ARGS...>>::value,
223 "Additional parameters of the allocator function must match the AllocSpec<ARGS> template parameters");
226 using ArgTuple = Tuple<FurtherArgs>;
230 ArgTuple params {forward<decltype(args)> (args)...};
231 return PApply<FUN,FurtherArgs>::bindBack (fun, params);
250 using interact::AllocSpec;
259 static_assert (not
sizeof(V),
"unknown generic view type");
Access point to singletons and other kinds of dependencies designated by type.
A specification to describe the strategy for allocating (placing, retrieving) a component view.
static auto buildPartialApplicator(FUN &&fun)
A rule to determine some location by matching against the UI-tree.
A specification to describe the desired location of a component view within the Lumiera UI.
LocatorSpec(UICoord::Builder &&simpleLocationSpec)
shortcut to allow initialisation from UI-Coordinate builder expression
LocatorSpec(LocationRule &&ruleToDetermineLocation)
Describe a location within the UI through structural/topological coordinates.
Singleton services and Dependency Injection.
Lumiera error handling (C++ interface).
Partial function application and building a complete function closure.
Metaprogramming tools for detecting and transforming function types.
AllocSpec< uint > limitAllocation
Descriptor< VIEW > & viewSpec()
Access point: Factory for "view specs".
Generic Component View descriptors.
LocatorSpec< UIC_VIEW > ViewSpec
A specification to describe the desired location of a component view within the Lumiera UI.
std::function< UICoord(Literal)> Locator
Locator is a functor to resolve to a topological location in the UI-tree.
std::function< UICoord(UICoord)> Allocator
Allocator is a functor to resolve a given, desired location of a view within the UI.
Lumiera GTK UI implementation root.
A single location specification to be matched and fulfilled.
Marker types to indicate a literal string and a Symbol.
Metaprogramming with tuples-of-types and the std::tuple record.
A topological addressing scheme to designate structural locations within the UI.
A solver to match incomplete coordinate specifications against the actual UI topology.