Loading...
Searching...
No Matches
ml::ToggleSettings Struct Reference

Settings shared by all toggle variants — behaviour only. More...

#include <Malena/Traits/Settings/ToggleSettings.h>

Inheritance diagram for ml::ToggleSettings:
[legend]

Public Member Functions

void addItem (const std::string &label, const std::string &key)
void clearItems ()
float getAnimSpeed () const
const std::vector< std::pair< std::string, std::string > > & getItems () const
ToggleSettingsoperator= (const ControlSettings &c)
ToggleSettingsoperator= (const GraphicSettings &g)
void setAnimSpeed (float s)
void setItems (std::vector< std::pair< std::string, std::string > > i)

Public Attributes

float animSpeed = 10.f
std::vector< std::pair< std::string, std::string > > items

Detailed Description

Settings shared by all toggle variants — behaviour only.

Colors live in ToggleTheme. ToggleSettings holds animation speed and the item list used to pre-populate a ToggleGroup.

See also
ControlSettings, ToggleTheme, PillSettings

Definition at line 27 of file ToggleSettings.h.

Member Function Documentation

◆ addItem()

void ml::ToggleSettings::addItem ( const std::string & label,
const std::string & key )
inline

Definition at line 57 of file ToggleSettings.h.

◆ clearItems()

void ml::ToggleSettings::clearItems ( )
inline

Definition at line 60 of file ToggleSettings.h.

◆ getAnimSpeed()

float ml::ToggleSettings::getAnimSpeed ( ) const
inlinenodiscard

Definition at line 48 of file ToggleSettings.h.

◆ getItems()

const std::vector< std::pair< std::string, std::string > > & ml::ToggleSettings::getItems ( ) const
inlinenodiscard

Definition at line 52 of file ToggleSettings.h.

◆ operator=() [1/2]

ToggleSettings & ml::ToggleSettings::operator= ( const ControlSettings & c)
inline

Definition at line 34 of file ToggleSettings.h.

◆ operator=() [2/2]

ToggleSettings & ml::ToggleSettings::operator= ( const GraphicSettings & g)
inline

Definition at line 40 of file ToggleSettings.h.

◆ setAnimSpeed()

void ml::ToggleSettings::setAnimSpeed ( float s)
inline

Definition at line 49 of file ToggleSettings.h.

◆ setItems()

void ml::ToggleSettings::setItems ( std::vector< std::pair< std::string, std::string > > i)
inline

Definition at line 54 of file ToggleSettings.h.

Member Data Documentation

◆ animSpeed

float ml::ToggleSettings::animSpeed = 10.f

Definition at line 29 of file ToggleSettings.h.

◆ items

std::vector<std::pair<std::string, std::string> > ml::ToggleSettings::items

Definition at line 30 of file ToggleSettings.h.


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