Rocket::Core::FontEffectInstancer Class Reference

#include <FontEffectInstancer.h>

Inheritance diagram for Rocket::Core::FontEffectInstancer:
Collaboration diagram for Rocket::Core::FontEffectInstancer:

Public Member Functions

virtual FontEffectInstanceFontEffect (const String &name, const PropertyDictionary &properties)=0
virtual void ReleaseFontEffect (FontEffect *font_effect)=0
virtual void Release ()=0
 Releases the instancer.
const PropertySpecificationGetPropertySpecification () const
 Returns the property specification associated with the instancer.

Protected Member Functions

PropertyDefinitionRegisterProperty (const String &property_name, const String &default_value, bool affects_generation=true)
bool RegisterShorthand (const String &shorthand_name, const String &property_names, PropertySpecification::ShorthandType type=PropertySpecification::AUTO)
virtual void OnReferenceDeactivate ()
 A hook method called when the reference count drops to 0.

Friends

class Factory

Detailed Description

A font effect instancer provides a method for allocating and deallocating font effects.

It is important at the same instancer that allocated a font effect releases it. This ensures there are no issues with memory from different DLLs getting mixed up.

Author:
Peter Curry

Member Function Documentation

virtual FontEffect* Rocket::Core::FontEffectInstancer::InstanceFontEffect ( const String name,
const PropertyDictionary properties 
) [pure virtual]

Instances a font effect given the property tag and attributes from the RCSS file.

Parameters:
[in] name The type of font effect desired. For example, "title-font-effect: outline;" is declared as type "outline".
[in] properties All RCSS properties associated with the font effect.
Returns:
The font effect if it was instanced successfully, NULL if an error occured.

Implemented in Rocket::Core::FontEffectNoneInstancer, Rocket::Core::FontEffectOutlineInstancer, and Rocket::Core::FontEffectShadowInstancer.

virtual void Rocket::Core::FontEffectInstancer::ReleaseFontEffect ( FontEffect font_effect  )  [pure virtual]

Releases the given font effect.

Parameters:
[in] font_effect Font effect to release. This is guaranteed to have been constructed by this instancer.

Implemented in Rocket::Core::FontEffectNoneInstancer, Rocket::Core::FontEffectOutlineInstancer, and Rocket::Core::FontEffectShadowInstancer.

PropertyDefinition & Rocket::Core::FontEffectInstancer::RegisterProperty ( const String property_name,
const String default_value,
bool  affects_generation = true 
) [protected]

Registers a property for the font effect.

Parameters:
[in] property_name The name of the new property (how it is specified through RCSS).
[in] default_value The default value to be used.
[in] affects_generation True if this property affects the effect's texture data or glyph size, false if not.
Returns:
The new property definition, ready to have parsers attached.

bool Rocket::Core::FontEffectInstancer::RegisterShorthand ( const String shorthand_name,
const String property_names,
PropertySpecification::ShorthandType  type = PropertySpecification::AUTO 
) [protected]

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.


The documentation for this class was generated from the following files: