LLMenuGL Class Reference

#include <llmenugl.h>

Inheritance diagram for LLMenuGL:

Inheritance graph
[legend]
Collaboration diagram for LLMenuGL:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 LLMenuGL (const LLString &name, const LLString &label, LLHandle< LLFloater > parent_floater=LLHandle< LLFloater >())
 LLMenuGL (const LLString &label, LLHandle< LLFloater > parent_floater=LLHandle< LLFloater >())
virtual ~LLMenuGL (void)
virtual LLXMLNodePtr getXML (bool save_children=true) const
void parseChildXML (LLXMLNodePtr child, LLView *parent, LLUICtrlFactory *factory)
virtual BOOL handleUnicodeCharHere (llwchar uni_char)
virtual BOOL handleHover (S32 x, S32 y, MASK mask)
virtual void draw (void)
virtual void drawBackground (LLMenuItemGL *itemp, LLColor4 &color)
virtual void setVisible (BOOL visible)
virtual BOOL handleAcceleratorKey (KEY key, MASK mask)
LLMenuGLgetChildMenuByName (const LLString &name, BOOL recurse) const
BOOL clearHoverItem ()
const LLStringgetLabel (void) const
void setLabel (const LLStringExplicit &label)
void setBackgroundColor (const LLColor4 &color)
const LLColor4getBackgroundColor () const
void setBackgroundVisible (BOOL b)
void setCanTearOff (BOOL tear_off, LLHandle< LLFloater > parent_floater_handle=LLHandle< LLFloater >())
virtual BOOL append (LLMenuItemGL *item)
virtual BOOL appendSeparator (const LLString &separator_name="separator")
virtual BOOL appendMenu (LLMenuGL *menu)
virtual void updateParent (LLView *parentp)
void setItemEnabled (const LLString &name, BOOL enable)
void setEnabledSubMenus (BOOL enable)
void setItemVisible (const LLString &name, BOOL visible)
void setLeftAndBottom (S32 left, S32 bottom)
virtual BOOL handleJumpKey (KEY key)
virtual BOOL jumpKeysActive ()
virtual BOOL isOpen ()
virtual void arrange (void)
void empty (void)
void setItemLastSelected (LLMenuItemGL *item)
U32 getItemCount ()
LLMenuItemGLgetItem (S32 number)
LLMenuItemGLgetHighlightedItem ()
LLMenuItemGLhighlightNextItem (LLMenuItemGL *cur_item, BOOL skip_disabled=TRUE)
LLMenuItemGLhighlightPrevItem (LLMenuItemGL *cur_item, BOOL skip_disabled=TRUE)
void buildDrawLabels ()
void createJumpKeys ()
void setDropShadowed (const BOOL shadowed)
void setParentMenuItem (LLMenuItemGL *parent_menu_item)
LLMenuItemGLgetParentMenuItem ()
void setTornOff (BOOL torn_off)
BOOL getTornOff ()
BOOL getCanTearOff ()
KEY getJumpKey () const
void setJumpKey (KEY key)

Static Public Member Functions

static LLViewfromXML (LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
static void setDefaultBackgroundColor (const LLColor4 &color)
static void showPopup (LLMenuGL *menu)
static void showPopup (LLView *spawning_view, LLMenuGL *menu, S32 x, S32 y)
static void setKeyboardMode (BOOL mode)
static BOOL getKeyboardMode ()

Static Public Attributes

static class LLMenuHolderGLsMenuContainer = NULL

Protected Types

typedef std::list< LLMenuItemGL * > item_list_t
typedef std::map< KEY,
LLMenuItemGL * > 
navigation_key_map_t

Protected Member Functions

void createSpilloverBranch ()
void cleanupSpilloverBranch ()

Protected Attributes

item_list_t mItems
navigation_key_map_t mJumpKeys
S32 mLastMouseX
S32 mLastMouseY
S32 mMouseVelX
S32 mMouseVelY
BOOL mHorizontalLayout
BOOL mKeepFixedSize

Private Attributes

LLColor4 mBackgroundColor
BOOL mBgVisible
LLMenuItemGLmParentMenuItem
LLUIString mLabel
BOOL mDropShadowed
BOOL mHasSelection
LLFrameTimer mFadeTimer
BOOL mTornOff
class LLMenuItemTearOffGLmTearOffItem
class LLMenuItemBranchGLmSpilloverBranch
LLMenuGLmSpilloverMenu
LLHandle< LLFloatermParentFloaterHandle
KEY mJumpKey

Static Private Attributes

static LLColor4 sDefaultBackgroundColor
static BOOL sKeyboardMode = FALSE

Friends

class LLMenuItemBranchGL


Detailed Description

Definition at line 396 of file llmenugl.h.


Member Typedef Documentation

typedef std::list< LLMenuItemGL* > LLMenuGL::item_list_t [protected]

Definition at line 522 of file llmenugl.h.

typedef std::map<KEY, LLMenuItemGL*> LLMenuGL::navigation_key_map_t [protected]

Definition at line 524 of file llmenugl.h.


Constructor & Destructor Documentation

LLMenuGL::LLMenuGL ( const LLString name,
const LLString label,
LLHandle< LLFloater parent_floater = LLHandle<LLFloater>() 
)

Definition at line 1620 of file llmenugl.cpp.

References FALSE, mFadeTimer, setCanTearOff(), LLUICtrl::setTabStop(), LLFrameTimer::stop(), and TRUE.

Referenced by createSpilloverBranch(), and fromXML().

Here is the call graph for this function:

Here is the caller graph for this function:

LLMenuGL::LLMenuGL ( const LLString label,
LLHandle< LLFloater parent_floater = LLHandle<LLFloater>() 
)

Definition at line 1645 of file llmenugl.cpp.

References FALSE, mFadeTimer, setCanTearOff(), LLUICtrl::setTabStop(), LLFrameTimer::stop(), and TRUE.

Here is the call graph for this function:

LLMenuGL::~LLMenuGL ( void   )  [virtual]

Definition at line 1671 of file llmenugl.cpp.

References mJumpKeys, and mSpilloverBranch.


Member Function Documentation

LLXMLNodePtr LLMenuGL::getXML ( bool  save_children = true  )  const [virtual]

Reimplemented from LLUICtrl.

Reimplemented in LLMenuBarGL.

Definition at line 1699 of file llmenugl.cpp.

References LLMenuItemGL::getXML(), LLView::getXML(), mBackgroundColor, mBgVisible, mDropShadowed, mItems, mTearOffItem, LLColor4::mV, NULL, and TRUE.

Referenced by LLMenuBarGL::getXML(), and LLMenuItemBranchGL::getXML().

Here is the call graph for this function:

Here is the caller graph for this function:

LLView * LLMenuGL::fromXML ( LLXMLNodePtr  node,
LLView parent,
LLUICtrlFactory factory 
) [static]

Reimplemented from LLUICtrl.

Reimplemented in LLMenuBarGL.

Definition at line 2048 of file llmenugl.cpp.

References createJumpKeys(), FALSE, LLUICtrlFactory::getAttributeColor(), KEY_NONE, LLMenuGL(), LLPointer< Type >::notNull(), parseChildXML(), S32, setBackgroundColor(), setBackgroundVisible(), setCanTearOff(), setDropShadowed(), and setJumpKey().

Referenced by LLUICtrlFactory::buildMenu(), LLMenuBarGL::fromXML(), and parseChildXML().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLMenuGL::parseChildXML ( LLXMLNodePtr  child,
LLView parent,
LLUICtrlFactory factory 
)

BOOL LLMenuGL::handleUnicodeCharHere ( llwchar  uni_char  )  [virtual]

Reimplemented from LLView.

Definition at line 2752 of file llmenugl.cpp.

References FALSE, handleJumpKey(), and jumpKeysActive().

Here is the call graph for this function:

BOOL LLMenuGL::handleHover ( S32  x,
S32  y,
MASK  mask 
) [virtual]

void LLMenuGL::draw ( void   )  [virtual]

Reimplemented from LLView.

Reimplemented in LLPieMenu, and LLMenuBarGL.

Definition at line 2828 of file llmenugl.cpp.

References LLView::draw(), LLView::getRect(), gl_drop_shadow(), gl_rect_2d(), mBackgroundColor, mBgVisible, mDropShadowed, mTornOff, LLUI::sColorsGroup, and LLUI::sConfigGroup.

Referenced by LLMenuBarGL::draw().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLMenuGL::drawBackground ( LLMenuItemGL itemp,
LLColor4 color 
) [virtual]

Reimplemented in LLPieMenu.

Definition at line 2846 of file llmenugl.cpp.

References LLGLImmediate::color4fv(), LLRectBase< Type >::getHeight(), LLView::getRect(), LLRectBase< Type >::getWidth(), gGL, gl_rect_2d(), and LLColor4::mV.

Referenced by LLMenuHolderGL::draw().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLMenuGL::setVisible ( BOOL  visible  )  [virtual]

BOOL LLMenuGL::handleAcceleratorKey ( KEY  key,
MASK  mask 
) [virtual]

Reimplemented in LLMenuBarGL.

Definition at line 2730 of file llmenugl.cpp.

References FALSE, LLView::getEnabled(), LLMenuItemGL::handleAcceleratorKey(), mItems, and TRUE.

Referenced by LLMenuBarGL::handleAcceleratorKey(), LLMenuItemBranchDownGL::handleAcceleratorKey(), and LLMenuItemBranchGL::handleAcceleratorKey().

Here is the call graph for this function:

Here is the caller graph for this function:

LLMenuGL * LLMenuGL::getChildMenuByName ( const LLString name,
BOOL  recurse 
) const

Definition at line 2876 of file llmenugl.cpp.

References FALSE, LLMenuItemBranchGL::getBranch(), LLView::getChildView(), LLView::getName(), llendl, llwarns, and NULL.

Referenced by LLObjectBridge::buildContextMenu(), and init_menus().

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL LLMenuGL::clearHoverItem (  ) 

const LLString& LLMenuGL::getLabel ( void   )  const [inline]

Definition at line 427 of file llmenugl.h.

References LLUIString::getString(), and mLabel.

Referenced by LLMenuBarGL::appendMenu(), appendMenu(), and LLPieMenu::appendPieMenu().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLMenuGL::setLabel ( const LLStringExplicit label  )  [inline]

Definition at line 428 of file llmenugl.h.

References mLabel.

static void LLMenuGL::setDefaultBackgroundColor ( const LLColor4 color  )  [inline, static]

Definition at line 431 of file llmenugl.h.

References sDefaultBackgroundColor.

Referenced by pre_init_menus().

Here is the caller graph for this function:

void LLMenuGL::setBackgroundColor ( const LLColor4 color  )  [inline]

const LLColor4& LLMenuGL::getBackgroundColor (  )  const [inline]

Definition at line 433 of file llmenugl.h.

References mBackgroundColor.

Referenced by LLViewerWindow::initWorldUI(), and LLPanelLogin::loadLoginPage().

Here is the caller graph for this function:

void LLMenuGL::setBackgroundVisible ( BOOL  b  )  [inline]

Definition at line 434 of file llmenugl.h.

References mBgVisible.

Referenced by LLTearOffMenu::draw(), LLMenuBarGL::fromXML(), fromXML(), and LLTearOffMenu::onClose().

Here is the caller graph for this function:

void LLMenuGL::setCanTearOff ( BOOL  tear_off,
LLHandle< LLFloater parent_floater_handle = LLHandle<LLFloater>() 
)

Definition at line 1679 of file llmenugl.cpp.

References LLView::addChildAtEnd(), arrange(), mItems, mTearOffItem, NULL, and LLView::removeChild().

Referenced by createSpilloverBranch(), LLMenuBarGL::fromXML(), fromXML(), LLMenuBarGL::LLMenuBarGL(), LLMenuGL(), LLNetMap::LLNetMap(), and LLPieMenu::LLPieMenu().

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL LLMenuGL::append ( LLMenuItemGL item  )  [virtual]

BOOL LLMenuGL::appendSeparator ( const LLString separator_name = "separator"  )  [virtual]

Reimplemented in LLPieMenu, and LLMenuBarGL.

Definition at line 2444 of file llmenugl.cpp.

References append().

Referenced by LLVOAvatar::buildCharacter(), init_client_menu(), init_debug_rendering_menu(), init_debug_ui_menu(), init_landmark_menu(), init_server_menu(), LLNetMap::LLNetMap(), and parseChildXML().

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL LLMenuGL::appendMenu ( LLMenuGL menu  )  [virtual]

Reimplemented in LLMenuBarGL.

Definition at line 2451 of file llmenugl.cpp.

References append(), getJumpKey(), getLabel(), LLView::getName(), llendl, llerrs, LLMenuItemBranchGL, mBackgroundColor, NULL, setBackgroundColor(), LLMenuItemGL::setJumpKey(), and TRUE.

Referenced by init_client_menu(), init_debug_avatar_menu(), init_debug_rendering_menu(), init_server_menu(), and parseChildXML().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLMenuGL::updateParent ( LLView parentp  )  [virtual]

void LLMenuGL::setItemEnabled ( const LLString name,
BOOL  enable 
)

Definition at line 2483 of file llmenugl.cpp.

References mItems.

Referenced by LLSelectMgr::processObjectProperties(), and show_debug_menus().

Here is the caller graph for this function:

void LLMenuGL::setEnabledSubMenus ( BOOL  enable  ) 

Definition at line 2471 of file llmenugl.cpp.

References mItems, and LLView::setEnabled().

Referenced by LLMenuItemBranchGL::setEnabledSubMenus().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLMenuGL::setItemVisible ( const LLString name,
BOOL  visible 
)

Definition at line 2497 of file llmenugl.cpp.

References mItems.

Referenced by init_menus(), LLFloaterTools::onClose(), LLFloaterTools::onOpen(), and show_debug_menus().

Here is the caller graph for this function:

void LLMenuGL::setLeftAndBottom ( S32  left,
S32  bottom 
)

Definition at line 2404 of file llmenugl.cpp.

References arrange(), LLView::getRect(), and LLView::setRect().

Here is the call graph for this function:

BOOL LLMenuGL::handleJumpKey ( KEY  key  )  [virtual]

Reimplemented in LLMenuBarGL.

Definition at line 2410 of file llmenugl.cpp.

References mJumpKeys, setKeyboardMode(), and TRUE.

Referenced by handleUnicodeCharHere().

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL LLMenuGL::jumpKeysActive (  )  [virtual]

Reimplemented in LLMenuBarGL.

Definition at line 2005 of file llmenugl.cpp.

References LLView::getEnabled(), getHighlightedItem(), LLView::getParent(), getParentMenuItem(), getTornOff(), LLView::getVisible(), LLUICtrl::hasFocus(), and LLMenuItemGL::isActive().

Referenced by LLMenuItemBranchDownGL::draw(), LLMenuItemGL::draw(), handleUnicodeCharHere(), and LLMenuBarGL::jumpKeysActive().

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL LLMenuGL::isOpen ( void   )  [virtual]

void LLMenuGL::arrange ( void   )  [virtual]

void LLMenuGL::empty ( void   ) 

Definition at line 2393 of file llmenugl.cpp.

References cleanupSpilloverBranch(), LLView::deleteAllChildren(), and mItems.

Referenced by clear_landmark_menu().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLMenuGL::setItemLastSelected ( LLMenuItemGL item  ) 

Definition at line 2510 of file llmenugl.cpp.

References LLMenuItemGL::buildDrawLabel(), LLView::getVisible(), and LLMenuHolderGL::setActivatedItem().

Referenced by LLMenuItemToggleGL::doIt(), and LLMenuItemCallGL::doIt().

Here is the call graph for this function:

Here is the caller graph for this function:

U32 LLMenuGL::getItemCount (  ) 

Definition at line 2532 of file llmenugl.cpp.

References mItems.

Referenced by LLMenuItemBranchGL::addToAcceleratorList(), LLPieMenuBranch::buildDrawLabel(), and cleanupSpilloverBranch().

Here is the caller graph for this function:

LLMenuItemGL * LLMenuGL::getItem ( S32  number  ) 

Definition at line 2537 of file llmenugl.cpp.

References mItems, NULL, and S32.

Referenced by LLMenuItemBranchGL::addToAcceleratorList(), LLPieMenuBranch::buildDrawLabel(), and cleanupSpilloverBranch().

Here is the caller graph for this function:

LLMenuItemGL * LLMenuGL::getHighlightedItem (  ) 

LLMenuItemGL * LLMenuGL::highlightNextItem ( LLMenuItemGL cur_item,
BOOL  skip_disabled = TRUE 
)

LLMenuItemGL * LLMenuGL::highlightPrevItem ( LLMenuItemGL cur_item,
BOOL  skip_disabled = TRUE 
)

Definition at line 2645 of file llmenugl.cpp.

References LLView::getParent(), getTornOff(), mItems, NULL, SEPARATOR_NAME, LLUICtrl::setFocus(), and TRUE.

Referenced by LLMenuItemSeparatorGL::handleHover(), LLTearOffMenu::handleKeyHere(), LLMenuItemBranchDownGL::handleKeyHere(), and LLMenuItemGL::handleKeyHere().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLMenuGL::buildDrawLabels (  ) 

Definition at line 2707 of file llmenugl.cpp.

References mItems.

Referenced by LLWornItemFetchedObserver::done(), and LLNetMap::handleRightMouseDown().

Here is the caller graph for this function:

void LLMenuGL::createJumpKeys (  ) 

static void LLMenuGL::showPopup ( LLMenuGL menu  )  [static]

Referenced by LLNetMap::handleRightMouseDown(), and LLFolderView::handleRightMouseDown().

Here is the caller graph for this function:

void LLMenuGL::showPopup ( LLView spawning_view,
LLMenuGL menu,
S32  x,
S32  y 
) [static]

void LLMenuGL::setDropShadowed ( const BOOL  shadowed  ) 

Definition at line 2522 of file llmenugl.cpp.

References mDropShadowed.

Referenced by LLMenuBarGL::fromXML(), fromXML(), LLTearOffMenu::LLTearOffMenu(), and LLTearOffMenu::onClose().

Here is the caller graph for this function:

void LLMenuGL::setParentMenuItem ( LLMenuItemGL parent_menu_item  )  [inline]

Definition at line 501 of file llmenugl.h.

References mParentMenuItem.

Referenced by LLMenuItemBranchGL::LLMenuItemBranchGL(), and LLPieMenuBranch::LLPieMenuBranch().

Here is the caller graph for this function:

LLMenuItemGL* LLMenuGL::getParentMenuItem (  )  [inline]

Definition at line 502 of file llmenugl.h.

References mParentMenuItem.

Referenced by jumpKeysActive(), and LLTearOffMenu::onFocusReceived().

Here is the caller graph for this function:

void LLMenuGL::setTornOff ( BOOL  torn_off  ) 

Definition at line 2527 of file llmenugl.cpp.

References mTornOff.

Referenced by LLTearOffMenu::LLTearOffMenu(), and LLTearOffMenu::onClose().

Here is the caller graph for this function:

BOOL LLMenuGL::getTornOff (  )  [inline]

BOOL LLMenuGL::getCanTearOff (  )  [inline]

Definition at line 507 of file llmenugl.h.

References mTearOffItem, and NULL.

Referenced by LLMenuBarGL::fromXML(), and LLMenuItemBranchGL::openMenu().

Here is the caller graph for this function:

KEY LLMenuGL::getJumpKey (  )  const [inline]

Definition at line 509 of file llmenugl.h.

References mJumpKey.

Referenced by appendMenu().

Here is the caller graph for this function:

void LLMenuGL::setJumpKey ( KEY  key  )  [inline]

Definition at line 510 of file llmenugl.h.

References mJumpKey.

Referenced by fromXML().

Here is the caller graph for this function:

static void LLMenuGL::setKeyboardMode ( BOOL  mode  )  [inline, static]

static BOOL LLMenuGL::getKeyboardMode (  )  [inline, static]

void LLMenuGL::createSpilloverBranch (  )  [protected]

Definition at line 2246 of file llmenugl.cpp.

References FALSE, LLFontGL::ITALIC, LLMenuGL(), LLMenuItemBranchGL, mBackgroundColor, mParentFloaterHandle, mSpilloverBranch, mSpilloverMenu, setBackgroundColor(), setCanTearOff(), LLMenuItemGL::setFontStyle(), and updateParent().

Referenced by arrange().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLMenuGL::cleanupSpilloverBranch (  )  [protected]

Definition at line 2265 of file llmenugl.cpp.

References LLView::addChild(), cleanupSpilloverBranch(), getItem(), getItemCount(), LLView::getParent(), mItems, mSpilloverBranch, mSpilloverMenu, NULL, and LLView::removeChild().

Referenced by arrange(), cleanupSpilloverBranch(), and empty().

Here is the call graph for this function:

Here is the caller graph for this function:


Friends And Related Function Documentation

friend class LLMenuItemBranchGL [friend]

Definition at line 402 of file llmenugl.h.

Referenced by appendMenu(), and createSpilloverBranch().


Member Data Documentation

Definition at line 525 of file llmenugl.h.

Referenced by createJumpKeys(), LLMenuBarGL::handleJumpKey(), handleJumpKey(), and ~LLMenuGL().

Definition at line 526 of file llmenugl.h.

Referenced by LLMenuBarGL::handleHover(), handleHover(), and setVisible().

Definition at line 527 of file llmenugl.h.

Referenced by LLMenuBarGL::handleHover(), handleHover(), and setVisible().

Definition at line 528 of file llmenugl.h.

Referenced by LLMenuBarGL::handleHover(), and handleHover().

Definition at line 529 of file llmenugl.h.

Referenced by LLMenuBarGL::handleHover(), and handleHover().

Definition at line 530 of file llmenugl.h.

Referenced by arrange(), and LLMenuBarGL::LLMenuBarGL().

Definition at line 531 of file llmenugl.h.

Referenced by arrange(), and LLMenuBarGL::LLMenuBarGL().

Definition at line 534 of file llmenugl.h.

Referenced by setDefaultBackgroundColor().

BOOL LLMenuGL::sKeyboardMode = FALSE [static, private]

Definition at line 535 of file llmenugl.h.

Referenced by getKeyboardMode(), and setKeyboardMode().

Definition at line 538 of file llmenugl.h.

Referenced by draw(), getXML(), and setBackgroundVisible().

Definition at line 539 of file llmenugl.h.

Referenced by getParentMenuItem(), and setParentMenuItem().

Definition at line 540 of file llmenugl.h.

Referenced by getLabel(), and setLabel().

Definition at line 541 of file llmenugl.h.

Referenced by draw(), getXML(), and setDropShadowed().

Definition at line 542 of file llmenugl.h.

Referenced by handleHover(), and setVisible().

Definition at line 543 of file llmenugl.h.

Referenced by LLMenuGL(), and setVisible().

Definition at line 544 of file llmenugl.h.

Referenced by draw(), getTornOff(), and setTornOff().

Definition at line 545 of file llmenugl.h.

Referenced by getCanTearOff(), getXML(), highlightNextItem(), and setCanTearOff().

Definition at line 546 of file llmenugl.h.

Referenced by arrange(), cleanupSpilloverBranch(), createSpilloverBranch(), and ~LLMenuGL().

Definition at line 547 of file llmenugl.h.

Referenced by arrange(), cleanupSpilloverBranch(), and createSpilloverBranch().

Definition at line 548 of file llmenugl.h.

Referenced by createSpilloverBranch().

Definition at line 549 of file llmenugl.h.

Referenced by getJumpKey(), and setJumpKey().


The documentation for this class was generated from the following files:

Generated on Fri May 16 08:52:45 2008 for SecondLife by  doxygen 1.5.5