5#ifndef MALENA_TOOLBAR_H
6#define MALENA_TOOLBAR_H
92 std::unique_ptr<ml::Core> owned;
93 std::function<void()> action;
95 bool separator =
false;
99 Item(Item&&) =
default;
103 std::vector<Item> _items;
105 float _barLength = 0.f;
106 int _hoveredIdx = -1;
128 static_assert(std::is_base_of_v<ToolbarSettings, S>,
129 "applySettings() requires ToolbarSettings");
137 static_assert(std::is_base_of_v<ToolbarTheme, T>,
138 "applyTheme() requires ToolbarTheme");
142 template<
typename St>
145 static_assert(std::is_base_of_v<ToolbarSettings, St> &&
146 std::is_base_of_v<ToolbarTheme, St>,
147 "applyStyle() requires ToolbarSettings and ToolbarTheme");
157 std::function<
void()> action = {});
174 [[nodiscard]] std::size_t
itemCount()
const {
return _items.size(); }
193 template<
typename MANIFEST>
Virtual base class for all Malena framework objects.
static const sf::Font & getDefault()
Return the built-in Arial font.
Base class for all Malena manifests.
Component< M, Traits... > ComponentWith
Alias for Component<M, Traits...>.
Vector2< float > Vector2f
Universal design token set applied across all Themeable components.