LLScrollableContainerView Class Reference

#include <llscrollcontainer.h>

Inheritance diagram for LLScrollableContainerView:

Inheritance graph
[legend]
Collaboration diagram for LLScrollableContainerView:

Collaboration graph
[legend]
List of all members.

Public Types

 VERTICAL
 HORIZONTAL
 SCROLLBAR_COUNT
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 init ()
void setScrolledView (LLView *view)
virtual void setValue (const LLSD &value)
virtual EWidgetType getWidgetType () const
virtual LLString getWidgetTag () const
void calcVisibleSize (S32 *visible_width, S32 *visible_height, BOOL *show_h_scrollbar, BOOL *show_v_scrollbar)
void calcVisibleSize (const LLRect &doc_rect, S32 *visible_width, S32 *visible_height, BOOL *show_h_scrollbar, BOOL *show_v_scrollbar)
void setBorderVisible (BOOL b)
void scrollToShowRect (const LLRect &rect, const LLCoordGL &desired_offset)
void setReserveScrollCorner (BOOL b)
const LLRectgetScrolledViewRect ()
void pageUp (S32 overlap=0)
void pageDown (S32 overlap=0)
void goToTop ()
void goToBottom ()
S32 getBorderWidth ()
BOOL needsToScroll (S32 x, S32 y, SCROLL_ORIENTATION axis)
virtual void reshape (S32 width, S32 height, BOOL called_from_parent)
virtual BOOL handleKey (KEY key, MASK mask, BOOL called_from_parent)
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 void horizontalChange (S32 new_pos, LLScrollbar *sb, void *user_data)
static void verticalChange (S32 new_pos, LLScrollbar *sb, void *user_data)
static LLViewfromXML (LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)

Protected Member Functions

virtual void scrollHorizontal (S32 new_pos)
virtual void scrollVertical (S32 new_pos)
void updateScroll ()

Protected Attributes

LLScrollbarmScrollbar [SCROLLBAR_COUNT]
LLViewmScrolledView
S32 mSize
BOOL mIsOpaque
LLColor4 mBackgroundColor
LLRect mInnerRect
LLViewBordermBorder
BOOL mReserveScrollCorner
BOOL mAutoScrolling
F32 mAutoScrollRate

Detailed Description

Definition at line 58 of file llscrollcontainer.h.


Member Enumeration Documentation

enum LLScrollableContainerView::SCROLL_ORIENTATION

Enumerator:
VERTICAL 
HORIZONTAL 
SCROLLBAR_COUNT 

Definition at line 63 of file llscrollcontainer.h.


Constructor & Destructor Documentation

LLScrollableContainerView::LLScrollableContainerView ( const LLString name,
const LLRect rect,
LLView scrolled_view,
BOOL  is_opaque = FALSE,
const LLColor4 bg_color = LLColor4(0,0,0,0) 
)

---------------------------------------------------------------------------- Class LLScrollableContainerView ----------------------------------------------------------------------------

Definition at line 72 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 94 of file llscrollcontainer.cpp.

References LLView::addChild(), and init().

LLScrollableContainerView::~LLScrollableContainerView ( void   )  [virtual]

Definition at line 157 of file llscrollcontainer.cpp.

References i, mScrollbar, mScrolledView, NULL, S32, and SCROLLBAR_COUNT.


Member Function Documentation

void LLScrollableContainerView::calcVisibleSize ( const LLRect doc_rect,
S32 visible_width,
S32 visible_height,
BOOL show_h_scrollbar,
BOOL show_v_scrollbar 
)

Definition at line 432 of file llscrollcontainer.cpp.

References FALSE, LLViewBorder::getBorderWidth(), LLRectBase< Type >::getHeight(), LLRectBase< Type >::getWidth(), mBorder, LLView::mRect, S32, SCROLLBAR_SIZE, and TRUE.

void LLScrollableContainerView::calcVisibleSize ( S32 visible_width,
S32 visible_height,
BOOL show_h_scrollbar,
BOOL show_v_scrollbar 
)

Definition at line 426 of file llscrollcontainer.cpp.

References LLView::getRect(), and mScrolledView.

Referenced by LLFolderView::arrange(), draw(), reshape(), LLFolderView::reshape(), scrollToShowRect(), LLFolderView::startRenamingSelectedItem(), and updateScroll().

void LLScrollableContainerView::draw (  )  [virtual]

Reimplemented from LLView.

Definition at line 462 of file llscrollcontainer.cpp.

References AUTO_SCROLL_RATE_ACCEL, calcVisibleSize(), LLFocusMgr::childHasKeyboardFocus(), LLView::drawChild(), LLView::drawDebugRect(), FALSE, LLUICtrl::focusFirstItem(), LLView::getChildList(), LLFrameTimer::getFrameDeltaTimeF32(), LLView::getRect(), LLView::getVisible(), gFocusMgr, gl_rect_2d(), glColor4fv, 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.

LLView * LLScrollableContainerView::fromXML ( LLXMLNodePtr  node,
LLView parent,
LLUICtrlFactory factory 
) [static]

Definition at line 763 of file llscrollcontainer.cpp.

References LLUICtrlFactory::createCtrlWidget(), LLView::createRect(), FALSE, LLUICtrlFactory::getAttributeColor(), llendl, llinfos, LLScrollableContainerView(), mScrolledView, LLPointer< Type >::notNull(), LLRectBase< Type >::null, and NULL.

S32 LLScrollableContainerView::getBorderWidth (  ) 

Definition at line 730 of file llscrollcontainer.cpp.

References LLViewBorder::getBorderWidth(), and mBorder.

Referenced by LLFolderView::scrollToShowItem().

const LLRect& LLScrollableContainerView::getScrolledViewRect (  )  [inline]

Definition at line 91 of file llscrollcontainer.h.

References LLView::getRect(), and mScrolledView.

virtual LLString LLScrollableContainerView::getWidgetTag (  )  const [inline, virtual]

Implements LLView.

Definition at line 79 of file llscrollcontainer.h.

References LL_SCROLLABLE_CONTAINER_VIEW_TAG.

virtual EWidgetType LLScrollableContainerView::getWidgetType (  )  const [inline, virtual]

Implements LLView.

Definition at line 78 of file llscrollcontainer.h.

References WIDGET_TYPE_SCROLL_CONTAINER.

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

Reimplemented from LLUICtrl.

Definition at line 741 of file llscrollcontainer.cpp.

References LLView::getXML(), mBackgroundColor, mIsOpaque, mScrolledView, LLColor4::mV, and TRUE.

void LLScrollableContainerView::goToBottom (  ) 

Definition at line 725 of file llscrollcontainer.cpp.

References mScrollbar, LLScrollbar::setDocPos(), and VERTICAL.

Referenced by LLFolderView::handleKeyHere().

void LLScrollableContainerView::goToTop (  ) 

Definition at line 720 of file llscrollcontainer.cpp.

References mScrollbar, LLScrollbar::setDocPos(), and VERTICAL.

Referenced by LLFolderView::handleKeyHere().

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 318 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::handleKey ( KEY  key,
MASK  mask,
BOOL  called_from_parent 
) [virtual]

Reimplemented from LLView.

Definition at line 239 of file llscrollcontainer.cpp.

References FALSE, LLView::getParent(), LLView::getVisible(), LLView::handleKey(), i, LLView::mEnabled, mScrollbar, mScrolledView, S32, SCROLLBAR_COUNT, and TRUE.

BOOL LLScrollableContainerView::handleScrollWheel ( S32  x,
S32  y,
S32  clicks 
) [virtual]

Reimplemented from LLView.

Definition at line 279 of file llscrollcontainer.cpp.

References i, LLView::mEnabled, mScrollbar, S32, SCROLLBAR_COUNT, and TRUE.

Referenced by LLFolderView::handleScrollWheel().

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

Reimplemented from LLView.

Definition at line 395 of file llscrollcontainer.cpp.

References FALSE, LLView::getRect(), LLView::getVisible(), LLView::handleToolTip(), i, LLRectBase< Type >::mBottom, LLRectBase< Type >::mLeft, mScrollbar, mScrolledView, LLView::pointInView(), S32, SCROLLBAR_COUNT, and TRUE.

static void LLScrollableContainerView::horizontalChange ( S32  new_pos,
LLScrollbar sb,
void user_data 
) [static]

void LLScrollableContainerView::init (  ) 

Definition at line 113 of file llscrollcontainer.cpp.

References LLView::addChild(), LLViewBorder::BEVEL_IN, FALSE, LLRectBase< Type >::getHeight(), LLRectBase< Type >::getWidth(), LLScrollbar::HORIZONTAL, HORIZONTAL, HORIZONTAL_MULTIPLE, mBorder, LLRectBase< Type >::mBottom, mInnerRect, LLRectBase< Type >::mLeft, LLView::mRect, 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().

BOOL LLScrollableContainerView::needsToScroll ( S32  x,
S32  y,
SCROLL_ORIENTATION  axis 
)

Definition at line 298 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::pageDown ( S32  overlap = 0  ) 

Definition at line 715 of file llscrollcontainer.cpp.

References mScrollbar, LLScrollbar::pageDown(), and VERTICAL.

Referenced by LLFolderView::handleKeyHere().

void LLScrollableContainerView::pageUp ( S32  overlap = 0  ) 

Definition at line 710 of file llscrollcontainer.cpp.

References mScrollbar, LLScrollbar::pageUp(), and VERTICAL.

Referenced by LLFolderView::handleKeyHere().

void LLScrollableContainerView::reshape ( S32  width,
S32  height,
BOOL  called_from_parent 
) [virtual]

Reimplemented from LLView.

Definition at line 213 of file llscrollcontainer.cpp.

References calcVisibleSize(), FALSE, LLViewBorder::getBorderWidth(), LLRectBase< Type >::getHeight(), LLView::getRect(), LLRectBase< Type >::getWidth(), HORIZONTAL, mBorder, mInnerRect, LLView::mRect, mScrollbar, mScrolledView, LLView::reshape(), S32, LLRectBase< Type >::set(), LLScrollbar::setDocSize(), LLScrollbar::setPageSize(), LLRectBase< Type >::stretch(), and VERTICAL.

void LLScrollableContainerView::scrollHorizontal ( S32  new_pos  )  [protected, virtual]

Definition at line 189 of file llscrollcontainer.cpp.

References LLView::getRect(), mInnerRect, LLRectBase< Type >::mLeft, mScrolledView, S32, and LLView::translate().

Referenced by updateScroll().

void LLScrollableContainerView::scrollToShowRect ( const LLRect rect,
const LLCoordGL desired_offset 
)

Definition at line 641 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::scrollVertical ( S32  new_pos  )  [protected, virtual]

Definition at line 201 of file llscrollcontainer.cpp.

References LLView::getRect(), mInnerRect, mScrolledView, LLRectBase< Type >::mTop, S32, and LLView::translate().

Referenced by updateScroll().

void LLScrollableContainerView::setBorderVisible ( BOOL  b  ) 

Definition at line 635 of file llscrollcontainer.cpp.

References mBorder, and LLView::setVisible().

void LLScrollableContainerView::setReserveScrollCorner ( BOOL  b  )  [inline]

Definition at line 90 of file llscrollcontainer.h.

References mReserveScrollCorner.

Referenced by LLFloaterPermissionsMgr::LLFloaterPermissionsMgr(), and LLInventoryPanel::postBuild().

void LLScrollableContainerView::setScrolledView ( LLView view  )  [inline]

Definition at line 75 of file llscrollcontainer.h.

References mScrolledView.

Referenced by LLFloaterCustomize::initScrollingPanelList(), and LLFloaterNetwork2080::LLFloaterNetwork2080().

virtual void LLScrollableContainerView::setValue ( const LLSD value  )  [inline, virtual]

Reimplemented from LLView.

Definition at line 77 of file llscrollcontainer.h.

References mInnerRect, and LLRectBase< Type >::setValue().

void LLScrollableContainerView::updateScroll (  )  [protected]

Definition at line 553 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, LLView::mRect, mReserveScrollCorner, mScrollbar, mScrolledView, LLRectBase< Type >::mTop, r, LLScrollbar::reshape(), S32, SCROLLBAR_SIZE, scrollHorizontal(), scrollVertical(), LLScrollbar::setDocPos(), LLScrollbar::setDocSize(), LLScrollbar::setPageSize(), LLView::setRect(), LLView::setVisible(), LLView::translate(), TRUE, and VERTICAL.

Referenced by draw(), and scrollToShowRect().

static void LLScrollableContainerView::verticalChange ( S32  new_pos,
LLScrollbar sb,
void user_data 
) [static]


Member Data Documentation

BOOL LLScrollableContainerView::mAutoScrolling [protected]

Definition at line 130 of file llscrollcontainer.h.

Referenced by draw(), and handleDragAndDrop().

F32 LLScrollableContainerView::mAutoScrollRate [protected]

Definition at line 131 of file llscrollcontainer.h.

Referenced by draw(), and handleDragAndDrop().

LLColor4 LLScrollableContainerView::mBackgroundColor [protected]

Definition at line 126 of file llscrollcontainer.h.

Referenced by draw(), and getXML().

LLViewBorder* LLScrollableContainerView::mBorder [protected]

Definition at line 128 of file llscrollcontainer.h.

Referenced by calcVisibleSize(), draw(), getBorderWidth(), init(), reshape(), setBorderVisible(), and updateScroll().

LLRect LLScrollableContainerView::mInnerRect [protected]

Definition at line 127 of file llscrollcontainer.h.

Referenced by draw(), handleDragAndDrop(), init(), needsToScroll(), reshape(), scrollHorizontal(), scrollVertical(), setValue(), and updateScroll().

BOOL LLScrollableContainerView::mIsOpaque [protected]

Definition at line 125 of file llscrollcontainer.h.

Referenced by draw(), and getXML().

BOOL LLScrollableContainerView::mReserveScrollCorner [protected]

Definition at line 129 of file llscrollcontainer.h.

Referenced by setReserveScrollCorner(), and updateScroll().

LLScrollbar* LLScrollableContainerView::mScrollbar[SCROLLBAR_COUNT] [protected]

Definition at line 122 of file llscrollcontainer.h.

Referenced by draw(), goToBottom(), goToTop(), handleDragAndDrop(), handleKey(), handleScrollWheel(), handleToolTip(), init(), needsToScroll(), pageDown(), pageUp(), reshape(), scrollToShowRect(), updateScroll(), and ~LLScrollableContainerView().

LLView* LLScrollableContainerView::mScrolledView [protected]

Definition at line 123 of file llscrollcontainer.h.

Referenced by calcVisibleSize(), draw(), fromXML(), getScrolledViewRect(), getXML(), handleKey(), handleToolTip(), LLScrollableContainerView(), reshape(), scrollHorizontal(), scrollToShowRect(), scrollVertical(), setScrolledView(), updateScroll(), and ~LLScrollableContainerView().

S32 LLScrollableContainerView::mSize [protected]

Definition at line 124 of file llscrollcontainer.h.


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