26#ifndef TGUI_OBJECT_CONVERTER_HPP
27#define TGUI_OBJECT_CONVERTER_HPP
30#include <TGUI/TextStyle.hpp>
31#include <TGUI/Variant.hpp>
32#include <TGUI/Outline.hpp>
33#include <TGUI/Texture.hpp>
34#include <TGUI/Color.hpp>
35#include <TGUI/Font.hpp>
108 m_value{std::move(font)}
120 m_type {Type::
Color},
144 template <typename T, typename = typename std::enable_if<std::is_arithmetic<T>::value, T>::type>
146 m_type {Type::Number},
147 m_value{static_cast<float>(number)}
210 m_value{std::move(data)}
338 Type m_type = Type::None;
342 bool m_serialized =
false;
Wrapper for colors.
Definition Color.hpp:63
Implicit converter for settable properties.
Definition ObjectConverter.hpp:48
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:131
const Color & getColor()
Retrieves the saved color.
ObjectConverter(std::shared_ptr< RendererData > data)
Stores render data for later retrieval.
Definition ObjectConverter.hpp:208
const Texture & getTexture()
Retrieves the saved texture.
ObjectConverter(const Outline &outline)
Stores an outline object for later retrieval.
Definition ObjectConverter.hpp:158
ObjectConverter(Color color)
Stores a color object for later retrieval.
Definition ObjectConverter.hpp:119
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:171
const String & getString()
Retrieves the saved string.
ObjectConverter()
Default constructor, to create an empty object.
Definition ObjectConverter.hpp:69
ObjectConverter(const char *string)
Stores a string for later retrieval.
Definition ObjectConverter.hpp:80
ObjectConverter(Font font)
Stores a font object for later retrieval.
Definition ObjectConverter.hpp:106
ObjectConverter(TextStyle style)
Stores a single text style for later retrieval.
Definition ObjectConverter.hpp:183
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:91
ObjectConverter(T number)
Stores a number for later retrieval.
Definition ObjectConverter.hpp:145
ObjectConverter(TextStyles style)
Stores a text style for later retrieval.
Definition ObjectConverter.hpp:195
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:39
Wrapper class to store strings.
Definition String.hpp:79
Wrapper for text styles.
Definition TextStyle.hpp:58
Definition Texture.hpp:49
Definition Variant.hpp:92
Namespace that contains all TGUI functions and classes.
Definition AbsoluteOrRelativeValue.hpp:36
TextStyle
Enumeration of the text drawing styles.
Definition TextStyle.hpp:40
Shared data used in renderer classes.
Definition WidgetRenderer.hpp:42