LLPieMenu Class Reference

#include <llmenugl.h>

Inheritance diagram for LLPieMenu:

Inheritance graph
[legend]
Collaboration diagram for LLPieMenu:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LLPieMenu (const LLString &name, const LLString &label)
 LLPieMenu (const LLString &name)
virtual ~LLPieMenu ()
virtual EWidgetType getWidgetType () const
virtual LLString getWidgetTag () const
void initXML (LLXMLNodePtr node, LLView *context, LLUICtrlFactory *factory)
virtual void setVisible (BOOL visible)
virtual BOOL handleHover (S32 x, S32 y, MASK mask)
virtual BOOL handleMouseDown (S32 x, S32 y, MASK mask)
virtual BOOL handleRightMouseDown (S32 x, S32 y, MASK mask)
virtual BOOL handleRightMouseUp (S32 x, S32 y, MASK mask)
virtual BOOL handleMouseUp (S32 x, S32 y, MASK mask)
virtual void draw ()
virtual void drawBackground (LLMenuItemGL *itemp, LLColor4 &color)
virtual BOOL append (LLMenuItemGL *item)
virtual BOOL appendSeparator (const LLString &separator_name="separator")
virtual BOOL appendMenu (LLPieMenu *menu, enabled_callback enabled_cb=NULL, void *user_data=NULL)
virtual void arrange (void)
void show (S32 x, S32 y, BOOL mouse_down)
void hide (BOOL item_selected)

Protected Member Functions

LLMenuItemGLpieItemFromXY (S32 x, S32 y)
S32 pieItemIndexFromXY (S32 x, S32 y)

Private Attributes

BOOL mFirstMouseDown
BOOL mUseInfiniteRadius
LLMenuItemGLmHoverItem
BOOL mHoverThisFrame
BOOL mHoveredAnyItem
LLFrameTimer mShrinkBorderTimer
F32 mOuterRingAlpha
F32 mCurRadius
BOOL mRightMouseDown

Detailed Description

Definition at line 644 of file llmenugl.h.


Constructor & Destructor Documentation

LLPieMenu::LLPieMenu ( const LLString name,
const LLString label 
)

Definition at line 3307 of file llmenugl.cpp.

References FALSE, LLMenuGL::setCanTearOff(), and LLMenuGL::setVisible().

Referenced by initXML().

LLPieMenu::LLPieMenu ( const LLString name  ) 

Definition at line 3322 of file llmenugl.cpp.

References FALSE, LLMenuGL::setCanTearOff(), and LLMenuGL::setVisible().

LLPieMenu::~LLPieMenu (  )  [virtual]

Definition at line 3338 of file llmenugl.cpp.


Member Function Documentation

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

Reimplemented from LLMenuGL.

Definition at line 3732 of file llmenugl.cpp.

References LLMenuGL::append(), LLMenuItemGL::setBriefItem(), LLMenuItemGL::setFont(), LLFontGL::sSansSerifSmall, and TRUE.

Referenced by appendMenu(), appendSeparator(), and LLVOAvatar::buildCharacter().

BOOL LLPieMenu::appendMenu ( LLPieMenu menu,
enabled_callback  enabled_cb = NULL,
void user_data = NULL 
) [virtual]

Definition at line 3749 of file llmenugl.cpp.

References LLView::addChild(), append(), LLPieMenuBranch::getBranch(), LLMenuGL::getLabel(), LLView::getName(), LLView::getParent(), llendl, llerrs, LLMenuItemGL::setFont(), and LLFontGL::sSansSerifSmall.

Referenced by LLVOAvatar::buildCharacter(), and initXML().

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

Reimplemented from LLMenuGL.

Definition at line 3740 of file llmenugl.cpp.

References append(), LLMenuItemGL::setFont(), and LLFontGL::sSansSerifSmall.

Referenced by LLVOAvatar::buildCharacter().

void LLPieMenu::arrange ( void   )  [virtual]

Reimplemented from LLMenuGL.

Definition at line 3765 of file llmenugl.cpp.

References i, LLRectBase< Type >::mBottom, LLMenuGL::mItems, LLRectBase< Type >::mLeft, LLView::mRect, S32, LLRectBase< Type >::setCenterAndSize(), LLRectBase< Type >::setOriginAndSize(), and LLRectBase< Type >::translate().

Referenced by dialog_refresh_all(), and show().

void LLPieMenu::draw (  )  [virtual]

Reimplemented from LLMenuGL.

Definition at line 3615 of file llmenugl.cpp.

References clamp_rescale(), LLView::draw(), f, F_PI, FALSE, LLControlGroup::getColor(), LLFrameTimer::getElapsedTimeF32(), LLControlGroup::getF32(), LLRectBase< Type >::getHeight(), LLFrameTimer::getStarted(), LLRectBase< Type >::getWidth(), gl_circle_2d(), gl_washer_2d(), gl_washer_segment_2d(), gl_washer_spokes_2d(), glColor4fv, glPopMatrix, glTranslatef, height, i, llmax(), mCurRadius, mHoverItem, mHoverThisFrame, LLMenuGL::mItems, mOuterRingAlpha, LLView::mRect, mShrinkBorderTimer, mUseInfiniteRadius, LLColor4::mV, NULL, PIE_CENTER_SIZE, PIE_SCALE_FACTOR, PIE_SHRINK_TIME, S32, LLUI::sColorsGroup, LLUI::sConfigGroup, LLMenuItemGL::setHighlight(), LLUI::setLineWidth(), VALPHA, and width.

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

Reimplemented from LLMenuGL.

Definition at line 3697 of file llmenugl.cpp.

References f, F_PI, LLRectBase< Type >::getHeight(), LLView::getRect(), LLRectBase< Type >::getWidth(), gl_washer_segment_2d(), glColor4fv, glPopMatrix, glTranslatef, height, i, LLRectBase< Type >::mBottom, mCurRadius, LLMenuGL::mItems, LLRectBase< Type >::mLeft, mOuterRingAlpha, LLView::mRect, LLColor4::mV, PIE_CENTER_SIZE, S32, VALPHA, and width.

LLString LLPieMenu::getWidgetTag (  )  const [virtual]

Reimplemented from LLMenuGL.

Definition at line 3347 of file llmenugl.cpp.

References LL_PIE_MENU_TAG.

EWidgetType LLPieMenu::getWidgetType (  )  const [virtual]

Reimplemented from LLMenuGL.

Definition at line 3342 of file llmenugl.cpp.

References WIDGET_TYPE_PIE_MENU.

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

Reimplemented from LLMenuGL.

Definition at line 3385 of file llmenugl.cpp.

References FALSE, LLFrameTimer::getElapsedTimeF32(), LLView::getEnabled(), LLView::getName(), LLFrameTimer::getStarted(), LLView::getWindow(), gFocusMgr, LLView::hasMouseCapture(), lldebugst, llendl, make_ui_sound(), mHoveredAnyItem, mHoverItem, mHoverThisFrame, mRightMouseDown, mShrinkBorderTimer, mUseInfiniteRadius, NULL, PIE_SHRINK_TIME, pieItemFromXY(), pieItemIndexFromXY(), LLView::pointInView(), LLWindow::setCursor(), LLMenuItemGL::setHighlight(), LLFocusMgr::setMouseCapture(), TRUE, and UI_CURSOR_ARROW.

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

Reimplemented from LLView.

Definition at line 3480 of file llmenugl.cpp.

References FALSE, LLView::getParent(), LLMenuItemGL::handleMouseDown(), mRightMouseDown, and pieItemFromXY().

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

Reimplemented from LLView.

Definition at line 3564 of file llmenugl.cpp.

References FALSE, LLView::getEnabled(), LLView::getParent(), LLFrameTimer::getStarted(), LLMenuItemGL::handleMouseUp(), hide(), LLMenuHolderGL::hideMenus(), make_ui_sound(), mFirstMouseDown, mRightMouseDown, mShrinkBorderTimer, mUseInfiniteRadius, pieItemFromXY(), LLMenuGL::sMenuContainer, LLFrameTimer::start(), and TRUE.

Referenced by handleRightMouseUp().

BOOL LLPieMenu::handleRightMouseDown ( S32  x,
S32  y,
MASK  mask 
) [virtual]

Reimplemented from LLView.

Definition at line 3502 of file llmenugl.cpp.

References FALSE, LLRectBase< Type >::getCenterX(), LLRectBase< Type >::getCenterY(), LLView::getLocalRect(), gFocusMgr, LLMenuItemGL::handleMouseDown(), mCurRadius, mRightMouseDown, mShrinkBorderTimer, mUseInfiniteRadius, pieItemFromXY(), S32, LLFocusMgr::setMouseCapture(), LLFrameTimer::stop(), and TRUE.

BOOL LLPieMenu::handleRightMouseUp ( S32  x,
S32  y,
MASK  mask 
) [virtual]

Reimplemented from LLView.

Definition at line 3537 of file llmenugl.cpp.

References FALSE, LLRectBase< Type >::getCenterX(), LLRectBase< Type >::getCenterY(), LLFrameTimer::getElapsedTimeF32(), LLView::getLocalRect(), LLFrameTimer::getStarted(), gFocusMgr, handleMouseUp(), LLMenuHolderGL::hideMenus(), mFirstMouseDown, mHoveredAnyItem, mRightMouseDown, mShrinkBorderTimer, mUseInfiniteRadius, NULL, PIE_CENTER_SIZE, PIE_SHRINK_TIME, S32, LLFocusMgr::setMouseCapture(), LLMenuGL::sMenuContainer, and TRUE.

void LLPieMenu::hide ( BOOL  item_selected  ) 

Definition at line 3989 of file llmenugl.cpp.

References FALSE, LLView::getVisible(), gFocusMgr, make_ui_sound(), mFirstMouseDown, mHoveredAnyItem, mHoverItem, mRightMouseDown, mUseInfiniteRadius, NULL, LLMenuItemGL::setHighlight(), LLFocusMgr::setMouseCapture(), and LLView::setVisible().

Referenced by LLPieMenuBranch::doIt(), LLObjectDelete::handleEvent(), LLEditDelete::handleEvent(), handleMouseUp(), LLPieMenuBranch::LLPieMenuBranch(), and setVisible().

void LLPieMenu::initXML ( LLXMLNodePtr  node,
LLView context,
LLUICtrlFactory factory 
)

Definition at line 3352 of file llmenugl.cpp.

References appendMenu(), initXML(), LL_PIE_MENU_TAG, LLPieMenu(), LLPointer< Type >::notNull(), and LLMenuGL::parseChildXML().

Referenced by LLUICtrlFactory::buildPieMenu(), and initXML().

LLMenuItemGL * LLPieMenu::pieItemFromXY ( S32  x,
S32  y 
) [protected]

Definition at line 3821 of file llmenugl.cpp.

References angle, f, LLRectBase< Type >::getHeight(), LLRectBase< Type >::getWidth(), llmax(), LLMenuGL::mItems, LLView::mRect, mRightMouseDown, mUseInfiniteRadius, NULL, PIE_CENTER_SIZE, RAD_TO_DEG, and S32.

Referenced by handleHover(), handleMouseDown(), handleMouseUp(), and handleRightMouseDown().

S32 LLPieMenu::pieItemIndexFromXY ( S32  x,
S32  y 
) [protected]

Definition at line 3874 of file llmenugl.cpp.

References angle, f, LLRectBase< Type >::getHeight(), LLRectBase< Type >::getWidth(), LLView::mRect, PIE_CENTER_SIZE, RAD_TO_DEG, and S32.

Referenced by handleHover().

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

Reimplemented from LLMenuGL.

Definition at line 3377 of file llmenugl.cpp.

References FALSE, and hide().

void LLPieMenu::show ( S32  x,
S32  y,
BOOL  mouse_down 
)

Definition at line 3901 of file llmenugl.cpp.

References arrange(), FALSE, LLRectBase< Type >::getHeight(), LLMenuHolderGL::getMenuRect(), LLView::getParent(), LLRectBase< Type >::getWidth(), gFocusMgr, height, make_ui_sound(), LLRectBase< Type >::mBottom, mFirstMouseDown, mHoveredAnyItem, LLRectBase< Type >::mLeft, LLView::mRect, LLRectBase< Type >::mRight, mRightMouseDown, mShrinkBorderTimer, LLRectBase< Type >::mTop, mUseInfiniteRadius, LLCoord::mX, LLCoord::mY, S32, LLView::screenPointToLocal(), LLRectBase< Type >::setCenterAndSize(), LLUI::setCursorPositionLocal(), LLFocusMgr::setMouseCapture(), LLView::setVisible(), LLMenuGL::sMenuContainer, LLFrameTimer::start(), LLFrameTimer::stop(), LLRectBase< Type >::translate(), TRUE, and width.

Referenced by LLPieMenuBranch::doIt(), and LLToolPie::pickAndShowMenu().


Member Data Documentation

F32 LLPieMenu::mCurRadius [private]

Definition at line 702 of file llmenugl.h.

Referenced by draw(), drawBackground(), and handleRightMouseDown().

BOOL LLPieMenu::mFirstMouseDown [private]

Definition at line 695 of file llmenugl.h.

Referenced by handleMouseUp(), handleRightMouseUp(), hide(), and show().

BOOL LLPieMenu::mHoveredAnyItem [private]

Definition at line 699 of file llmenugl.h.

Referenced by handleHover(), handleRightMouseUp(), hide(), and show().

LLMenuItemGL* LLPieMenu::mHoverItem [private]

Definition at line 697 of file llmenugl.h.

Referenced by draw(), handleHover(), and hide().

BOOL LLPieMenu::mHoverThisFrame [private]

Definition at line 698 of file llmenugl.h.

Referenced by draw(), and handleHover().

F32 LLPieMenu::mOuterRingAlpha [private]

Definition at line 701 of file llmenugl.h.

Referenced by draw(), and drawBackground().

BOOL LLPieMenu::mRightMouseDown [private]

Definition at line 703 of file llmenugl.h.

Referenced by handleHover(), handleMouseDown(), handleMouseUp(), handleRightMouseDown(), handleRightMouseUp(), hide(), pieItemFromXY(), and show().

LLFrameTimer LLPieMenu::mShrinkBorderTimer [private]

Definition at line 700 of file llmenugl.h.

Referenced by draw(), handleHover(), handleMouseUp(), handleRightMouseDown(), handleRightMouseUp(), and show().

BOOL LLPieMenu::mUseInfiniteRadius [private]

Definition at line 696 of file llmenugl.h.

Referenced by draw(), handleHover(), handleMouseUp(), handleRightMouseDown(), handleRightMouseUp(), hide(), pieItemFromXY(), and show().


The documentation for this class was generated from the following files:
Generated on Thu Jul 1 06:11:39 2010 for Second Life Viewer by  doxygen 1.4.7