|
CeresEngine 0.2.0
A game development framework
|
An object that describes the appearance of a UI view. More...
#include <CeresEngine/UI/UIAppearance.hpp>
Public Member Functions | |
| UIAppearance () | |
| ~UIAppearance () noexcept | |
| template<typename T > | |
| void | set (const UIAppearanceProperty< T > &property, const T &value) |
| Sets a new property override on the appearance. | |
| template<typename T > | |
| Optional< const T & > | get (const UIAppearanceProperty< T > &property) const |
Tries to find an override for the given appearance property. | |
Public Member Functions inherited from CeresEngine::RefCounted< UIAppearance > | |
| RefCounted (Args &&... args) | |
Creates a new RefCounted object and constructs a new Deleter by forwarding Args to it. | |
| void | retain () noexcept |
| Retains the object by increment it's reference count by one. | |
| bool | release () noexcept |
| Relases the object by decrementing it's reference count by one. | |
Private Types | |
| using | PropertyVariant = Variant< UIColor, double, Paint, HFont > |
Private Attributes | |
| HashMap< String, PropertyVariant > | mProperties |
An object that describes the appearance of a UI view.
| CeresEngine::UIAppearance::UIAppearance | ( | ) |
|
noexcept |
| template Optional< const HFont & > CeresEngine::UIAppearance::get | ( | const UIAppearanceProperty< T > & | property | ) | const |
Tries to find an override for the given appearance property.
| T | The property value type. |
| property | The appearance property. |
| template void CeresEngine::UIAppearance::set | ( | const UIAppearanceProperty< T > & | property, |
| const T & | value | ||
| ) |
Sets a new property override on the appearance.
Any views or subviews to which the appearance is attached to, will use this value when resolving the property.
| T | The property value type. |
| property | The appearance property. |
| value | The new appearance property override value. |
|
private |