LLColumnHeader Class Reference

#include <llscrolllistctrl.h>

Inheritance diagram for LLColumnHeader:

Inheritance graph
[legend]
Collaboration diagram for LLColumnHeader:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LLColumnHeader (const LLString &label, const LLRect &rect, LLScrollListColumn *column, const LLFontGL *font=NULL)
 ~LLColumnHeader ()
void draw ()
BOOL handleDoubleClick (S32 x, S32 y, MASK mask)
void showList ()
LLViewfindSnapEdge (S32 &new_edge_val, const LLCoordGL &mouse_dir, ESnapEdge snap_edge, ESnapType snap_type, S32 threshold, S32 padding)
void userSetShape (const LLRect &new_rect)
void setImage (const LLString &image_name)
LLScrollListColumngetColumn ()
void setHasResizableElement (BOOL resizable)
BOOL canResize ()
void enableResizeBar (BOOL enable)
LLString getLabel ()

Static Public Member Functions

static void onSelectSort (LLUICtrl *ctrl, void *user_data)
static void onClick (void *user_data)
static void onMouseDown (void *user_data)
static void onHeldDown (void *user_data)

Protected Attributes

LLScrollListColumnmColumn
LLResizeBarmResizeBar
LLString mOrigLabel
LLUIString mAscendingText
LLUIString mDescendingText
BOOL mShowSortOptions
BOOL mHasResizableElement

Detailed Description

Definition at line 261 of file llscrolllistctrl.h.


Constructor & Destructor Documentation

LLColumnHeader::LLColumnHeader ( const LLString label,
const LLRect rect,
LLScrollListColumn column,
const LLFontGL font = NULL 
)

Definition at line 3116 of file llscrolllistctrl.cpp.

References LLComboBox::ABOVE, LLView::addChild(), FALSE, LLRectBase< Type >::getHeight(), LLView::getRect(), LLRectBase< Type >::getWidth(), llmax(), mAscendingText, LLComboBox::mButton, mDescendingText, MIN_COLUMN_WIDTH, LLComboBox::mList, LLComboBox::mListPosition, LLView::mRect, mResizeBar, onClick(), onHeldDown(), onMouseDown(), onSelectSort(), LLScrollListCtrl::reshape(), LLResizeBar::RIGHT, S32, S32_MAX, LLUI::sConfigGroup, LLUICtrl::setCallbackUserData(), LLButton::setClickedCallback(), LLUICtrl::setCommitCallback(), LLView::setEnabled(), LLButton::setHeldDownCallback(), LLButton::setHeldDownDelay(), LLButton::setMouseDownCallback(), and LLUICtrl::setTabStop().

LLColumnHeader::~LLColumnHeader (  ) 

Definition at line 3152 of file llscrolllistctrl.cpp.


Member Function Documentation

BOOL LLColumnHeader::canResize (  ) 

Definition at line 3514 of file llscrolllistctrl.cpp.

References LLView::getVisible(), mColumn, LLScrollListColumn::mDynamicWidth, and mHasResizableElement.

Referenced by handleDoubleClick().

void LLColumnHeader::draw (  )  [virtual]

Reimplemented from LLComboBox.

Definition at line 3156 of file llscrolllistctrl.cpp.

References LLComboBox::draw(), LLComboBox::getCurrentIndex(), LLScrollListCtrl::getSortAscending(), LLScrollListCtrl::getSortColumnName(), LLImageProviderInterface::getUIImageByID(), LLView::getVisible(), LLScrollListCtrl::isSorted(), LLComboBox::mArrowImage, mColumn, LLComboBox::mDrawArrow, LLScrollListColumn::mLabel, LLComboBox::mList, LLScrollListColumn::mParentCtrl, LLScrollListColumn::mSortingColumn, LLUI::sAssetsGroup, LLUI::sImageProvider, and LLScrollListCtrl::sortByColumn().

void LLColumnHeader::enableResizeBar ( BOOL  enable  ) 

Definition at line 3505 of file llscrolllistctrl.cpp.

References mColumn, LLScrollListColumn::mDynamicWidth, mResizeBar, and LLView::setEnabled().

LLView * LLColumnHeader::findSnapEdge ( S32 new_edge_val,
const LLCoordGL mouse_dir,
ESnapEdge  snap_edge,
ESnapType  snap_type,
S32  threshold,
S32  padding 
)

Definition at line 3351 of file llscrolllistctrl.cpp.

References LLScrollListCtrl::getColumn(), LLView::getSnapRect(), LLRectBase< Type >::getWidth(), llabs(), llassert, llmin(), mColumn, LLScrollListColumn::mHeader, LLScrollListColumn::mIndex, LLScrollListColumn::mMaxContentWidth, LLScrollListColumn::mParentCtrl, LLRectBase< Type >::mRight, LLCoord::mX, S32, and LLView::SNAP_RIGHT.

LLScrollListColumn* LLColumnHeader::getColumn (  )  [inline]

Definition at line 274 of file llscrolllistctrl.h.

References mColumn.

LLString LLColumnHeader::getLabel ( void   )  [inline]

Definition at line 278 of file llscrolllistctrl.h.

References mOrigLabel.

BOOL LLColumnHeader::handleDoubleClick ( S32  x,
S32  y,
MASK  mask 
) [virtual]

Reimplemented from LLView.

Definition at line 3184 of file llscrolllistctrl.cpp.

References canResize(), LLView::getRect(), mColumn, LLScrollListColumn::mMaxContentWidth, mResizeBar, LLRectBase< Type >::mRight, onClick(), LLRectBase< Type >::pointInRect(), TRUE, and userSetShape().

void LLColumnHeader::onClick ( void user_data  )  [static]

Definition at line 3210 of file llscrolllistctrl.cpp.

References LLScrollListCtrl::getSortAscending(), LLView::getVisible(), LLComboBox::hideList(), mColumn, LLComboBox::mList, LLScrollListColumn::mParentCtrl, LLScrollListCtrl::onClickColumn(), and LLScrollListCtrl::selectNthItem().

Referenced by handleDoubleClick(), and LLColumnHeader().

void LLColumnHeader::onHeldDown ( void user_data  )  [static]

Definition at line 3237 of file llscrolllistctrl.cpp.

References showList().

Referenced by LLColumnHeader().

void LLColumnHeader::onMouseDown ( void user_data  )  [static]

Definition at line 3230 of file llscrolllistctrl.cpp.

Referenced by LLColumnHeader().

void LLColumnHeader::onSelectSort ( LLUICtrl ctrl,
void user_data 
) [static]

Definition at line 3326 of file llscrolllistctrl.cpp.

References FALSE, LLComboBox::getCurrentIndex(), mColumn, mOrigLabel, LLScrollListColumn::mParentCtrl, LLScrollListColumn::mSortingColumn, LLComboBox::setLabel(), LLScrollListCtrl::sortByColumn(), and TRUE.

Referenced by LLColumnHeader().

void LLColumnHeader::setHasResizableElement ( BOOL  resizable  ) 

Definition at line 3468 of file llscrolllistctrl.cpp.

References LLScrollListCtrl::getColumn(), LLScrollListCtrl::getNumColumns(), mColumn, LLScrollListColumn::mDynamicWidth, mHasResizableElement, LLScrollListColumn::mParentCtrl, and S32.

Referenced by LLScrollListCtrl::addElement(), LLNameListCtrl::addElement(), and LLNameListCtrl::addNameItem().

void LLColumnHeader::setImage ( const LLString image_name  ) 

Definition at line 3200 of file llscrolllistctrl.cpp.

References LLComboBox::mButton, LLButton::setImageSelected(), and LLButton::setImageUnselected().

Referenced by LLScrollListCtrl::addColumn().

void LLColumnHeader::showList (  )  [virtual]

Reimplemented from LLComboBox.

Definition at line 3243 of file llscrolllistctrl.cpp.

References LLScrollListCtrl::getColumn(), LLScrollListItem::getColumn(), LLScrollListCtrl::getFirstData(), LLRectBase< Type >::getHeight(), LLButton::getLabelSelected(), LLScrollListCtrl::getLastData(), LLView::getRect(), LLScrollListCtrl::getSortAscending(), LLUIString::getString(), LLScrollListCell::getText(), LLRectBase< Type >::getWidth(), LLFontGL::getWidth(), LLScrollListCell::isText(), llmax(), mAscendingText, LLComboBox::mButton, mColumn, mDescendingText, LLScrollListColumn::mIndex, LLComboBox::mList, mOrigLabel, LLScrollListColumn::mParentCtrl, LLView::mRect, mShowSortOptions, LLScrollListColumn::mSortingColumn, LLScrollListColumn::mWidth, LLScrollListCtrl::reshape(), S32, LLUIString::setArg(), LLComboBox::showList(), LLScrollListCtrl::sortByColumn(), LLFontGL::sSansSerifSmall, and LLStringBase< char >::truncate().

Referenced by onHeldDown().

void LLColumnHeader::userSetShape ( const LLRect new_rect  )  [virtual]

Reimplemented from LLView.

Definition at line 3389 of file llscrolllistctrl.cpp.

References LLScrollListCtrl::getColumn(), LLScrollListCtrl::getColumnPadding(), LLScrollListCtrl::getItemListRect(), LLRectBase< Type >::getWidth(), llmax(), llmin(), mColumn, MIN_COLUMN_WIDTH, LLScrollListColumn::mIndex, LLScrollListColumn::mParentCtrl, LLView::mRect, LLScrollListColumn::mRelWidth, LLScrollListColumn::mWidth, S32, and LLScrollListCtrl::updateColumns().

Referenced by handleDoubleClick().


Member Data Documentation

LLUIString LLColumnHeader::mAscendingText [protected]

Definition at line 289 of file llscrolllistctrl.h.

Referenced by LLColumnHeader(), and showList().

LLScrollListColumn* LLColumnHeader::mColumn [protected]

Definition at line 286 of file llscrolllistctrl.h.

Referenced by canResize(), draw(), enableResizeBar(), findSnapEdge(), getColumn(), handleDoubleClick(), onClick(), onSelectSort(), setHasResizableElement(), showList(), and userSetShape().

LLUIString LLColumnHeader::mDescendingText [protected]

Definition at line 290 of file llscrolllistctrl.h.

Referenced by LLColumnHeader(), and showList().

BOOL LLColumnHeader::mHasResizableElement [protected]

Definition at line 292 of file llscrolllistctrl.h.

Referenced by canResize(), and setHasResizableElement().

LLString LLColumnHeader::mOrigLabel [protected]

Definition at line 288 of file llscrolllistctrl.h.

Referenced by getLabel(), onSelectSort(), and showList().

LLResizeBar* LLColumnHeader::mResizeBar [protected]

Definition at line 287 of file llscrolllistctrl.h.

Referenced by enableResizeBar(), handleDoubleClick(), and LLColumnHeader().

BOOL LLColumnHeader::mShowSortOptions [protected]

Definition at line 291 of file llscrolllistctrl.h.

Referenced by showList().


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