Go to the documentation of this file.
29 #ifndef __OverlayElement_H__
30 #define __OverlayElement_H__
35 #include "OgreUTFString.h"
49 #if OGRE_UNICODE_SUPPORT
51 # define OGRE_DEREF_DISPLAYSTRING_ITERATOR(it) it.getCharacter()
54 # define OGRE_DEREF_DISPLAYSTRING_ITERATOR(it) *it
186 virtual void updatePositionGeometry(
void) = 0;
191 virtual void updateTextureGeometry(
void) = 0;
201 virtual void addBaseParameters(
void);
209 virtual void initialise(
void) = 0;
212 const String& getName(
void)
const;
216 virtual void show(
void);
219 virtual void hide(
void);
222 bool isVisible(
void)
const;
224 bool isEnabled()
const;
225 virtual void setEnabled(
bool b);
229 void setDimensions(
Real width,
Real height);
233 void setPosition(
Real left,
Real top);
236 void setWidth(
Real width);
238 Real getWidth(
void)
const;
241 void setHeight(
Real height);
243 Real getHeight(
void)
const;
246 void setLeft(
Real left);
248 Real getLeft(
void)
const;
251 void setTop(
Real Top);
253 Real getTop(
void)
const;
264 void _setLeft(
Real left);
266 void _setTop(
Real top);
268 void _setWidth(
Real width);
270 void _setHeight(
Real height);
272 void _setPosition(
Real left,
Real top);
274 void _setDimensions(
Real width,
Real height);
277 virtual const String& getMaterialName(
void)
const;
289 virtual void setMaterialName(
const String& matName);
299 void getWorldTransforms(
Matrix4* xform)
const;
302 virtual void _positionsOutOfDate(
void);
305 virtual void _update(
void);
308 virtual void _updateFromParent(
void);
314 virtual Real _getDerivedLeft(
void);
317 virtual Real _getDerivedTop(
void);
320 virtual Real _getRelativeWidth(
void);
322 virtual Real _getRelativeHeight(
void);
326 virtual void _getClippingRegion(
RealRect &clippingRegion);
345 virtual void _notifyWorldTransforms(
const Matrix4& xform);
350 virtual void _notifyViewport();
353 virtual void _updateRenderQueue(
RenderQueue* queue);
357 bool debugRenderables =
false);
360 virtual const String& getTypeName(
void)
const = 0;
436 virtual bool contains(
Real x,
Real y)
const;
451 {
return mCloneable; }
472 return 10000.0f - (
Real)getZOrder();
488 return mSourceTemplate ;
GuiHorizontalAlignment mHorzAlign
Command object for OverlayElement - see ParamCommand.
Command object for OverlayElement - see ParamCommand.
Abstract definition of a 2D element to be displayed in an Overlay.
Real _getHeight(void) const
Gets the height of this element in relation to the screen (where 1.0 = screen height)
static OverlayElementCommands::CmdWidth msWidthCmd
virtual bool isKeyEnabled() const
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
static OverlayElementCommands::CmdLeft msLeftCmd
Command object for OverlayElement - see ParamCommand.
A viewpoint from which the scene will be rendered.
Overlay * mOverlay
Overlay attached to.
Command object for OverlayElement - see ParamCommand.
OverlayContainer * mParent
Parent pointer.
GuiMetricsMode
Enum describing how the position / size of an element is to be recorded.
static OverlayElementCommands::CmdHeight msHeightCmd
bool mEnabled
Is element enabled?
GuiHorizontalAlignment
Enum describing where '0' is in relation to the parent in the horizontal dimension.
virtual bool isContainer() const
returns false as this class is not a container type
Command object for OverlayElement - see ParamCommand.
Command object for OverlayElement - see ParamCommand.
Real _getWidth(void) const
Gets the width of this element in relation to the screen (where 1.0 = screen width)
GuiMetricsMode mMetricsMode
static OverlayElementCommands::CmdHorizontalAlign msHorizontalAlignCmd
Class encapsulating a standard 4x4 homogeneous matrix.
const OverlayElement * getSourceTemplate() const
Returns the SourceTemplate for this element.
void _setParent(OverlayContainer *parent)
Command object for OverlayElement - see ParamCommand.
Real _getLeft(void) const
Gets the left of this element in relation to the screen (where 0 = far left, 1.0 = far right)
#define _OgreOverlayExport
virtual bool isCloneable() const
Command object for OverlayElement - see ParamCommand.
Command object for OverlayElement - see ParamCommand.
Positions & sizes are in absolute pixels.
virtual void setCloneable(bool c)
Class defining the common interface which classes can use to present a reflection-style,...
bool mGeomPositionsOutOfDate
Flag indicating if the vertex positions need recalculating.
static OverlayElementCommands::CmdMetricsMode msMetricsModeCmd
Real getSquaredViewDepth(const Camera *cam) const
Overridden from Renderable.
static OverlayElementCommands::CmdVerticalAlign msVerticalAlignCmd
Class representing colour.
static OverlayElementCommands::CmdVisible msVisibleCmd
const LightList & getLights(void) const
Gets a list of lights, ordered relative to how close they are to this renderable.
ushort getZOrder() const
Returns the zOrder of the element.
Visitor object that can be used to iterate over a collection of Renderable instances abstractly.
Abstract class defining the interface all renderable objects must implement.
GuiVerticalAlignment
Enum describing where '0' is in relation to the parent in the vertical dimension.
'left', 'top', 'height' and 'width' are parametrics from 0.0 to 1.0
float Real
Software floating point type.
Real _getTop(void) const
Gets the top of this element in relation to the screen (where 0 = far left, 1.0 = far right)
OverlayElement * mSourceTemplate
Used to see if this element is created from a Template.
Command object for OverlayElement - see ParamCommand.
bool mGeomUVsOutOfDate
Flag indicating if the vertex uvs need recalculating.
Matrix4 mXForm
World transforms.
static OverlayElementCommands::CmdCaption msCaptionCmd
bool mInitialised
Is element initialised?
Represents a layer which is rendered on top of the 'normal' scene contents.
Class to manage the scene object rendering queue.
A 2D element which contains other OverlayElement instances.
static OverlayElementCommands::CmdTop msTopCmd
static OverlayElementCommands::CmdMaterial msMaterialCmd
GuiVerticalAlignment mVertAlign
Positions & sizes are in virtual pixels.
ushort mZOrder
Zorder for when sending to render queue.
Copyright © 2012 Torus Knot Software Ltd

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.