CEGUI::PopupMenu Class Reference

Base class for popup menus. More...

Inheritance diagram for CEGUI::PopupMenu:

Inheritance graph
[legend]
Collaboration diagram for CEGUI::PopupMenu:

Collaboration graph
[legend]

List of all members.

Public Member Functions

float getFadeInTime (void) const
 Get the fade in time for this popup menu.
float getFadeOutTime (void) const
 Get the fade out time for this popup menu.
bool isPopupMenuOpen (void) const
 Find out if this popup menu is open or closed;.
void setFadeInTime (float fadetime)
 Set the fade in time for this popup menu.
void setFadeOutTime (float fadetime)
 Set the fade out time for this popup menu.
void openPopupMenu (bool notify=true)
 Tells the popup menu to open.
void closePopupMenu (bool notify=true)
 Tells the popup menu to close.
 PopupMenu (const String &type, const String &name)
 Constructor for PopupMenu objects.
virtual ~PopupMenu (void)
 Destructor for PopupMenu objects.

Static Public Attributes

static const String EventNamespace
 Namespace for global events.
static const String WidgetTypeName
 Window factory name.

Protected Member Functions

virtual void updateSelf (float elapsed)
 Perform actual update processing for this Window.
virtual void layoutItemWidgets (void)
 Setup size and position for the item widgets attached to this Listbox.
virtual Size getContentSize (void) const
 Resizes the popup menu to exactly fit the content that is attached to it.
virtual bool testClassName_impl (const String &class_name) const
 Return whether this window was inherited from the given class name at some point in the inheritance hierarchy.
virtual void onAlphaChanged (WindowEventArgs &e)
 Handler called when the window's alpha blend value is changed.
virtual void onDestructionStarted (WindowEventArgs &e)
 Handler called when this window's destruction sequence has begun.
virtual void onShown (WindowEventArgs &e)
 Handler called when the window is shown (made visible).
virtual void onHidden (WindowEventArgs &e)
 Handler called when the window is hidden.
virtual void onMouseButtonDown (MouseEventArgs &e)
 Handler called when a mouse button has been depressed within this window's area.
virtual void onMouseButtonUp (MouseEventArgs &e)
 Handler called when a mouse button has been released within this window's area.

Protected Attributes

float d_origAlpha
 The original alpha of this window.
float d_fadeElapsed
 The time in seconds this popup menu has been fading.
float d_fadeOutTime
 The time in seconds it takes for this popup menu to fade out.
float d_fadeInTime
 The time in seconds it takes for this popup menu to fade in.
bool d_fading
 true if this popup menu is fading in/out. false if not
bool d_fadingOut
 true if this popup menu is fading out. false if fading in.
bool d_isOpen
 true if this popup menu is open. false if not.


Detailed Description

Base class for popup menus.

Member Function Documentation

void CEGUI::PopupMenu::closePopupMenu ( bool  notify = true  ) 

Tells the popup menu to close.

Parameters:
notify true if the parent menu item (if any) is to handle the closing. false if not.

References d_fadeElapsed, d_fadeInTime, d_fadeOutTime, d_fading, d_fadingOut, d_isOpen, d_origAlpha, CEGUI::Window::getParent(), CEGUI::Window::hide(), CEGUI::Window::setAlpha(), and CEGUI::Window::testClassName().

Referenced by CEGUI::MenuItem::closeAllMenuItemPopups(), and CEGUI::MenuItem::closePopupMenu().

Size CEGUI::PopupMenu::getContentSize ( void   )  const [protected, virtual]

Resizes the popup menu to exactly fit the content that is attached to it.

Returns:
Nothing.

Implements CEGUI::ItemListBase.

References CEGUI::Size::d_height, CEGUI::MenuBase::d_itemSpacing, CEGUI::ItemListBase::d_listItems, and CEGUI::Size::d_width.

float CEGUI::PopupMenu::getFadeInTime ( void   )  const [inline]

Get the fade in time for this popup menu.

Returns:
The time in seconds that it takes for the popup to fade in. 0 if fading is disabled.

float CEGUI::PopupMenu::getFadeOutTime ( void   )  const [inline]

Get the fade out time for this popup menu.

Returns:
The time in seconds that it takes for the popup to fade out. 0 if fading is disabled.

void CEGUI::PopupMenu::layoutItemWidgets ( void   )  [protected, virtual]

void CEGUI::PopupMenu::onAlphaChanged ( WindowEventArgs e  )  [protected, virtual]

Handler called when the window's alpha blend value is changed.

Parameters:
e WindowEventArgs object whose 'window' pointer field is set to the window that triggered the event. For this event the trigger window is always 'this'.

Reimplemented from CEGUI::Window.

References CEGUI::Window::d_alpha, d_fading, and d_origAlpha.

void CEGUI::PopupMenu::onDestructionStarted ( WindowEventArgs e  )  [protected, virtual]

Handler called when this window's destruction sequence has begun.

Parameters:
e WindowEventArgs object whose 'window' pointer field is set to the window that triggered the event. For this event the trigger window is always 'this'.

Reimplemented from CEGUI::Window.

References CEGUI::Window::getParent(), and CEGUI::Window::testClassName().

void CEGUI::PopupMenu::onHidden ( WindowEventArgs e  )  [protected, virtual]

Handler called when the window is hidden.

Parameters:
e WindowEventArgs object whose 'window' pointer field is set to the window that triggered the event. For this event the trigger window is always 'this'.

Reimplemented from CEGUI::Window.

References d_isOpen.

void CEGUI::PopupMenu::onMouseButtonDown ( MouseEventArgs e  )  [protected, virtual]

Handler called when a mouse button has been depressed within this window's area.

Parameters:
e MouseEventArgs object. All fields are valid.

Reimplemented from CEGUI::Window.

References CEGUI::EventArgs::handled.

void CEGUI::PopupMenu::onMouseButtonUp ( MouseEventArgs e  )  [protected, virtual]

Handler called when a mouse button has been released within this window's area.

Parameters:
e MouseEventArgs object. All fields are valid.

Reimplemented from CEGUI::Window.

References CEGUI::EventArgs::handled.

void CEGUI::PopupMenu::onShown ( WindowEventArgs e  )  [protected, virtual]

Handler called when the window is shown (made visible).

Parameters:
e WindowEventArgs object whose 'window' pointer field is set to the window that triggered the event. For this event the trigger window is always 'this'.

Reimplemented from CEGUI::Window.

References d_isOpen.

void CEGUI::PopupMenu::openPopupMenu ( bool  notify = true  ) 

Tells the popup menu to open.

Parameters:
notify true if the parent menu item (if any) is to handle the opening. false if not.

References d_fadeElapsed, d_fadeInTime, d_fadeOutTime, d_fading, d_fadingOut, d_isOpen, d_origAlpha, CEGUI::Window::getParent(), CEGUI::Window::moveToFront(), CEGUI::Window::setAlpha(), CEGUI::Window::show(), and CEGUI::Window::testClassName().

Referenced by CEGUI::MenuItem::openPopupMenu().

void CEGUI::PopupMenu::setFadeInTime ( float  fadetime  )  [inline]

Set the fade in time for this popup menu.

Parameters:
fadetime The time in seconds that it takes for the popup to fade in. If this parameter is zero, fading is disabled.

void CEGUI::PopupMenu::setFadeOutTime ( float  fadetime  )  [inline]

Set the fade out time for this popup menu.

Parameters:
fadetime The time in seconds that it takes for the popup to fade out. If this parameter is zero, fading is disabled.

virtual bool CEGUI::PopupMenu::testClassName_impl ( const String class_name  )  const [inline, protected, virtual]

Return whether this window was inherited from the given class name at some point in the inheritance hierarchy.

Parameters:
class_name The class name that is to be checked.
Returns:
true if this window was inherited from class_name. false if not.

Reimplemented from CEGUI::MenuBase.

References CEGUI::MenuBase::testClassName_impl().

void CEGUI::PopupMenu::updateSelf ( float  elapsed  )  [protected, virtual]

Perform actual update processing for this Window.

Parameters:
elapsed float value indicating the number of seconds elapsed since the last update call.
Returns:
Nothing.

Reimplemented from CEGUI::Window.

References d_fadeElapsed, d_fadeInTime, d_fadeOutTime, d_fading, d_fadingOut, d_origAlpha, CEGUI::Window::hide(), and CEGUI::Window::setAlpha().


Generated on Thu Nov 27 20:34:37 2008 for Crazy Eddies GUI System by  doxygen 1.5.7.1