MezzanineEngine 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Attributes | List of all members
Mezzanine::UI::DefaultColourTag Class Reference

This class implements a character colour changing tag. More...

#include <defaultmarkupparser.h>

+ Inheritance diagram for Mezzanine::UI::DefaultColourTag:
+ Collaboration diagram for Mezzanine::UI::DefaultColourTag:

Public Member Functions

 DefaultColourTag ()
 Class constructor.
 
virtual ~DefaultColourTag ()
 Class destructor.
 
virtual const StringGetName () const
 Gets the name of this tag. More...
 
virtual Boolean IsRangeTag () const
 Gets whether or not this tag applies to a range of characters. More...
 
virtual ProcessResult Process (NameValuePairMap &Params, CharacterTraits &Traits, TextLayer *Layer) const
 Processes this tag. More...
 
- Public Member Functions inherited from Mezzanine::UI::MarkupTag
 MarkupTag ()
 Class constructor.
 
virtual ~MarkupTag ()
 Class destructor.
 

Static Public Attributes

static const String TagName = "Colour"
 The name of this tag as it should appear in markup.
 

Additional Inherited Members

- Public Types inherited from Mezzanine::UI::MarkupTag
typedef std::list< Character * > CharacterContainer
 Basic container type for the storage of Character instances by this class.
 
typedef
CharacterContainer::iterator 
CharacterIterator
 Iterator type for Character instances stored by this class.
 
typedef
CharacterContainer::const_iterator 
ConstCharacterIterator
 Const Iterator type for Character instances stored by this class.
 
typedef std::pair< Boolean,
Character * > 
ProcessResult
 An std::pair used to report the result of a MarkupTag being processed any the character it may have generated.
 

Detailed Description

This class implements a character colour changing tag.

This tag supports both short and long notation. For example: "[Colour=FFFFFFFF]" is valid and equivalent to "[Colour Value=FFFFFFFF]". "Value" is the only parameter name supported by this class/tag. The actual value of "Value" is a colour expressed in Hexadecimal. Each two characters are one colour, in the following order: Red, Green, Blue, and Alpha. The alpha portion does not need to be defined and in it's absence an alpha value of 1.0 will be filled in. If the parameter is less than 6 characters long this will fail and "Process" will return false.

Definition at line 59 of file defaultmarkupparser.h.

Member Function Documentation

virtual const String& Mezzanine::UI::DefaultColourTag::GetName ( ) const
inlinevirtual

Gets the name of this tag.

Returns
Returns a String containing the name of this tag.

Implements Mezzanine::UI::MarkupTag.

Definition at line 77 of file defaultmarkupparser.h.

virtual Boolean Mezzanine::UI::DefaultColourTag::IsRangeTag ( ) const
inlinevirtual

Gets whether or not this tag applies to a range of characters.

Returns
Returns true if this tag requires a closing tag to accompany to be valid, false otherwise.

Implements Mezzanine::UI::MarkupTag.

Definition at line 80 of file defaultmarkupparser.h.

MarkupTag::ProcessResult Mezzanine::UI::DefaultColourTag::Process ( NameValuePairMap Params,
CharacterTraits Traits,
TextLayer Layer 
) const
virtual

Processes this tag.

Parameters
ParamsA NameValuePairMap of all the parameters provided for this tag.
TraitsThe character traits to be modified and used for future character construction.
LayerA pointer to the TextLayer currently being parsed.
Returns
Returns a process result where the first value is true if this tag succeeded in making it's alterations and the second value contains a pointer to a generated character if one was generated. The second value can be NULL.

Implements Mezzanine::UI::MarkupTag.

Definition at line 58 of file defaultmarkupparser.cpp.


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