Spinning Topp Logo BlackTopp Studios
inc
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
Mezzanine::UI::LineList Class Reference

This is an object comprised of a series of lines. More...

#include <linelist.h>

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

Public Types

typedef std::vector< Vector2PointVector
 Basic container type for the storage of all the points in 2D space that create the line to be rendered.
 
- Public Types inherited from Mezzanine::UI::Renderable
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)
 Appends the vertices of this renderable to another vector. More...
 
virtual void _MarkDirty ()
 Marks this renderable as dirty, and informs other renderables if needed. More...
 
LineListAddActualPoint (const Real &X, const Real &Y)
 Adds a new point/line to the list via 2 reals. More...
 
LineListAddActualPoint (const Vector2 &Position)
 Adds a new point/line to the list via a vector2. More...
 
LineListAddPoint (const Real &X, const Real &Y)
 Adds a new point/line to the list via 2 reals. More...
 
LineListAddPoint (const Vector2 &Position)
 Adds a new point/line to the list via a vector2. More...
 
LineListBegin (const Whole &LineThickness, const ColourValue &LineColour)
 Starts a new line list. More...
 
void End (Boole Closed=false)
 Finalizes the list and prepares it for rendering. More...
 
const ColourValueGetLineColour () const
 Gets the colour of this linelist. More...
 
const RealGetLineThickness () const
 Gets the thickness of the line generated by this linelist. More...
 
const PointVectorGetPoints () const
 Gets the vector of points stored by this linelist. More...
 
RenderableType GetRenderableType () const
 Gets the type of renderable this is. More...
 
virtual Boole GetVisible () const
 Gets the visibility setting of this renderable. More...
 
virtual void Hide ()
 Forces this renderable to hide. More...
 
Boole IsClosed () const
 Gets whether or not this linelist is enclosed. More...
 
virtual Boole IsVisible () const
 Gets whether or not this renderable is being drawn. More...
 
virtual void SetVisible (Boole CanSee)
 Sets the visibility of this renderable. More...
 
virtual void Show ()
 Forces this renderable to be shown. More...
 
virtual void UpdateDimensions ()
 Updates the dimensions of this QuadRenderable based on the transform of it's parent. More...
 
- Public Member Functions inherited from Mezzanine::UI::Renderable
virtual void _Clean ()=0
 Refreshes the render data of this renderable. More...
 
Boole _IsDirty () const
 Gets whether or not this renderable is dirty. 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...
 
ScreenGetScreen () const
 Gets the parent screen of this renderable. More...
 
Boole IsScreen () const
 Gets whether or not this renderable is a Screen. More...
 
Boole IsWidget () const
 Gets whether or not this renderable is a Widget. 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...
 

Protected Member Functions

 LineList (const String &RendName, Screen *PScreen)
 Class constructor. More...
 
virtual ~LineList ()
 Class destructor.
 
- Protected Member Functions inherited from Mezzanine::UI::Renderable
 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

Boole Closed
 A bool indicating whether or not an additional segment should be generated between the first and last points. More...
 
ColourValue Colour
 The colour of the line. More...
 
PointVector Positions
 The points in 2D space that create this line. More...
 
LineListRendererRenderer
 The internal renderer responsible for generating this lines vertices. More...
 
Real Thickness
 The pixel thickness of the each line segment in this linelist. More...
 
- Protected Attributes inherited from Mezzanine::UI::Renderable
Boole 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...
 
Boole Visible
 Stores whether this Renderable is to be rendered (also dependent on parent visibility). More...
 

Friends

class ExtendedRenderableFactory
 

Additional Inherited Members

- Static Public Member Functions inherited from Mezzanine::UI::Renderable
static String GetSerializableName ()
 Get the name of the the XML tag the Renderable class will leave behind as its instances are serialized. More...
 

Detailed Description

This is an object comprised of a series of lines.

This class isn't an object, but rather just a series of lines. As such it doesn't have a position or size. The position functions exist only to create additional points for the lines to connect.

Definition at line 61 of file linelist.h.

Constructor & Destructor Documentation

Mezzanine::UI::LineList::LineList ( const String RendName,
Screen PScreen 
)
protected

Class constructor.

Parameters
RendNameThe name to give to this Linelist.
PScreenPointer to the parent Screen that created this linelist.

Definition at line 147 of file linelist.cpp.

Member Function Documentation

void Mezzanine::UI::LineList::_AppendRenderData ( ScreenRenderData RenderData)
virtual

Appends the vertices of this renderable to another vector.

Parameters
RenderDataThe vector of vertex's to append to.

Implements Mezzanine::UI::Renderable.

Definition at line 283 of file linelist.cpp.

void Mezzanine::UI::LineList::_MarkDirty ( )
virtual

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

Implements Mezzanine::UI::Renderable.

Definition at line 278 of file linelist.cpp.

LineList & Mezzanine::UI::LineList::AddActualPoint ( const Real X,
const Real Y 
)

Adds a new point/line to the list via 2 reals.

Parameters
XCoordinate on the X vector.
YCoordinate on the Y vector.
Returns
Returns a reference to this.

Definition at line 183 of file linelist.cpp.

LineList & Mezzanine::UI::LineList::AddActualPoint ( const Vector2 Position)

Adds a new point/line to the list via a vector2.

Parameters
PositionA vector2 representing the position on screen.
Returns
Returns a reference to this.

Definition at line 189 of file linelist.cpp.

LineList & Mezzanine::UI::LineList::AddPoint ( const Real X,
const Real Y 
)

Adds a new point/line to the list via 2 reals.

Parameters
XRelative coordinate on the X vector.
YRelative coordinate on the Y vector.
Returns
Returns a reference to this.

Definition at line 171 of file linelist.cpp.

LineList & Mezzanine::UI::LineList::AddPoint ( const Vector2 Position)

Adds a new point/line to the list via a vector2.

Parameters
PositionA vector2 representing the relative position on screen.
Returns
Returns a reference to this.

Definition at line 177 of file linelist.cpp.

LineList & Mezzanine::UI::LineList::Begin ( const Whole LineThickness,
const ColourValue LineColour 
)

Starts a new line list.

If this function is called while lines have already been defined, it will clear the current list of lines and start a new list.

Parameters
LineThicknessThe thickness of the line to draw in pixels.
LineColourThe colour of the line.
Returns
Returns a reference to this.

Definition at line 162 of file linelist.cpp.

void Mezzanine::UI::LineList::End ( Boole  Closed = false)

Finalizes the list and prepares it for rendering.

Parameters
ClosedWhether or not the line list connects back to it's starting position. If true this will create one last line connecting the last provided position with the first.

Definition at line 195 of file linelist.cpp.

const ColourValue & Mezzanine::UI::LineList::GetLineColour ( ) const

Gets the colour of this linelist.

Returns
Returns a const reference to the colourvalue for this linelist.

Definition at line 219 of file linelist.cpp.

const Real & Mezzanine::UI::LineList::GetLineThickness ( ) const

Gets the thickness of the line generated by this linelist.

Returns
Returns a const reference to the real storing the line thickness for this linelist.

Definition at line 224 of file linelist.cpp.

const LineList::PointVector & Mezzanine::UI::LineList::GetPoints ( ) const

Gets the vector of points stored by this linelist.

Returns
Returns a const reference to the vector of points stored by this linelist.

Definition at line 209 of file linelist.cpp.

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

Gets the type of renderable this is.

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

Implements Mezzanine::UI::Renderable.

Definition at line 204 of file linelist.cpp.

Boole Mezzanine::UI::LineList::GetVisible ( ) const
virtual

Gets the visibility setting of this renderable.

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

Implements Mezzanine::UI::Renderable.

Definition at line 240 of file linelist.cpp.

void Mezzanine::UI::LineList::Hide ( )
virtual

Forces this renderable to hide.

Implements Mezzanine::UI::Renderable.

Definition at line 255 of file linelist.cpp.

Boole Mezzanine::UI::LineList::IsClosed ( ) const

Gets whether or not this linelist is enclosed.

Returns
Returns true if this linelist has an extra line connecting the first and last entries.

Definition at line 214 of file linelist.cpp.

Boole Mezzanine::UI::LineList::IsVisible ( ) const
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.

Implements Mezzanine::UI::Renderable.

Definition at line 245 of file linelist.cpp.

void Mezzanine::UI::LineList::SetVisible ( Boole  CanSee)
virtual

Sets the visibility of this renderable.

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

Implements Mezzanine::UI::Renderable.

Definition at line 232 of file linelist.cpp.

void Mezzanine::UI::LineList::Show ( )
virtual

Forces this renderable to be shown.

Implements Mezzanine::UI::Renderable.

Definition at line 250 of file linelist.cpp.

void Mezzanine::UI::LineList::UpdateDimensions ( )
virtual

Updates the dimensions of this QuadRenderable based on the transform of it's parent.

This function is called automatically when a parent changes in size, and shouldn't need to be called manually.

Definition at line 263 of file linelist.cpp.

Member Data Documentation

Boole Mezzanine::UI::LineList::Closed
protected

A bool indicating whether or not an additional segment should be generated between the first and last points.

Definition at line 82 of file linelist.h.

ColourValue Mezzanine::UI::LineList::Colour
protected

The colour of the line.

Definition at line 70 of file linelist.h.

PointVector Mezzanine::UI::LineList::Positions
protected

The points in 2D space that create this line.

Definition at line 73 of file linelist.h.

LineListRenderer* Mezzanine::UI::LineList::Renderer
protected

The internal renderer responsible for generating this lines vertices.

Definition at line 76 of file linelist.h.

Real Mezzanine::UI::LineList::Thickness
protected

The pixel thickness of the each line segment in this linelist.

Definition at line 79 of file linelist.h.


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