bWidgets
Core widget toolkit designed for Blender
|
Simple class for managing properties that can be manipulated through stylesheets (CSS). More...
#include <bwStyleProperties.h>
Public Types | |
enum class | Type { BOOL , INTEGER , FLOAT , COLOR } |
Public Member Functions | |
void | setValue (bool) |
void | setValue (int) |
void | setValue (float) |
void | setValue (const bwColor &) |
void | setValue (const bwStyleProperty &) |
void | setValueToDefault () |
void | setDefaultValue (bool) |
void | setDefaultValue (int) |
void | setDefaultValue (float) |
void | setDefaultValue (const bwColor &) |
auto | getIdentifier () const -> std::string_view |
auto | getType () const -> Type |
Friends | |
template<typename > | |
class | bwStylePropertyInternal |
Simple class for managing properties that can be manipulated through stylesheets (CSS).
Idea of the bwStyleProperty is to add a string identifier to a variable (basic RTTI) so that stylesheet rules can be mapped to this concrete variable. Use the bwStyleProperties class to manage (add, lookup and iterate) a list of properties.
It is possible to reference an existing variable with a bwStyleProperty, meaning the property is not owner of it. To do so call the bwStyleProperties::addFoo() function with the reference argument set. Such usage looks like this:
|
strong |
auto bWidgets::bwStyleProperty::getIdentifier | ( | ) | const -> std::string_view |
auto bWidgets::bwStyleProperty::getType | ( | ) | const -> Type |
void bWidgets::bwStyleProperty::setDefaultValue | ( | bool | value | ) |
void bWidgets::bwStyleProperty::setDefaultValue | ( | const bwColor & | value | ) |
void bWidgets::bwStyleProperty::setDefaultValue | ( | float | value | ) |
void bWidgets::bwStyleProperty::setDefaultValue | ( | int | value | ) |
void bWidgets::bwStyleProperty::setValue | ( | bool | value | ) |
void bWidgets::bwStyleProperty::setValue | ( | const bwColor & | value | ) |
void bWidgets::bwStyleProperty::setValue | ( | const bwStyleProperty & | from_property_base | ) |
void bWidgets::bwStyleProperty::setValue | ( | float | value | ) |
void bWidgets::bwStyleProperty::setValue | ( | int | value | ) |
void bWidgets::bwStyleProperty::setValueToDefault | ( | ) |
|
friend |