29 #ifndef __OverlayElement_H__
30 #define __OverlayElement_H__
35 #include "OgreUTFString.h"
50 #if OGRE_UNICODE_SUPPORT
52 # define OGRE_DEREF_DISPLAYSTRING_ITERATOR(it) it.getCharacter()
55 # define OGRE_DEREF_DISPLAYSTRING_ITERATOR(it) *it
187 virtual void updatePositionGeometry(
void) = 0;
192 virtual void updateTextureGeometry(
void) = 0;
202 virtual void addBaseParameters(
void);
210 virtual void initialise(
void) = 0;
213 const String& getName(
void)
const;
217 virtual void show(
void);
220 virtual void hide(
void);
223 bool isVisible(
void)
const;
225 bool isEnabled()
const;
226 virtual void setEnabled(
bool b);
230 void setDimensions(
Real width,
Real height);
234 void setPosition(
Real left,
Real top);
237 void setWidth(
Real width);
239 Real getWidth(
void)
const;
242 void setHeight(
Real height);
244 Real getHeight(
void)
const;
247 void setLeft(
Real left);
249 Real getLeft(
void)
const;
252 void setTop(
Real Top);
254 Real getTop(
void)
const;
265 void _setLeft(
Real left);
267 void _setTop(
Real top);
269 void _setWidth(
Real width);
271 void _setHeight(
Real height);
273 void _setPosition(
Real left,
Real top);
275 void _setDimensions(
Real width,
Real height);
278 virtual const String& getMaterialName(
void)
const;
290 virtual void setMaterialName(
const String& matName);
300 void getWorldTransforms(
Matrix4* xform)
const;
303 virtual void _positionsOutOfDate(
void);
306 virtual void _update(
void);
309 virtual void _updateFromParent(
void);
315 virtual Real _getDerivedLeft(
void);
318 virtual Real _getDerivedTop(
void);
321 virtual Real _getRelativeWidth(
void);
323 virtual Real _getRelativeHeight(
void);
327 virtual void _getClippingRegion(
Rectangle &clippingRegion);
346 virtual void _notifyWorldTransforms(
const Matrix4& xform);
351 virtual void _notifyViewport();
354 virtual void _updateRenderQueue(
RenderQueue* queue);
358 bool debugRenderables =
false);
361 virtual const String& getTypeName(
void)
const = 0;
437 virtual bool contains(
Real x,
Real y)
const;
452 {
return mCloneable; }
473 return 10000.0f - (
Real)getZOrder();
489 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.
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
Rectangle mClippingRegion
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.
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.
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
static OverlayElementCommands::CmdHeight msHeightCmd
OverlayElement * mSourceTemplate
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
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.
Command object for OverlayElement - see ParamCommand.
static OverlayElementCommands::CmdLeft msLeftCmd
GuiHorizontalAlignment mHorzAlign
Abstract definition of a 2D element to be displayed in an Overlay.
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
Specialisation of SharedPtr to allow SharedPtr to be assigned to MaterialPtr.
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
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.