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 ;
Command object for OverlayElement - see ParamCommand.
A viewpoint from which the scene will be rendered.
Command object for OverlayElement - see ParamCommand.
Class encapsulating a standard 4x4 homogeneous matrix.
Real _getHeight(void) const
Gets the height of this element in relation to the screen (where 1.0 = screen height) ...
float Real
Software floating point type.
bool mGeomPositionsOutOfDate
Flag indicating if the vertex positions need recalculating.
Command object for OverlayElement - see ParamCommand.
#define _OgreOverlayExport
Class representing colour.
Real _getTop(void) const
Gets the top of this element in relation to the screen (where 0 = far left, 1.0 = far right) ...
static OverlayElementCommands::CmdTop msTopCmd
static OverlayElementCommands::CmdWidth msWidthCmd
Positions & sizes are in virtual pixels.
static OverlayElementCommands::CmdCaption msCaptionCmd
Real getSquaredViewDepth(const Camera *cam) const
Overridden from Renderable.
A 2D element which contains other OverlayElement instances.
ushort getZOrder() const
Returns the zOrder of the element.
GuiMetricsMode
Enum describing how the position / size of an element is to be recorded.
bool mInitialised
Is element initialised?
Abstract class defining the interface all renderable objects must implement.
Command object for OverlayElement - see ParamCommand.
Command object for OverlayElement - see ParamCommand.
Command object for OverlayElement - see ParamCommand.
ushort mZOrder
Zorder for when sending to render queue.
virtual void setCloneable(bool c)
virtual bool isKeyEnabled() const
Class defining the common interface which classes can use to present a reflection-style, self-defining parameter set to callers.
const LightList & getLights(void) const
Gets a list of lights, ordered relative to how close they are to this renderable. ...
static OverlayElementCommands::CmdMetricsMode msMetricsModeCmd
static OverlayElementCommands::CmdVerticalAlign msVerticalAlignCmd
static OverlayElementCommands::CmdVisible msVisibleCmd
const OverlayElement * getSourceTemplate() const
Returns the SourceTemplate for this element.
static OverlayElementCommands::CmdHeight msHeightCmd
OverlayElement * mSourceTemplate
Used to see if this element is created from a Template.
Command object for OverlayElement - see ParamCommand.
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
static OverlayElementCommands::CmdMaterial msMaterialCmd
OverlayContainer * mParent
Parent pointer.
Visitor object that can be used to iterate over a collection of Renderable instances abstractly...
Command object for OverlayElement - see ParamCommand.
bool mGeomUVsOutOfDate
Flag indicating if the vertex uvs need recalculating.
Matrix4 mXForm
World transforms.
Command object for OverlayElement - see ParamCommand.
static OverlayElementCommands::CmdLeft msLeftCmd
GuiHorizontalAlignment mHorzAlign
Abstract definition of a 2D element to be displayed in an Overlay.
Overlay * mOverlay
Overlay attached to.
static OverlayElementCommands::CmdHorizontalAlign msHorizontalAlignCmd
virtual bool isContainer() const
returns false as this class is not a container type
Real _getWidth(void) const
Gets the width of this element in relation to the screen (where 1.0 = screen width) ...
GuiVerticalAlignment mVertAlign
Class to manage the scene object rendering queue.
void _setParent(OverlayContainer *parent)
Command object for OverlayElement - see ParamCommand.
virtual bool isCloneable() const
GuiMetricsMode mMetricsMode
GuiVerticalAlignment
Enum describing where '0' is in relation to the parent in the vertical dimension. ...
GuiHorizontalAlignment
Enum describing where '0' is in relation to the parent in the horizontal dimension.
'left', 'top', 'height' and 'width' are parametrics from 0.0 to 1.0
bool mEnabled
Is element enabled?
Real _getLeft(void) const
Gets the left of this element in relation to the screen (where 0 = far left, 1.0 = far right) ...
Represents a layer which is rendered on top of the 'normal' scene contents.
Positions & sizes are in absolute pixels.