Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Ogre::BorderPanelGuiElement Class Reference

A specialisation of the PanelGuiElement to provide a panel with a border. More...

#include <OgreBorderPanelGuiElement.h>

Inheritance diagram for Ogre::BorderPanelGuiElement:

Ogre::PanelGuiElement Ogre::GuiContainer Ogre::GuiElement Ogre::StringInterface Ogre::Renderable Ogre::MouseTarget Ogre::MouseMotionTarget Ogre::PositionTarget Ogre::PositionTarget Ogre::EventTarget Ogre::ButtonGuiElement List of all members.

Public Types

typedef std::map< String,
GuiElement * > 
ChildMap
typedef MapIterator< ChildMapChildIterator
typedef std::map< String,
GuiContainer * > 
ChildContainerMap
typedef MapIterator< ChildContainerMapChildContainerIterator

Public Methods

 BorderPanelGuiElement (const String &name)
 Constructor. More...

 ~BorderPanelGuiElement ()
void setBorderSize (Real size)
 Sets the size of the border. More...

void setBorderSize (Real sides, Real topAndBottom)
 Sets the size of the border, with different sizes for vertical and horizontal borders. More...

void setBorderSize (Real left, Real right, Real top, Real bottom)
 Sets the size of the border separately for all borders. More...

Real getLeftBorderSize (void)
 Gets the size of the left border. More...

Real getRightBorderSize (void)
 Gets the size of the right border. More...

Real getTopBorderSize (void)
 Gets the size of the top border. More...

Real getBottomBorderSize (void)
 Gets the size of the bottom border. More...

void setLeftBorderUV (Real u1, Real v1, Real u2, Real v2)
 Sets the texture coordinates for the left edge of the border. More...

void setRightBorderUV (Real u1, Real v1, Real u2, Real v2)
 Sets the texture coordinates for the right edge of the border. More...

void setTopBorderUV (Real u1, Real v1, Real u2, Real v2)
 Sets the texture coordinates for the top edge of the border. More...

void setBottomBorderUV (Real u1, Real v1, Real u2, Real v2)
 Sets the texture coordinates for the bottom edge of the border. More...

void setTopLeftBorderUV (Real u1, Real v1, Real u2, Real v2)
 Sets the texture coordinates for the top-left corner of the border. More...

void setTopRightBorderUV (Real u1, Real v1, Real u2, Real v2)
 Sets the texture coordinates for the top-right corner of the border. More...

void setBottomLeftBorderUV (Real u1, Real v1, Real u2, Real v2)
 Sets the texture coordinates for the bottom-left corner of the border. More...

void setBottomRightBorderUV (Real u1, Real v1, Real u2, Real v2)
 Sets the texture coordinates for the bottom-right corner of the border. More...

String getLeftBorderUVString ()
String getRightBorderUVString ()
String getTopBorderUVString ()
String getBottomBorderUVString ()
String getTopLeftBorderUVString ()
String getTopRightBorderUVString ()
String getBottomLeftBorderUVString ()
String getBottomRightBorderUVString ()
void setBorderMaterialName (const String &name)
 Sets the name of the material to use for the borders. More...

const StringgetBorderMaterialName (void)
 Gets the name of the material to use for the borders. More...

void _updateRenderQueue (RenderQueue *queue)
 Overridden from GuiContainer. More...

void setMetricsMode (GuiMetricsMode gmm)
 Overridden from GuiElement. More...

void _update (void)
 Overridden from GuiElement. More...

void setTiling (Real x, Real y, ushort layer=0)
 Sets the number of times textures should repeat. More...

Real getTileX (ushort layer=0)
Real getTileY (ushort layer=0)
 Gets the number of times the texture should repeat vertically. More...

void setTransparent (bool isTransparent)
 Sets whether this panel is transparent (used only as a grouping level), or if it is actually renderred. More...

bool isTransparent (void)
 Returns whether this panel is transparent. More...

const StringgetTypeName (void)
 See GuiElement. More...

void getRenderOperation (RenderOperation &rend)
 See Renderable. More...

void setMaterialName (const String &matName)
 Overridden from GuiElement. More...

virtual void addChild (GuiElement *elem)
 Adds another GuiElement to this container. More...

virtual void addChild (GuiContainer *cont)
 Add a nested container to this container. More...

virtual void removeChild (const String &name)
 Removes a named element from this container. More...

virtual GuiElementgetChild (const String &name)
 Gets the named child of this container. More...

virtual ChildIterator getChildIterator (void)
 Gets an object for iterating over all the children of this object. More...

virtual ChildContainerIterator getChildContainerIterator (void)
 Gets an iterator for just the container children of this object. More...

virtual void _notifyZOrder (ushort newZOrder)
 Overridden from GuiElement. More...

bool isContainer ()
 Overridden from GuiElement. More...

virtual GuiElementfindElementAt (Real x, Real y)
 This returns a GuiElement at position x,y. More...

void copyFromTemplate (GuiElement *templateGui)
const StringgetName (void) const
 Gets the name of this overlay. More...

void show (void)
 Shows this element if it was hidden. More...

void hide (void)
 Hides this element if it was visible. More...

bool isVisible (void)
 Returns whether or not the element is visible. More...

void setDimensions (Real width, Real height)
 Sets the dimensions of this element in relation to the screen (1.0 = screen width/height). More...

void setPosition (Real left, Real top)
 Sets the position of the top-left corner of the element, relative to the screen size (1.0 = screen width / height). More...

void setWidth (Real width)
 Sets the width of this element in relation to the screen (where 1.0 = screen width). More...

Real getWidth (void) const
 Gets the width of this element in relation to the screen (where 1.0 = screen width). More...

void setHeight (Real height)
 Sets the height of this element in relation to the screen (where 1.0 = screen height). More...

Real getHeight (void) const
 Gets the height of this element in relation to the screen (where 1.0 = screen height). More...

void setLeft (Real left)
 Sets the left of this element in relation to the screen (where 0 = far left, 1.0 = far right). More...

Real getLeft (void) const
 Gets the left of this element in relation to the screen (where 0 = far left, 1.0 = far right). More...

void setTop (Real Top)
 Sets the top of this element in relation to the screen (where 0 = top, 1.0 = bottom). More...

Real getTop (void) const
 Gets the top of this element in relation to the screen (where 0 = top, 1.0 = bottom). More...

virtual const StringgetMaterialName (void) const
 Gets the name of the material this element uses. More...

MaterialgetMaterial (void) const
 See Renderable. More...

void getWorldTransforms (Matrix4 *xform)
 See Renderable. More...

bool useIdentityProjection (void)
 See Renderable. More...

bool useIdentityView (void)
 See Renderable. More...

virtual void _updateFromParent (void)
 Updates this elements transform based on it's parent. More...

virtual void _notifyParent (GuiContainer *parent, Overlay *overlay)
 Internal method for notifying the gui element of it's parent and ultimate overlay. More...

virtual Real _getDerivedLeft (void)
 Gets the 'left' position as derived from own left and that of parents. More...

virtual Real _getDerivedTop (void)
 Gets the 'top' position as derived from own left and that of parents. More...

virtual void setCaption (const String &text)
 Sets the caption on elements that support it. More...

virtual const StringgetCaption (void) const
 Gets the caption for this element. More...

virtual GuiMetricsMode getMetricsMode (void)
 Retrieves the current settings of how the element metrics are interpreted. More...

virtual void setHorizontalAlignment (GuiHorizontalAlignment gha)
 Sets the horizontal origin for this element. More...

virtual GuiHorizontalAlignment getHorizontalAlignment (void)
 Gets the horizontal alignment for this element. More...

virtual void setVerticalAlignment (GuiVerticalAlignment gva)
 Sets the vertical origin for this element. More...

virtual GuiVerticalAlignment getVerticalAlignment (void)
 Gets the vertical alignment for this element. More...

virtual bool contains (Real x, Real y) const
 Returns true if xy is within the constraints of the component. More...

virtual void processEvent (InputEvent *e)
 Processes events occurring on this component. More...

virtual bool isCloneable ()
virtual void setCloneable (bool c)
PositionTargetgetPositionTargetParent ()
 Returns the parent container. More...

GuiContainergetParent ()
 Returns the parent container. More...

ushort getZOrder () const
 Returns the zOrder of the element. More...

Real getSquaredViewDepth (const Camera *cam) const
 Overridden from Renderable. More...

ParamDictionarygetParamDictionary (void)
 Retrieves the parameter dictionary for this class. More...

const ParameterListgetParameters (void)
 Retrieves a list of parameters valid for this object. More...

virtual bool setParameter (const String &name, const String &value)
 Generic parameter setting method. More...

virtual String getParameter (const String &name)
 Generic parameter retrieval method. More...

virtual void copyParametersTo (StringInterface *dest)
 Method for copying this object's parameters to another object. More...

virtual unsigned short getNumWorldTransforms (void)
 Returns the number of world transform matrices this renderable requires. More...

virtual SceneDetailLevel getRenderDetail ()
 Returns the preferred rasterisation mode of this renderable. More...

void processMouseEvent (MouseEvent *e)
void addMouseListener (MouseListener *l)
void removeMouseListener (MouseListener *l)
void processMouseMotionEvent (MouseEvent *e)
void addMouseMotionListener (MouseMotionListener *l)
void removeMouseMotionListener (MouseMotionListener *l)

Protected Types

enum  BorderCellIndex {
  BCELL_TOP_LEFT = 0, BCELL_TOP = 1, BCELL_TOP_RIGHT = 2, BCELL_LEFT = 3,
  BCELL_RIGHT = 4, BCELL_BOTTOM_LEFT = 5, BCELL_BOTTOM = 6, BCELL_BOTTOM_RIGHT = 7
}

Protected Methods

void updatePositionGeometry (void)
 internal method for setting up geometry, called by GuiElement::update. More...

void addBaseParameters (void)
 Internal method for setting up parameters. More...

void setCellUV (BorderCellIndex idx, Real &u1, Real &v1, Real &u2, Real &v2)
 Internal method for updating UV. More...

String getCellUVString (BorderCellIndex idx)
virtual void updateTextureGeometry (void)
 Called to update the texture coords when layers change. More...

bool createParamDictionary (const String &className)
 Internal method for creating a parameter dictionary for the class, if it does not already exist. More...


Protected Attributes

Real mLeftBorderSize
Real mRightBorderSize
Real mTopBorderSize
Real mBottomBorderSize
ushort mPixelLeftBorderSize
ushort mPixelRightBorderSize
ushort mPixelTopBorderSize
ushort mPixelBottomBorderSize
String mBorderMaterialName
MaterialmpBorderMaterial
RenderOperation mRenderOp2
BorderRenderablemBorderRenderable
bool mTransparent
Real mTileX [OGRE_MAX_TEXTURE_LAYERS]
Real mTileY [OGRE_MAX_TEXTURE_LAYERS]
RenderOperation mRenderOp
ChildMap mChildren
ChildContainerMap mChildContainers
String mName
bool mVisible
bool mCloneable
Real mLeft
Real mTop
Real mWidth
Real mHeight
String mMaterialName
MaterialmpMaterial
String mCaption
GuiMetricsMode mMetricsMode
GuiHorizontalAlignment mHorzAlign
GuiVerticalAlignment mVertAlign
short mPixelTop
short mPixelLeft
short mPixelWidth
short mPixelHeight
GuiContainermParent
OverlaymOverlay
Real mDerivedLeft
Real mDerivedTop
bool mDerivedOutOfDate
bool mGeomPositionsOutOfDate
 Falg indicating if the vertex positons need recalculating. More...

ushort mZOrder
String mParamDictName
 Class name for this instance to be used as a lookup (must be initialised by subclasses). More...

MouseListenermMouseListener
MouseMotionListenermMouseMotionListener

Static Protected Attributes

String msTypeName = "BorderPanel"
CmdBorderSize msCmdBorderSize
CmdBorderMaterial msCmdBorderMaterial
CmdBorderLeftUV msCmdBorderLeftUV
CmdBorderTopUV msCmdBorderTopUV
CmdBorderBottomUV msCmdBorderBottomUV
CmdBorderRightUV msCmdBorderRightUV
CmdBorderTopLeftUV msCmdBorderTopLeftUV
CmdBorderBottomLeftUV msCmdBorderBottomLeftUV
CmdBorderTopRightUV msCmdBorderTopRightUV
CmdBorderBottomRightUV msCmdBorderBottomRightUV
CmdTiling msCmdTiling
CmdTransparent msCmdTransparent
GuiElementCommands::CmdLeft msLeftCmd
GuiElementCommands::CmdTop msTopCmd
GuiElementCommands::CmdWidth msWidthCmd
GuiElementCommands::CmdHeight msHeightCmd
GuiElementCommands::CmdMaterial msMaterialCmd
GuiElementCommands::CmdCaption msCaptionCmd
GuiElementCommands::CmdMetricsMode msMetricsModeCmd
GuiElementCommands::CmdHorizontalAlign msHorizontalAlignCmd
GuiElementCommands::CmdVerticalAlign msVerticalAlignCmd
ParamDictionaryMap msDictionary
 Dictionary of parameters. More...


Friends

class BorderRenderable

Detailed Description

A specialisation of the PanelGuiElement to provide a panel with a border.

Remarks:
Whilst the standard panel can use a single tiled material, this class allows panels with a tileable backdrop plus a border texture. This is handy for large panels that are too big to use a single large texture with a border, or for multiple different size panels where you want the border a constant width but the center to repeat.

In addition to the usual PanelGuiElement properties, this class has a 'border material', which specifies the material used for the edges of the panel, a border width (which can either be constant all the way around, or specified per edge), and the texture coordinates for each of the border sections.


Member Typedef Documentation

typedef MapIterator<ChildContainerMap> Ogre::GuiContainer::ChildContainerIterator [inherited]
 

typedef std::map<String, GuiContainer*> Ogre::GuiContainer::ChildContainerMap [inherited]
 

typedef MapIterator<ChildMap> Ogre::GuiContainer::ChildIterator [inherited]
 

typedef std::map<String, GuiElement*> Ogre::GuiContainer::ChildMap [inherited]
 


Member Enumeration Documentation

enum Ogre::BorderPanelGuiElement::BorderCellIndex [protected]
 

Enumeration values:
BCELL_TOP_LEFT 
BCELL_TOP 
BCELL_TOP_RIGHT 
BCELL_LEFT 
BCELL_RIGHT 
BCELL_BOTTOM_LEFT 
BCELL_BOTTOM 
BCELL_BOTTOM_RIGHT 


Constructor & Destructor Documentation

Ogre::BorderPanelGuiElement::BorderPanelGuiElement const String   name
 

Constructor.

Ogre::BorderPanelGuiElement::~BorderPanelGuiElement  
 


Member Function Documentation

Real Ogre::GuiElement::_getDerivedLeft void    [virtual, inherited]
 

Gets the 'left' position as derived from own left and that of parents.

Real Ogre::GuiElement::_getDerivedTop void    [virtual, inherited]
 

Gets the 'top' position as derived from own left and that of parents.

void Ogre::GuiElement::_notifyParent GuiContainer   parent,
Overlay   overlay
[virtual, inherited]
 

Internal method for notifying the gui element of it's parent and ultimate overlay.

void Ogre::GuiContainer::_notifyZOrder ushort    newZOrder [virtual, inherited]
 

Overridden from GuiElement.

Reimplemented from Ogre::GuiElement.

void Ogre::BorderPanelGuiElement::_update void    [virtual]
 

Overridden from GuiElement.

Reimplemented from Ogre::GuiContainer.

void Ogre::GuiElement::_updateFromParent void    [virtual, inherited]
 

Updates this elements transform based on it's parent.

void Ogre::BorderPanelGuiElement::_updateRenderQueue RenderQueue   queue [virtual]
 

Overridden from GuiContainer.

Reimplemented from Ogre::PanelGuiElement.

void Ogre::BorderPanelGuiElement::addBaseParameters void    [protected, virtual]
 

Internal method for setting up parameters.

Reimplemented from Ogre::PanelGuiElement.

Reimplemented in Ogre::ButtonGuiElement.

void Ogre::GuiContainer::addChild GuiContainer   cont [virtual, inherited]
 

Add a nested container to this container.

void Ogre::GuiContainer::addChild GuiElement   elem [virtual, inherited]
 

Adds another GuiElement to this container.

void Ogre::MouseTarget::addMouseListener MouseListener   l [inherited]
 

void Ogre::MouseMotionTarget::addMouseMotionListener MouseMotionListener   l [inherited]
 

bool Ogre::GuiElement::contains Real    x,
Real    y
const [virtual, inherited]
 

Returns true if xy is within the constraints of the component.

void Ogre::GuiContainer::copyFromTemplate GuiElement   templateGui [inherited]
 

Reimplemented from Ogre::GuiElement.

virtual void Ogre::StringInterface::copyParametersTo StringInterface   dest [inline, virtual, inherited]
 

Method for copying this object's parameters to another object.

Remarks:
This method takes the values of all the object's parameters and tries to set the same values on the destination object. This provides a completely type independent way to copy parameters to other objects. Note that because of the String manipulation involved, this should not be regarded as an efficient process and should be saved for times outside of the rendering loop.

Any unrecognised parameters will be ignored as with setParameter method.

Parameters:
dest  Pointer to object to have it's parameters set the same as this object.

bool Ogre::StringInterface::createParamDictionary const String   className [inline, protected, inherited]
 

Internal method for creating a parameter dictionary for the class, if it does not already exist.

Remarks:
This method will check to see if a parameter dictionary exist for this class yet, and if not will create one. NB you must supply the name of the class (RTTI is not used or performance).
Parameters:
className  the name of the class using the dictionary
Returns:
true if a new dictionary was created, false if it was already there

GuiElement * Ogre::GuiContainer::findElementAt Real    x,
Real    y
[virtual, inherited]
 

This returns a GuiElement at position x,y.

Reimplemented from Ogre::GuiElement.

Reimplemented in Ogre::ButtonGuiElement.

const String & Ogre::BorderPanelGuiElement::getBorderMaterialName void   
 

Gets the name of the material to use for the borders.

Real Ogre::BorderPanelGuiElement::getBottomBorderSize void   
 

Gets the size of the bottom border.

String Ogre::BorderPanelGuiElement::getBottomBorderUVString  
 

String Ogre::BorderPanelGuiElement::getBottomLeftBorderUVString  
 

String Ogre::BorderPanelGuiElement::getBottomRightBorderUVString  
 

const String & Ogre::GuiElement::getCaption void    const [virtual, inherited]
 

Gets the caption for this element.

Reimplemented in Ogre::TextAreaGuiElement.

String Ogre::BorderPanelGuiElement::getCellUVString BorderCellIndex    idx [protected]
 

GuiElement * Ogre::GuiContainer::getChild const String   name [virtual, inherited]
 

Gets the named child of this container.

GuiContainer::ChildContainerIterator Ogre::GuiContainer::getChildContainerIterator void    [virtual, inherited]
 

Gets an iterator for just the container children of this object.

Remarks:
Good for cascading updates without having to use RTTI

GuiContainer::ChildIterator Ogre::GuiContainer::getChildIterator void    [virtual, inherited]
 

Gets an object for iterating over all the children of this object.

Real Ogre::GuiElement::getHeight void    const [inherited]
 

Gets the height of this element in relation to the screen (where 1.0 = screen height).

GuiHorizontalAlignment Ogre::GuiElement::getHorizontalAlignment void    [virtual, inherited]
 

Gets the horizontal alignment for this element.

Real Ogre::GuiElement::getLeft void    const [virtual, inherited]
 

Gets the left of this element in relation to the screen (where 0 = far left, 1.0 = far right).

Implements Ogre::PositionTarget.

Real Ogre::BorderPanelGuiElement::getLeftBorderSize void   
 

Gets the size of the left border.

String Ogre::BorderPanelGuiElement::getLeftBorderUVString  
 

Material * Ogre::GuiElement::getMaterial void    const [virtual, inherited]
 

See Renderable.

Implements Ogre::Renderable.

const String & Ogre::GuiElement::getMaterialName void    const [virtual, inherited]
 

Gets the name of the material this element uses.

GuiMetricsMode Ogre::GuiElement::getMetricsMode void    [virtual, inherited]
 

Retrieves the current settings of how the element metrics are interpreted.

const String & Ogre::GuiElement::getName void    const [inherited]
 

Gets the name of this overlay.

virtual unsigned short Ogre::Renderable::getNumWorldTransforms void    [inline, virtual, inherited]
 

Returns the number of world transform matrices this renderable requires.

Remarks:
When a renderable uses vertex blending, it uses multiple world matrices instead of a single one. Each vertex sent to the pipeline can reference one or more matrices in this list with given weights. If a renderable does not use vertex blending this method returns 1, which is the default for simplicity.

Reimplemented in Ogre::SubEntity.

ParamDictionary* Ogre::StringInterface::getParamDictionary void    [inline, inherited]
 

Retrieves the parameter dictionary for this class.

Remarks:
Only valid to call this after createParamDictionary.
Returns:
Pointer to ParamDictionary shared by all instances of this class which you can add parameters to, retrieve parameters etc.

virtual String Ogre::StringInterface::getParameter const String   name [inline, virtual, inherited]
 

Generic parameter retrieval method.

Remarks:
Call this method with the name of a parameter to retrieve a string-format value of the parameter in question. If in doubt, check the parameter definition in the list returned from getParameters for the type of this parameter. If you like you can use StringConverter to convert this string back into a native type.
Parameters:
name  The name of the parameter to get
Returns:
String value of parameter, blank if not found

const ParameterList& Ogre::StringInterface::getParameters void    [inline, inherited]
 

Retrieves a list of parameters valid for this object.

Returns:
A reference to a static list of ParameterDef objects.

GuiContainer * Ogre::GuiElement::getParent   [inherited]
 

Returns the parent container.

PositionTarget * Ogre::GuiElement::getPositionTargetParent   [virtual, inherited]
 

Returns the parent container.

Implements Ogre::PositionTarget.

virtual SceneDetailLevel Ogre::Renderable::getRenderDetail   [inline, virtual, inherited]
 

Returns the preferred rasterisation mode of this renderable.

Reimplemented in Ogre::SubEntity.

void Ogre::PanelGuiElement::getRenderOperation RenderOperation   rend [virtual, inherited]
 

See Renderable.

Implements Ogre::Renderable.

Real Ogre::BorderPanelGuiElement::getRightBorderSize void   
 

Gets the size of the right border.

String Ogre::BorderPanelGuiElement::getRightBorderUVString  
 

Real Ogre::GuiElement::getSquaredViewDepth const Camera   cam const [inline, virtual, inherited]
 

Overridden from Renderable.

Implements Ogre::Renderable.

Real Ogre::PanelGuiElement::getTileX ushort    layer = 0 [inherited]
 

Real Ogre::PanelGuiElement::getTileY ushort    layer = 0 [inherited]
 

Gets the number of times the texture should repeat vertically.

Parameters:
layer  The texture layer to specify (only needs to be altered if you're using a multi-texture layer material)

Real Ogre::GuiElement::getTop void    const [virtual, inherited]
 

Gets the top of this element in relation to the screen (where 0 = top, 1.0 = bottom).

Implements Ogre::PositionTarget.

Real Ogre::BorderPanelGuiElement::getTopBorderSize void   
 

Gets the size of the top border.

String Ogre::BorderPanelGuiElement::getTopBorderUVString  
 

String Ogre::BorderPanelGuiElement::getTopLeftBorderUVString  
 

String Ogre::BorderPanelGuiElement::getTopRightBorderUVString  
 

const String & Ogre::PanelGuiElement::getTypeName void    [virtual, inherited]
 

See GuiElement.

Implements Ogre::GuiElement.

GuiVerticalAlignment Ogre::GuiElement::getVerticalAlignment void    [virtual, inherited]
 

Gets the vertical alignment for this element.

Real Ogre::GuiElement::getWidth void    const [inherited]
 

Gets the width of this element in relation to the screen (where 1.0 = screen width).

void Ogre::GuiElement::getWorldTransforms Matrix4   xform [virtual, inherited]
 

See Renderable.

Implements Ogre::Renderable.

ushort Ogre::GuiElement::getZOrder   const [inline, inherited]
 

Returns the zOrder of the element.

void Ogre::GuiElement::hide void    [inherited]
 

Hides this element if it was visible.

virtual bool Ogre::GuiElement::isCloneable   [inline, virtual, inherited]
 

bool Ogre::GuiContainer::isContainer   [inline, virtual, inherited]
 

Overridden from GuiElement.

Reimplemented from Ogre::GuiElement.

bool Ogre::PanelGuiElement::isTransparent void    [inherited]
 

Returns whether this panel is transparent.

bool Ogre::GuiElement::isVisible void    [inherited]
 

Returns whether or not the element is visible.

void Ogre::GuiElement::processEvent InputEvent   e [virtual, inherited]
 

Processes events occurring on this component.

By default this method calls the appropriate process event method

Implements Ogre::EventTarget.

Reimplemented in Ogre::ButtonGuiElement.

void Ogre::MouseTarget::processMouseEvent MouseEvent   e [inherited]
 

void Ogre::MouseMotionTarget::processMouseMotionEvent MouseEvent   e [inherited]
 

void Ogre::GuiContainer::removeChild const String   name [virtual, inherited]
 

Removes a named element from this container.

void Ogre::MouseTarget::removeMouseListener MouseListener   l [inherited]
 

void Ogre::MouseMotionTarget::removeMouseMotionListener MouseMotionListener   l [inherited]
 

void Ogre::BorderPanelGuiElement::setBorderMaterialName const String   name
 

Sets the name of the material to use for the borders.

void Ogre::BorderPanelGuiElement::setBorderSize Real    left,
Real    right,
Real    top,
Real    bottom
 

Sets the size of the border separately for all borders.

Remarks:
This method sets a size all borders separately. Remember that the dimensions specified here are in relation to the size of the screen, so 0.1 is 1/10th of the screen width or height. Also note that because most screen resolutions are 1.333:1 width:height ratio that using the same border size will look slightly bigger across than up.
Parameters:
left  The size of the left border as a factor of the screen dimensions ie 0.2 is one-fifth of the screen size.
right  The size of the left border as a factor of the screen dimensions.
top  The size of the top border as a factor of the screen dimensions.
bottom  The size of the bottom border as a factor of the screen dimensions.

void Ogre::BorderPanelGuiElement::setBorderSize Real    sides,
Real    topAndBottom
 

Sets the size of the border, with different sizes for vertical and horizontal borders.

Remarks:
This method sets a size for the side and top / bottom borders separately. Remember that the dimensions specified here are in relation to the size of the screen, so 0.1 is 1/10th of the screen width or height. Also note that because most screen resolutions are 1.333:1 width:height ratio that using the same border size will look slightly bigger across than up.
Parameters:
sides  The size of the side borders as a factor of the screen dimensions ie 0.2 is one-fifth of the screen size.
topAndBottom  The size of the top and bottom borders as a factor of the screen dimensions.

void Ogre::BorderPanelGuiElement::setBorderSize Real    size
 

Sets the size of the border.

Remarks:
This method sets a constant size for all borders. There are also alternative methods which allow you to set border widths for individual edges separately. Remember that the dimensions specified here are in relation to the size of the screen, so 0.1 is 1/10th of the screen width or height. Also note that because most screen resolutions are 1.333:1 width:height ratio that using the same border size will look slightly bigger across than up.
Parameters:
size  The size of the border as a factor of the screen dimensions ie 0.2 is one-fifth of the screen size.

void Ogre::BorderPanelGuiElement::setBottomBorderUV Real    u1,
Real    v1,
Real    u2,
Real    v2
 

Sets the texture coordinates for the bottom edge of the border.

Remarks:
See setLeftBorderUV.

void Ogre::BorderPanelGuiElement::setBottomLeftBorderUV Real    u1,
Real    v1,
Real    u2,
Real    v2
 

Sets the texture coordinates for the bottom-left corner of the border.

Remarks:
See setLeftBorderUV.

void Ogre::BorderPanelGuiElement::setBottomRightBorderUV Real    u1,
Real    v1,
Real    u2,
Real    v2
 

Sets the texture coordinates for the bottom-right corner of the border.

Remarks:
See setLeftBorderUV.

void Ogre::GuiElement::setCaption const String   text [virtual, inherited]
 

Sets the caption on elements that support it.

Remarks:
This property doesn't do something on all elements, just those that support it. However, being a common requirement it is in the top-level interface to avoid having to set it via the StringInterface all the time.

Reimplemented in Ogre::TextAreaGuiElement.

void Ogre::BorderPanelGuiElement::setCellUV BorderCellIndex    idx,
Real   u1,
Real   v1,
Real   u2,
Real   v2
[protected]
 

Internal method for updating UV.

virtual void Ogre::GuiElement::setCloneable bool    c [inline, virtual, inherited]
 

void Ogre::GuiElement::setDimensions Real    width,
Real    height
[inherited]
 

Sets the dimensions of this element in relation to the screen (1.0 = screen width/height).

void Ogre::GuiElement::setHeight Real    height [inherited]
 

Sets the height of this element in relation to the screen (where 1.0 = screen height).

void Ogre::GuiElement::setHorizontalAlignment GuiHorizontalAlignment    gha [virtual, inherited]
 

Sets the horizontal origin for this element.

Remarks:
By default, the horizontal origin for a GuiElement is the left edge of the parent container (or the screen if this is a root element). You can alter this by calling this method, which is especially useful when you want to use pixel-based metrics (see setMetricsMode) since in this mode you can't use relative positioning.

For example, if you were using GMM_PIXELS metrics mode, and you wanted to place a 30x30 pixel crosshair in the center of the screen, you would use GHA_CENTER with a 'left' property of -15.

Note that neither GHA_CENTER or GHA_RIGHT alter the position of the element based on it's width, you have to alter the 'left' to a negative number to do that; all this does is establish the origin. This is because this way you can align multiple things in the center and right with different 'left' offsets for maximum flexibility.

void Ogre::GuiElement::setLeft Real    left [inherited]
 

Sets the left of this element in relation to the screen (where 0 = far left, 1.0 = far right).

void Ogre::BorderPanelGuiElement::setLeftBorderUV Real    u1,
Real    v1,
Real    u2,
Real    v2
 

Sets the texture coordinates for the left edge of the border.

Remarks:
The border panel uses 8 panels for the border (9 including the center). Imagine a table with 3 rows and 3 columns. The corners are always the same size, but the edges stretch depending on how big the panel is. Those who have done resizable HTML tables will be familiar with this approach.

We only require 2 sets of uv coordinates, one for the top-left and one for the bottom-right of the panel, since it is assumed the sections are aligned on the texture.

void Ogre::PanelGuiElement::setMaterialName const String   matName [virtual, inherited]
 

Overridden from GuiElement.

Reimplemented from Ogre::GuiElement.

void Ogre::BorderPanelGuiElement::setMetricsMode GuiMetricsMode    gmm [virtual]
 

Overridden from GuiElement.

Reimplemented from Ogre::GuiElement.

bool Ogre::StringInterface::setParameter const String   name,
const String   value
[virtual, inherited]
 

Generic parameter setting method.

Remarks:
Call this method with the name of a parameter and a string version of the value to set. The implementor will convert the string to a native type internally. If in doubt, check the parameter definition in the list returned from StringInterface::getParameters.
Parameters:
name  The name of the parameter to set
value  String value. Must be in the right format for the type specified in the parameter definition. See the StringConverter class for more information.
Returns:
true if set was successful, false otherwise (NB no exceptions thrown - tolerant method)

void Ogre::GuiElement::setPosition Real    left,
Real    top
[inherited]
 

Sets the position of the top-left corner of the element, relative to the screen size (1.0 = screen width / height).

void Ogre::BorderPanelGuiElement::setRightBorderUV Real    u1,
Real    v1,
Real    u2,
Real    v2
 

Sets the texture coordinates for the right edge of the border.

Remarks:
See setLeftBorderUV.

void Ogre::PanelGuiElement::setTiling Real    x,
Real    y,
ushort    layer = 0
[inherited]
 

Sets the number of times textures should repeat.

Parameters:
x  The number of times the texture should repeat horizontally
y  The number of times the texture should repeat vertically
layer  The texture layer to specify (only needs to be altered if you're using a multi-texture layer material)

void Ogre::GuiElement::setTop Real    Top [inherited]
 

Sets the top of this element in relation to the screen (where 0 = top, 1.0 = bottom).

void Ogre::BorderPanelGuiElement::setTopBorderUV Real    u1,
Real    v1,
Real    u2,
Real    v2
 

Sets the texture coordinates for the top edge of the border.

Remarks:
See setLeftBorderUV.

void Ogre::BorderPanelGuiElement::setTopLeftBorderUV Real    u1,
Real    v1,
Real    u2,
Real    v2
 

Sets the texture coordinates for the top-left corner of the border.

Remarks:
See setLeftBorderUV.

void Ogre::BorderPanelGuiElement::setTopRightBorderUV Real    u1,
Real    v1,
Real    u2,
Real    v2
 

Sets the texture coordinates for the top-right corner of the border.

Remarks:
See setLeftBorderUV.

void Ogre::PanelGuiElement::setTransparent bool    isTransparent [inherited]
 

Sets whether this panel is transparent (used only as a grouping level), or if it is actually renderred.

void Ogre::GuiElement::setVerticalAlignment GuiVerticalAlignment    gva [virtual, inherited]
 

Sets the vertical origin for this element.

Remarks:
By default, the vertical origin for a GuiElement is the top edge of the parent container (or the screen if this is a root element). You can alter this by calling this method, which is especially useful when you want to use pixel-based metrics (see setMetricsMode) since in this mode you can't use relative positioning.

For example, if you were using GMM_PIXELS metrics mode, and you wanted to place a 30x30 pixel crosshair in the center of the screen, you would use GHA_CENTER with a 'top' property of -15.

Note that neither GVA_CENTER or GVA_BOTTOM alter the position of the element based on it's height, you have to alter the 'top' to a negative number to do that; all this does is establish the origin. This is because this way you can align multiple things in the center and bottom with different 'top' offsets for maximum flexibility.

void Ogre::GuiElement::setWidth Real    width [inherited]
 

Sets the width of this element in relation to the screen (where 1.0 = screen width).

void Ogre::GuiElement::show void    [inherited]
 

Shows this element if it was hidden.

void Ogre::BorderPanelGuiElement::updatePositionGeometry void    [protected, virtual]
 

internal method for setting up geometry, called by GuiElement::update.

Reimplemented from Ogre::PanelGuiElement.

void Ogre::PanelGuiElement::updateTextureGeometry void    [protected, virtual, inherited]
 

Called to update the texture coords when layers change.

bool Ogre::GuiElement::useIdentityProjection void    [virtual, inherited]
 

See Renderable.

Reimplemented from Ogre::Renderable.

bool Ogre::GuiElement::useIdentityView void    [virtual, inherited]
 

See Renderable.

Reimplemented from Ogre::Renderable.


Friends And Related Function Documentation

friend class BorderRenderable [friend]
 


Member Data Documentation

String Ogre::BorderPanelGuiElement::mBorderMaterialName [protected]
 

BorderRenderable* Ogre::BorderPanelGuiElement::mBorderRenderable [protected]
 

Real Ogre::BorderPanelGuiElement::mBottomBorderSize [protected]
 

String Ogre::GuiElement::mCaption [protected, inherited]
 

ChildContainerMap Ogre::GuiContainer::mChildContainers [protected, inherited]
 

ChildMap Ogre::GuiContainer::mChildren [protected, inherited]
 

bool Ogre::GuiElement::mCloneable [protected, inherited]
 

Real Ogre::GuiElement::mDerivedLeft [protected, inherited]
 

bool Ogre::GuiElement::mDerivedOutOfDate [protected, inherited]
 

Real Ogre::GuiElement::mDerivedTop [protected, inherited]
 

bool Ogre::GuiElement::mGeomPositionsOutOfDate [protected, inherited]
 

Falg indicating if the vertex positons need recalculating.

Real Ogre::GuiElement::mHeight [protected, inherited]
 

GuiHorizontalAlignment Ogre::GuiElement::mHorzAlign [protected, inherited]
 

Real Ogre::GuiElement::mLeft [protected, inherited]
 

Real Ogre::BorderPanelGuiElement::mLeftBorderSize [protected]
 

String Ogre::GuiElement::mMaterialName [protected, inherited]
 

GuiMetricsMode Ogre::GuiElement::mMetricsMode [protected, inherited]
 

MouseListener* Ogre::MouseTarget::mMouseListener [protected, inherited]
 

MouseMotionListener* Ogre::MouseMotionTarget::mMouseMotionListener [protected, inherited]
 

String Ogre::GuiElement::mName [protected, inherited]
 

Overlay* Ogre::GuiElement::mOverlay [protected, inherited]
 

String Ogre::StringInterface::mParamDictName [protected, inherited]
 

Class name for this instance to be used as a lookup (must be initialised by subclasses).

GuiContainer* Ogre::GuiElement::mParent [protected, inherited]
 

Material* Ogre::BorderPanelGuiElement::mpBorderMaterial [protected]
 

ushort Ogre::BorderPanelGuiElement::mPixelBottomBorderSize [protected]
 

short Ogre::GuiElement::mPixelHeight [protected, inherited]
 

short Ogre::GuiElement::mPixelLeft [protected, inherited]
 

ushort Ogre::BorderPanelGuiElement::mPixelLeftBorderSize [protected]
 

ushort Ogre::BorderPanelGuiElement::mPixelRightBorderSize [protected]
 

short Ogre::GuiElement::mPixelTop [protected, inherited]
 

ushort Ogre::BorderPanelGuiElement::mPixelTopBorderSize [protected]
 

short Ogre::GuiElement::mPixelWidth [protected, inherited]
 

Material* Ogre::GuiElement::mpMaterial [protected, inherited]
 

RenderOperation Ogre::PanelGuiElement::mRenderOp [protected, inherited]
 

RenderOperation Ogre::BorderPanelGuiElement::mRenderOp2 [protected]
 

Real Ogre::BorderPanelGuiElement::mRightBorderSize [protected]
 

GuiElementCommands::CmdCaption Ogre::GuiElement::msCaptionCmd [static, protected, inherited]
 

BorderPanelGuiElement::CmdBorderBottomLeftUV Ogre::BorderPanelGuiElement::msCmdBorderBottomLeftUV [static, protected]
 

BorderPanelGuiElement::CmdBorderBottomRightUV Ogre::BorderPanelGuiElement::msCmdBorderBottomRightUV [static, protected]
 

BorderPanelGuiElement::CmdBorderBottomUV Ogre::BorderPanelGuiElement::msCmdBorderBottomUV [static, protected]
 

BorderPanelGuiElement::CmdBorderLeftUV Ogre::BorderPanelGuiElement::msCmdBorderLeftUV [static, protected]
 

BorderPanelGuiElement::CmdBorderMaterial Ogre::BorderPanelGuiElement::msCmdBorderMaterial [static, protected]
 

BorderPanelGuiElement::CmdBorderRightUV Ogre::BorderPanelGuiElement::msCmdBorderRightUV [static, protected]
 

BorderPanelGuiElement::CmdBorderSize Ogre::BorderPanelGuiElement::msCmdBorderSize [static, protected]
 

BorderPanelGuiElement::CmdBorderTopLeftUV Ogre::BorderPanelGuiElement::msCmdBorderTopLeftUV [static, protected]
 

BorderPanelGuiElement::CmdBorderTopRightUV Ogre::BorderPanelGuiElement::msCmdBorderTopRightUV [static, protected]
 

BorderPanelGuiElement::CmdBorderTopUV Ogre::BorderPanelGuiElement::msCmdBorderTopUV [static, protected]
 

PanelGuiElement::CmdTiling Ogre::PanelGuiElement::msCmdTiling [static, protected, inherited]
 

PanelGuiElement::CmdTransparent Ogre::PanelGuiElement::msCmdTransparent [static, protected, inherited]
 

ParamDictionaryMap Ogre::StringInterface::msDictionary [static, protected, inherited]
 

Dictionary of parameters.

GuiElementCommands::CmdHeight Ogre::GuiElement::msHeightCmd [static, protected, inherited]
 

GuiElementCommands::CmdHorizontalAlign Ogre::GuiElement::msHorizontalAlignCmd [static, protected, inherited]
 

GuiElementCommands::CmdLeft Ogre::GuiElement::msLeftCmd [static, protected, inherited]
 

GuiElementCommands::CmdMaterial Ogre::GuiElement::msMaterialCmd [static, protected, inherited]
 

GuiElementCommands::CmdMetricsMode Ogre::GuiElement::msMetricsModeCmd [static, protected, inherited]
 

GuiElementCommands::CmdTop Ogre::GuiElement::msTopCmd [static, protected, inherited]
 

String Ogre::BorderPanelGuiElement::msTypeName = "BorderPanel" [static, protected]
 

Reimplemented from Ogre::PanelGuiElement.

Reimplemented in Ogre::ButtonGuiElement.

GuiElementCommands::CmdVerticalAlign Ogre::GuiElement::msVerticalAlignCmd [static, protected, inherited]
 

GuiElementCommands::CmdWidth Ogre::GuiElement::msWidthCmd [static, protected, inherited]
 

Real Ogre::PanelGuiElement::mTileX[OGRE_MAX_TEXTURE_LAYERS] [protected, inherited]
 

Real Ogre::PanelGuiElement::mTileY[OGRE_MAX_TEXTURE_LAYERS] [protected, inherited]
 

Real Ogre::GuiElement::mTop [protected, inherited]
 

Real Ogre::BorderPanelGuiElement::mTopBorderSize [protected]
 

bool Ogre::PanelGuiElement::mTransparent [protected, inherited]
 

GuiVerticalAlignment Ogre::GuiElement::mVertAlign [protected, inherited]
 

bool Ogre::GuiElement::mVisible [protected, inherited]
 

Real Ogre::GuiElement::mWidth [protected, inherited]
 

ushort Ogre::GuiElement::mZOrder [protected, inherited]
 

Copyright © 2002 by The OGRE Team