Loading...
Searching...
No Matches
TextInputTheme.h
Go to the documentation of this file.
1//
2// TextInputTheme.h
3//
4
5#ifndef MALENA_TEXTINPUTTHEME_H
6#define MALENA_TEXTINPUTTHEME_H
7
8#pragma once
9
12
13namespace ml
14{
24 {
25 sf::Color selectionColor = sf::Color(70, 130, 230, 120);
27
28 // ── applyFrom ─────────────────────────────────────────────────────────
29
30 TextInputTheme& applyFrom(const Theme& t) override
31 {
35 return *this;
36 }
37
38 // ── Assignment from parent levels ─────────────────────────────────────
39
41 { static_cast<InputTheme&>(*this) = i; return *this; }
42
44 { static_cast<InputTheme&>(*this) = c; return *this; }
45
47 { static_cast<InputTheme&>(*this) = g; return *this; }
48
49 // ── Getters / setters ─────────────────────────────────────────────────
50
51 [[nodiscard]] sf::Color getSelectionColor() const { return selectionColor; }
52 [[nodiscard]] sf::Color getCursorColor() const { return cursorColor; }
53
55 void setCursorColor(const sf::Color& c) { cursorColor = c; }
56 };
57
58} // namespace ml
59
60#endif // MALENA_TEXTINPUTTHEME_H
static const Color White
std::uint8_t b
std::uint8_t g
std::uint8_t r
Definition Component.h:22
Theme tokens for interactive UI controls.
Theme tokens for all visual components.
Color and font tokens shared by all input controls.
Definition InputTheme.h:25
InputTheme & applyFrom(const Theme &t) override
Populate all fields from the global Theme token set.
Definition InputTheme.h:38
Color tokens for TextInput and TextArea.
sf::Color getCursorColor() const
TextInputTheme & applyFrom(const Theme &t) override
Populate all fields from the global Theme token set.
TextInputTheme & operator=(const ControlTheme &c)
void setCursorColor(const sf::Color &c)
TextInputTheme & operator=(const GraphicTheme &g)
void setSelectionColor(const sf::Color &c)
sf::Color getSelectionColor() const
TextInputTheme & operator=(const InputTheme &i)
Universal design token set applied across all Themeable components.
Definition Theme.h:70
sf::Color primary
Definition Theme.h:74
sf::Color onSurface
Definition Theme.h:86