Loading...
Searching...
No Matches
ToggleTheme.h
Go to the documentation of this file.
1//
2// ToggleTheme.h
3//
4
5#ifndef MALENA_TOGGLETHEME_H
6#define MALENA_TOGGLETHEME_H
7
8#pragma once
9
12
13namespace ml
14{
15 // ── ToggleTheme ───────────────────────────────────────────────────────────
16
31 {
35
36 // ── applyFrom ─────────────────────────────────────────────────────────
37
38 ToggleTheme& applyFrom(const Theme& t) override
39 {
44 return *this;
45 }
46
47 // ── Assignment from parent ────────────────────────────────────────────
48
50 {
51 static_cast<ControlTheme&>(*this) = c;
52 return *this;
53 }
54
56 {
57 static_cast<ControlTheme&>(*this) = g;
58 return *this;
59 }
60
61 // ── Getters / setters ─────────────────────────────────────────────────
62
63 [[nodiscard]] sf::Color getActiveColor() const { return activeColor; }
64 [[nodiscard]] sf::Color getInactiveColor() const { return inactiveColor; }
65 [[nodiscard]] sf::Color getActiveTextColor() const { return activeTextColor; }
66
67 void setActiveColor(const sf::Color& c) { activeColor = c; }
70 };
71
72} // namespace ml
73
74#endif // MALENA_TOGGLETHEME_H
static const Color White
Definition Component.h:22
Theme tokens for interactive UI controls.
ControlTheme & applyFrom(const Theme &t) override
Populate all fields from the global Theme token set.
Theme tokens for all visual components.
Universal design token set applied across all Themeable components.
Definition Theme.h:70
sf::Color onPrimary
Definition Theme.h:89
sf::Color primary
Definition Theme.h:74
sf::Color surface
Definition Theme.h:80
Theme tokens shared by all toggle variants.
Definition ToggleTheme.h:31
sf::Color getInactiveColor() const
Definition ToggleTheme.h:64
sf::Color inactiveColor
Definition ToggleTheme.h:33
ToggleTheme & applyFrom(const Theme &t) override
Populate all fields from the global Theme token set.
Definition ToggleTheme.h:38
ToggleTheme & operator=(const GraphicTheme &g)
Definition ToggleTheme.h:55
sf::Color activeTextColor
Definition ToggleTheme.h:34
void setActiveTextColor(const sf::Color &c)
Definition ToggleTheme.h:69
ToggleTheme & operator=(const ControlTheme &c)
Definition ToggleTheme.h:49
void setInactiveColor(const sf::Color &c)
Definition ToggleTheme.h:68
sf::Color getActiveTextColor() const
Definition ToggleTheme.h:65
sf::Color activeColor
Definition ToggleTheme.h:32
void setActiveColor(const sf::Color &c)
Definition ToggleTheme.h:67
sf::Color getActiveColor() const
Definition ToggleTheme.h:63