--- ---
|
TGUI
1.x-dev
|
Implicit converter for settable properties. More...
#include <TGUI/ObjectConverter.hpp>
Public Types | |
| enum class | Type { None , Bool , Font , Color , String , Number , Outline , Texture , TextStyle , RendererData } |
Public Member Functions | |
| ObjectConverter () | |
| Default constructor, to create an empty object. | |
| ObjectConverter (const char *string) | |
| Stores a string for later retrieval. | |
| ObjectConverter (const String &string) | |
| Stores a string for later retrieval. | |
| ObjectConverter (Font font) | |
| Stores a font object for later retrieval. | |
| ObjectConverter (Color color) | |
| Stores a color object for later retrieval. | |
| ObjectConverter (bool value) | |
| Stores a boolean for later retrieval. | |
| template<typename T , typename = typename std::enable_if_t<std::is_arithmetic<T>::value, T>> | |
| ObjectConverter (T number) | |
| Stores a number for later retrieval. | |
| ObjectConverter (const Outline &outline) | |
| Stores an outline object for later retrieval. | |
| ObjectConverter (const Texture &texture) | |
| Stores a texture object for later retrieval. | |
| ObjectConverter (TextStyle style) | |
| Stores a single text style for later retrieval. | |
| ObjectConverter (TextStyles style) | |
| Stores a text style for later retrieval. | |
| ObjectConverter (std::shared_ptr< RendererData > data) | |
| Stores render data for later retrieval. | |
| const String & | getString () |
| Retrieves the saved string. | |
| const Font & | getFont () |
| Retrieves the saved font. | |
| const Color & | getColor () |
| Retrieves the saved color. | |
| const Outline & | getOutline () |
| Retrieves the saved outline. | |
| bool | getBool () |
| Retrieves the saved boolean. | |
| float | getNumber () |
| Retrieves the saved number. | |
| const Texture & | getTexture () |
| Retrieves the saved texture. | |
| const TextStyles & | getTextStyle () |
| Retrieves the saved text style. | |
| const std::shared_ptr< RendererData > & | getRenderer () |
| Retrieves the saved renderer data. | |
| Type | getType () const |
| Retrieves the type of the object that has been stored. | |
| bool | operator== (const ObjectConverter &right) const |
| Check if the object equals another one. | |
| bool | operator!= (const ObjectConverter &right) const |
| Check if the object differs from another one. | |
Implicit converter for settable properties.
|
inline |
Stores a string for later retrieval.
| string | String to store |
|
inline |
Stores a string for later retrieval.
| string | String to store |
|
inline |
Stores a font object for later retrieval.
| font | Font to store |
|
inline |
Stores a color object for later retrieval.
| color | Color to store |
|
inline |
Stores a boolean for later retrieval.
| value | Boolean to store |
|
inline |
Stores a number for later retrieval.
| number | Number to store |
|
inline |
Stores an outline object for later retrieval.
| outline | Outline to store |
|
inline |
Stores a texture object for later retrieval.
| texture | Texture to store |
|
inline |
Stores a single text style for later retrieval.
| style | Text style to store |
|
inline |
Stores a text style for later retrieval.
| style | Text style to store |
|
inline |
Stores render data for later retrieval.
| data | Renderer data to store |
|
nodiscard |
Retrieves the saved boolean.
This function will assert when something other than a boolean was saved
|
nodiscard |
Retrieves the saved color.
This function will assert when something other than a color was saved
|
nodiscard |
Retrieves the saved font.
This function will assert when something other than a font was saved
|
nodiscard |
Retrieves the saved number.
This function will assert when something other than a number was saved
|
nodiscard |
Retrieves the saved outline.
This function will assert when something other than a outline was saved
|
nodiscard |
Retrieves the saved renderer data.
This function will assert when something other than a renderer data was saved
|
nodiscard |
Retrieves the saved string.
|
nodiscard |
Retrieves the saved text style.
This function will assert when something other than a text style was saved
|
nodiscard |
Retrieves the saved texture.
This function will assert when something other than a texture was saved
|
nodiscard |
Retrieves the type of the object that has been stored.
|
nodiscard |
Check if the object differs from another one.
Objects with different types will always be considered as different, even if using them would have the same outcome
|
nodiscard |
Check if the object equals another one.
Objects with different types will always be considered as different, even if using them would have the same outcome