6#include "structure/graphics/spk_color.hpp"
7#include "structure/graphics/spk_sprite_sheet.hpp"
8#include "structure/math/spk_vector2.hpp"
9#include "structure/widget/components/spk_nine_slice_background.hpp"
10#include "structure/widget/components/spk_text_region.hpp"
11#include "structure/widget/spk_widget.hpp"
30 size_t _minimalWidth = 0;
31 size_t _currentWrapWidth = 0;
36 std::wstring _wrapText(uint32_t p_availableWidth)
const;
37 spk::Vector2UInt _computeMinimalSize()
const;
112 void setText(
const std::wstring &p_text);
117 const std::wstring &
text()
const;
135 void setAlignment(spk::HorizontalAlignment p_horizontalAlignment, spk::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
void setColors(const spk::Color &p_glyphColor, const spk::Color &p_outlineColor)
Sets glyph and outline colors.
Definition spk_text_area.cpp:131
const spk::Font::Size & fontSize() const
Returns the font size used for text rendering.
Definition spk_text_area.cpp:126
void setAlignment(spk::HorizontalAlignment p_horizontalAlignment, spk::VerticalAlignment p_verticalAlignment)
Sets text alignment.
Definition spk_text_area.cpp:171
spk::VerticalAlignment verticalAlignment() const
Returns the vertical alignment.
Definition spk_text_area.cpp:182
size_t minimalWidth() const
Returns the minimal width for wrapping.
Definition spk_text_area.cpp:161
spk::Font * font() const
Returns the font used for text rendering.
Definition spk_text_area.cpp:114
TextArea(const std::wstring &p_name, spk::Widget *p_parent)
Builds a text area widget.
Definition spk_text_area.cpp:70
const spk::Color & glyphColor() const
Returns the glyph color.
Definition spk_text_area.cpp:136
spk::HorizontalAlignment horizontalAlignment() const
Returns the horizontal alignment.
Definition spk_text_area.cpp:177
const spk::Color & outlineColor() const
Returns the outline color.
Definition spk_text_area.cpp:141
void setText(const std::wstring &p_text)
Sets the text content.
Definition spk_text_area.cpp:146
void setMinimalWidth(size_t p_width)
Sets the minimal width for wrapping.
Definition spk_text_area.cpp:153
void setCornerSize(const spk::Vector2UInt &p_cornerSize)
Sets background corner size.
Definition spk_text_area.cpp:85
const spk::Vector2UInt & cornerSize() const
Returns background corner size.
Definition spk_text_area.cpp:92
const spk::SpriteSheet * texture() const
Returns the background texture.
Definition spk_text_area.cpp:102
void setFont(spk::Font *p_font)
Sets the font used for text rendering.
Definition spk_text_area.cpp:107
const std::wstring & text() const
Returns the text content.
Definition spk_text_area.cpp:166
void setFontSize(const spk::Font::Size &p_size)
Sets the font size used for text rendering.
Definition spk_text_area.cpp:119
void setTexture(const spk::SpriteSheet *p_spriteSheet)
Sets the background texture.
Definition spk_text_area.cpp:97
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