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

Basic class for all structures that get inserted into the rendering hierarchy. More...

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

Public Types

enum  RenderableType { RT_LineList, RT_Screen, RT_Widget }
 A small enum to describe the type of renderable this is.
 

Public Member Functions

virtual void _AppendRenderData (ScreenRenderData &RenderData)=0
 Appends the vertices of this renderable to another vector. More...
 
bool _IsDirty () const
 Gets whether or not this renderable is dirty. More...
 
virtual void _MarkDirty ()=0
 Marks this renderable as dirty, and informs other renderables if needed. More...
 
virtual String GetDerivedSerializableName () const
 Gets the most derived serializable name of this Renderable. More...
 
const StringGetName () const
 Gets the name of this renderable. More...
 
virtual RenderableType GetRenderableType () const =0
 Gets the type of renderable this is. More...
 
ScreenGetScreen () const
 Gets the parent screen of this renderable. More...
 
virtual Boolean GetVisible () const =0
 Gets the visibility setting of this renderable. More...
 
virtual void Hide ()=0
 Forces this renderable to hide.
 
virtual Boolean IsVisible () const =0
 Gets whether or not this renderable is being drawn. More...
 
virtual void ProtoDeSerialize (const XML::Node &SelfRoot)
 Take the data stored in an XML Node and overwrite this object with it. More...
 
virtual void ProtoDeSerializeProperties (const XML::Node &SelfRoot)
 Take the data stored in an XML Node and overwrite the properties of this object with it. More...
 
virtual void ProtoSerialize (XML::Node &ParentNode) const
 Convert this class to an XML::Node ready for serialization. More...
 
virtual void ProtoSerializeProperties (XML::Node &SelfRoot) const
 Convert the properties of this class to an XML::Node ready for serialization. More...
 
virtual void SetVisible (Boolean CanSee)=0
 Sets the visibility of this renderable. More...
 
virtual void Show ()=0
 Forces this renderable to be shown.
 

Static Public Member Functions

static String GetSerializableName ()
 Get the name of the the XML tag the Renderable class will leave behind as its instances are serialized. More...
 

Protected Member Functions

 Renderable (Screen *Parent)
 Blank constructor. More...
 
 Renderable (const String &RendName, Screen *Parent)
 Class constructor. More...
 
virtual ~Renderable ()
 Class destructor.
 
virtual void ProtoDeSerializeImpl (const XML::Node &SelfRoot)
 Implementation method for deseriailizing additional sets of data. More...
 
virtual void ProtoSerializeImpl (XML::Node &SelfRoot) const
 Implementation method for serializing additional sets of data. More...
 

Protected Attributes

Boolean Dirty
 Stores whether this Renderables vertices need to be regenerated. More...
 
String Name
 The unique name of this Renderable. More...
 
ScreenParentScreen
 A pointer to the Screen that created this Renderable. More...
 
Boolean Visible
 Stores whether this Renderable is to be rendered (also dependent on parent visibility). More...
 

Friends

class Widget
 

Detailed Description

Basic class for all structures that get inserted into the rendering hierarchy.

Definition at line 60 of file renderable.h.

Constructor & Destructor Documentation

Mezzanine::UI::Renderable::Renderable ( Screen Parent)
protected

Blank constructor.

Note
This is primarily useful for (and used as) a basic constructor suitable for XML deserialization post-construction.
Parameters
ParentThe parent screen that created this renderable.

Definition at line 52 of file renderable.cpp.

Mezzanine::UI::Renderable::Renderable ( const String RendName,
Screen Parent 
)
protected

Class constructor.

Parameters
RendNameThe name to be given to this renderable.
ParentThe parent screen that created this renderable.

Definition at line 58 of file renderable.cpp.

Member Function Documentation

virtual void Mezzanine::UI::Renderable::_AppendRenderData ( ScreenRenderData RenderData)
pure virtual

Appends the vertices of this renderable to another vector.

Parameters
RenderDataThe vector of vertex's to append to.

Implemented in Mezzanine::UI::QuadRenderable, and Mezzanine::UI::LineList.

bool Mezzanine::UI::Renderable::_IsDirty ( ) const

Gets whether or not this renderable is dirty.

Returns
Returns true if this renderable is dirty, false otherwise.

Definition at line 143 of file renderable.cpp.

virtual void Mezzanine::UI::Renderable::_MarkDirty ( )
pure virtual

Marks this renderable as dirty, and informs other renderables if needed.

Implemented in Mezzanine::UI::QuadRenderable, Mezzanine::UI::Screen, and Mezzanine::UI::LineList.

String Mezzanine::UI::Renderable::GetDerivedSerializableName ( ) const
virtual

Gets the most derived serializable name of this Renderable.

Note
When creating a new Renderable class verify this method has a valid return for it in order for serialization to work properly.
Returns
Returns the name of the XML tag from the most derived class of "this".

Reimplemented in Mezzanine::UI::QuadRenderable, Mezzanine::UI::Screen, and Mezzanine::UI::Widget.

Definition at line 134 of file renderable.cpp.

const String & Mezzanine::UI::Renderable::GetName ( ) const

Gets the name of this renderable.

Returns
Returns a string containing the name of this renderable.

Definition at line 77 of file renderable.cpp.

virtual RenderableType Mezzanine::UI::Renderable::GetRenderableType ( ) const
pure virtual

Gets the type of renderable this is.

Returns
Returns a RenderableType enum value coressponding the type of renderable this is.

Implemented in Mezzanine::UI::Screen, Mezzanine::UI::Widget, and Mezzanine::UI::LineList.

Screen * Mezzanine::UI::Renderable::GetScreen ( ) const

Gets the parent screen of this renderable.

Returns
Returns a pointer to the screen this renderable belongs to.

Definition at line 80 of file renderable.cpp.

String Mezzanine::UI::Renderable::GetSerializableName ( )
static

Get the name of the the XML tag the Renderable class will leave behind as its instances are serialized.

Returns
A string containing the name of this class.

Definition at line 137 of file renderable.cpp.

virtual Boolean Mezzanine::UI::Renderable::GetVisible ( ) const
pure virtual

Gets the visibility setting of this renderable.

Returns
Returns a bool that is the current visibility setting of this renderable.

Implemented in Mezzanine::UI::Screen, Mezzanine::UI::Widget, and Mezzanine::UI::LineList.

virtual Boolean Mezzanine::UI::Renderable::IsVisible ( ) const
pure virtual

Gets whether or not this renderable is being drawn.

This function will check the visibility of all parent objects to see if it is being drawn. This will not tell you whether or not this renderable has it's own visibility setting enabled. For that see: GetVisible().

Returns
Returns a bool representing the visibility of this renderable.

Implemented in Mezzanine::UI::Screen, Mezzanine::UI::Widget, and Mezzanine::UI::LineList.

void Mezzanine::UI::Renderable::ProtoDeSerialize ( const XML::Node SelfRoot)
virtual

Take the data stored in an XML Node and overwrite this object with it.

Parameters
SelfRootAn XML::Node containing the data to populate this class with.

Reimplemented in Mezzanine::UI::QuadRenderable.

Definition at line 107 of file renderable.cpp.

void Mezzanine::UI::Renderable::ProtoDeSerializeImpl ( const XML::Node SelfRoot)
protectedvirtual

Implementation method for deseriailizing additional sets of data.

Parameters
SelfRootAn XML::Node containing the data to populate this class with.

Reimplemented in Mezzanine::UI::QuadRenderable, Mezzanine::UI::Widget, Mezzanine::UI::RadioButton, Mezzanine::UI::PagedContainer, and Mezzanine::UI::PageProvider.

Definition at line 71 of file renderable.cpp.

void Mezzanine::UI::Renderable::ProtoDeSerializeProperties ( const XML::Node SelfRoot)
virtual
void Mezzanine::UI::Renderable::ProtoSerialize ( XML::Node ParentNode) const
virtual

Convert this class to an XML::Node ready for serialization.

Parameters
ParentNodeThe point in the XML hierarchy that this renderable should be appended to.

Reimplemented in Mezzanine::UI::QuadRenderable.

Definition at line 86 of file renderable.cpp.

void Mezzanine::UI::Renderable::ProtoSerializeImpl ( XML::Node SelfRoot) const
protectedvirtual

Implementation method for serializing additional sets of data.

Parameters
SelfRootThe root node containing all the serialized data for this instance.

Reimplemented in Mezzanine::UI::QuadRenderable, Mezzanine::UI::Widget, Mezzanine::UI::RadioButton, Mezzanine::UI::PagedContainer, and Mezzanine::UI::PageProvider.

Definition at line 68 of file renderable.cpp.

void Mezzanine::UI::Renderable::ProtoSerializeProperties ( XML::Node SelfRoot) const
virtual
virtual void Mezzanine::UI::Renderable::SetVisible ( Boolean  CanSee)
pure virtual

Sets the visibility of this renderable.

Parameters
CanSeeBool determining whether or not this renderable should be visible.

Implemented in Mezzanine::UI::Screen, Mezzanine::UI::Widget, Mezzanine::UI::MenuEntry, and Mezzanine::UI::LineList.

Member Data Documentation

Boolean Mezzanine::UI::Renderable::Dirty
protected

Stores whether this Renderables vertices need to be regenerated.

Definition at line 81 of file renderable.h.

String Mezzanine::UI::Renderable::Name
protected

The unique name of this Renderable.

Definition at line 84 of file renderable.h.

Screen* Mezzanine::UI::Renderable::ParentScreen
protected

A pointer to the Screen that created this Renderable.

Definition at line 75 of file renderable.h.

Boolean Mezzanine::UI::Renderable::Visible
protected

Stores whether this Renderable is to be rendered (also dependent on parent visibility).

Definition at line 78 of file renderable.h.


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