Loading...
Searching...
No Matches

Foundational framework types, base abstractions, and shared managers. More...

Collaboration diagram for Core:

Files

file  Export.h
 Provides ML_EXPORT for registering Malena types at startup.

Classes

class  ml::Component< First, Rest >
 Primary base class for all user-facing Malena components. More...
struct  ml::ComponentBase< ComponentManifest, Traits >
 Intermediate drawable layer — with manifest. More...
struct  ml::ComponentCore< ComponentManifest, Traits >
 Internal non-drawable layer of the component hierarchy. More...
class  ml::Core
 Virtual base class for all Malena framework objects. More...
class  ml::CoreAdapter
 Concrete adapter that gives Core a default virtual interface. More...
class  ml::CoreManager< T >
 Static, type-safe collection manager for Core-derived objects. More...
class  ml::DeferredOperationsManager< Derived >
 CRTP base that gives a manager safe deferred-operation support. More...
class  ml::DrawableWrapper< ENTITY >
 Adapts any sf::Drawable into a first-class ml::Core object. More...
struct  ml::MLExport< T >
 Template alternative to ML_EXPORT for registering Malena types in .cpp files. More...

Typedefs

template<typename M, typename... Traits>
using ml::ComponentWith = Component<M, Traits...>
 Alias for Component<M, Traits...>.

Enumerations

enum class  ml::Layer : int { ml::Layer::Background = 0 , ml::Layer::Content = 100 , ml::Layer::Overlay = 200 }
 Framework-provided default layer enum. More...

Detailed Description

Foundational framework types, base abstractions, and shared managers.

Typedef Documentation

◆ ComponentWith

template<typename M, typename... Traits>
using ml::ComponentWith = Component<M, Traits...>

Alias for Component<M, Traits...>.

class MyWidget : public ml::ComponentWith<MyManifest> {};
class MyWidget : public ml::ComponentWith<MyManifest, Draggable> {};
Component< M, Traits... > ComponentWith
Alias for Component<M, Traits...>.
Definition Component.h:316
Template Parameters
MThe manifest type.
TraitsOptional additional traits.

Definition at line 316 of file Component.h.

Enumeration Type Documentation

◆ Layer

enum class ml::Layer : int
strong

Framework-provided default layer enum.

Use this when a component has no manifest of its own and just needs to place children into broad strokes. For component-specific vocabulary, declare a Layer enum on the component's manifest and alias it into scope.

addComponent(_background, ml::Layer::Background);
addComponent(_content, ml::Layer::Content);
addComponent(_overlay, ml::Layer::Overlay);
@ Overlay
Definition Core.h:55
@ Background
Definition Core.h:53
@ Content
Definition Core.h:54

Values are spaced 100 apart so callers can slip a custom layer in between (e.g. 50 for a backdrop behind Content) without renumbering.

Enumerator
Background 
Content 
Overlay 

Definition at line 51 of file Core.h.