Rocket::Core::StyleSheetSpecification Class Reference
#include <StyleSheetSpecification.h>
|
Static Public Member Functions |
| static bool | Initialise () |
|
static void | Shutdown () |
| | Destroys the specification structure and releases the parsers.
|
| static bool | RegisterParser (const String &parser_name, PropertyParser *parser) |
| static PropertyParser * | GetParser (const String &parser_name) |
| static PropertyDefinition & | RegisterProperty (const String &property_name, const String &default_value, bool inherited, bool forces_layout=false) |
| static const PropertyDefinition * | GetProperty (const String &property_name) |
| static void | GetRegisteredProperties (PropertyNameList &properties) |
| static bool | RegisterShorthand (const String &shorthand_name, const String &property_names, PropertySpecification::ShorthandType type=PropertySpecification::AUTO) |
static const
PropertyShorthandDefinition * | GetShorthand (const String &shorthand_name) |
| static bool | ParsePropertyDeclaration (PropertyDictionary &dictionary, const String &property_name, const String &property_value, const String &source_file="", int source_line_number=0) |
Detailed Description
- Author:
- Peter Curry
Member Function Documentation
| bool Rocket::Core::StyleSheetSpecification::Initialise |
( |
|
) |
[static] |
Starts up the specification structure and registers default properties and type parsers.
- Returns:
- True if the specification started up successfully, false if not.
| bool Rocket::Core::StyleSheetSpecification::RegisterParser |
( |
const String & |
parser_name, |
|
|
PropertyParser * |
parser | |
|
) |
| | [static] |
Registers a parser for use in property definitions.
- Parameters:
-
| [in] | parser_name | The name to register the new parser under. |
| [in] | parser | The parser to register. This parser will be released by the specification. |
- Returns:
- True if the parser was registered successfully, false otherwise.
| PropertyParser * Rocket::Core::StyleSheetSpecification::GetParser |
( |
const String & |
parser_name |
) |
[static] |
Returns the parser registered with a specific name.
- Parameters:
-
| [in] | parser_name | The name of the desired parser. |
- Returns:
- The parser registered under the given name, or NULL if no such parser exists.
| PropertyDefinition & Rocket::Core::StyleSheetSpecification::RegisterProperty |
( |
const String & |
property_name, |
|
|
const String & |
default_value, |
|
|
bool |
inherited, |
|
|
bool |
forces_layout = false | |
|
) |
| | [static] |
Registers a property with a new definition.
- Parameters:
-
| [in] | property_name | The name to register the new property under. |
| [in] | default_value | The default value to be used for an element if it has no other definition provided. |
| [in] | inherited | True if this property is inherited from parent to child, false otherwise. |
| [in] | forces_layout | True if a change in this property on an element will cause the element's layout to possibly change. |
- Returns:
- The new property definition, ready to have parsers attached.
Returns a property definition.
- Parameters:
-
| [in] | property_name | The name of the desired property. |
- Returns:
- The appropriate property definition if it could be found, NULL otherwise.
| void Rocket::Core::StyleSheetSpecification::GetRegisteredProperties |
( |
PropertyNameList & |
properties |
) |
[static] |
Fetches a list of the names of all registered property definitions.
- Parameters:
-
| properties[in] | The list to store the property names. |
| bool Rocket::Core::StyleSheetSpecification::RegisterShorthand |
( |
const String & |
shorthand_name, |
|
|
const String & |
property_names, |
|
|
PropertySpecification::ShorthandType |
type = PropertySpecification::AUTO | |
|
) |
| | [static] |
Registers a shorthand property definition.
- Parameters:
-
| [in] | shorthand_name | The name to register the new shorthand property under. |
| [in] | properties | A comma-separated list of the properties this definition is shorthand for. The order in which they are specified here is the order in which the values will be processed. |
| [in] | type | The type of shorthand to declare. |
| True | if all the property names exist, false otherwise. |
Returns a shorthand definition.
- Parameters:
-
| [in] | shorthand_name | The name of the desired shorthand. |
- Returns:
- The appropriate shorthand definition if it could be found, NULL otherwise.
| bool Rocket::Core::StyleSheetSpecification::ParsePropertyDeclaration |
( |
PropertyDictionary & |
dictionary, |
|
|
const String & |
property_name, |
|
|
const String & |
property_value, |
|
|
const String & |
source_file = "", |
|
|
int |
source_line_number = 0 | |
|
) |
| | [static] |
Parses a property declaration, setting any parsed and validated properties on the given dictionary.
- Parameters:
-
| [in] | dictionary | The property dictionary which will hold all declared properties. |
| [in] | property_name | The name of the declared property. |
| [in] | property_value | The values the property is being set to. |
| [in] | source_file | The file where this property was declared. Used for error reporting, debugging and relative paths for referenced assets. |
| [in] | line_number | The location of the source file where this property was declared. Used for error reporting and debugging. |
- Returns:
- True if all properties were parsed successfully, false otherwise.
The documentation for this class was generated from the following files: