20 template<
typename... Traits>
21 struct HasCoreTraits : std::disjunction<
22 std::is_same<Traits, Subscribable>...,
23 std::is_same<Traits, Flaggable>...,
24 std::is_same<Traits, Positionable>...
33 template<
typename ComponentManifest = void,
typename... Traits>
37 public GatherFlags <ComponentManifest, Draggable, Traits...>::type,
38 public GatherStates<ComponentManifest, Draggable, Traits...>::type
41 !HasCoreTraits<Traits...>::value,
42 "Subscribable, Flaggable, and Positionable are already included via Core."
87 template<
typename ComponentManifest,
typename... Traits>
96 template<
typename... Traits>
126 template<
typename First = void,
typename... Rest>
128 std::is_base_of_v<Manifest, First>,
129 ComponentBase<First, Rest...>,
130 ComponentBase<void, First, Rest...>
149 template<
typename M,
typename... Traits>
void onClick(std::function< void()> callback)
Register a no-argument callback invoked when this component is clicked.
Primary base class for all user-facing Malena components.
Virtual base class for all Malena framework objects.
Receiver trait that adds mouse-drag behavior to any Component.
static void subscribe(EnumType eventEnum, EventReceiver *component)
Register a component for an enum-keyed event.
Enum-keyed boolean flag store.
void toggleFlag(State state)
void disableFlag(State state)
void setFlag(State state, bool status)
bool checkFlag(State state) const
void enableFlag(State state)
void onHover(std::function< void()> callback)
Register a no-argument callback invoked when the mouse enters this component's bounds.
Component< M, Traits... > ComponentWith
Alias for Component<M, Traits...>.
@ DRAG
Component is being dragged.
Flag
System-level boolean flags available on every ml::Core object.
Intermediate drawable layer — with manifest.
ml::ManifestResources< ComponentManifest > Resources
Internal non-drawable layer of the component hierarchy.
Collects all Flag enums from a component manifest and its traits.
Collects all State enums from a component manifest and its traits.
Unified manifest resource and config accessor.