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

Ogre::ListGuiElement Class Reference

The listener interface for receiving "interesting" mouse events (press, release, click, enter, and exit) on a component. More...

#include <OgreListGuiElement.h>

Inheritance diagram for Ogre::ListGuiElement:

Ogre::PanelGuiElement Ogre::ListSelectionTarget Ogre::ListChanger Ogre::MouseListener Ogre::GuiContainer Ogre::EventListener Ogre::GuiElement Ogre::StringInterface Ogre::Renderable Ogre::MouseTarget Ogre::MouseMotionTarget Ogre::PositionTarget Ogre::PositionTarget Ogre::EventTarget 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

 ListGuiElement (const String &name)
void setItemTemplateName (const String &val)
void addListItem (Resource *r)
void removeListItem (Resource *r)
String getItemTemplateName ()
String getVSpacing ()
String getHSpacing ()
void setVSpacing (const String &val)
void setHSpacing (const String &val)
void mouseClicked (MouseEvent *e)
 Invoked when the mouse has been clicked on a component. More...

void mouseEntered (MouseEvent *e)
 Invoked when the mouse enters a component. More...

void mouseExited (MouseEvent *e)
 Invoked when the mouse exits a component. More...

void mousePressed (MouseEvent *e)
 Invoked when a mouse button has been pressed on a component. More...

void mouseReleased (MouseEvent *e)
 Invoked when a mouse button has been released on a component. More...

String getItemPanelMaterial ()
String getItemPanelMaterialSelected ()
void setItemPanelMaterial (const String &val)
void setItemPanelMaterialSelected (const String &val)
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...

void _updateRenderQueue (RenderQueue *queue)
 Overridden from GuiContainer. 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 _update (void)
 Overridden from GuiElement. 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 void setMetricsMode (GuiMetricsMode gmm)
 Tells this element how to interpret the position and dimension values it is given. 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)
void processListSelectionEvent (ListSelectionEvent *e)
void addListSelectionListener (ListSelectionListener *l)
void removeListSelectionListener (ListSelectionListener *l)
virtual bool isMulticaster ()
 Returns whether or not the listener is a multicaster. More...


Protected Methods

void setSelectedItem (GuiElement *item, bool on)
void addBaseParameters (void)
 Method for setting up base parameters for this class. More...

String getListItemName (Resource *r)
String getListItemPanelName (Resource *r)
void layoutItems ()
virtual void updatePositionGeometry (void)
 internal method for setting up geometry, called by GuiElement::update. More...

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 mVSpacing
Real mHSpacing
ushort mPixelVSpacing
ushort mPixelHSpacing
String mItemTemplateName
String mItemPanelMaterial
String mItemPanelMaterialSelected
ResourceList mResourceList
GuiElementmSelectedElement
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
ListSelectionListenermListSelectionListener

Static Protected Attributes

CmdItemTemplate msCmdItemTemplate
CmdVSpacing msCmdVSpacing
CmdHSpacing msCmdHSpacing
CmdItemPanelMaterial msCmdItemPanelMaterial
CmdItemPanelMaterialSelected msCmdItemPanelMaterialSelected
String msTypeName = "List"
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...


Detailed Description

The listener interface for receiving "interesting" mouse events (press, release, click, enter, and exit) on a component.

(To track mouse moves and mouse drags, use the MouseMotionListener.)

The class that is interested in processing a mouse event either implements this interface (and all the methods it contains) or extends the abstract MouseAdapter class (overriding only the methods of interest).

The listener object created from that class is then registered with a component using the component's addMouseListener method. A mouse event is generated when the mouse is pressed, released clicked (pressed and released). A mouse event is also generated when the mouse cursor enters or leaves a component. When a mouse event occurs the relevant method in the listener object is invoked, and the MouseEvent is passed to it.


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]
 


Constructor & Destructor Documentation

Ogre::ListGuiElement::ListGuiElement const String   name
 


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::GuiContainer::_update void    [virtual, inherited]
 

Overridden from GuiElement.

Reimplemented from Ogre::GuiElement.

Reimplemented in Ogre::BorderPanelGuiElement.

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

Updates this elements transform based on it's parent.

void Ogre::PanelGuiElement::_updateRenderQueue RenderQueue   queue [virtual, inherited]
 

Overridden from GuiContainer.

Reimplemented from Ogre::GuiContainer.

Reimplemented in Ogre::BorderPanelGuiElement.

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

Method for setting up base parameters for this class.

Reimplemented from Ogre::PanelGuiElement.

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::ListGuiElement::addListItem Resource   r [virtual]
 

Implements Ogre::ListChanger.

void Ogre::ListSelectionTarget::addListSelectionListener ListSelectionListener   l [inherited]
 

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::GuiElement::getCaption void    const [virtual, inherited]
 

Gets the caption for this element.

Reimplemented in Ogre::TextAreaGuiElement.

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.

String Ogre::ListGuiElement::getHSpacing  
 

String Ogre::ListGuiElement::getItemPanelMaterial  
 

String Ogre::ListGuiElement::getItemPanelMaterialSelected  
 

String Ogre::ListGuiElement::getItemTemplateName  
 

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.

String Ogre::ListGuiElement::getListItemName Resource   r [protected]
 

String Ogre::ListGuiElement::getListItemPanelName Resource   r [protected]
 

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::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.

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.

String Ogre::ListGuiElement::getVSpacing  
 

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.

virtual bool Ogre::EventListener::isMulticaster   [inline, virtual, inherited]
 

Returns whether or not the listener is a multicaster.

Reimplemented in Ogre::EventMulticaster.

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::ListGuiElement::layoutItems   [protected]
 

void Ogre::ListGuiElement::mouseClicked MouseEvent   e [inline, virtual]
 

Invoked when the mouse has been clicked on a component.

Implements Ogre::MouseListener.

void Ogre::ListGuiElement::mouseEntered MouseEvent   e [inline, virtual]
 

Invoked when the mouse enters a component.

Implements Ogre::MouseListener.

void Ogre::ListGuiElement::mouseExited MouseEvent   e [inline, virtual]
 

Invoked when the mouse exits a component.

Implements Ogre::MouseListener.

void Ogre::ListGuiElement::mousePressed MouseEvent   e [virtual]
 

Invoked when a mouse button has been pressed on a component.

Implements Ogre::MouseListener.

void Ogre::ListGuiElement::mouseReleased MouseEvent   e [inline, virtual]
 

Invoked when a mouse button has been released on a component.

Implements Ogre::MouseListener.

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::ListSelectionTarget::processListSelectionEvent ListSelectionEvent   e [inherited]
 

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::ListGuiElement::removeListItem Resource   r [virtual]
 

Implements Ogre::ListChanger.

void Ogre::ListSelectionTarget::removeListSelectionListener ListSelectionListener   l [inherited]
 

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

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

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.

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::ListGuiElement::setHSpacing const String   val
 

void Ogre::ListGuiElement::setItemPanelMaterial const String   val
 

void Ogre::ListGuiElement::setItemPanelMaterialSelected const String   val
 

void Ogre::ListGuiElement::setItemTemplateName const String   val
 

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::PanelGuiElement::setMaterialName const String   matName [virtual, inherited]
 

Overridden from GuiElement.

Reimplemented from Ogre::GuiElement.

void Ogre::GuiElement::setMetricsMode GuiMetricsMode    gmm [virtual, inherited]
 

Tells this element how to interpret the position and dimension values it is given.

Remarks:
By default, GuiElements are positioned and sized according to relative dimensions of the screen. This is to ensure portability between different resolutions when you want things to be positioned and sized the same way across all resolutions. However, sometimes you want things to be sized according to fixed pixels. In order to do this, you can call this method with the parameter GMM_PIXELS. Note that if you then want to place your element relative to the center, right or bottom of it's parent, you will need to use the setHorizontalAlignment and setVerticalAlignment methods.

Reimplemented in Ogre::BorderPanelGuiElement.

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::ListGuiElement::setSelectedItem GuiElement   item,
bool    on
[protected]
 

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::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::ListGuiElement::setVSpacing const String   val
 

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::PanelGuiElement::updatePositionGeometry void    [protected, virtual, inherited]
 

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

Implements Ogre::GuiElement.

Reimplemented in Ogre::BorderPanelGuiElement.

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.


Member Data Documentation

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::ListGuiElement::mHSpacing [protected]
 

String Ogre::ListGuiElement::mItemPanelMaterial [protected]
 

String Ogre::ListGuiElement::mItemPanelMaterialSelected [protected]
 

String Ogre::ListGuiElement::mItemTemplateName [protected]
 

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

ListSelectionListener* Ogre::ListSelectionTarget::mListSelectionListener [protected, inherited]
 

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]
 

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

ushort Ogre::ListGuiElement::mPixelHSpacing [protected]
 

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

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

ushort Ogre::ListGuiElement::mPixelVSpacing [protected]
 

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

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

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

ResourceList Ogre::ListGuiElement::mResourceList [protected]
 

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

ListGuiElement::CmdHSpacing Ogre::ListGuiElement::msCmdHSpacing [static, protected]
 

ListGuiElement::CmdItemPanelMaterial Ogre::ListGuiElement::msCmdItemPanelMaterial [static, protected]
 

ListGuiElement::CmdItemPanelMaterialSelected Ogre::ListGuiElement::msCmdItemPanelMaterialSelected [static, protected]
 

ListGuiElement::CmdItemTemplate Ogre::ListGuiElement::msCmdItemTemplate [static, protected]
 

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

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

ListGuiElement::CmdVSpacing Ogre::ListGuiElement::msCmdVSpacing [static, protected]
 

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

Dictionary of parameters.

GuiElement* Ogre::ListGuiElement::mSelectedElement [protected]
 

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::ListGuiElement::msTypeName = "List" [static, protected]
 

Reimplemented from Ogre::PanelGuiElement.

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]
 

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

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

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

Real Ogre::ListGuiElement::mVSpacing [protected]
 

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

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

Copyright © 2002 by The OGRE Team