5#ifndef MALENA_BUTTONTOGGLE_H
6#define MALENA_BUTTONTOGGLE_H
25 enum class Flag { ON, DISABLED };
60 std::function<void(
bool)> _onToggled;
62 void syncFromSettings();
74 static_assert(std::is_base_of_v<ButtonSettings, S>,
75 "applySettings() requires a type derived from ButtonSettings");
83 static_assert(std::is_base_of_v<ButtonTheme, T>,
84 "applyTheme() requires a type derived from ButtonTheme");
92 static_assert(std::is_base_of_v<ButtonSettings, St> &&
93 std::is_base_of_v<ButtonTheme, St>,
94 "applyStyle() requires a type derived from both ButtonSettings and ButtonTheme");
102 [[nodiscard]]
bool isOn()
const;
113 template<
typename MANIFEST>
Base class for all Malena manifests.
Component< M, Traits... > ComponentWith
Alias for Component<M, Traits...>.
@ HOVERED
Mouse is currently over this component (set by HoverableDispatcher).
Vector2< float > Vector2f
Universal design token set applied across all Themeable components.