#include <llscrollcontainer.h>
Public Types | |
enum | SCROLL_ORIENTATION { VERTICAL, HORIZONTAL, SCROLLBAR_COUNT } |
Public Member Functions | |
LLScrollableContainerView (const LLString &name, const LLRect &rect, LLView *scrolled_view, BOOL is_opaque=FALSE, const LLColor4 &bg_color=LLColor4(0, 0, 0, 0)) | |
LLScrollableContainerView (const LLString &name, const LLRect &rect, LLUICtrl *scrolled_ctrl, BOOL is_opaque=FALSE, const LLColor4 &bg_color=LLColor4(0, 0, 0, 0)) | |
virtual | ~LLScrollableContainerView (void) |
void | setScrolledView (LLView *view) |
virtual void | setValue (const LLSD &value) |
void | calcVisibleSize (S32 *visible_width, S32 *visible_height, BOOL *show_h_scrollbar, BOOL *show_v_scrollbar) const |
void | calcVisibleSize (const LLRect &doc_rect, S32 *visible_width, S32 *visible_height, BOOL *show_h_scrollbar, BOOL *show_v_scrollbar) const |
void | setBorderVisible (BOOL b) |
void | scrollToShowRect (const LLRect &rect, const LLCoordGL &desired_offset) |
void | setReserveScrollCorner (BOOL b) |
const LLRect & | getScrolledViewRect () const |
void | pageUp (S32 overlap=0) |
void | pageDown (S32 overlap=0) |
void | goToTop () |
void | goToBottom () |
S32 | getBorderWidth () const |
BOOL | needsToScroll (S32 x, S32 y, SCROLL_ORIENTATION axis) const |
virtual void | reshape (S32 width, S32 height, BOOL called_from_parent=TRUE) |
virtual BOOL | handleKeyHere (KEY key, MASK mask) |
virtual BOOL | handleScrollWheel (S32 x, S32 y, S32 clicks) |
virtual BOOL | handleDragAndDrop (S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, LLString &tooltip_msg) |
virtual BOOL | handleToolTip (S32 x, S32 y, LLString &msg, LLRect *sticky_rect) |
virtual void | draw () |
virtual LLXMLNodePtr | getXML (bool save_children=true) const |
Static Public Member Functions | |
static LLView * | fromXML (LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory) |
Private Member Functions | |
void | init () |
virtual void | scrollHorizontal (S32 new_pos) |
virtual void | scrollVertical (S32 new_pos) |
void | updateScroll () |
Private Attributes | |
LLScrollbar * | mScrollbar [SCROLLBAR_COUNT] |
LLView * | mScrolledView |
S32 | mSize |
BOOL | mIsOpaque |
LLColor4 | mBackgroundColor |
LLRect | mInnerRect |
LLViewBorder * | mBorder |
BOOL | mReserveScrollCorner |
BOOL | mAutoScrolling |
F32 | mAutoScrollRate |
Definition at line 55 of file llscrollcontainer.h.
LLScrollableContainerView::LLScrollableContainerView | ( | const LLString & | name, | |
const LLRect & | rect, | |||
LLView * | scrolled_view, | |||
BOOL | is_opaque = FALSE , |
|||
const LLColor4 & | bg_color = LLColor4(0,0,0,0) | |||
) |
Definition at line 67 of file llscrollcontainer.cpp.
References LLView::addChild(), init(), and mScrolledView.
Referenced by fromXML().
LLScrollableContainerView::LLScrollableContainerView | ( | const LLString & | name, | |
const LLRect & | rect, | |||
LLUICtrl * | scrolled_ctrl, | |||
BOOL | is_opaque = FALSE , |
|||
const LLColor4 & | bg_color = LLColor4(0,0,0,0) | |||
) |
Definition at line 89 of file llscrollcontainer.cpp.
References LLView::addChild(), and init().
LLScrollableContainerView::~LLScrollableContainerView | ( | void | ) | [virtual] |
Definition at line 152 of file llscrollcontainer.cpp.
References i, mScrollbar, mScrolledView, NULL, S32, and SCROLLBAR_COUNT.
void LLScrollableContainerView::setScrolledView | ( | LLView * | view | ) | [inline] |
Definition at line 70 of file llscrollcontainer.h.
References mScrolledView.
Referenced by LLFloaterCustomize::initScrollingPanelList().
virtual void LLScrollableContainerView::setValue | ( | const LLSD & | value | ) | [inline, virtual] |
Reimplemented from LLView.
Definition at line 72 of file llscrollcontainer.h.
References mInnerRect, and LLRectBase< Type >::setValue().
void LLScrollableContainerView::calcVisibleSize | ( | S32 * | visible_width, | |
S32 * | visible_height, | |||
BOOL * | show_h_scrollbar, | |||
BOOL * | show_v_scrollbar | |||
) | const |
Definition at line 370 of file llscrollcontainer.cpp.
References LLView::getRect(), and mScrolledView.
Referenced by LLFolderView::arrange(), draw(), LLFolderView::reshape(), LLContainerView::reshape(), reshape(), scrollToShowRect(), LLFolderView::startRenamingSelectedItem(), and updateScroll().
void LLScrollableContainerView::calcVisibleSize | ( | const LLRect & | doc_rect, | |
S32 * | visible_width, | |||
S32 * | visible_height, | |||
BOOL * | show_h_scrollbar, | |||
BOOL * | show_v_scrollbar | |||
) | const |
Definition at line 376 of file llscrollcontainer.cpp.
References FALSE, LLViewBorder::getBorderWidth(), LLRectBase< Type >::getHeight(), LLView::getRect(), LLRectBase< Type >::getWidth(), mBorder, S32, SCROLLBAR_SIZE, and TRUE.
void LLScrollableContainerView::setBorderVisible | ( | BOOL | b | ) |
Definition at line 577 of file llscrollcontainer.cpp.
References mBorder, and LLView::setVisible().
void LLScrollableContainerView::scrollToShowRect | ( | const LLRect & | rect, | |
const LLCoordGL & | desired_offset | |||
) |
Definition at line 583 of file llscrollcontainer.cpp.
References calcVisibleSize(), FALSE, LLScrollbar::getDocPos(), LLRectBase< Type >::getHeight(), LLView::getRect(), LLRectBase< Type >::getWidth(), HORIZONTAL, llclamp(), llendl, llmax(), llmin(), llwarns, LLRectBase< Type >::mBottom, LLRectBase< Type >::mLeft, LLRectBase< Type >::mRight, mScrollbar, mScrolledView, LLRectBase< Type >::mTop, LLCoord::mX, LLCoord::mY, S32, LLScrollbar::setDocPos(), LLScrollbar::setDocSize(), LLScrollbar::setPageSize(), updateScroll(), and VERTICAL.
Referenced by LLFolderView::scrollToShowItem().
void LLScrollableContainerView::setReserveScrollCorner | ( | BOOL | b | ) | [inline] |
Definition at line 79 of file llscrollcontainer.h.
References mReserveScrollCorner.
Referenced by LLFloaterPermissionsMgr::LLFloaterPermissionsMgr(), and LLInventoryPanel::postBuild().
const LLRect& LLScrollableContainerView::getScrolledViewRect | ( | ) | const [inline] |
Definition at line 80 of file llscrollcontainer.h.
References LLView::getRect(), and mScrolledView.
void LLScrollableContainerView::pageUp | ( | S32 | overlap = 0 |
) |
Definition at line 652 of file llscrollcontainer.cpp.
References mScrollbar, LLScrollbar::pageUp(), and VERTICAL.
Referenced by LLFolderView::handleKeyHere().
void LLScrollableContainerView::pageDown | ( | S32 | overlap = 0 |
) |
Definition at line 657 of file llscrollcontainer.cpp.
References mScrollbar, LLScrollbar::pageDown(), and VERTICAL.
Referenced by LLFolderView::handleKeyHere().
void LLScrollableContainerView::goToTop | ( | ) |
Definition at line 662 of file llscrollcontainer.cpp.
References mScrollbar, LLScrollbar::setDocPos(), and VERTICAL.
Referenced by LLFolderView::handleKeyHere().
void LLScrollableContainerView::goToBottom | ( | ) |
Definition at line 667 of file llscrollcontainer.cpp.
References mScrollbar, LLScrollbar::setDocPos(), and VERTICAL.
Referenced by LLFolderView::handleKeyHere().
S32 LLScrollableContainerView::getBorderWidth | ( | ) | const |
Definition at line 672 of file llscrollcontainer.cpp.
References LLViewBorder::getBorderWidth(), and mBorder.
Referenced by LLFolderView::scrollToShowItem().
BOOL LLScrollableContainerView::needsToScroll | ( | S32 | x, | |
S32 | y, | |||
LLScrollableContainerView::SCROLL_ORIENTATION | axis | |||
) | const |
Definition at line 245 of file llscrollcontainer.cpp.
References FALSE, LLScrollbar::getDocPos(), LLRectBase< Type >::getHeight(), LLView::getVisible(), LLRectBase< Type >::getWidth(), mInnerRect, mScrollbar, S32, SCROLLBAR_SIZE, and TRUE.
Referenced by LLInventoryView::handleDragAndDrop().
void LLScrollableContainerView::reshape | ( | S32 | width, | |
S32 | height, | |||
BOOL | called_from_parent = TRUE | |||
) | [virtual] |
Reimplemented from LLView.
Definition at line 189 of file llscrollcontainer.cpp.
References calcVisibleSize(), FALSE, LLViewBorder::getBorderWidth(), LLRectBase< Type >::getHeight(), LLView::getRect(), LLRectBase< Type >::getWidth(), HORIZONTAL, mBorder, mInnerRect, mScrollbar, mScrolledView, LLView::reshape(), S32, LLRectBase< Type >::set(), LLScrollbar::setDocSize(), LLScrollbar::setPageSize(), LLRectBase< Type >::stretch(), and VERTICAL.
Reimplemented from LLView.
Definition at line 215 of file llscrollcontainer.cpp.
References FALSE, i, mScrollbar, S32, SCROLLBAR_COUNT, and TRUE.
Reimplemented from LLView.
Definition at line 228 of file llscrollcontainer.cpp.
References i, mScrollbar, S32, SCROLLBAR_COUNT, and TRUE.
Referenced by LLFolderView::handleScrollWheel().
BOOL LLScrollableContainerView::handleDragAndDrop | ( | S32 | x, | |
S32 | y, | |||
MASK | mask, | |||
BOOL | drop, | |||
EDragAndDropType | cargo_type, | |||
void * | cargo_data, | |||
EAcceptance * | accept, | |||
LLString & | tooltip_msg | |||
) | [virtual] |
Reimplemented from LLView.
Definition at line 266 of file llscrollcontainer.cpp.
References ACCEPT_NO, LLView::childrenHandleDragAndDrop(), FALSE, LLScrollbar::getDocPos(), LLScrollbar::getDocPosMax(), LLFrameTimer::getFrameDeltaTimeF32(), LLRectBase< Type >::getHeight(), LLView::getVisible(), LLRectBase< Type >::getWidth(), HORIZONTAL, llround(), mAutoScrolling, mAutoScrollRate, LLRectBase< Type >::mBottom, mInnerRect, LLRectBase< Type >::mLeft, LLRectBase< Type >::mRight, mScrollbar, LLRectBase< Type >::mTop, NULL, LLRectBase< Type >::pointInRect(), S32, SCROLLBAR_SIZE, LLScrollbar::setDocPos(), TRUE, and VERTICAL.
BOOL LLScrollableContainerView::handleToolTip | ( | S32 | x, | |
S32 | y, | |||
LLString & | msg, | |||
LLRect * | sticky_rect | |||
) | [virtual] |
Reimplemented from LLView.
Definition at line 343 of file llscrollcontainer.cpp.
References LLView::getRect(), LLView::handleToolTip(), i, LLRectBase< Type >::mBottom, LLRectBase< Type >::mLeft, mScrollbar, mScrolledView, S32, SCROLLBAR_COUNT, and TRUE.
void LLScrollableContainerView::draw | ( | void | ) | [virtual] |
Reimplemented from LLView.
Definition at line 406 of file llscrollcontainer.cpp.
References AUTO_SCROLL_RATE_ACCEL, calcVisibleSize(), LLFocusMgr::childHasKeyboardFocus(), LLGLImmediate::color4fv(), LLView::drawChild(), LLView::drawDebugRect(), FALSE, LLUICtrl::focusFirstItem(), LLView::getChildList(), LLFrameTimer::getFrameDeltaTimeF32(), LLView::getRect(), LLView::getVisible(), gFocusMgr, gGL, gl_rect_2d(), LLView::hasMouseCapture(), HORIZONTAL, llmin(), mAutoScrolling, mAutoScrollRate, MAX_AUTO_SCROLL_RATE, mBackgroundColor, mBorder, LLRectBase< Type >::mBottom, MIN_AUTO_SCROLL_RATE, mInnerRect, mIsOpaque, LLRectBase< Type >::mLeft, mScrollbar, mScrolledView, LLColor4::mV, S32, SCROLLBAR_SIZE, LLView::sDebugRects, LLView::sDepth, LLViewBorder::setKeyboardFocusHighlight(), updateScroll(), and VERTICAL.
LLXMLNodePtr LLScrollableContainerView::getXML | ( | bool | save_children = true |
) | const [virtual] |
Reimplemented from LLUICtrl.
Definition at line 683 of file llscrollcontainer.cpp.
References LLView::getXML(), mBackgroundColor, mIsOpaque, mScrolledView, LLColor4::mV, and TRUE.
LLView * LLScrollableContainerView::fromXML | ( | LLXMLNodePtr | node, | |
LLView * | parent, | |||
LLUICtrlFactory * | factory | |||
) | [static] |
Reimplemented from LLUICtrl.
Definition at line 705 of file llscrollcontainer.cpp.
References LLUICtrlFactory::createCtrlWidget(), LLView::createRect(), FALSE, LLUICtrlFactory::getAttributeColor(), LLView::isPanel(), llendl, llinfos, LLScrollableContainerView(), mScrolledView, LLPointer< Type >::notNull(), LLRectBase< Type >::null, and NULL.
void LLScrollableContainerView::init | ( | void | ) | [private] |
Definition at line 108 of file llscrollcontainer.cpp.
References LLView::addChild(), LLViewBorder::BEVEL_IN, FALSE, LLViewBorder::getBorderWidth(), LLRectBase< Type >::getHeight(), LLView::getRect(), LLRectBase< Type >::getWidth(), LLScrollbar::HORIZONTAL, HORIZONTAL, HORIZONTAL_MULTIPLE, mBorder, LLRectBase< Type >::mBottom, mInnerRect, LLRectBase< Type >::mLeft, LLRectBase< Type >::mRight, mScrollbar, LLRectBase< Type >::mTop, NULL, SCROLLBAR_SIZE, LLRectBase< Type >::set(), LLView::setFollowsBottom(), LLView::setFollowsLeft(), LLView::setFollowsRight(), LLView::setFollowsTop(), LLUICtrl::setTabStop(), LLView::setVisible(), LLRectBase< Type >::stretch(), LLScrollbar::VERTICAL, VERTICAL, and VERTICAL_MULTIPLE.
Referenced by LLScrollableContainerView().
void LLScrollableContainerView::scrollHorizontal | ( | S32 | new_pos | ) | [private, virtual] |
Definition at line 165 of file llscrollcontainer.cpp.
References LLView::getRect(), mInnerRect, LLRectBase< Type >::mLeft, mScrolledView, S32, and LLView::translate().
Referenced by updateScroll().
void LLScrollableContainerView::scrollVertical | ( | S32 | new_pos | ) | [private, virtual] |
Definition at line 177 of file llscrollcontainer.cpp.
References LLView::getRect(), mInnerRect, mScrolledView, LLRectBase< Type >::mTop, S32, and LLView::translate().
Referenced by updateScroll().
void LLScrollableContainerView::updateScroll | ( | ) | [private] |
Definition at line 495 of file llscrollcontainer.cpp.
References calcVisibleSize(), FALSE, LLViewBorder::getBorderWidth(), LLRectBase< Type >::getHeight(), LLView::getRect(), LLRectBase< Type >::getWidth(), HORIZONTAL, mBorder, LLRectBase< Type >::mBottom, mInnerRect, LLRectBase< Type >::mLeft, mReserveScrollCorner, mScrollbar, mScrolledView, LLRectBase< Type >::mTop, r, LLScrollbar::reshape(), S32, SCROLLBAR_SIZE, scrollHorizontal(), scrollVertical(), LLScrollbar::setDocPos(), LLScrollbar::setDocSize(), LLScrollbar::setPageSize(), LLView::setRect(), LLView::setVisible(), LLRectBase< Type >::translate(), LLView::translate(), TRUE, and VERTICAL.
Referenced by draw(), and scrollToShowRect().
LLScrollbar* LLScrollableContainerView::mScrollbar[SCROLLBAR_COUNT] [private] |
Definition at line 113 of file llscrollcontainer.h.
Referenced by draw(), goToBottom(), goToTop(), handleDragAndDrop(), handleKeyHere(), handleScrollWheel(), handleToolTip(), init(), needsToScroll(), pageDown(), pageUp(), reshape(), scrollToShowRect(), updateScroll(), and ~LLScrollableContainerView().
LLView* LLScrollableContainerView::mScrolledView [private] |
Definition at line 114 of file llscrollcontainer.h.
Referenced by calcVisibleSize(), draw(), fromXML(), getScrolledViewRect(), getXML(), handleToolTip(), LLScrollableContainerView(), reshape(), scrollHorizontal(), scrollToShowRect(), scrollVertical(), setScrolledView(), updateScroll(), and ~LLScrollableContainerView().
S32 LLScrollableContainerView::mSize [private] |
Definition at line 115 of file llscrollcontainer.h.
BOOL LLScrollableContainerView::mIsOpaque [private] |
LLRect LLScrollableContainerView::mInnerRect [private] |
Definition at line 118 of file llscrollcontainer.h.
Referenced by draw(), handleDragAndDrop(), init(), needsToScroll(), reshape(), scrollHorizontal(), scrollVertical(), setValue(), and updateScroll().
LLViewBorder* LLScrollableContainerView::mBorder [private] |
Definition at line 119 of file llscrollcontainer.h.
Referenced by calcVisibleSize(), draw(), getBorderWidth(), init(), reshape(), setBorderVisible(), and updateScroll().
Definition at line 120 of file llscrollcontainer.h.
Referenced by setReserveScrollCorner(), and updateScroll().