Rocket::Core::Decorator Class Reference
#include <Decorator.h>
Detailed Description
The abstract base class for any visual object that can be attached to any element.
- Author:
- Peter Curry
Member Function Documentation
| virtual DecoratorDataHandle Rocket::Core::Decorator::GenerateElementData |
( |
Element * |
element |
) |
[pure virtual] |
| virtual void Rocket::Core::Decorator::ReleaseElementData |
( |
DecoratorDataHandle |
element_data |
) |
[pure virtual] |
| void Rocket::Core::Decorator::SetZIndex |
( |
float |
z_index |
) |
|
Sets the z-index of the decorator. A decorator with a higher z-index will be rendered after a decorator with a lower z-index. By default, all decorators have a z-index of 0.
- Parameters:
-
| [in] | z-index | The new z-index of the decorator. |
| float Rocket::Core::Decorator::GetZIndex |
( |
|
) |
const |
Returns the decorator's z-index.
- Returns:
- The z-index of the decorator.
| void Rocket::Core::Decorator::SetSpecificity |
( |
int |
specificity |
) |
|
Sets the specificity of the decorator.
- Parameters:
-
| [in] | specificity | The specificity of the decorator. |
| int Rocket::Core::Decorator::GetSpecificity |
( |
|
) |
const |
Returns the specificity of the decorator. This is used when multiple pseudo-classes are active on an element, each with similarly-named decorators.
- Returns:
- The specificity of the decorator.
| virtual void Rocket::Core::Decorator::RenderElement |
( |
Element * |
element, |
|
|
DecoratorDataHandle |
element_data | |
|
) |
| | [pure virtual] |
| int Rocket::Core::Decorator::LoadTexture |
( |
const String & |
texture_name, |
|
|
const String & |
rcss_path | |
|
) |
| | [protected] |
Attempts to load a texture into the list of textures in use by the decorator.
- Parameters:
-
| [in] | texture_name | The name of the texture to load. |
| [in] | rcss_path | The RCSS file the decorator definition was loaded from; this is used to resolve relative paths. |
- Returns:
- The index of the texture if the load was successful, or -1 if the load failed.
| const Texture * Rocket::Core::Decorator::GetTexture |
( |
int |
index = 0 |
) |
const [protected] |
Returns one of the decorator's previously loaded textures.
- Parameters:
-
| [in] | index | The index of the desired texture. |
- Returns:
- The texture at the appropriate index, or NULL if the index was invalid.
| float Rocket::Core::Decorator::ResolveProperty |
( |
const PropertyDictionary & |
properties, |
|
|
const String & |
name, |
|
|
float |
base_value | |
|
) |
| | const [protected] |
Returns the floating-point value of a numerical property from a dictionary of properties, resolving it against a base value if it is a relative property.
- Parameters:
-
| [in] | properties | The user-supplied dictionary of properties. |
| [in] | name | The name of the desired property. This must be a numerical property. |
- Returns:
- The fully-resolved value of the property, or 0 if an error occured.
The documentation for this class was generated from the following files:
- Include/Rocket/Core/Decorator.h
- Source/Core/Decorator.cpp