LLMenuItemGL Class Reference

#include <llmenugl.h>

Inheritance diagram for LLMenuItemGL:

Inheritance graph
[legend]
Collaboration diagram for LLMenuItemGL:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 LLMenuItemGL (const LLString &name, const LLString &label, KEY key=KEY_NONE, MASK=MASK_NONE)
virtual void setValue (const LLSD &value)
virtual LLXMLNodePtr getXML (bool save_children=true) const
virtual LLString getType () const
virtual BOOL handleHover (S32 x, S32 y, MASK mask)
virtual BOOL handleAcceleratorKey (KEY key, MASK mask)
void setJumpKey (KEY key)
KEY getJumpKey () const
void setFont (const LLFontGL *font)
const LLFontGLgetFont () const
void setFontStyle (U8 style)
U8 getFontStyle () const
virtual U32 getNominalHeight (void) const
virtual void setBriefItem (BOOL brief)
virtual BOOL isBriefItem () const
virtual BOOL addToAcceleratorList (std::list< LLKeyBinding * > *listp)
void setAllowKeyRepeat (BOOL allow)
BOOL getAllowKeyRepeat () const
void setLabel (const LLStringExplicit &label)
LLString getLabel (void) const
virtual BOOL setLabelArg (const LLString &key, const LLStringExplicit &text)
virtual class LLMenuGLgetMenu ()
virtual U32 getNominalWidth (void) const
virtual void buildDrawLabel (void)
virtual void updateBranchParent (LLView *parentp)
virtual void doIt (void)
virtual void setHighlight (BOOL highlight)
virtual BOOL getHighlight () const
virtual BOOL isActive (void) const
virtual BOOL isOpen (void) const
virtual void setEnabledSubMenus (BOOL enable)
virtual BOOL handleKeyHere (KEY key, MASK mask)
virtual BOOL handleMouseDown (S32 x, S32 y, MASK mask)
virtual BOOL handleMouseUp (S32 x, S32 y, MASK mask)
virtual void draw (void)
BOOL getHover () const
void setDrawTextDisabled (BOOL disabled)
BOOL getDrawTextDisabled () const

Static Public Member Functions

static void setEnabledColor (const LLColor4 &color)
static const LLColor4getEnabledColor ()
static void setDisabledColor (const LLColor4 &color)
static const LLColor4getDisabledColor ()
static void setHighlightBGColor (const LLColor4 &color)
static const LLColor4getHighlightBGColor ()
static void setHighlightFGColor (const LLColor4 &color)
static const LLColor4getHighlightFGColor ()

Protected Member Functions

void setHover (BOOL hover)
void appendAcceleratorString (LLString &st) const

Protected Attributes

KEY mAcceleratorKey
MASK mAcceleratorMask
LLUIString mLabel
LLUIString mDrawBoolLabel
LLUIString mDrawAccelLabel
LLUIString mDrawBranchLabel
BOOL mHighlight

Private Attributes

BOOL mAllowKeyRepeat
BOOL mGotHover
BOOL mBriefItem
const LLFontGLmFont
U8 mStyle
BOOL mDrawTextDisabled
KEY mJumpKey

Static Private Attributes

static LLColor4 sEnabledColor
static LLColor4 sDisabledColor
static LLColor4 sHighlightBackground
static LLColor4 sHighlightForeground


Detailed Description

Definition at line 78 of file llmenugl.h.


Constructor & Destructor Documentation

LLMenuItemGL::LLMenuItemGL ( const LLString name,
const LLString label,
KEY  key = KEY_NONE,
MASK  mask = MASK_NONE 
)

============================================================================ Class LLMenuItemGL ============================================================================

Definition at line 135 of file llmenugl.cpp.

References setLabel().

Here is the call graph for this function:


Member Function Documentation

static void LLMenuItemGL::setEnabledColor ( const LLColor4 color  )  [inline, static]

Definition at line 82 of file llmenugl.h.

References sEnabledColor.

Referenced by pre_init_menus().

Here is the caller graph for this function:

static const LLColor4& LLMenuItemGL::getEnabledColor (  )  [inline, static]

Definition at line 83 of file llmenugl.h.

References sEnabledColor.

Referenced by LLMenuItemBranchDownGL::draw(), and LLMenuItemTearOffGL::draw().

Here is the caller graph for this function:

static void LLMenuItemGL::setDisabledColor ( const LLColor4 color  )  [inline, static]

Definition at line 84 of file llmenugl.h.

References sDisabledColor.

Referenced by pre_init_menus().

Here is the caller graph for this function:

static const LLColor4& LLMenuItemGL::getDisabledColor (  )  [inline, static]

Definition at line 85 of file llmenugl.h.

References sDisabledColor.

Referenced by LLMenuItemBranchDownGL::draw(), LLMenuItemTearOffGL::draw(), and LLMenuItemSeparatorGL::draw().

Here is the caller graph for this function:

static void LLMenuItemGL::setHighlightBGColor ( const LLColor4 color  )  [inline, static]

Definition at line 86 of file llmenugl.h.

References sHighlightBackground.

Referenced by pre_init_menus().

Here is the caller graph for this function:

static const LLColor4& LLMenuItemGL::getHighlightBGColor (  )  [inline, static]

Definition at line 87 of file llmenugl.h.

References sHighlightBackground.

Referenced by LLMenuHolderGL::draw(), LLMenuItemBranchDownGL::draw(), and LLMenuItemTearOffGL::draw().

Here is the caller graph for this function:

static void LLMenuItemGL::setHighlightFGColor ( const LLColor4 color  )  [inline, static]

Definition at line 88 of file llmenugl.h.

References sHighlightForeground.

Referenced by pre_init_menus().

Here is the caller graph for this function:

static const LLColor4& LLMenuItemGL::getHighlightFGColor (  )  [inline, static]

Definition at line 89 of file llmenugl.h.

References sHighlightForeground.

Referenced by LLMenuItemBranchDownGL::draw().

Here is the caller graph for this function:

virtual void LLMenuItemGL::setValue ( const LLSD value  )  [inline, virtual]

Reimplemented from LLView.

Reimplemented in LLMenuItemCheckGL.

Definition at line 93 of file llmenugl.h.

References LLSD::asString(), and setLabel().

Here is the call graph for this function:

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

Reimplemented from LLView.

Reimplemented in LLMenuItemCallGL, LLMenuItemCheckGL, and LLMenuItemBranchGL.

Definition at line 152 of file llmenugl.cpp.

References getType(), LLView::getXML(), KEY_NONE, mAcceleratorKey, mAcceleratorMask, MASK_ALT, MASK_CONTROL, MASK_MAC_CONTROL, MASK_SHIFT, mLabel, LLKeyboard::stringFromKey(), and TRUE.

Referenced by LLMenuGL::getXML(), LLMenuItemBranchGL::getXML(), and LLMenuItemCallGL::getXML().

Here is the call graph for this function:

Here is the caller graph for this function:

virtual LLString LLMenuItemGL::getType (  )  const [inline, virtual]

Reimplemented in LLMenuItemSeparatorGL, LLMenuItemBranchDownGL, LLMenuItemCallGL, LLMenuItemCheckGL, LLMenuItemToggleGL, LLMenuItemBranchGL, and LLMenuItemTearOffGL.

Definition at line 97 of file llmenugl.h.

Referenced by getXML().

Here is the caller graph for this function:

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

Reimplemented from LLView.

Reimplemented in LLMenuItemSeparatorGL.

Definition at line 201 of file llmenugl.cpp.

References LLView::getWindow(), LLWindow::setCursor(), setHover(), TRUE, and UI_CURSOR_ARROW.

Here is the call graph for this function:

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

Reimplemented in LLMenuItemBranchDownGL, LLMenuItemCallGL, and LLMenuItemBranchGL.

Definition at line 191 of file llmenugl.cpp.

References doIt(), FALSE, LLView::getEnabled(), LLKeyboard::getKeyRepeated(), gKeyboard, mAcceleratorKey, mAcceleratorMask, mAllowKeyRepeat, MASK_NORMALKEYS, and TRUE.

Referenced by LLMenuGL::handleAcceleratorKey(), and LLMenuItemCallGL::handleAcceleratorKey().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLMenuItemGL::setJumpKey ( KEY  key  ) 

Definition at line 300 of file llmenugl.cpp.

References mJumpKey, and LLStringOps::toUpper().

Referenced by LLMenuBarGL::appendMenu(), LLMenuGL::appendMenu(), and LLMenuGL::parseChildXML().

Here is the call graph for this function:

Here is the caller graph for this function:

KEY LLMenuItemGL::getJumpKey (  )  const [inline]

Definition at line 104 of file llmenugl.h.

References mJumpKey.

Referenced by LLMenuBarGL::appendMenu(), and LLMenuItemBranchDownGL::draw().

Here is the caller graph for this function:

void LLMenuItemGL::setFont ( const LLFontGL font  )  [inline]

Definition at line 107 of file llmenugl.h.

References mFont.

Referenced by LLPieMenu::append(), LLPieMenu::appendPieMenu(), and LLPieMenu::appendSeparator().

Here is the caller graph for this function:

const LLFontGL* LLMenuItemGL::getFont (  )  const [inline]

Definition at line 108 of file llmenugl.h.

References mFont.

Referenced by LLMenuItemBranchDownGL::draw(), and LLMenuItemBranchDownGL::getNominalWidth().

Here is the caller graph for this function:

void LLMenuItemGL::setFontStyle ( U8  style  )  [inline]

Definition at line 109 of file llmenugl.h.

References mStyle.

Referenced by LLMenuGL::createSpilloverBranch().

Here is the caller graph for this function:

U8 LLMenuItemGL::getFontStyle (  )  const [inline]

Definition at line 110 of file llmenugl.h.

References mStyle.

Referenced by LLMenuItemBranchDownGL::draw().

Here is the caller graph for this function:

U32 LLMenuItemGL::getNominalHeight ( void   )  const [virtual]

Reimplemented in LLMenuItemSeparatorGL, and LLMenuItemTearOffGL.

Definition at line 307 of file llmenugl.cpp.

References LLFontGL::getLineHeight(), llround(), MENU_ITEM_PADDING, and mFont.

Referenced by LLMenuGL::arrange().

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void LLMenuItemGL::setBriefItem ( BOOL  brief  )  [inline, virtual]

Definition at line 116 of file llmenugl.h.

References mBriefItem.

Referenced by LLPieMenu::append().

Here is the caller graph for this function:

virtual BOOL LLMenuItemGL::isBriefItem (  )  const [inline, virtual]

Definition at line 117 of file llmenugl.h.

References mBriefItem.

Referenced by LLMenuItemTearOffGL::draw().

Here is the caller graph for this function:

BOOL LLMenuItemGL::addToAcceleratorList ( std::list< LLKeyBinding * > *  listp  )  [virtual]

Reimplemented in LLMenuItemBranchGL.

Definition at line 210 of file llmenugl.cpp.

References FALSE, KEY_NONE, mAcceleratorKey, mAcceleratorMask, MASK_NORMALKEYS, LLKeyBinding::mKey, LLKeyBinding::mMask, NULL, and TRUE.

Referenced by LLMenuItemBranchGL::addToAcceleratorList().

Here is the caller graph for this function:

void LLMenuItemGL::setAllowKeyRepeat ( BOOL  allow  )  [inline]

Definition at line 120 of file llmenugl.h.

References mAllowKeyRepeat.

BOOL LLMenuItemGL::getAllowKeyRepeat (  )  const [inline]

Definition at line 121 of file llmenugl.h.

References mAllowKeyRepeat.

Referenced by LLMenuItemCallGL::handleAcceleratorKey().

Here is the caller graph for this function:

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

LLString LLMenuItemGL::getLabel ( void   )  const [inline]

Definition at line 125 of file llmenugl.h.

References LLUIString::getString(), and mLabel.

Here is the call graph for this function:

BOOL LLMenuItemGL::setLabelArg ( const LLString key,
const LLStringExplicit text 
) [virtual]

Reimplemented from LLView.

Definition at line 511 of file llmenugl.cpp.

References mLabel, LLUIString::setArg(), and TRUE.

Here is the call graph for this function:

LLMenuGL * LLMenuItemGL::getMenu (  )  [virtual]

U32 LLMenuItemGL::getNominalWidth ( void   )  const [virtual]

Reimplemented in LLMenuItemBranchDownGL.

Definition at line 323 of file llmenugl.cpp.

References ACCEL_PAD_PIXELS, appendAcceleratorString(), BRIEF_PAD_PIXELS, LLFontGL::getWidth(), LLUIString::getWString(), KEY_NONE, mAcceleratorKey, mBriefItem, mFont, mLabel, and PLAIN_PAD_PIXELS.

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

Here is the call graph for this function:

Here is the caller graph for this function:

void LLMenuItemGL::buildDrawLabel ( void   )  [virtual]

virtual void LLMenuItemGL::updateBranchParent ( LLView parentp  )  [inline, virtual]

Reimplemented in LLMenuItemBranchGL.

Definition at line 148 of file llmenugl.h.

void LLMenuItemGL::doIt ( void   )  [virtual]

void LLMenuItemGL::setHighlight ( BOOL  highlight  )  [virtual]

virtual BOOL LLMenuItemGL::getHighlight (  )  const [inline, virtual]

virtual BOOL LLMenuItemGL::isActive ( void   )  const [inline, virtual]

Reimplemented in LLMenuItemBranchDownGL, and LLMenuItemBranchGL.

Definition at line 157 of file llmenugl.h.

References FALSE.

Referenced by LLViewerWindow::handleKey(), and LLMenuGL::jumpKeysActive().

Here is the caller graph for this function:

virtual BOOL LLMenuItemGL::isOpen ( void   )  const [inline, virtual]

Reimplemented in LLMenuItemBranchGL.

Definition at line 160 of file llmenugl.h.

References FALSE.

Referenced by LLMenuBarGL::draw(), handleKeyHere(), and LLMenuGL::isOpen().

Here is the caller graph for this function:

virtual void LLMenuItemGL::setEnabledSubMenus ( BOOL  enable  )  [inline, virtual]

Reimplemented in LLMenuItemBranchGL.

Definition at line 162 of file llmenugl.h.

BOOL LLMenuItemGL::handleKeyHere ( KEY  key,
MASK  mask 
) [virtual]

Reimplemented from LLView.

Reimplemented in LLMenuItemBranchDownGL, and LLMenuItemBranchGL.

Definition at line 378 of file llmenugl.cpp.

References doIt(), FALSE, getHighlight(), getMenu(), LLMenuGL::highlightNextItem(), LLMenuGL::highlightPrevItem(), isOpen(), KEY_DOWN, KEY_RETURN, KEY_UP, MASK_NONE, LLMenuGL::setKeyboardMode(), and TRUE.

Referenced by LLMenuItemBranchGL::handleKeyHere().

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL LLMenuItemGL::handleMouseDown ( S32  x,
S32  y,
MASK  mask 
) [virtual]

Reimplemented from LLView.

Reimplemented in LLMenuItemSeparatorGL, LLMenuItemVerticalSeparatorGL, and LLMenuItemBranchDownGL.

Definition at line 422 of file llmenugl.cpp.

References FALSE, setHighlight(), LLMenuGL::setKeyboardMode(), and TRUE.

Referenced by LLPieMenu::handleMouseDown(), and LLPieMenu::handleRightMouseDown().

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL LLMenuItemGL::handleMouseUp ( S32  x,
S32  y,
MASK  mask 
) [virtual]

Reimplemented from LLView.

Reimplemented in LLMenuItemSeparatorGL, LLMenuItemBranchDownGL, and LLMenuItemBranchGL.

Definition at line 412 of file llmenugl.cpp.

References doIt(), FALSE, make_ui_sound(), LLMenuGL::setKeyboardMode(), and TRUE.

Referenced by LLPieMenu::handleMouseUp().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLMenuItemGL::draw ( void   )  [virtual]

BOOL LLMenuItemGL::getHover (  )  const [inline]

Definition at line 170 of file llmenugl.h.

References mGotHover.

Referenced by LLMenuBarGL::draw().

Here is the caller graph for this function:

void LLMenuItemGL::setDrawTextDisabled ( BOOL  disabled  )  [inline]

Definition at line 172 of file llmenugl.h.

References mDrawTextDisabled.

Referenced by LLPieMenuBranch::buildDrawLabel().

Here is the caller graph for this function:

BOOL LLMenuItemGL::getDrawTextDisabled (  )  const [inline]

Definition at line 173 of file llmenugl.h.

References mDrawTextDisabled.

Referenced by LLPieMenuBranch::buildDrawLabel(), and LLMenuItemBranchDownGL::draw().

Here is the caller graph for this function:

void LLMenuItemGL::setHover ( BOOL  hover  )  [inline, protected]

Definition at line 176 of file llmenugl.h.

References mGotHover.

Referenced by LLMenuItemBranchDownGL::draw(), draw(), and handleHover().

Here is the caller graph for this function:

void LLMenuItemGL::appendAcceleratorString ( LLString st  )  const [protected]


Member Data Documentation

Definition at line 194 of file llmenugl.h.

Referenced by getHighlight(), and setHighlight().

Definition at line 196 of file llmenugl.h.

Referenced by draw(), getEnabledColor(), and setEnabledColor().

Definition at line 197 of file llmenugl.h.

Referenced by draw(), getDisabledColor(), and setDisabledColor().

Definition at line 198 of file llmenugl.h.

Referenced by draw(), getHighlightBGColor(), and setHighlightBGColor().

Definition at line 199 of file llmenugl.h.

Referenced by draw(), getHighlightFGColor(), and setHighlightFGColor().

Definition at line 202 of file llmenugl.h.

Referenced by getAllowKeyRepeat(), handleAcceleratorKey(), and setAllowKeyRepeat().

Definition at line 203 of file llmenugl.h.

Referenced by getHover(), and setHover().

Definition at line 207 of file llmenugl.h.

Referenced by draw(), getNominalWidth(), isBriefItem(), and setBriefItem().

const LLFontGL* LLMenuItemGL::mFont [private]

Definition at line 210 of file llmenugl.h.

Referenced by draw(), getFont(), getNominalHeight(), getNominalWidth(), and setFont().

Definition at line 211 of file llmenugl.h.

Referenced by draw(), getFontStyle(), and setFontStyle().

Definition at line 212 of file llmenugl.h.

Referenced by draw(), getDrawTextDisabled(), and setDrawTextDisabled().

Definition at line 214 of file llmenugl.h.

Referenced by draw(), getJumpKey(), and setJumpKey().


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

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