3#include "structure/widget/components/spk_nine_slice_background.hpp"
4#include "structure/widget/components/spk_text_region.hpp"
5#include "structure/widget/spk_widget.hpp"
109 void setText(
const std::wstring &p_text);
114 const std::wstring &
text()
const;
121 void setAlignment(HorizontalAlignment p_horizontalAlignment, VerticalAlignment p_verticalAlignment);
Loads font data and provides cached bitmap atlases per size.
Definition spk_font.hpp:33
Renders a scalable nine-slice background using a sprite sheet.
Definition spk_nine_slice_background.hpp:25
Loads an image and exposes individual sprite regions.
Definition spk_sprite_sheet.hpp:21
const spk::Color & outlineColor() const
Returns the current outline color.
Definition spk_text_label.cpp:72
TextLabel(const std::wstring &p_name, spk::Widget *p_parent)
Creates a text label widget.
Definition spk_text_label.cpp:5
spk::Font * font() const
Returns the font used for the label text.
Definition spk_text_label.cpp:46
const spk::Color & glyphColor() const
Returns the current glyph color.
Definition spk_text_label.cpp:67
void _onPaintEvent(spk::PaintEvent &p_event) override
Paints the background and text regions.
Definition spk_text_label.cpp:109
HorizontalAlignment horizontalAlignment() const
Returns the current horizontal alignment.
Definition spk_text_label.cpp:93
const std::wstring & text() const
Returns the current label text.
Definition spk_text_label.cpp:83
void setFont(spk::Font *p_font)
Sets the font used for the label text.
Definition spk_text_label.cpp:40
VerticalAlignment verticalAlignment() const
Returns the current vertical alignment.
Definition spk_text_label.cpp:98
const spk::SpriteSheet * texture() const
Returns the sprite sheet used for the background.
Definition spk_text_label.cpp:35
void _onGeometryChange() override
Updates background and text geometry when the widget size changes.
Definition spk_text_label.cpp:103
void setTexture(const spk::SpriteSheet *p_spriteSheet)
Assigns the sprite sheet used for the background.
Definition spk_text_label.cpp:30
const spk::Vector2UInt & cornerSize() const
Returns the current corner size for the background.
Definition spk_text_label.cpp:25
void setText(const std::wstring &p_text)
Updates the label text.
Definition spk_text_label.cpp:77
const spk::Font::Size & fontSize() const
Returns the current font size for the label text.
Definition spk_text_label.cpp:57
void setColors(const spk::Color &p_glyphColor, const spk::Color &p_outlineColor)
Sets the glyph and outline colors for the label text.
Definition spk_text_label.cpp:62
void setFontSize(const spk::Font::Size &p_size)
Sets the font size for the label text.
Definition spk_text_label.cpp:51
void setAlignment(HorizontalAlignment p_horizontalAlignment, VerticalAlignment p_verticalAlignment)
Sets the horizontal and vertical alignment for the text.
Definition spk_text_label.cpp:88
void setCornerSize(const spk::Vector2UInt &p_cornerSize)
Sets the corner size for the nine-slice background.
Definition spk_text_label.cpp:18
Renders formatted text within a geometry region.
Definition spk_text_region.hpp:24
RGBA color utility storing normalized floating components.
Definition spk_color.hpp:18
Defines glyph and outline sizes for a font bitmap.
Definition spk_font.hpp:40
Event emitted when a drawable region needs repainting.
Definition spk_paint_event.hpp:19