#include <llscrolllistctrl.h>
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 () |
LLView * | findSnapEdge (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) |
LLScrollListColumn * | getColumn () |
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) |
Private Attributes | |
LLScrollListColumn * | mColumn |
LLResizeBar * | mResizeBar |
LLString | mOrigLabel |
LLUIString | mAscendingText |
LLUIString | mDescendingText |
BOOL | mShowSortOptions |
BOOL | mHasResizableElement |
Definition at line 282 of file llscrolllistctrl.h.
LLColumnHeader::LLColumnHeader | ( | const LLString & | label, | |
const LLRect & | rect, | |||
LLScrollListColumn * | column, | |||
const LLFontGL * | font = NULL | |||
) |
Definition at line 3437 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, 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 3473 of file llscrolllistctrl.cpp.
void LLColumnHeader::draw | ( | void | ) | [virtual] |
Reimplemented from LLComboBox.
Definition at line 3477 of file llscrolllistctrl.cpp.
References LLComboBox::draw(), LLComboBox::getCurrentIndex(), LLButton::getImageOverlay(), LLScrollListCtrl::getSortAscending(), LLScrollListCtrl::getSortColumnName(), LLView::getVisible(), LLScrollListCtrl::isSorted(), LLComboBox::mArrowImage, LLComboBox::mButton, mColumn, LLScrollListColumn::mLabel, LLComboBox::mList, LLScrollListColumn::mParentCtrl, LLScrollListColumn::mSortingColumn, LLFontGL::RIGHT, LLButton::setImageOverlay(), LLScrollListCtrl::sortByColumn(), LLColor4::transparent, and LLColor4::white.
Reimplemented from LLView.
Definition at line 3501 of file llscrolllistctrl.cpp.
References canResize(), LLView::getRect(), mColumn, LLRectBase< Type >::mLeft, LLScrollListColumn::mMaxContentWidth, mResizeBar, LLRectBase< Type >::mRight, onClick(), LLRectBase< Type >::pointInRect(), TRUE, and userSetShape().
void LLColumnHeader::showList | ( | ) | [virtual] |
Reimplemented from LLComboBox.
Definition at line 3560 of file llscrolllistctrl.cpp.
References LLSD::asString(), LLScrollListCtrl::getColumn(), LLScrollListItem::getColumn(), LLScrollListCtrl::getFirstData(), LLRectBase< Type >::getHeight(), LLButton::getLabelSelected(), LLScrollListCtrl::getLastData(), LLView::getRect(), LLScrollListCtrl::getSortAscending(), LLUIString::getString(), LLScrollListCell::getValue(), LLFontGL::getWidth(), LLScrollListCell::isText(), llmax(), mAscendingText, LLComboBox::mButton, mColumn, mDescendingText, LLScrollListColumn::mIndex, LLComboBox::mList, mOrigLabel, LLScrollListColumn::mParentCtrl, mShowSortOptions, LLScrollListColumn::mSortingColumn, LLScrollListColumn::mWidth, LLScrollListCtrl::reshape(), S32, LLUIString::setArg(), LLComboBox::showList(), LLScrollListCtrl::sortByColumn(), LLFontGL::sSansSerifSmall, and LLStringBase< char >::truncate().
Referenced by onHeldDown().
LLView * LLColumnHeader::findSnapEdge | ( | S32 & | new_edge_val, | |
const LLCoordGL & | mouse_dir, | |||
ESnapEdge | snap_edge, | |||
ESnapType | snap_type, | |||
S32 | threshold, | |||
S32 | padding | |||
) | [virtual] |
Reimplemented from LLView.
Definition at line 3668 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.
void LLColumnHeader::userSetShape | ( | const LLRect & | new_rect | ) | [virtual] |
Reimplemented from LLView.
Definition at line 3706 of file llscrolllistctrl.cpp.
References canResize(), LLScrollListCtrl::getColumn(), LLScrollListCtrl::getColumnPadding(), LLScrollListCtrl::getItemListRect(), LLView::getRect(), LLRectBase< Type >::getWidth(), llmax(), llmin(), mColumn, LLScrollListColumn::mDynamicWidth, LLScrollListColumn::mHeader, MIN_COLUMN_WIDTH, LLScrollListColumn::mIndex, LLScrollListColumn::mParentCtrl, LLScrollListColumn::mRelWidth, LLScrollListColumn::mWidth, S32, and LLScrollListCtrl::updateColumns().
Referenced by handleDoubleClick().
void LLColumnHeader::setImage | ( | const LLString & | image_name | ) |
Definition at line 3517 of file llscrolllistctrl.cpp.
References LLComboBox::mButton, LLButton::setImageSelected(), and LLButton::setImageUnselected().
Referenced by LLScrollListCtrl::addColumn().
LLScrollListColumn* LLColumnHeader::getColumn | ( | ) | [inline] |
void LLColumnHeader::setHasResizableElement | ( | BOOL | resizable | ) |
Definition at line 3787 of file llscrolllistctrl.cpp.
References canResize(), enableResizeBar(), LLScrollListCtrl::getColumn(), LLScrollListCtrl::getNumColumns(), mColumn, LLScrollListColumn::mDynamicWidth, mHasResizableElement, LLScrollListColumn::mHeader, LLScrollListColumn::mParentCtrl, and S32.
Referenced by LLNameListCtrl::addElement(), LLScrollListCtrl::addElement(), and LLNameListCtrl::addNameItem().
BOOL LLColumnHeader::canResize | ( | ) |
Definition at line 3833 of file llscrolllistctrl.cpp.
References LLView::getVisible(), mColumn, LLScrollListColumn::mDynamicWidth, and mHasResizableElement.
Referenced by handleDoubleClick(), setHasResizableElement(), and userSetShape().
void LLColumnHeader::enableResizeBar | ( | BOOL | enable | ) |
Definition at line 3824 of file llscrolllistctrl.cpp.
References mColumn, LLScrollListColumn::mDynamicWidth, mResizeBar, and LLView::setEnabled().
Referenced by setHasResizableElement().
LLString LLColumnHeader::getLabel | ( | void | ) | [inline] |
void LLColumnHeader::onSelectSort | ( | LLUICtrl * | ctrl, | |
void * | user_data | |||
) | [static] |
Definition at line 3643 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::onClick | ( | void * | user_data | ) | [static] |
Definition at line 3527 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::onMouseDown | ( | void * | user_data | ) | [static] |
Definition at line 3547 of file llscrolllistctrl.cpp.
Referenced by LLColumnHeader().
void LLColumnHeader::onHeldDown | ( | void * | user_data | ) | [static] |
Definition at line 3554 of file llscrolllistctrl.cpp.
References showList().
Referenced by LLColumnHeader().
LLScrollListColumn* LLColumnHeader::mColumn [private] |
Definition at line 308 of file llscrolllistctrl.h.
Referenced by canResize(), draw(), enableResizeBar(), findSnapEdge(), getColumn(), handleDoubleClick(), onClick(), onSelectSort(), setHasResizableElement(), showList(), and userSetShape().
LLResizeBar* LLColumnHeader::mResizeBar [private] |
Definition at line 309 of file llscrolllistctrl.h.
Referenced by enableResizeBar(), handleDoubleClick(), and LLColumnHeader().
LLString LLColumnHeader::mOrigLabel [private] |
Definition at line 310 of file llscrolllistctrl.h.
Referenced by getLabel(), onSelectSort(), and showList().
LLUIString LLColumnHeader::mAscendingText [private] |
LLUIString LLColumnHeader::mDescendingText [private] |
BOOL LLColumnHeader::mShowSortOptions [private] |
BOOL LLColumnHeader::mHasResizableElement [private] |
Definition at line 314 of file llscrolllistctrl.h.
Referenced by canResize(), and setHasResizableElement().