43 #include "UI/uimanager.h"
44 #include "UI/screen.h"
45 #include "UI/textureatlas.h"
46 #include "UI/mousehoverstrategy.h"
47 #include "UI/brutestrategy.h"
48 #include "UI/layoutstrategy.h"
50 #include "UI/button.h"
51 #include "UI/checkbox.h"
52 #include "UI/dropdownlist.h"
53 #include "UI/editbox.h"
54 #include "UI/gridcontainer.h"
55 #include "UI/horizontalcontainer.h"
56 #include "UI/horizontalscrollbar.h"
57 #include "UI/linelist.h"
58 #include "UI/listbox.h"
59 #include "UI/menuentry.h"
60 #include "UI/radiobutton.h"
61 #include "UI/scrollbar.h"
62 #include "UI/spinner.h"
63 #include "UI/stackbutton.h"
64 #include "UI/tabset.h"
65 #include "UI/verticalcontainer.h"
66 #include "UI/verticalscrollbar.h"
67 #include "UI/widget.h"
68 #include "UI/window.h"
70 #include "Graphics/gamewindow.h"
71 #include "Graphics/viewport.h"
73 #include "Graphics/graphicsmanager.h"
74 #include "Graphics/scenemanager.h"
76 #include "MathTools/mathtools.h"
80 #include <OgreMatrix4.h>
81 #include <OgreRenderSystem.h>
82 #include <OgreRenderOperation.h>
83 #include <OgreHardwareBufferManager.h>
84 #include <OgreHardwareVertexBuffer.h>
85 #include <OgreRenderQueueListener.h>
101 class VertexCollectFunctor
105 ScreenRenderData* Data;
109 VertexCollectFunctor(ScreenRenderData* pData) : Data(pData) {}
111 ~VertexCollectFunctor() {}
115 Boole operator()(QuadRenderable* Quad)
117 Quad->_AppendRenderData(*Data);
132 Ogre::Vector3 Position;
134 Ogre::ColourValue Colour;
146 struct ScreenInternalData :
public Ogre::RenderQueueListener
149 Screen* ParentScreen;
151 Ogre::RenderOperation RenderOp;
153 Ogre::RenderSystem* RenderSys;
155 Ogre::HardwareVertexBufferSharedPtr VertexBuffer;
158 void renderQueueStarted(Ogre::uint8,
const Ogre::String&,
bool&) { }
161 void renderQueueEnded(Ogre::uint8 queueGroupId,
const Ogre::String& invocation,
bool& repeatThisInvocation)
163 if( queueGroupId == Ogre::RENDER_QUEUE_OVERLAY && this->RenderSys->_getViewport() == this->ParentScreen->GetViewport()->_GetOgreViewport() ) {
164 if( this->ParentScreen->IsVisible() ) {
165 this->ParentScreen->_RenderScreen();
186 {
return this->
Vertices.at(Index); }
196 MouseHitPosition(-1,-1),
199 GameViewport(WindowViewport),
210 this->
SID =
new ScreenInternalData();
211 this->
SID->RenderSys = Ogre::Root::getSingletonPtr()->getRenderSystem();
212 this->
SID->ParentScreen =
this;
229 MouseHitPosition(-1,-1),
237 this->
SID =
new ScreenInternalData();
238 this->
SID->RenderSys = Ogre::Root::getSingletonPtr()->getRenderSystem();
239 this->
SID->ParentScreen =
this;
267 if( SceneMan )
return SceneMan;
277 return (*WidFactIt).second;
286 std::pair<WidgetIterator,Boole> InsertReturn = this->
Widgets.insert( std::pair<String,Widget*>(WidgetName,ToInsert) );
287 if( !InsertReturn.second )
294 this->
SID->RenderSys->_setWorldMatrix( Ogre::Matrix4::IDENTITY );
295 this->
SID->RenderSys->_setProjectionMatrix( Ogre::Matrix4::IDENTITY );
296 this->
SID->RenderSys->_setViewMatrix( Ogre::Matrix4::IDENTITY );
304 this->
SID->RenderOp.vertexData = OGRE_NEW Ogre::VertexData;
305 this->
SID->RenderOp.vertexData->vertexStart = 0;
307 Ogre::VertexDeclaration* VertexDecl = this->
SID->RenderOp.vertexData->vertexDeclaration;
311 VertexDecl->addElement(0,0,Ogre::VET_FLOAT3,Ogre::VES_POSITION);
312 Offset += Ogre::VertexElement::getTypeSize(Ogre::VET_FLOAT3);
315 VertexDecl->addElement(0,Offset,Ogre::VET_FLOAT4,Ogre::VES_DIFFUSE);
316 Offset += Ogre::VertexElement::getTypeSize(Ogre::VET_FLOAT4);
319 VertexDecl->addElement(0,Offset,Ogre::VET_FLOAT2, Ogre::VES_TEXTURE_COORDINATES);
321 this->
SID->VertexBuffer = Ogre::HardwareBufferManager::getSingletonPtr()->createVertexBuffer(
322 VertexDecl->getVertexSize(0),
324 Ogre::HardwareBuffer::HBU_DYNAMIC_WRITE_ONLY_DISCARDABLE,
327 this->
SID->RenderOp.vertexData->vertexBufferBinding->setBinding(0,this->
SID->VertexBuffer);
328 this->
SID->RenderOp.operationType = Ogre::RenderOperation::OT_TRIANGLE_LIST;
329 this->
SID->RenderOp.useIndexes =
false;
334 OGRE_DELETE this->
SID->RenderOp.vertexData;
335 this->
SID->RenderOp.vertexData = 0;
336 this->
SID->VertexBuffer.setNull();
341 if( this->
SID->VertexBuffer.isNull() )
344 if(RequestedSize > this->
SID->VertexBuffer->getNumVertices() ) {
346 Whole NewVertexBufferSize = 1;
347 while(NewVertexBufferSize < RequestedSize)
348 NewVertexBufferSize <<= 1;
350 this->
SID->VertexBuffer = Ogre::HardwareBufferManager::getSingletonPtr()->createVertexBuffer(
351 this->
SID->RenderOp.vertexData->vertexDeclaration->getVertexSize(0),
353 Ogre::HardwareBuffer::HBU_DYNAMIC_WRITE_ONLY_DISCARDABLE,
356 this->
SID->RenderOp.vertexData->vertexStart = 0;
357 this->
SID->RenderOp.vertexData->vertexBufferBinding->setBinding(0,this->
SID->VertexBuffer);
380 {
return Renderable::RT_Screen; }
388 if( this->
ActDims.
Size != CurrentSize || ( this->InverseSize.X == 0.0 || this->InverseSize.Y == 0.0 ) ) {
402 {
return this->
UIMan; }
469 delete (*FactIt).second;
478 delete (*FactIt).second;
567 return this->
CheckAndInsertExcept( (*FactIt).second->CreateWidget(RendName,RendRect,Params,
this) );
576 if( WidIt != this->
Widgets.end() )
return (*WidIt).second;
589 if( WidIt != this->
Widgets.end() )
595 (*FactIt).second->DestroyWidget( ToBeDestroyed );
603 (*ChildIt)->_NotifyParenthood(NULL);
606 (*FactIt).second->DestroyWidget( (*ChildIt) );
858 return NewGridContain;
865 return NewGridContain;
899 {
return this->
SID->RenderSys->getHorizontalTexelOffset(); }
902 {
return this->
SID->RenderSys->getVerticalTexelOffset(); }
944 if( !PropertiesNode.
Empty() ) {
947 Whole ViewZOrder = 0;
951 if( !CurrAttrib.
Empty() )
954 CurrAttrib = PropertiesNode.
GetAttribute(
"WindowTitle");
955 if( !CurrAttrib.
Empty() )
956 WindowTitle = CurrAttrib.
AsString();
958 CurrAttrib = PropertiesNode.
GetAttribute(
"ViewportZOrder");
959 if( !CurrAttrib.
Empty() )
960 ViewZOrder = CurrAttrib.
AsWhole();
964 if( !VertexTransformNode.
Empty() )
968 if( !ScaleNode.
Empty() )
971 if( !WindowTitle.empty() ) {
974 if( NamedWindow != NULL ) {
1002 {
return "Screen"; }
1024 Boole Force =
false;
1029 else if(this->
Orientation == Mezzanine::OM_Degree_180)
1031 else if(this->
Orientation == Mezzanine::OM_Degree_270)
1039 size_t KnownVertexCount = this->
SID->RenderOp.vertexData->vertexCount;
1040 if(this->
SID->RenderOp.vertexData->vertexCount) {
1053 if(CurrVertAtlas.empty()) {
1056 if(CurrVertAtlas != CurrAtlas) {
1057 CurrAtlas = CurrVertAtlas;
1059 this->
SID->RenderSys->_setTexture(0,
true,TextureUse);
1062 this->
SID->RenderOp.vertexData->vertexStart = this->
TextureByVertex[TexIndex].RenderStart;
1063 this->
SID->RenderSys->_render(this->
SID->RenderOp);
1081 if( Begin != End ) {
1082 for( X = Begin ; X < End ; X++ )
1084 RenderData[X].Vert.Position.X = ( ( RenderData[X].Vert.Position.X * this->
InverseSize.
X ) * 2 ) - 1;
1085 RenderData[X].Vert.Position.Y = ( ( RenderData[X].Vert.Position.Y * this->
InverseSize.
Y ) * -2 ) + 1;
1089 for( X = Begin ; X < End ; X++ )
1090 RenderData[X].Vert.Position = this->VertexTransform * RenderData[X].Vert.Position;
1099 Whole KnownVertexCount = 0;
1106 KnownVertexCount = TempVertexCache.
Size();
1107 this->
_Transform(TempVertexCache,0,KnownVertexCount);
1110 Vertex* WriteIterator = (
Vertex*) this->
SID->VertexBuffer->lock(Ogre::HardwareBuffer::HBL_DISCARD);
1111 for(
Whole Index = 0 ; Index < TempVertexCache.
Size() ; ++Index )
1113 if( TempVertexCache[Index].Atlas.empty() ) {
1116 if( TempVertexCache[Index].Atlas != CurrentName ) {
1121 MyObject.
Atlas = TempVertexCache[Index].Atlas;
1123 CurrentName = TempVertexCache[Index].Atlas;
1126 const Vertex& NewVertex = TempVertexCache[Index].Vert;
1127 *WriteIterator++ = NewVertex;
1130 MyObject.
Atlas = CurrentName;
1133 this->
SID->VertexBuffer->unlock();
1134 this->
SID->RenderOp.vertexData->vertexCount = KnownVertexCount;
1136 this->
Dirty =
false;
static const String TypeName
String containing the type name for this class: "CheckBox".
Attribute AppendAttribute(const Char8 *Name)
Creates an Attribute and puts it at the end of this Nodes attributes.
Thrown when duplicates of teh same identity string exist.
This class represents a collection of Glyphs in a common visual style.
void _MarkDirty()
Marks this renderable as dirty, and informs other renderables if needed.
Vector2 GetTextureSize() const
Gets the size of the TextureAtlas.
const String & GetName() const
Gets the name of this renderable.
void Clear()
Clears all Vertex vectors.
static const String TypeName
String containing the type name for this class: "TabSet".
A light-weight handle for manipulating attributes in DOM tree.
void _NotifyScreenDirty()
Notifies this that it's parent screen was altered.
This is a base class for the algorithms used by QuadRenderables to determine how they should update t...
TextureAtlas * GetAtlas(const String &AtlasName)
Gets a loaded Atlas being stored in this manager.
static const String TypeName
String containing the type name for this class: "GricContainer".
This is the factory implementation for DropDownList widgets.
Matrix4x4 VertexTransform
The transformation matrix used to update vertex transforms if needed.
void ProtoSerialize(XML::Node &CurrentRoot) const
Convert this class to an XML::Node ready for serialization.
void AddWidgetFactory(WidgetFactory *ToBeAdded)
Adds/registers a widget factory with this Screen, allowing it to be constructed through this API...
Boole IsMarkupParserRegistered(const String &ParserName) const
Checks to see if a MarkupParser has already been registsered under a specific name.
std::vector< VertexData > Vertices
Container storing all of the vertices to be rendered.
Graphics::Viewport * GameViewport
A pointer to the viewport this screen is bound to.
bool Boole
Generally acts a single bit, true or false.
virtual Widget * FindHoveredWidget(const Vector2 &MousePos)
Gets the quad the mouse is over if any.
String Atlas
The name of the atlas to be rendered with.
This class contains utilities and functions to allow the manipulation of the Graphical scene...
This is the factory implementation for GridContainer widgets.
Basic class describing a vertex in the UI to be rendered.
const String & GetWindowCaption() const
Gets the the text in the titlebar.
virtual RadioButton * CreateRadioButton(const String &RendName)
Creates a RadioButton.
virtual Graphics::SceneManager * GetSceneManager() const
Gets a pointer to the SceneManager connected to this screens viewport.
This is the factory implementation for ListBox widgets.
virtual void SetPrimaryAtlas(const String &Atlas)
Sets the Atlas to be assumed when one isn't provided for atlas related tasks.
Ogre::TexturePtr _GetTexture()
Gets the texture being used by this Atlas.
void _RenderVertices(bool Force=false)
Prepares all vertices for rendering to the screen.
virtual VerticalContainer * CreateVerticalContainer(const String &RendName)
Creates a widget container aligned on the Y axis.
This is a container class for placing child objects on a 2 dimensional grid.
Vector2 GetTextureSize(const String &Atlas) const
Gets the texture size of the specified Atlas.
SpinnerStyle
Used by the spinner class to determine what styling should be used for the spinner.
Vector2 Size
Vector2 representing the width and height of the rect.
virtual Boole IsVisible() const
Gets whether or not this renderable is being drawn.
virtual void ProtoDeSerializeProperties(const XML::Node &SelfRoot)
Take the data stored in an XML Node and overwrite the properties of this object with it...
static const String TypeName
String containing the type name for this class: "ListBox".
GameWindow * GetGameWindow(const Whole &Index) const
Gets a game window by index.
virtual Whole GetNumWidgets()
Gets the number of widgets being used in this screen.
Whole Size()
Gets the combined size of all Vertex vectors.
UIManager * UIMan
A pointer to the UIManager that owns this screen.
virtual CheckBox * CreateCheckBox(const String &RendName)
Creates a CheckBox.
Thrown when the requested identity could not be found.
virtual EditBox * CreateEditBox(const String &RendName, const RenderLayerType EditLayerType, FontData *EditFont)
Creates a EditBox.
Integer GetZOrder() const
Gets the Zorder assigned to this viewport.
Node GetFirstChild() const
Get the first child Node of this Node.
#define MEZZ_EXCEPTION(num, desc)
An easy way to throw exceptions with rich information.
void Append(ScreenRenderData &OtherData)
Appends the contents of another ScreenRenderData to the end of this.
virtual TabSet * CreateTabSet(const String &RendName)
Creates a TabSet.
virtual void SetMousePassthrough(Boole Enable)
Sets whether or not this quad should be skipped when determining if the mouse is hovered over this qu...
This class stores how the calls to Render are to be done.
Thrown when a version is accessed/parsed/required and it cannot work correctly or is missing...
Vector3 Scale
The scaling to be applied to all vertices that are generated by this screen.
const Char8 * AsString(const Char8 *def="") const
Attempts to convert the value of the attribute to a String and returns the results.
virtual WorldManager * GetCreator() const
Gets a pointer to this proxies creator.
virtual void ProtoSerializeProperties(XML::Node &SelfRoot) const
Convert the properties of this class to an XML::Node ready for serialization.
virtual void CreateVertexBuffer(const Whole &InitialSize)
Creates a new Vertex Buffer for vertices generated by the UI system.
Boole Visible
Stores whether this Renderable is to be rendered (also dependent on parent visibility).
A 4x4 matrix math class for the representation of full transforms.
virtual void SetMouseHoverStrategy(MouseHoverStrategy *Strategy)
Sets the strategy to use when detect which object the mouse is hovered over.
This is a collection of smaller textures packed into a larger texture, intended to increase UI perfor...
virtual void Hide()
Forces this renderable to hide.
WidgetContainer::iterator WidgetIterator
Iterator type for Widget instances stored by this class.
FontData * GetFont(const String &FontName, const String &Atlas) const
Gets the specified FontData from an Atlas.
void _SetScreen(Screen *Parent)
Sets the parent screen.
This class represents a box shaped area on the screen.
virtual UIManager * GetManager() const
Gets the UIManager this screen belongs to.
ScrollbarStyle
Used by the scrollbar class to determine what styling should be used for the scrollbar.
This is a widget that stores sets of renderables but only displays one at a time. ...
bool Empty() const
Is this storing anything at all?
Whole GetActualWidth() const
Gets the width of the viewport in pixels.
This implements the exception hiearchy for Mezzanine.
virtual const Vector2 & GetViewportDimensions() const
Gets the current viewport dimensions.
This is a simple widget for a numeric variable in a box.
Boole AllLayersDirty
Determines whether or not this Quad needs all of it's layers refreshed. Usually after a transform upd...
ChildContainer ChildWidgets
This is a container storing all the children that belong to this Quad.
This is the factory implementation for CheckBox widgets.
virtual void SetVisible(Boole CanSee)
Sets the visibility of this renderable.
Rect ActDims
The actual (pixel) position and size of this Quad on the screen it belongs to.
float Real
A Datatype used to represent a real floating point number.
virtual void Show()
Forces this renderable to be shown.
bool SetValue(const Char8 *rhs)
Set the value of this.
String PrimaryAtlas
The name of the this screens primary atlas for texture lookups.
void ProtoDeSerialize(const XML::Node &OneNode)
Take the data stored in an XML and overwrite this instance of this object with it.
This class represents a 2D rect which can express the size and position of a renderable on screen...
Whole AsWhole(Whole def=0) const
Attempts to convert the value of the attribute to a Whole and returns the results.
virtual void DestroyVertexBuffer()
Destroys the Vertex Buffer storing all the UI vertices generated by this screen.
void _Transform(ScreenRenderData &RenderData, const Whole &Begin, const Whole &End)
Updates the vertex positions so they are in front of the camera in world space.
void DestroyAllWidgetFactories()
Destroys all widget factories in this Screen.
static UIManager * GetSingletonPtr()
Fetches a pointer to the singleton.
This class is for creating and managing viewports within a game window.
Vector2 GetWhitePixel(const String &Atlas) const
Gets the position of the white pixel from an Atlas.
Real Y
Coordinate on the Y vector.
This is the base class for a method of finding which quad the mouse is hovered over.
This strategy uses a brute force reverse search for the hovered quad.
This file contains the declaration for the World proxy wrapping camera functionality.
virtual void DestroyWidget(Widget *ToBeDestroyed)
Destroys a widget.
static const String TypeName
String containing the type name for this class: "VerticalContainer".
void _SetOrientation(const Mezzanine::OrientationMode &Mode)
Forces an orientation mode change for this screen.
A light-weight handle for manipulating nodes in DOM tree.
Whole RenderEnd
The index of the last verticy to be rendered.
static const String TypeName
String containing the type name for this class: "DropDownList".
virtual DropDownList * CreateDropDownList(const String &RendName, const UI::ScrollbarStyle Style)
Creates a DropDownList.
GameWindow * GetParentWindow() const
Gets the game window this viewport belongs to.
Real X
Coordinate on the X vector.
int AsInt(int def=0) const
Attempts to convert the value of the attribute to an int and returns the results. ...
Vector2 MouseHitPosition
The pixel position on this screen where the mouse clicked on a Widget.
This is used to represent a point on a 2 dimentional area, such as a screen.
static const String TypeName
String containing the type name for this class: "EditBox".
bool Empty() const
Is this storing anything at all?
virtual WidgetFactory * GetWidgetFactoryExcept(const String &WidgetTypeName)
Gets a registered WidgetFactory that creates the specified type of widget. a widget factor of the spe...
Sprite * GetSprite(const String &SpriteName, const String &Atlas) const
Gets a sprite from an Atlas.
virtual void ProtoSerializeProperties(XML::Node &SelfRoot) const
Convert the properties of this class to an XML::Node ready for serialization.
This is the factory implementation for TabSet widgets.
virtual Spinner * CreateSpinner(const String &RendName, const SpinnerStyle SpinStyle, FontData *EditFont)
Creates a Spinner.
VertexData & operator[](const Whole &Index)
Array access operator spanning all 3 Vertex vectors.
Whole GetActualHeight() const
Gets the height of the viewport in pixels.
virtual RenderableType GetRenderableType() const
Gets the type of renderable this is.
ScreenInternalData * SID
A pointer to the class storing all sensative internal data THAT IS NOT FOR YOUR EYES! ...
virtual void ProtoDeSerializeProperties(const XML::Node &SelfRoot)
Take the data stored in an XML Node and overwrite the properties of this object with it...
Real GetTexelOffsetX() const
Gets the X axis Texel Offset for the current rendersystem.
virtual GridContainer * CreateGridContainer(const String &RendName)
Creates a widget container for the placement of widgets on a 2D grid.
This is the factory implementation for VerticalContainer widgets.
TextureAtlas * GetAtlas(const String &Atlas) const
Gets an atlas that has been loaded.
A layout container that aligns it's children along a common Y axis.
void SetValues(const Real &x, const Real &y)
Sets the X and Y values of this vector2.
Screen(const String &RendName, const String &Atlas, Graphics::Viewport *WindowViewport, UIManager *Manager)
Internal constructor.
Thrown when the available information should have worked but failed for unknown reasons.
MouseHoverStrategy * MouseStrat
A pointer to the strategy to be used when detecting the hovered widget.
virtual void ResizeVertexBuffer(const Whole &RequestedSize)
Resizes the Vertex Buffer.
WidgetFactoryContainer WidgetFactories
A container storing all the factories for the widgets supported by this screen.
void AddAllDefaultWidgetFactories()
Adds all the default widget factories provided by the engine to the Screen.
virtual void _AppendRenderDataCascading(ScreenRenderData &RenderData)
Appends the vertices of this renderable to another vector, and then does the same for this renderable...
Thrown when parameters are checked at runtime and found invalid.
virtual void _SetLayoutStrat(LayoutStrategy *ToSet)
Sets a new LayoutStrategy for this quad to use.
virtual void CheckViewportSize()
Checks to see if the viewport has changed in size. If so it updates all the UI elements on the screen...
This is the proxy class for placing and manipulating a camera in the scene.
virtual Widget * FindHoveredWidget(const Vector2 &MousePos)=0
Finds the hovered quad for the parent screen.
Basic class describing a vertex in the UI to be rendered.
void ProtoDeSerialize(const XML::Node &OneNode)
Take the data stored in an XML and overwrite this instance of this object with it.
This is the factory implementation for Spinner widgets.
virtual MenuEntry * CreateMenuEntry(const String &RendName)
Creates a MenuEntry.
virtual HorizontalScrollbar * CreateHorizontalScrollbar(const String &RendName, const UI::ScrollbarStyle Style)
Creates a Scrollbar aligned on the X axis.
virtual String GetPrimaryAtlas()
Gets the currently set primary atlas.
static Vector3 Unit_Z()
Gets a vector representing the Z unit of a Vector3.
CameraProxy * GetCamera() const
Gets the CameraProxy associated with this viewport.
virtual void _MarkAllLayersDirty()
Tells this QuadRenderable that all of it's layers are dirty.
virtual Graphics::Viewport * GetViewport() const
Gets the Viewport this screen is currently rendering to.
Thrown when the identity string wasn't valid at all.
RenderLayerType
This enum describes the type of RenderLayer this is for use in casting.
Ogre::SceneManager * _GetGraphicsWorldPointer() const
Gets the internal Ogre Scene Manager pointer.
This is used to represent a point in space, or a vector through space.
virtual ListBox * CreateListBox(const String &RendName, const UI::ScrollbarStyle Style)
Creates a ListBox.
This class is responsible for any and all user interactions with the User interface/HUD.
virtual Widget * GetWidget(const String &Name)
Gets a widget in this screen by name.
This is intended to store basic graphics setting for the user.
virtual Button * CreateButton(const String &RendName)
Creates a Button.
Sprite * GetSprite(const String &SpriteName) const
Gets a Sprite by name.
MarkupParser * GetMarkupParser(const String &ParserName) const
Gets a MarkupParser by it's registered name.
The bulk of the engine components go in this namspace.
This class stores all vertices pertaining to a layer sorted by their priority for rendering...
OrientationMode
Simple enum for communicating the orientation the UI and Camera have relative to the world it is rend...
unsigned long Whole
Whole is an unsigned integer, it will be at least 32bits in size.
A layout container that aligns it's children along a common X axis.
void RemoveWidgetFactory(WidgetFactory *ToBeRemoved)
Removes a widget factory from this Screen.
virtual String GetDerivedSerializableName() const
Gets the most derived serializable name of this Renderable.
virtual Boole GetVisible() const
Gets the visibility setting of this renderable.
WidgetContainer Widgets
A container storing all the created Widgets owned by this screen.
ChildContainer::iterator ChildIterator
Iterator type for Widget instances stored by this class.
virtual void PrepareRenderSystem()
Sets up all the necessary projection and world matrices for UI rendering.
virtual const Vector2 & GetMouseHitPosition() const
Gets the mouse position from the last call to "FindHoveredQuad(const Vector2&).
virtual void ProtoDeSerialize(const XML::Node &SelfRoot)
Take the data stored in an XML Node and overwrite this object with it.
Boole Dirty
Stores whether this Renderables vertices need to be regenerated.
Vector2 GetWhitePixel() const
Gets the location of the WhitePixel on the TextureAtlas.
This is the factory implementation for EditBox widgets.
FontData * GetFont(const String &FontName) const
Gets the set of Glyphs of the specified name.
This is a base class for the parsing of markup texts contained in text layers.
const Char8 * Name() const
ptrdiff_tGet the name of this Node.
This is a simple widget for storing a bool value.
Mezzanine::OrientationMode Orientation
The current orientation mode of this screen.
This is used to store information about rotation in 3d space.
Whole RenderStart
The index of the first verticy to be rendered.
This represents a nestable quad for an object in a GUI layout.
static const String TypeName
String containing the type name for this class: "Spinner".
virtual void UpdateDimensions()
Updates the dimensions of this QuadRenderable based on the transform of it's parent.
void _RenderScreen()
Manually calls the UI system to render this screen.
void SerializeError(const String &FailedTo, const String &ClassName, Boole SOrD)
Simply does some string concatenation, then throws an Exception.
This is the factory implementation for HorizontalContainer widgets.
virtual void DestroyAllWidgets()
Destroys all widgets being stored by this screen.
virtual ~Screen()
Class destructor.
virtual VerticalScrollbar * CreateVerticalScrollbar(const String &RendName, const UI::ScrollbarStyle Style)
Creates a Scrollbar aligned on the Y axis.
TextureVertexContainer TextureByVertex
A container storing a mapping of the textures needed to render each section of vertices.
bool IsMarkupParserRegistered(const String &ParserName) const
Checks to see if a MarkupParser has already been registsered under a specific name.
virtual Widget * CheckAndInsertExcept(Widget *ToInsert)
Verifies uniqueness of a widget and inserts it if it is. a widget with the same name already exists i...
Node AppendChild(NodeType Type=NodeElement)
Creates a Node and makes it a child of this one.
std::map< String, String > NameValuePairMap
This is a datatype mostly used for describing settings or parameters that can't be declared in advanc...
WidgetFactoryContainer::iterator WidgetFactoryIterator
Iterator type for Widget instances stored by this class.
void DestroyWidgetFactory(WidgetFactory *ToBeDestroyed)
Removes and destroys a widget factory in this Screen.
Basic class used to describe a portion of a texture to be applied to a Quad.
std::string String
A datatype used to a series of characters.
virtual StackButton * CreateStackButton(const String &RendName)
Creates a StackButton.
Real GetTexelOffsetY() const
Gets the Y axis Texel Offset for the current rendersystem.
RenderableType
A small enum to describe the type of renderable this is.
UI::MarkupParser * GetMarkupParser(const String &ParserName) const
Gets a MarkupParser by it's registered name.
Viewport * GetViewportByZOrder(const Integer ZOrder) const
Gets a viewport by ZOrder.
static String GetSerializableName()
Get the name of the the XML tag the Renderable class will leave behind as its instances are serialize...
Attribute GetAttribute(const Char8 *Name) const
Attempt to get an Attribute on this Node with a given name.
void SetTransform(const Vector3 &Position, const Vector3 &Scale, const Quaternion &Rotation)
Sets the Matrix based on a provided position, scale, and rotation.
This class is for creating and managing game windows.
static const String TypeName
String containing the type name for this class: "HorizontalContainer".
Mezzanine::OrientationMode GetOrientationMode() const
Gets the current Orientation of the viewport.
Vector2 InverseSize
The inverse size (1/size) of the viewport this screen is bound to in pixels.
void ProtoSerialize(XML::Node &CurrentRoot) const
Convert this class to an XML::Node ready for serialization.
This is a widget that displays one selection from a list that can have it's visibility toggled...
Node GetChild(const Char8 *Name) const
Attempt to get a child Node with a given name.
This is a widget for displaying a list of captions in a box.
virtual MouseHoverStrategy * GetMouseHoverStrategy() const
Gets the MouseHoverStrategy currently being used by this screen.
virtual Widget * CreateWidget(const XML::Node &WidgetNode)
Creates a widget from an XML::Node.
virtual HorizontalContainer * CreateHorizontalContainer(const String &RendName)
Creates a widget container aligned on the X axis.
Widget for handling the input and manipulation of text.