29#include <TGUI/Font.hpp>
30#include <TGUI/Color.hpp>
31#include <TGUI/Vector2.hpp>
32#include <TGUI/TextStyle.hpp>
33#include <TGUI/RenderStates.hpp>
43 constexpr unsigned int AutoTextSize = 0xFFFFFFFF;
115 static String wordWrap(
float maxWidth,
const String& text,
Font font,
unsigned int textSize,
bool bold,
bool dropLeadingSpace =
true);
146 Text& operator=(
Text&&) noexcept = default;
198 void setCharacterSize(
unsigned int size);
207 unsigned int getCharacterSize() const;
234 void setOpacity(
float opacity);
243 float getOpacity() const;
307 void setOutlineThickness(
float thickness);
315 float getOutlineThickness() const;
330 Vector2f findCharacterPos(std::
size_t index) const;
338 float getExtraHorizontalPadding() const;
346 float getExtraHorizontalOffset() const;
352 float getLineHeight() const;
358 float getLineWidth() const;
375 Color m_outlineColor;
Base class for text implementations that depend on the backend.
Definition: BackendText.hpp:41
Wrapper for colors.
Definition: Color.hpp:63
Wrapper class to store strings.
Definition: String.hpp:79
Wrapper for text styles.
Definition: TextStyle.hpp:58
static unsigned int findBestTextSize(Font font, float height, int fit=0)
Finds the best character size for the text.
static float getExtraHorizontalPadding(Font font, unsigned int characterSize, TextStyles textStyle={})
Returns a small distance that text should be placed from the side of a widget as padding.
static float calculateExtraVerticalSpace(Font font, unsigned int characterSize, TextStyles style={})
Text()
Default constructor.
static float getExtraVerticalPadding(unsigned int characterSize)
Returns the distance that text should be placed from the bottom of the widget as padding.
static float getLineWidth(const String &text, Font font, unsigned int characterSize, TextStyles textStyle={})
Returns the width of a single line of text.
static float getLineHeight(Font font, unsigned int characterSize, TextStyles textStyle={})
Returns the height of a single line of text.
static float getExtraHorizontalOffset(Font font, unsigned int characterSize, TextStyles textStyle={})
Returns an extra distance that text should be placed from the side of a widget as padding.
static String wordWrap(float maxWidth, const String &text, Font font, unsigned int textSize, bool bold, bool dropLeadingSpace=true)
Namespace that contains all TGUI functions and classes.
Definition: AbsoluteOrRelativeValue.hpp:36