Loading...
Searching...
No Matches
ml::CarouselManifest Class Reference

Manifest for the Carousel component. More...

#include <Malena/Graphics/Controls/Carousel.h>

Inheritance diagram for ml::CarouselManifest:
[legend]

Public Types

enum class  ArrowPlacement { SIDES , TOP , OVERLAY }
 Controls where navigation arrows are placed relative to the content. More...
enum class  ArrowSide { LEFT , RIGHT }
 Identifies which navigation arrow to target in setter calls. More...
enum class  Flag { SCROLLING , SHOW_ARROWS }
 Runtime boolean flags for the carousel. More...
enum class  State { SCROLL_IDLE , SCROLL_LEFT , SCROLL_RIGHT }
 Scroll animation states. More...
using Style = ShaderLibrary::Style
 Shader visual style — aliases ShaderLibrary::Style.

Static Public Member Functions

template<typename ConfigType, typename ValueType>
static const ValueType & getConfig (ConfigType config)
template<typename Asset>
static const std::string & getFilepath (const Asset &asset)
template<typename EnumType>
static const ThemeTaggetTheme (EnumType key)
 Retrieve a theme stored via set(key, ThemeDerived{}).

Static Protected Member Functions

template<typename E, typename V, typename... Args>
static void set (E key, V &&value, Args &&... args)
 Register multiple key-value pairs in one call.
template<typename EnumType>
static void set (EnumType key, const char *filepath)
 Register an asset file path.
template<typename EnumType>
static void set (EnumType key, std::string value)
 Register a string configuration value.
template<typename EnumType, typename T>
static std::enable_if_t< std::is_base_of_v< ThemeTag, std::decay_t< T > > > set (EnumType key, T &&value)
 Register a Theme-derived value.
template<typename EnumType, typename ValueType>
static std::enable_if_t< !std::is_same_v< std::decay_t< ValueType >, const char * > &&!std::is_same_v< std::decay_t< ValueType >, std::string > &&!std::is_base_of_v< ThemeTag, std::decay_t< ValueType > > > set (EnumType key, ValueType &&value)
 Register a typed configuration value (int, float, struct, etc.).

Detailed Description

Manifest for the Carousel component.

Declares the flags, states, and supporting enums that drive carousel behavior. These are gathered automatically into the Carousel component's flag and state stores.

Definition at line 32 of file Carousel.h.

Member Typedef Documentation

◆ Style

Shader visual style — aliases ShaderLibrary::Style.

Definition at line 71 of file Carousel.h.

Member Enumeration Documentation

◆ ArrowPlacement

Controls where navigation arrows are placed relative to the content.

Value Placement
SIDES Arrows flank the content on the left and right (default)
TOP Both arrows sit above the carousel
OVERLAY Arrows float on top of the content near the edges
Enumerator
SIDES 
TOP 
OVERLAY 

Definition at line 65 of file Carousel.h.

◆ ArrowSide

Identifies which navigation arrow to target in setter calls.

Enumerator
LEFT 
RIGHT 

Definition at line 68 of file Carousel.h.

◆ Flag

enum class ml::CarouselManifest::Flag
strong

Runtime boolean flags for the carousel.

Flag Effect
SCROLLING Set while a scroll animation is in progress
SHOW_ARROWS Controls whether navigation arrows are visible
Enumerator
SCROLLING 
SHOW_ARROWS 

Definition at line 43 of file Carousel.h.

◆ State

enum class ml::CarouselManifest::State
strong

Scroll animation states.

State Meaning
SCROLL_IDLE No scroll in progress
SCROLL_LEFT Scrolling toward previous items
SCROLL_RIGHT Scrolling toward next items
Enumerator
SCROLL_IDLE 
SCROLL_LEFT 
SCROLL_RIGHT 

Definition at line 54 of file Carousel.h.

Member Function Documentation

◆ getConfig()

template<typename ConfigType, typename ValueType>
const ValueType & ml::Manifest::getConfig ( ConfigType config)
staticinherited

◆ getFilepath()

template<typename Asset>
const std::string & ml::Manifest::getFilepath ( const Asset & asset)
staticinherited

◆ getTheme()

template<typename EnumType>
const ThemeTag & ml::Manifest::getTheme ( EnumType key)
staticinherited

Retrieve a theme stored via set(key, ThemeDerived{}).

Called internally by ThemeManager::apply(). Returns a reference to the stored theme cast to ThemeTagThemeManager casts to Theme& from there.

◆ set() [1/5]

template<typename E, typename V, typename... Args>
void ml::Manifest::set ( E key,
V && value,
Args &&... args )
staticprotectedinherited

Register multiple key-value pairs in one call.

◆ set() [2/5]

template<typename EnumType>
void ml::Manifest::set ( EnumType key,
const char * filepath )
staticprotectedinherited

Register an asset file path.

◆ set() [3/5]

template<typename EnumType>
void ml::Manifest::set ( EnumType key,
std::string value )
staticprotectedinherited

Register a string configuration value.

◆ set() [4/5]

template<typename EnumType, typename T>
std::enable_if_t< std::is_base_of_v< ThemeTag, std::decay_t< T > > > ml::Manifest::set ( EnumType key,
T && value )
staticprotectedinherited

Register a Theme-derived value.

Stored as shared_ptr<ThemeTag> so Theme.h is not needed in Manifest.tpp. ThemeManager::apply() casts back to Theme&.

◆ set() [5/5]

template<typename EnumType, typename ValueType>
std::enable_if_t< !std::is_same_v< std::decay_t< ValueType >, const char * > &&!std::is_same_v< std::decay_t< ValueType >, std::string > &&!std::is_base_of_v< ThemeTag, std::decay_t< ValueType > > > ml::Manifest::set ( EnumType key,
ValueType && value )
staticprotectedinherited

Register a typed configuration value (int, float, struct, etc.).

Excludes const char*, std::string, and ThemeTag-derived types — those are handled by their own overloads.


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