26#ifndef TGUI_RICH_TEXT_LABEL_HPP
27#define TGUI_RICH_TEXT_LABEL_HPP
30#include <TGUI/Widgets/Label.hpp>
34TGUI_MODULE_EXPORT
namespace tgui
54 using Ptr = std::shared_ptr<RichTextLabel>;
55 using ConstPtr = std::shared_ptr<const RichTextLabel>;
57 static constexpr const char StaticWidgetType[] =
"RichTextLabel";
67 RichTextLabel(
const char* typeName = StaticWidgetType,
bool initRenderer =
true);
122 float calculateLineSpacing(
const std::vector<Text::Blueprint>& line,
float defaultLineSpacing);
128 float calculateTextHeight(
const std::vector<std::vector<Text::Blueprint>>& textPiecesLines,
float defaultLineSpacing);
134 void constructRichLineBlueprints(std::vector<std::vector<Text::Blueprint>>& textPiecesLines, std::vector<Texture>& images);
146 std::vector<Sprite> m_images;
Base class for render targets.
Definition BackendRenderTarget.hpp:48
Label widget.
Definition Label.hpp:44
RichTextLabel widget.
Definition RichTextLabel.hpp:51
static TGUI_NODISCARD RichTextLabel::Ptr create(const String &text="")
Creates a new label widget.
static TGUI_NODISCARD RichTextLabel::Ptr copy(const RichTextLabel::ConstPtr &label)
Makes a copy of another label.
void draw(BackendRenderTarget &target, RenderStates states) const override
Draw the widget to a render target.
void rendererChanged(const String &property) override
Function called when one of the properties of the renderer is changed.
std::shared_ptr< const RichTextLabel > ConstPtr
Shared constant widget pointer.
Definition RichTextLabel.hpp:55
TGUI_NODISCARD Widget::Ptr clone() const override
Makes a copy of the widget if you don't know its exact type.
void rearrangeText() override
Rearrange the text (recreates m_textPieces), making use of the given size of maximum text width.
std::shared_ptr< RichTextLabel > Ptr
Shared widget pointer.
Definition RichTextLabel.hpp:54
Wrapper class to store strings.
Definition String.hpp:101
Namespace that contains all TGUI functions and classes.
Definition AbsoluteOrRelativeValue.hpp:39
States used for drawing.
Definition RenderStates.hpp:39