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

Complete style descriptor for SegmentToggle. More...

#include <Malena/Traits/Style/SegmentStyle.h>

Inheritance diagram for ml::SegmentStyle:
[legend]

Public Member Functions

void addItem (const std::string &label, const std::string &key)
SegmentStyleapplyFrom (const Theme &t)
 Populate all fields from the global Theme token set.
void clearItems ()
sf::Color getActiveColor () const
sf::Color getActiveTextColor () const
float getAnimSpeed () const
sf::Color getDisabledColor () const
sf::Color getDisabledTextColor () const
sf::Color getErrorColor () const
sf::Color getFillColor () const
sf::Color getFocusColor () const
const sf::FontgetFont () const
unsigned int getFontSize () const
unsigned int getFontSizeSmall () const
sf::Color getHoverColor () const
sf::Color getInactiveColor () const
sf::Color getInactiveTextColor () const
const std::vector< std::pair< std::string, std::string > > & getItems () const
sf::Color getMutedColor () const
std::string getOffLabel () const
std::string getOnLabel () const
sf::Color getOutlineColor () const
float getOutlineThickness () const
float getPadding () const
float getRadius () const
float getSegPadding () const
float getSegRadius () const
sf::Vector2f getSize () const
sf::Color getTextColor () const
sf::Color getThumbColor () const
sf::Color getTrackColor () const
SegmentStyleoperator= (const ControlSettings &c)
SegmentStyleoperator= (const ControlTheme &c)
SegmentStyleoperator= (const GraphicTheme &g)
SegmentStyleoperator= (const SegmentSettings &s)
SegmentStyleoperator= (const SegmentTheme &t)
SegmentStyleoperator= (const ToggleSettings &t)
SegmentStyleoperator= (const ToggleTheme &t)
void setActiveColor (const sf::Color &c)
void setActiveTextColor (const sf::Color &c)
void setAnimSpeed (float s)
void setDisabledColor (const sf::Color &c)
void setDisabledTextColor (const sf::Color &c)
void setErrorColor (const sf::Color &c)
void setFillColor (const sf::Color &c)
void setFocusColor (const sf::Color &c)
void setFont (const sf::Font &&)=delete
void setFont (const sf::Font &f)
void setFontSize (unsigned int s)
void setFontSizeSmall (unsigned int s)
void setHoverColor (const sf::Color &c)
void setInactiveColor (const sf::Color &c)
void setInactiveTextColor (const sf::Color &c)
void setItems (std::vector< std::pair< std::string, std::string > > i)
void setMutedColor (const sf::Color &c)
void setOffLabel (const std::string &s)
void setOnLabel (const std::string &s)
void setOutlineColor (const sf::Color &c)
void setOutlineThickness (float t)
void setPadding (float p)
void setRadius (float r)
void setSegmentLabels (const std::string &off, const std::string &on)
void setSegPadding (float p)
void setSegRadius (float r)
void setSize (const sf::Vector2f &s)
void setTextColor (const sf::Color &c)
void setThumbColor (const sf::Color &c)
void setTrackColor (const sf::Color &c)

Public Attributes

sf::Color activeColor = sf::Color(100, 60, 200)
sf::Color activeTextColor = sf::Color::White
float animSpeed = 10.f
sf::Color disabledColor = sf::Color(60, 60, 60)
sf::Color disabledTextColor = sf::Color(120, 120, 120)
sf::Color errorColor = sf::Color(220, 70, 70)
sf::Color fillColor = sf::Color(40, 40, 40)
sf::Color focusColor = sf::Color(100, 60, 200)
const sf::Fontfont = &FontManager<>::getDefault()
unsigned int fontSize = 14
unsigned int fontSizeSmall = 11
sf::Color hoverColor = sf::Color(70, 130, 230)
sf::Color inactiveColor = sf::Color(40, 40, 40)
sf::Color inactiveTextColor = sf::Color(120, 120, 120)
std::vector< std::pair< std::string, std::string > > items
sf::Color mutedColor = sf::Color(120, 120, 120)
std::string offLabel = "Off"
std::string onLabel = "On"
sf::Color outlineColor = sf::Color(100, 100, 100)
float outlineThickness = 1.5f
float padding = 8.f
float radius = 8.f
float segPadding = 3.f
float segRadius = 20.f
sf::Vector2f size = {200.f, 36.f}
sf::Color textColor = sf::Color::White
sf::Color thumbColor = sf::Color(100, 60, 200)
sf::Color trackColor = sf::Color(60, 60, 60)

Detailed Description

Complete style descriptor for SegmentToggle.

Combines SegmentSettings and SegmentTheme.

See also
SegmentSettings, SegmentTheme, SegmentToggle

Definition at line 24 of file SegmentStyle.h.

Member Function Documentation

◆ addItem()

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

Definition at line 57 of file ToggleSettings.h.

◆ applyFrom()

SegmentStyle & ml::SegmentStyle::applyFrom ( const Theme & t)
inlinevirtual

Populate all fields from the global Theme token set.

Subclasses call GraphicTheme::applyFrom(t) first, then apply their own token mappings.

Reimplemented from ml::ControlTheme.

Definition at line 47 of file SegmentStyle.h.

◆ clearItems()

void ml::ToggleSettings::clearItems ( )
inlineinherited

Definition at line 60 of file ToggleSettings.h.

◆ getActiveColor()

sf::Color ml::ToggleTheme::getActiveColor ( ) const
inlinenodiscardinherited

Definition at line 63 of file ToggleTheme.h.

◆ getActiveTextColor()

sf::Color ml::SegmentTheme::getActiveTextColor ( ) const
inlinenodiscardinherited

Definition at line 70 of file SegmentTheme.h.

◆ getAnimSpeed()

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

Definition at line 48 of file ToggleSettings.h.

◆ getDisabledColor()

sf::Color ml::ControlTheme::getDisabledColor ( ) const
inlinenodiscardinherited

Definition at line 75 of file ControlTheme.h.

◆ getDisabledTextColor()

sf::Color ml::ControlTheme::getDisabledTextColor ( ) const
inlinenodiscardinherited

Definition at line 76 of file ControlTheme.h.

◆ getErrorColor()

sf::Color ml::ControlTheme::getErrorColor ( ) const
inlinenodiscardinherited

Definition at line 74 of file ControlTheme.h.

◆ getFillColor()

sf::Color ml::GraphicTheme::getFillColor ( ) const
inlinenodiscardinherited

Definition at line 67 of file GraphicTheme.h.

◆ getFocusColor()

sf::Color ml::ControlTheme::getFocusColor ( ) const
inlinenodiscardinherited

Definition at line 73 of file ControlTheme.h.

◆ getFont()

const sf::Font * ml::ControlTheme::getFont ( ) const
inlinenodiscardinherited

Definition at line 80 of file ControlTheme.h.

◆ getFontSize()

unsigned int ml::ControlTheme::getFontSize ( ) const
inlinenodiscardinherited

Definition at line 81 of file ControlTheme.h.

◆ getFontSizeSmall()

unsigned int ml::ControlTheme::getFontSizeSmall ( ) const
inlinenodiscardinherited

Definition at line 82 of file ControlTheme.h.

◆ getHoverColor()

sf::Color ml::ControlTheme::getHoverColor ( ) const
inlinenodiscardinherited

Definition at line 72 of file ControlTheme.h.

◆ getInactiveColor()

sf::Color ml::ToggleTheme::getInactiveColor ( ) const
inlinenodiscardinherited

Definition at line 64 of file ToggleTheme.h.

◆ getInactiveTextColor()

sf::Color ml::SegmentTheme::getInactiveTextColor ( ) const
inlinenodiscardinherited

Definition at line 71 of file SegmentTheme.h.

◆ getItems()

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

Definition at line 52 of file ToggleSettings.h.

◆ getMutedColor()

sf::Color ml::ControlTheme::getMutedColor ( ) const
inlinenodiscardinherited

Definition at line 78 of file ControlTheme.h.

◆ getOffLabel()

std::string ml::SegmentSettings::getOffLabel ( ) const
inlinenodiscardinherited

Definition at line 61 of file SegmentSettings.h.

◆ getOnLabel()

std::string ml::SegmentSettings::getOnLabel ( ) const
inlinenodiscardinherited

Definition at line 62 of file SegmentSettings.h.

◆ getOutlineColor()

sf::Color ml::GraphicTheme::getOutlineColor ( ) const
inlinenodiscardinherited

Definition at line 68 of file GraphicTheme.h.

◆ getOutlineThickness()

float ml::GraphicTheme::getOutlineThickness ( ) const
inlinenodiscardinherited

Definition at line 69 of file GraphicTheme.h.

◆ getPadding()

float ml::ControlTheme::getPadding ( ) const
inlinenodiscardinherited

Definition at line 79 of file ControlTheme.h.

◆ getRadius()

float ml::GraphicTheme::getRadius ( ) const
inlinenodiscardinherited

Definition at line 70 of file GraphicTheme.h.

◆ getSegPadding()

float ml::SegmentSettings::getSegPadding ( ) const
inlinenodiscardinherited

Definition at line 60 of file SegmentSettings.h.

◆ getSegRadius()

float ml::SegmentSettings::getSegRadius ( ) const
inlinenodiscardinherited

Definition at line 59 of file SegmentSettings.h.

◆ getSize()

sf::Vector2f ml::SegmentSettings::getSize ( ) const
inlinenodiscardinherited

Definition at line 58 of file SegmentSettings.h.

◆ getTextColor()

sf::Color ml::ControlTheme::getTextColor ( ) const
inlinenodiscardinherited

Definition at line 77 of file ControlTheme.h.

◆ getThumbColor()

sf::Color ml::SegmentTheme::getThumbColor ( ) const
inlinenodiscardinherited

Definition at line 69 of file SegmentTheme.h.

◆ getTrackColor()

sf::Color ml::SegmentTheme::getTrackColor ( ) const
inlinenodiscardinherited

Definition at line 68 of file SegmentTheme.h.

◆ operator=() [1/7]

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

Definition at line 44 of file SegmentStyle.h.

◆ operator=() [2/7]

SegmentStyle & ml::SegmentStyle::operator= ( const ControlTheme & c)
inline

Definition at line 35 of file SegmentStyle.h.

◆ operator=() [3/7]

SegmentStyle & ml::SegmentStyle::operator= ( const GraphicTheme & g)
inline

Definition at line 38 of file SegmentStyle.h.

◆ operator=() [4/7]

SegmentStyle & ml::SegmentStyle::operator= ( const SegmentSettings & s)
inline

Definition at line 26 of file SegmentStyle.h.

◆ operator=() [5/7]

SegmentStyle & ml::SegmentStyle::operator= ( const SegmentTheme & t)
inline

Definition at line 29 of file SegmentStyle.h.

◆ operator=() [6/7]

SegmentStyle & ml::SegmentStyle::operator= ( const ToggleSettings & t)
inline

Definition at line 41 of file SegmentStyle.h.

◆ operator=() [7/7]

SegmentStyle & ml::SegmentStyle::operator= ( const ToggleTheme & t)
inline

Definition at line 32 of file SegmentStyle.h.

◆ setActiveColor()

void ml::ToggleTheme::setActiveColor ( const sf::Color & c)
inlineinherited

Definition at line 67 of file ToggleTheme.h.

◆ setActiveTextColor()

void ml::SegmentTheme::setActiveTextColor ( const sf::Color & c)
inlineinherited

Definition at line 75 of file SegmentTheme.h.

◆ setAnimSpeed()

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

Definition at line 49 of file ToggleSettings.h.

◆ setDisabledColor()

void ml::ControlTheme::setDisabledColor ( const sf::Color & c)
inlineinherited

Definition at line 87 of file ControlTheme.h.

◆ setDisabledTextColor()

void ml::ControlTheme::setDisabledTextColor ( const sf::Color & c)
inlineinherited

Definition at line 88 of file ControlTheme.h.

◆ setErrorColor()

void ml::ControlTheme::setErrorColor ( const sf::Color & c)
inlineinherited

Definition at line 86 of file ControlTheme.h.

◆ setFillColor()

void ml::GraphicTheme::setFillColor ( const sf::Color & c)
inlineinherited

Definition at line 72 of file GraphicTheme.h.

◆ setFocusColor()

void ml::ControlTheme::setFocusColor ( const sf::Color & c)
inlineinherited

Definition at line 85 of file ControlTheme.h.

◆ setFont() [1/2]

void ml::ControlTheme::setFont ( const sf::Font && )
deleteinherited

◆ setFont() [2/2]

void ml::ControlTheme::setFont ( const sf::Font & f)
inlineinherited

Definition at line 92 of file ControlTheme.h.

◆ setFontSize()

void ml::ControlTheme::setFontSize ( unsigned int s)
inlineinherited

Definition at line 94 of file ControlTheme.h.

◆ setFontSizeSmall()

void ml::ControlTheme::setFontSizeSmall ( unsigned int s)
inlineinherited

Definition at line 95 of file ControlTheme.h.

◆ setHoverColor()

void ml::ControlTheme::setHoverColor ( const sf::Color & c)
inlineinherited

Definition at line 84 of file ControlTheme.h.

◆ setInactiveColor()

void ml::ToggleTheme::setInactiveColor ( const sf::Color & c)
inlineinherited

Definition at line 68 of file ToggleTheme.h.

◆ setInactiveTextColor()

void ml::SegmentTheme::setInactiveTextColor ( const sf::Color & c)
inlineinherited

Definition at line 76 of file SegmentTheme.h.

◆ setItems()

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

Definition at line 54 of file ToggleSettings.h.

◆ setMutedColor()

void ml::ControlTheme::setMutedColor ( const sf::Color & c)
inlineinherited

Definition at line 90 of file ControlTheme.h.

◆ setOffLabel()

void ml::SegmentSettings::setOffLabel ( const std::string & s)
inlineinherited

Definition at line 67 of file SegmentSettings.h.

◆ setOnLabel()

void ml::SegmentSettings::setOnLabel ( const std::string & s)
inlineinherited

Definition at line 68 of file SegmentSettings.h.

◆ setOutlineColor()

void ml::GraphicTheme::setOutlineColor ( const sf::Color & c)
inlineinherited

Definition at line 73 of file GraphicTheme.h.

◆ setOutlineThickness()

void ml::GraphicTheme::setOutlineThickness ( float t)
inlineinherited

Definition at line 74 of file GraphicTheme.h.

◆ setPadding()

void ml::ControlTheme::setPadding ( float p)
inlineinherited

Definition at line 91 of file ControlTheme.h.

◆ setRadius()

void ml::GraphicTheme::setRadius ( float r)
inlineinherited

Definition at line 75 of file GraphicTheme.h.

◆ setSegmentLabels()

void ml::SegmentSettings::setSegmentLabels ( const std::string & off,
const std::string & on )
inlineinherited

Definition at line 69 of file SegmentSettings.h.

◆ setSegPadding()

void ml::SegmentSettings::setSegPadding ( float p)
inlineinherited

Definition at line 66 of file SegmentSettings.h.

◆ setSegRadius()

void ml::SegmentSettings::setSegRadius ( float r)
inlineinherited

Definition at line 65 of file SegmentSettings.h.

◆ setSize()

void ml::SegmentSettings::setSize ( const sf::Vector2f & s)
inlineinherited

Definition at line 64 of file SegmentSettings.h.

◆ setTextColor()

void ml::ControlTheme::setTextColor ( const sf::Color & c)
inlineinherited

Definition at line 89 of file ControlTheme.h.

◆ setThumbColor()

void ml::SegmentTheme::setThumbColor ( const sf::Color & c)
inlineinherited

Definition at line 74 of file SegmentTheme.h.

◆ setTrackColor()

void ml::SegmentTheme::setTrackColor ( const sf::Color & c)
inlineinherited

Definition at line 73 of file SegmentTheme.h.

Member Data Documentation

◆ activeColor

sf::Color ml::ToggleTheme::activeColor = sf::Color(100, 60, 200)
inherited

Definition at line 32 of file ToggleTheme.h.

◆ activeTextColor

sf::Color ml::SegmentTheme::activeTextColor = sf::Color::White
inherited

Definition at line 31 of file SegmentTheme.h.

◆ animSpeed

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

Definition at line 29 of file ToggleSettings.h.

◆ disabledColor

sf::Color ml::ControlTheme::disabledColor = sf::Color(60, 60, 60)
inherited

Definition at line 33 of file ControlTheme.h.

◆ disabledTextColor

sf::Color ml::ControlTheme::disabledTextColor = sf::Color(120, 120, 120)
inherited

Definition at line 34 of file ControlTheme.h.

◆ errorColor

sf::Color ml::ControlTheme::errorColor = sf::Color(220, 70, 70)
inherited

Definition at line 32 of file ControlTheme.h.

◆ fillColor

sf::Color ml::GraphicTheme::fillColor = sf::Color(40, 40, 40)
inherited

Definition at line 43 of file GraphicTheme.h.

◆ focusColor

sf::Color ml::ControlTheme::focusColor = sf::Color(100, 60, 200)
inherited

Definition at line 31 of file ControlTheme.h.

◆ font

const sf::Font* ml::ControlTheme::font = &FontManager<>::getDefault()
inherited

Definition at line 39 of file ControlTheme.h.

◆ fontSize

unsigned int ml::ControlTheme::fontSize = 14
inherited

Definition at line 40 of file ControlTheme.h.

◆ fontSizeSmall

unsigned int ml::ControlTheme::fontSizeSmall = 11
inherited

Definition at line 41 of file ControlTheme.h.

◆ hoverColor

sf::Color ml::ControlTheme::hoverColor = sf::Color(70, 130, 230)
inherited

Definition at line 30 of file ControlTheme.h.

◆ inactiveColor

sf::Color ml::ToggleTheme::inactiveColor = sf::Color(40, 40, 40)
inherited

Definition at line 33 of file ToggleTheme.h.

◆ inactiveTextColor

sf::Color ml::SegmentTheme::inactiveTextColor = sf::Color(120, 120, 120)
inherited

Definition at line 32 of file SegmentTheme.h.

◆ items

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

Definition at line 30 of file ToggleSettings.h.

◆ mutedColor

sf::Color ml::ControlTheme::mutedColor = sf::Color(120, 120, 120)
inherited

Definition at line 36 of file ControlTheme.h.

◆ offLabel

std::string ml::SegmentSettings::offLabel = "Off"
inherited

Definition at line 33 of file SegmentSettings.h.

◆ onLabel

std::string ml::SegmentSettings::onLabel = "On"
inherited

Definition at line 34 of file SegmentSettings.h.

◆ outlineColor

sf::Color ml::GraphicTheme::outlineColor = sf::Color(100, 100, 100)
inherited

Definition at line 44 of file GraphicTheme.h.

◆ outlineThickness

float ml::GraphicTheme::outlineThickness = 1.5f
inherited

Definition at line 45 of file GraphicTheme.h.

◆ padding

float ml::ControlTheme::padding = 8.f
inherited

Definition at line 37 of file ControlTheme.h.

◆ radius

float ml::GraphicTheme::radius = 8.f
inherited

Definition at line 46 of file GraphicTheme.h.

◆ segPadding

float ml::SegmentSettings::segPadding = 3.f
inherited

Definition at line 30 of file SegmentSettings.h.

◆ segRadius

float ml::SegmentSettings::segRadius = 20.f
inherited

Definition at line 29 of file SegmentSettings.h.

◆ size

sf::Vector2f ml::SegmentSettings::size = {200.f, 36.f}
inherited

Definition at line 28 of file SegmentSettings.h.

◆ textColor

sf::Color ml::ControlTheme::textColor = sf::Color::White
inherited

Definition at line 35 of file ControlTheme.h.

◆ thumbColor

sf::Color ml::SegmentTheme::thumbColor = sf::Color(100, 60, 200)
inherited

Definition at line 30 of file SegmentTheme.h.

◆ trackColor

sf::Color ml::SegmentTheme::trackColor = sf::Color(60, 60, 60)
inherited

Definition at line 29 of file SegmentTheme.h.


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