class GmMenu

The menu class defines the functionality of all menu objects such as pop-ups and pull-downs.

Inheritance:


Public Methods

[more] GmMenu ()
Standard constructor
[more]virtual void addTextItem (char* textMenuItem, WidgetIDType widgetId)
Adds a text-based menu item to the menu.
[more]virtual void applyLayout (float minX, float minY, float minZ, float maxX, float maxY, float maxZ)
Repositions and resizes this component based on parameters passed into the method.
[more]virtual void mousePressEvent (GmEvent* event)
Event processing function to process a mouse press event.
[more]virtual void widgetEvent (GmEvent::WidgetEventType* widgetEvent)
Called whenever a widget event occurs on a widget that this widget event handler has registered with.
[more]virtual ~GmMenu ()
Virtual destructor

Protected Fields

[more]float mGlMenuHeight
The OpenGL height of the drop-down menu
[more]float mGlMenuWidth
The OpenGL width of the drop-down menu
[more]vector<GmInteractiveWidget*> mListItems
The menu list item objects that are contained in this menu

Protected Methods

[more]virtual void render2d (GmTypes::RenderOptionType renderOptions)
Renders this menu to a 2D image buffer.
[more]virtual void render2dSelect (GmTypes::RenderOptionType renderOptions)
Renders this menu to a selection buffer.


Inherited from GmButton:

Public Methods

ovirtual float getBorderWidth()
ovirtual GmTypes::ButtonStateType getState()
ovirtual char* getText()
oGlmColor4* getTextColor()
ovoid getTextJustification(GmTypes::JustificationType& horizontal, GmTypes::JustificationType& vertical)
ofloat getTextPointSize()
ovirtual void mouseReleaseEvent(GmEvent* event)
ovirtual void setAbsoluteGeometry(float x, float y, float z, float width, float height, float depth)
ovirtual void setBorderWidth(float borderWidth)
ovirtual void setCoordType(GmTypes::CoordinateType coordType)
ovirtual void setDepth(float depth)
ovirtual void setHeight(float height)
ovirtual void setPosition(GlmPoint3* point)
ovirtual void setPosition(float x, float y, float z)
ovirtual void setRelativeGeometry(float x, float y, float width, float height)
ovirtual void setRelativeGeometry(float x, float y, float z, float width, float height, float depth)
ovirtual void setState(GmTypes::ButtonStateType state)
ovirtual void setText(char* text)
ovoid setTextColor(float r, float g, float b, float a)
ovoid setTextColor(GlmColor4* color)
ovoid setTextJustification(GmTypes::JustificationType horizontal, GmTypes::JustificationType vertical)
ovoid setTextPointSize(float pointSize)
ovirtual void setVisible(bool visible)
ovirtual void setWidth(float width)

Protected Fields

ofloat mBorderWidth
oGmTypes::ButtonStateType mState
oGmTextWidget* mTextWidget


Inherited from GmInteractiveWidget:

Public Fields

oGmFocusEventHandler* focusEventHandler
oGmKeyEventHandler* keyEventHandler
oGmAnimation* mFocusGainAnim
oGmAnimation* mFocusLoseAnim
oGmTypes::FocusType mFocusState
ounsigned int mFocusTimestamp
oGmAnimation* mKeyPressAnim
oGmAnimation* mKeyReleaseAnim
oGmAnimation* mMouseExitAnim
oGmAnimation* mMouseOverAnim
oGmAnimation* mMousePressAnim
oGmAnimation* mMouseReleaseAnim
oWidgetIDType mWidgetId
oGmToolTip* mWidgetToolTip
oGmMouseEventHandler* mouseEventHandler
oGmUserEventHandler* userEventHandler
oGmWidgetEventHandler* widgetEventHandler

Public Methods

ovirtual void focusGainEvent(GmEvent* event)
ovirtual void focusLoseEvent(GmEvent* event)
ovirtual WidgetIDType getWidgetId()
ovirtual void keyPressEvent(GmEvent* event)
ovirtual void keyReleaseEvent(GmEvent* event)
ovirtual void mouseDragEvent(GmEvent* event)
ovirtual void mouseMoveEvent(GmEvent* event)
ovirtual void setFocusEventHandler(GmFocusEventHandler* focusHandler, WidgetIDType widgetId)
ovirtual void setKeyEventHandler(GmKeyEventHandler* keyHandler, WidgetIDType widgetId)
ovirtual void setMouseEventHandler(GmMouseEventHandler* mouseHandler, WidgetIDType widgetId)
ovirtual void setToolTip(GmToolTip* tooltip)
ovirtual void setUserEventHandler(GmUserEventHandler* userHandler, WidgetIDType widgetId)
ovirtual void setWidgetEventHandler(GmWidgetEventHandler* widgetHandler, WidgetIDType widgetId)
ovirtual void userEvent(GmEvent* event)
ovirtual void wheelMoveEvent(GmEvent* event)

Protected Methods

ovirtual void render2dToolTip(GmTypes::RenderOptionType renderOptions)


Inherited from GmAnimatedWidget:

Public Methods

ovirtual void animationFinished(GmTypes::AnimationType animationType)
ovirtual void applyAnimationTransforms()
ovirtual void setEventAnimation(GmTypes::AnimationType animType, GmAnimation* animation)

Protected Fields

oGmAnimation* mAppearAnimation
oGmTypes::AnimationType mCurrentAnimation
oGmAnimation* mIdleAnimation
oGmAnimation* mVanishAnimation


Inherited from GmDrawable:

Public Methods

ovirtual GlmColor4* getBaseColor()
ovirtual GmTypes::CoordinateType getCoordType()
ovirtual float getDepth()
ovirtual float getGlDepth()
ovirtual void getGlExtents(float& width, float& height)
ovirtual float getGlHeight()
ovirtual GlmPoint3* getGlPosition()
ovirtual float getGlWidth()
ovirtual float getHeight()
ovirtual void getMinimumGeometry(float& width, float& height, float& depth)
ovirtual GlmPoint3* getPosition()
ovirtual bool getVisible()
ovirtual float getWidth()
ovirtual void render(GmTypes::RenderOptionType renderOptions)
ovirtual void setBaseColor(GlmColor4* color)
ovirtual void setBaseColor(float r, float g, float b, float a)

Protected Fields

oGlmColor4 mBaseColor
oGmTypes::CoordinateType mCoordType
ofloat mDepth
obool mDisplayListGenerate
oint mDisplayListId
ofloat mGlDepth
ofloat mGlHeight
oGlmPoint3 mGlPosition
ofloat mGlWidth
ofloat mHeight
oGlmPoint3 mPosition
obool mVisible
ofloat mWidth

Protected Methods

ovirtual bool getDisplayListGenerate()
ovirtual int getDisplayListId()
ovirtual void setDisplayListGenerate(bool generate)
ovirtual void setDisplayListId(int id)


Inherited from GmObject:

Public Methods

ounsigned short getObjectId()

Protected Fields

oThe object ID is used to uniquely identify each GmObject unsigned short mObjectId


Inherited from GmAnimationEventHandler:


Inherited from GmWidgetEventHandler:


Documentation

The menu class defines the functionality of all menu objects such as pop-ups and pull-downs.
ovector<GmInteractiveWidget*> mListItems
The menu list item objects that are contained in this menu

ofloat mGlMenuWidth
The OpenGL width of the drop-down menu

ofloat mGlMenuHeight
The OpenGL height of the drop-down menu

o GmMenu()
Standard constructor

ovirtual ~GmMenu()
Virtual destructor

ovirtual void addTextItem(char* textMenuItem, WidgetIDType widgetId)
Adds a text-based menu item to the menu.

Parameters:
textMenuItem - the text to use for the menu item.
widgetTokenId - the token id pneumonic to use when identifying the widget. The widget token ID is necessary for the widget event handler to uniquely identify the menu item when responding to a widget event.

ovirtual void mousePressEvent(GmEvent* event)
Event processing function to process a mouse press event.

Parameters:
event - the mouse press event for this object to process

ovirtual void widgetEvent(GmEvent::WidgetEventType* widgetEvent)
Called whenever a widget event occurs on a widget that this widget event handler has registered with.

Parameters:
- widgetEvent the widget event, which includes all relevant widget data.

ovirtual void applyLayout(float minX, float minY, float minZ, float maxX, float maxY, float maxZ)
Repositions and resizes this component based on parameters passed into the method. These parameters are usually passed in by the parent class.

Parameters:
minX - the starting X position of the constraint volume
minY - the starting Y position of the constraint volume
minZ - the starting Z position of the constraint volume
maxX - the ending X position of the constraint volume
maxY - the ending X position of the constraint volume
maxZ - the ending Z position of the constraint volume

ovirtual void render2d(GmTypes::RenderOptionType renderOptions)
Renders this menu to a 2D image buffer.

Parameters:
renderOptions - the render options to use when rendering the button.

ovirtual void render2dSelect(GmTypes::RenderOptionType renderOptions)
Renders this menu to a selection buffer.

Parameters:
renderOptions - the render options to use when rendering the button.


Direct child classes:
GmPopupMenu

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.