25#ifndef TGUI_OBJECT_CONVERTER_HPP
26#define TGUI_OBJECT_CONVERTER_HPP
28#include <TGUI/TextStyle.hpp>
29#include <TGUI/Variant.hpp>
30#include <TGUI/Outline.hpp>
31#include <TGUI/Texture.hpp>
32#include <TGUI/Color.hpp>
33#include <TGUI/Font.hpp>
37TGUI_MODULE_EXPORT
namespace tgui
100 m_value{std::move(font)}
110 m_type {Type::
Color},
131 template <typename T, typename = typename std::enable_if_t<std::is_arithmetic<T>::value, T>>
133 m_type {Type::Number},
134 m_value{static_cast<float>(number)}
189 m_value{std::move(data)}
270 TGUI_NODISCARD
const std::shared_ptr<RendererData>&
getRenderer();
295 Type m_type = Type::None;
299 bool m_serialized =
false;
Wrapper for colors.
Definition Color.hpp:73
Wrapper around the backend-specific font. All copies of the font will share the same internal font re...
Definition Font.hpp:58
Implicit converter for settable properties.
Definition ObjectConverter.hpp:46
bool operator!=(const ObjectConverter &right) const
Check if the object differs from another one.
const Font & getFont()
Retrieves the saved font.
bool getBool()
Retrieves the saved boolean.
ObjectConverter(bool value)
Stores a boolean for later retrieval.
Definition ObjectConverter.hpp:120
const Color & getColor()
Retrieves the saved color.
ObjectConverter(std::shared_ptr< RendererData > data)
Stores render data for later retrieval.
Definition ObjectConverter.hpp:187
const Texture & getTexture()
Retrieves the saved texture.
ObjectConverter(const Outline &outline)
Stores an outline object for later retrieval.
Definition ObjectConverter.hpp:143
ObjectConverter(Color color)
Stores a color object for later retrieval.
Definition ObjectConverter.hpp:109
const std::shared_ptr< RendererData > & getRenderer()
Retrieves the saved renderer data.
ObjectConverter(const Texture &texture)
Stores a texture object for later retrieval.
Definition ObjectConverter.hpp:154
const String & getString()
Retrieves the saved string.
ObjectConverter()
Default constructor, to create an empty object.
Definition ObjectConverter.hpp:65
ObjectConverter(const char *string)
Stores a string for later retrieval.
Definition ObjectConverter.hpp:75
ObjectConverter(Font font)
Stores a font object for later retrieval.
Definition ObjectConverter.hpp:98
ObjectConverter(TextStyle style)
Stores a single text style for later retrieval.
Definition ObjectConverter.hpp:165
Type getType() const
Retrieves the type of the object that has been stored.
ObjectConverter(const String &string)
Stores a string for later retrieval.
Definition ObjectConverter.hpp:85
ObjectConverter(T number)
Stores a number for later retrieval.
Definition ObjectConverter.hpp:132
ObjectConverter(TextStyles style)
Stores a text style for later retrieval.
Definition ObjectConverter.hpp:176
const Outline & getOutline()
Retrieves the saved outline.
const TextStyles & getTextStyle()
Retrieves the saved text style.
bool operator==(const ObjectConverter &right) const
Check if the object equals another one.
float getNumber()
Retrieves the saved number.
Definition Outline.hpp:38
Wrapper class to store strings.
Definition String.hpp:96
Wrapper for text styles.
Definition TextStyle.hpp:55
Texture wrapper that internally reuses resources when multiple Texture objects are loaded from the sa...
Definition Texture.hpp:57
Definition Variant.hpp:94
Namespace that contains all TGUI functions and classes.
Definition AbsoluteOrRelativeValue.hpp:38
TextStyle
Enumeration of the text drawing styles.
Definition TextStyle.hpp:38
Shared data used in renderer classes.
Definition WidgetRenderer.hpp:48