LLTabContainer Class Reference

#include <lltabcontainer.h>

Inheritance diagram for LLTabContainer:

Inheritance graph
[legend]
Collaboration diagram for LLTabContainer:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LLTabContainer (const LLString &name, const LLRect &rect, TabPosition pos, void(*close_callback)(void *), void *callback_userdata, const LLString &title=LLString::null, BOOL bordered=TRUE)
 LLTabContainer (const LLString &name, const LLString &rect_control, TabPosition pos, void(*close_callback)(void *), void *callback_userdata, const LLString &title=LLString::null, BOOL bordered=TRUE)
 ~LLTabContainer ()
void initButtons ()
void draw ()
void addTabPanel (LLPanel *child, const LLString &label, BOOL select=FALSE, void(*on_tab_clicked)(void *, bool)=NULL, void *userdata=NULL, S32 indent=0, BOOL placeholder=FALSE, eInsertionPoint insertion_point=END)
BOOL selectTab (S32 which)
void removeTabPanel (LLPanel *child)
void setPanelTitle (S32 index, const LLString &title)
void setTabImage (LLPanel *child, std::string img_name, const LLColor4 &color=LLColor4::white)
void setRightTabBtnOffset (S32 offset)
void setMinTabWidth (S32 width)
void setMaxTabWidth (S32 width)
S32 getMinTabWidth () const
S32 getMaxTabWidth () const
BOOL handleMouseDown (S32 x, S32 y, MASK mask)
BOOL handleHover (S32 x, S32 y, MASK mask)
BOOL handleMouseUp (S32 x, S32 y, MASK mask)
BOOL handleToolTip (S32 x, S32 y, LLString &msg, LLRect *sticky_rect)
BOOL handleKeyHere (KEY key, MASK mask, BOOL called_from_parent)
BOOL handleDragAndDrop (S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType type, void *cargo_data, EAcceptance *accept, LLString &tooltip)
virtual LLXMLNodePtr getXML (bool save_children=true) const

Protected Member Functions

virtual void updateMaxScrollPos ()
virtual void commitHoveredButton (S32 x, S32 y)

Protected Attributes

LLButtonmLeftArrowBtn
LLButtonmJumpLeftArrowBtn
LLButtonmRightArrowBtn
LLButtonmJumpRightArrowBtn
S32 mRightTabBtnOffset
S32 mMinTabWidth
S32 mMaxTabWidth
S32 mTotalTabWidth

Detailed Description

Definition at line 207 of file lltabcontainer.h.


Constructor & Destructor Documentation

LLTabContainer::LLTabContainer ( const LLString name,
const LLRect rect,
TabPosition  pos,
void(*)(void *)  close_callback,
void callback_userdata,
const LLString title = LLString::null,
BOOL  bordered = TRUE 
)

Definition at line 738 of file lltabcontainer.cpp.

References initButtons().

LLTabContainer::LLTabContainer ( const LLString name,
const LLString rect_control,
TabPosition  pos,
void(*)(void *)  close_callback,
void callback_userdata,
const LLString title = LLString::null,
BOOL  bordered = TRUE 
)

Definition at line 756 of file lltabcontainer.cpp.

References initButtons().

LLTabContainer::~LLTabContainer (  ) 

Definition at line 883 of file lltabcontainer.cpp.


Member Function Documentation

void LLTabContainer::addTabPanel ( LLPanel child,
const LLString label,
BOOL  select = FALSE,
void(*)(void *, bool)  on_tab_clicked = NULL,
void userdata = NULL,
S32  indent = 0,
BOOL  placeholder = FALSE,
eInsertionPoint  insertion_point = END 
)

Definition at line 887 of file lltabcontainer.cpp.

References LLView::addChild(), FALSE, LLRectBase< Type >::getHeight(), LLView::getName(), LLView::getParent(), LLView::getRect(), LLResMgr::getRes(), LLRectBase< Type >::getWidth(), LLFontGL::getWidth(), gResMgr, LLTabContainerCommon::insertTuple(), LLFontGL::LEFT, LLBUTTON_V_PAD, llclamp(), LLFONT_SANSSERIF_SMALL, LLPANEL_BORDER_WIDTH, LLRectBase< Type >::mBottom, LLRectBase< Type >::mLeft, mMaxTabWidth, mMinTabWidth, LLView::mRect, LLTabContainerCommon::mTabPosition, LLTabContainerCommon::mTopBorderHeight, mTotalTabWidth, NULL, LLTabContainerCommon::onTabBtn(), LLView::reshape(), S32, LLTabContainerCommon::selectLastTab(), LLPanel::setBackgroundVisible(), LLUICtrl::setCallbackUserData(), LLButton::setFixedBorder(), LLView::setFollowsAll(), LLView::setFollowsBottom(), LLView::setFollowsTop(), LLButton::setHAlign(), LLPanel::setLabel(), LLButton::setLeftHPad(), LLRectBase< Type >::setLeftTopAndSize(), LLRectBase< Type >::setOriginAndSize(), LLButton::setRightHPad(), LLView::setSaveToXML(), LLButton::setScaleImage(), LLUICtrl::setTabStop(), LLView::setToolTip(), LLView::setVisible(), TAB_PADDING, TABCNTR_BUTTON_PANEL_OVERLAP, TABCNTR_TAB_HEIGHT, LLTabContainerCommon::TOP, LLRectBase< Type >::translate(), LLView::translate(), LLStringBase< char >::trim(), TRUE, and updateMaxScrollPos().

void LLTabContainer::commitHoveredButton ( S32  x,
S32  y 
) [protected, virtual]

Implements LLTabContainerCommon.

Definition at line 1097 of file lltabcontainer.cpp.

References LLView::hasMouseCapture(), LLTabContainerCommon::mTabList, S32, and TRUE.

Referenced by handleHover(), and handleMouseUp().

void LLTabContainer::draw (  )  [virtual]

Reimplemented from LLPanel.

Definition at line 1211 of file lltabcontainer.cpp.

References LLPanel::draw(), f, FALSE, LLCriticalDamp::getInterpolant(), LLView::getLocalRect(), LLView::getRect(), LLView::getVisible(), LLRectBase< Type >::getWidth(), left, lerp(), llmin(), LLPANEL_BORDER_WIDTH, mJumpLeftArrowBtn, mJumpRightArrowBtn, LLRectBase< Type >::mLeft, mLeftArrowBtn, LLTabContainerCommon::mMaxScrollPos, LLView::mRect, LLRectBase< Type >::mRight, mRightArrowBtn, mRightTabBtnOffset, LLTabContainerCommon::mScrollPos, LLTabContainerCommon::mScrollPosPixels, LLTabContainerCommon::mTabList, LLTabContainerCommon::mTabsHidden, mTotalTabWidth, LLUI::popMatrix(), LLUI::pushMatrix(), S32, LLButton::setFlashing(), LLView::setVisible(), TABCNTR_ARROW_BTN_SIZE, TABCNTR_TAB_H_PAD, TABCNTR_TAB_PARTIAL_WIDTH, LLUI::translate(), and TRUE.

S32 LLTabContainer::getMaxTabWidth (  )  const

Definition at line 1130 of file lltabcontainer.cpp.

References mMaxTabWidth.

S32 LLTabContainer::getMinTabWidth (  )  const

Definition at line 1125 of file lltabcontainer.cpp.

References mMinTabWidth.

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

Reimplemented from LLPanel.

Definition at line 1575 of file lltabcontainer.cpp.

References LLPanel::getXML(), LLTabContainerCommon::mTabPosition, LLTabContainerCommon::TOP, and TRUE.

BOOL LLTabContainer::handleDragAndDrop ( S32  x,
S32  y,
MASK  mask,
BOOL  drop,
EDragAndDropType  type,
void cargo_data,
EAcceptance accept,
LLString tooltip 
) [virtual]

Reimplemented from LLView.

Definition at line 1584 of file lltabcontainer.cpp.

References LLFrameTimer::getElapsedTimeF32(), LLView::getRect(), LLView::handleDragAndDrop(), LLButton::handleHover(), LLRectBase< Type >::mBottom, LLTabContainerCommon::mDragAndDropDelayTimer, mJumpLeftArrowBtn, mJumpRightArrowBtn, LLRectBase< Type >::mLeft, mLeftArrowBtn, LLTabContainerCommon::mMaxScrollPos, mRightArrowBtn, LLTabContainerCommon::mTabList, LLRectBase< Type >::pointInRect(), S32, SCROLL_DELAY_TIME, LLFrameTimer::stop(), and TRUE.

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

Reimplemented from LLView.

Definition at line 1379 of file lltabcontainer.cpp.

References commitHoveredButton(), FALSE, LLView::getRect(), LLView::handleHover(), LLButton::handleHover(), LLRectBase< Type >::mBottom, mJumpLeftArrowBtn, mJumpRightArrowBtn, LLRectBase< Type >::mLeft, mLeftArrowBtn, LLTabContainerCommon::mMaxScrollPos, mRightArrowBtn, LLRectBase< Type >::pointInRect(), and S32.

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

Reimplemented from LLPanel.

Definition at line 1513 of file lltabcontainer.cpp.

References LLTabContainerCommon::BOTTOM, LLFocusMgr::childHasKeyboardFocus(), FALSE, LLTabContainerCommon::getCurrentPanel(), LLView::getEnabled(), LLTabContainerCommon::getTabPosition(), gFocusMgr, KEY_DOWN, KEY_LEFT, KEY_RIGHT, KEY_UP, MASK_ALT, LLTabContainerCommon::selectNextTab(), LLTabContainerCommon::selectPrevTab(), LLPanel::setFocus(), LLTabContainerCommon::TOP, and TRUE.

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

Reimplemented from LLView.

Definition at line 1325 of file lltabcontainer.cpp.

References FALSE, LLTabContainerCommon::getCurrentPanelIndex(), LLView::getRect(), gFocusMgr, LLView::handleMouseDown(), LLButton::handleMouseDown(), LLRectBase< Type >::mBottom, mJumpLeftArrowBtn, mJumpRightArrowBtn, LLRectBase< Type >::mLeft, mLeftArrowBtn, LLTabContainerCommon::mMaxScrollPos, LLRectBase< Type >::mRight, mRightArrowBtn, LLTabContainerCommon::mTabList, NULL, LLRectBase< Type >::pointInRect(), S32, LLFocusMgr::setKeyboardFocus(), and LLFocusMgr::setMouseCapture().

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

Reimplemented from LLView.

Definition at line 1420 of file lltabcontainer.cpp.

References commitHoveredButton(), FALSE, LLUICtrl::focusFirstItem(), LLTabContainerCommon::getCurrentPanel(), LLTabContainerCommon::getCurrentPanelIndex(), LLView::getRect(), gFocusMgr, LLView::handleMouseUp(), LLButton::handleMouseUp(), LLView::hasMouseCapture(), LLRectBase< Type >::mBottom, mJumpLeftArrowBtn, mJumpRightArrowBtn, LLRectBase< Type >::mLeft, mLeftArrowBtn, LLTabContainerCommon::mMaxScrollPos, mRightArrowBtn, LLTabContainerCommon::mTabList, NULL, LLRectBase< Type >::pointInRect(), S32, LLFocusMgr::setMouseCapture(), and TRUE.

BOOL LLTabContainer::handleToolTip ( S32  x,
S32  y,
LLString msg,
LLRect sticky_rect 
) [virtual]

Reimplemented from LLView.

Definition at line 1475 of file lltabcontainer.cpp.

References FALSE, LLView::getRect(), LLView::getVisible(), LLView::handleToolTip(), mJumpLeftArrowBtn, LLRectBase< Type >::mLeft, LLTabContainerCommon::mMaxScrollPos, LLRectBase< Type >::mRight, mRightArrowBtn, LLTabContainerCommon::mTabList, LLView::pointInView(), S32, and TRUE.

void LLTabContainer::initButtons (  )  [virtual]

Implements LLTabContainerCommon.

Definition at line 774 of file lltabcontainer.cpp.

References LLView::addChild(), LLTabContainerCommon::BOTTOM, FALSE, LLRectBase< Type >::getHeight(), LLRectBase< Type >::getWidth(), LLPANEL_BORDER_WIDTH, LLView::mDefaultTabGroup, mJumpLeftArrowBtn, mJumpRightArrowBtn, mLeftArrowBtn, LLView::mRect, mRightArrowBtn, mRightTabBtnOffset, LLTabContainerCommon::mTabPosition, LLTabContainerCommon::mTopBorderHeight, LLTabContainerCommon::onJumpFirstBtn(), LLTabContainerCommon::onJumpLastBtn(), LLTabContainerCommon::onNextBtn(), LLTabContainerCommon::onNextBtnHeld(), LLTabContainerCommon::onPrevBtn(), LLTabContainerCommon::onPrevBtnHeld(), RESIZE_HANDLE_WIDTH, S32, LLView::setFollowsBottom(), LLView::setFollowsLeft(), LLView::setFollowsRight(), LLView::setFollowsTop(), LLButton::setHeldDownCallback(), LLRectBase< Type >::setLeftTopAndSize(), LLView::setSaveToXML(), LLUICtrl::setTabStop(), LLFontGL::sSansSerif, TABCNTR_ARROW_BTN_SIZE, and LLTabContainerCommon::TOP.

Referenced by LLTabContainer().

void LLTabContainer::removeTabPanel ( LLPanel child  )  [virtual]

Reimplemented from LLTabContainerCommon.

Definition at line 1026 of file lltabcontainer.cpp.

References LLTabContainerCommon::mTabList, mTotalTabWidth, and LLTabContainerCommon::removeTabPanel().

BOOL LLTabContainer::selectTab ( S32  which  )  [virtual]

Implements LLTabContainerCommon.

Definition at line 1135 of file lltabcontainer.cpp.

References FALSE, LLRectBase< Type >::getWidth(), i, j, llclamp(), llmin(), LLPANEL_BORDER_WIDTH, LLTabContainerCommon::mCurrentTabIdx, LLTabContainerCommon::mMaxScrollPos, LLView::mRect, mRightTabBtnOffset, LLTabContainerCommon::mScrollPos, LLTabContainerCommon::mTabList, S32, TABCNTR_ARROW_BTN_SIZE, and TRUE.

Referenced by LLFloaterLand::show().

void LLTabContainer::setMaxTabWidth ( S32  width  ) 

Definition at line 1120 of file lltabcontainer.cpp.

References mMaxTabWidth.

void LLTabContainer::setMinTabWidth ( S32  width  ) 

Definition at line 1115 of file lltabcontainer.cpp.

References mMinTabWidth.

void LLTabContainer::setPanelTitle ( S32  index,
const LLString title 
) [virtual]

Reimplemented from LLTabContainerCommon.

Definition at line 1042 of file lltabcontainer.cpp.

References LLRectBase< Type >::getHeight(), LLView::getRect(), LLResMgr::getRes(), LLFontGL::getWidth(), LLRectBase< Type >::getWidth(), gResMgr, llclamp(), LLFONT_SANSSERIF_SMALL, mMaxTabWidth, mMinTabWidth, LLTabContainerCommon::mTabList, mTotalTabWidth, LLView::reshape(), S32, LLButton::setLabelSelected(), LLButton::setLabelUnselected(), TAB_PADDING, and updateMaxScrollPos().

void LLTabContainer::setRightTabBtnOffset ( S32  offset  )  [virtual]

Reimplemented from LLTabContainerCommon.

Definition at line 1318 of file lltabcontainer.cpp.

References mRightArrowBtn, mRightTabBtnOffset, LLView::translate(), and updateMaxScrollPos().

void LLTabContainer::setTabImage ( LLPanel child,
std::string  img_name,
const LLColor4 color = LLColor4::white 
) [virtual]

Reimplemented from LLTabContainerCommon.

Definition at line 1636 of file lltabcontainer.cpp.

References LLResMgr::getRes(), LLTabContainerCommon::getTabByPanel(), LLFontGL::getWidth(), gResMgr, LLBUTTON_H_PAD, llclamp(), LLFONT_SANSSERIF_SMALL, mMaxTabWidth, mMinTabWidth, mTotalTabWidth, LLFontGL::RIGHT, S32, TAB_PADDING, and updateMaxScrollPos().

void LLTabContainer::updateMaxScrollPos (  )  [protected, virtual]

Implements LLTabContainerCommon.

Definition at line 1059 of file lltabcontainer.cpp.

References LLRectBase< Type >::getWidth(), llmin(), LLPANEL_BORDER_WIDTH, LLTabContainerCommon::mMaxScrollPos, LLView::mRect, mRightTabBtnOffset, LLTabContainerCommon::mScrollPos, LLTabContainerCommon::mTabList, mTotalTabWidth, S32, TABCNTR_ARROW_BTN_SIZE, TABCNTR_TAB_H_PAD, and TABCNTR_TAB_PARTIAL_WIDTH.

Referenced by addTabPanel(), setPanelTitle(), setRightTabBtnOffset(), and setTabImage().


Member Data Documentation

LLButton* LLTabContainer::mJumpLeftArrowBtn [protected]

Definition at line 261 of file lltabcontainer.h.

Referenced by draw(), handleDragAndDrop(), handleHover(), handleMouseDown(), handleMouseUp(), handleToolTip(), and initButtons().

LLButton* LLTabContainer::mJumpRightArrowBtn [protected]

Definition at line 263 of file lltabcontainer.h.

Referenced by draw(), handleDragAndDrop(), handleHover(), handleMouseDown(), handleMouseUp(), and initButtons().

LLButton* LLTabContainer::mLeftArrowBtn [protected]

Definition at line 260 of file lltabcontainer.h.

Referenced by draw(), handleDragAndDrop(), handleHover(), handleMouseDown(), handleMouseUp(), and initButtons().

S32 LLTabContainer::mMaxTabWidth [protected]

Definition at line 272 of file lltabcontainer.h.

Referenced by addTabPanel(), getMaxTabWidth(), setMaxTabWidth(), setPanelTitle(), and setTabImage().

S32 LLTabContainer::mMinTabWidth [protected]

Definition at line 271 of file lltabcontainer.h.

Referenced by addTabPanel(), getMinTabWidth(), setMinTabWidth(), setPanelTitle(), and setTabImage().

LLButton* LLTabContainer::mRightArrowBtn [protected]

Definition at line 262 of file lltabcontainer.h.

Referenced by draw(), handleDragAndDrop(), handleHover(), handleMouseDown(), handleMouseUp(), handleToolTip(), initButtons(), and setRightTabBtnOffset().

S32 LLTabContainer::mRightTabBtnOffset [protected]

Definition at line 265 of file lltabcontainer.h.

Referenced by draw(), initButtons(), selectTab(), setRightTabBtnOffset(), and updateMaxScrollPos().

S32 LLTabContainer::mTotalTabWidth [protected]

Definition at line 273 of file lltabcontainer.h.

Referenced by addTabPanel(), draw(), removeTabPanel(), setPanelTitle(), setTabImage(), and updateMaxScrollPos().


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