9#ifndef ASW_MODULES_UI_THEME_H
10#define ASW_MODULES_UI_THEME_H
306 return own !=
nullptr ? own : theme.
font;
Anchor
A point of the parent an anchored widget sits at, see Widget::anchor.
const asw::Font & pick_font(const asw::Font &own, const Theme &theme)
The font a widget draws with: its own, or the theme font.
void draw_focus_ring(const FocusRingStyle &style, const asw::Quad< float > &bounds)
Draw a focus ring around a widget.
BoxSide
Which side of a checkbox the box is on.
std::shared_ptr< TTF_Font > Font
Alias for a shared pointer to an TTF_Font.
std::shared_ptr< MIX_Audio > Sample
Alias for a shared pointer to an MIX_Audio.
TextJustify
Text justification options for text rendering.
RGBA color struct with 8-bit channels.
How a checkbox looks. Set on Theme::checkbox for every checkbox, or on Checkbox::checkbox_style for o...
float border_width
Row border width in pixels. 0 draws no border.
asw::Color bg_hover
Row background color while hovered, or focused with focus shown.
BoxSide box_side
Which side the box is on. The text is on the other side.
asw::Color box_pressed
Box color while pressed.
asw::Color box_border
Box border color.
asw::Color text_disabled
Text color while disabled.
asw::Color border
Row border color.
asw::Color mark
Check mark color.
asw::Color mark_disabled
Check mark color while disabled.
float box_border_width
Box border width in pixels. 0 draws no border.
asw::Color box_disabled
Box color while disabled.
asw::Color bg
Background color of the whole row.
asw::Color text
Text color.
asw::Color box_hover
Box color while hovered, or focused with focus shown.
asw::Color color
Ring color.
float width
Ring width in pixels. 0 draws no ring.
float offset
Gap between the widget and the ring, in pixels.
Look of a Modal and the dimmed screen behind it.
float min_width
Narrowest the modal gets.
float border_width
Outline width.
asw::Color dim
Colour laid over the screen behind the modal.
asw::Color bg
Fill of the modal.
asw::Color border
Outline, none when the width is 0.
float padding
Space between the modal's edge and its content.
float gap
Space between its widgets.
How a slider looks. Set on Theme::slider for every slider, or on Slider::style for one slider.
asw::Color knob_hover
Knob color while hovered, pressed, or focused with focus shown.
float knob_width
Knob width in pixels. The knob is as tall as the widget.
asw::Color disabled
Knob and fill color while disabled.
asw::Color knob
Knob color.
asw::Color track
Track color.
float track_height
Track height in pixels, centred in the widget.
asw::Color fill
Color of the track up to the value.
asw::Color knob_editing
Knob color while editing with left and right, see Slider.
Theme configuration for UI elements.
asw::Color text
Default text color.
CheckboxStyle checkbox
Default checkbox style.
InputStyle input
Default input box style.
float gap
Default gap between elements.
asw::Color panel_bg
Panel background color.
ModalStyle modal
Modals from Root::open_modal.
FocusRingStyle focus_ring
Focus ring style.
SliderStyle slider
Default slider style.
asw::Sample sound_move
Played on the UI bus when navigation moves focus. Optional.
asw::Font font
Font for widgets that do not set their own.
ButtonStyle button
Default button style.
asw::Sample sound_activate
Played on the UI bus when a widget is clicked or activated. Optional.
asw::Color text_dim
Dimmed text color.
float padding
Default padding.
ToastStyle toast
Messages from Root::toast.
The ring drawn around the focused widget during keyboard or controller navigation.
float border_width
Outline width.
float padding
Space around the text inside each message.
float gap
Space between messages.
float seconds
How long a message stays, from when it shows.
float fade_seconds
How long a message takes to fade out at the end.
Anchor anchor
Where messages show: Top, TopLeft or TopRight stack down from the top, Bottom, BottomLeft or BottomRi...
asw::Color text
Message text.
asw::Color border
Outline, none when the width is 0.
asw::Color bg
Fill behind each message.
float margin
Space from the top of the screen to the first message.
std::size_t max_visible
Messages on screen at once, the rest wait their turn.
Types used throughout the ASW library.