LLScrollbar Class Reference

#include <llscrollbar.h>

Inheritance diagram for LLScrollbar:

Inheritance graph
[legend]
Collaboration diagram for LLScrollbar:

Collaboration graph
[legend]

List of all members.

Public Types

enum  ORIENTATION { HORIZONTAL, VERTICAL }

Public Member Functions

 LLScrollbar (const LLString &name, LLRect rect, ORIENTATION orientation, S32 doc_size, S32 doc_pos, S32 page_size, void(*change_callback)(S32 new_pos, LLScrollbar *self, void *userdata), void *callback_user_data=NULL, S32 step_size=1)
virtual ~LLScrollbar ()
virtual void setValue (const LLSD &value)
virtual BOOL handleKeyHere (KEY key, MASK mask)
virtual BOOL handleMouseDown (S32 x, S32 y, MASK mask)
virtual BOOL handleMouseUp (S32 x, S32 y, MASK mask)
virtual BOOL handleHover (S32 x, S32 y, 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 void reshape (S32 width, S32 height, BOOL called_from_parent=TRUE)
virtual void draw ()
void setDocSize (S32 size)
S32 getDocSize () const
void setDocPos (S32 pos)
S32 getDocPos () const
BOOL isAtBeginning ()
BOOL isAtEnd ()
void setDocParams (S32 size, S32 pos)
void setPageSize (S32 page_size)
S32 getPageSize () const
S32 getDocPosMax () const
void pageUp (S32 overlap)
void pageDown (S32 overlap)
void setTrackColor (const LLColor4 &color)
void setThumbColor (const LLColor4 &color)
void setHighlightColor (const LLColor4 &color)
void setShadowColor (const LLColor4 &color)
void setOnScrollEndCallback (void(*callback)(void *), void *userdata)

Static Public Member Functions

static void onLineUpBtnPressed (void *userdata)
static void onLineDownBtnPressed (void *userdata)

Private Member Functions

void updateThumbRect ()
void changeLine (S32 delta, BOOL update_thumb)

Private Attributes

void(* mChangeCallback )(S32 new_pos, LLScrollbar *self, void *userdata)
void * mCallbackUserData
const ORIENTATION mOrientation
S32 mDocSize
S32 mDocPos
S32 mPageSize
S32 mStepSize
BOOL mDocChanged
LLRect mThumbRect
S32 mDragStartX
S32 mDragStartY
F32 mHoverGlowStrength
F32 mCurGlowStrength
LLRect mOrigRect
S32 mLastDelta
LLColor4 mTrackColor
LLColor4 mThumbColor
LLColor4 mFocusColor
LLColor4 mHighlightColor
LLColor4 mShadowColor
void(* mOnScrollEndCallback )(void *)
void * mOnScrollEndData


Detailed Description

Definition at line 48 of file llscrollbar.h.


Member Enumeration Documentation

Enumerator:
HORIZONTAL 
VERTICAL 

Definition at line 52 of file llscrollbar.h.


Constructor & Destructor Documentation

LLScrollbar::LLScrollbar ( const LLString name,
LLRect  rect,
LLScrollbar::ORIENTATION  orientation,
S32  doc_size,
S32  doc_pos,
S32  page_size,
void(*)(S32 new_pos, LLScrollbar *self, void *userdata)  change_callback,
void *  callback_user_data = NULL,
S32  step_size = 1 
)

LLScrollbar::~LLScrollbar (  )  [virtual]

Definition at line 147 of file llscrollbar.cpp.


Member Function Documentation

void LLScrollbar::setValue ( const LLSD value  )  [virtual]

Reimplemented from LLView.

Definition at line 560 of file llscrollbar.cpp.

References LLSD::asInteger(), S32, and setDocPos().

Here is the call graph for this function:

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

Reimplemented from LLView.

Definition at line 566 of file llscrollbar.cpp.

References changeLine(), FALSE, getDocPosMax(), KEY_DOWN, KEY_END, KEY_HOME, KEY_PAGE_DOWN, KEY_PAGE_UP, KEY_UP, mDocPos, mStepSize, pageDown(), pageUp(), and TRUE.

Here is the call graph for this function:

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

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

Reimplemented from LLView.

Definition at line 443 of file llscrollbar.cpp.

References FALSE, gFocusMgr, LLView::handleMouseUp(), LLView::hasMouseCapture(), NULL, LLFocusMgr::setMouseCapture(), and TRUE.

Here is the call graph for this function:

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

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

Reimplemented from LLView.

Definition at line 415 of file llscrollbar.cpp.

References changeLine(), mStepSize, and TRUE.

Referenced by LLTextEditor::handleScrollWheel(), and LLScrollListCtrl::handleScrollWheel().

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL LLScrollbar::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 421 of file llscrollbar.cpp.

References FALSE.

void LLScrollbar::reshape ( S32  width,
S32  height,
BOOL  called_from_parent = TRUE 
) [virtual]

Reimplemented from LLView.

Definition at line 460 of file llscrollbar.cpp.

References LLView::reshape(), and updateThumbRect().

Referenced by LLScrollListCtrl::updateLayout(), and LLScrollableContainerView::updateScroll().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLScrollbar::draw ( void   )  [virtual]

void LLScrollbar::setDocSize ( S32  size  ) 

S32 LLScrollbar::getDocSize (  )  const [inline]

Definition at line 80 of file llscrollbar.h.

References mDocSize.

Referenced by LLScrollListCtrl::setEnabled(), LLTextEditor::setHideScrollbarForShortDocs(), and LLTextEditor::updateLineStartList().

Here is the caller graph for this function:

void LLScrollbar::setDocPos ( S32  pos  ) 

S32 LLScrollbar::getDocPos (  )  const [inline]

BOOL LLScrollbar::isAtBeginning (  ) 

Definition at line 196 of file llscrollbar.cpp.

References mDocPos.

Referenced by LLTextEditor::isScrolledToTop().

Here is the caller graph for this function:

BOOL LLScrollbar::isAtEnd (  ) 

Definition at line 201 of file llscrollbar.cpp.

References getDocPosMax(), and mDocPos.

Referenced by LLTextEditor::isScrolledToBottom().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLScrollbar::setDocParams ( S32  size,
S32  pos 
)

Definition at line 152 of file llscrollbar.cpp.

References getDocPosMax(), llclamp(), mDocChanged, mDocPos, mDocSize, TRUE, and updateThumbRect().

Referenced by LLScrollListCtrl::clearRows().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLScrollbar::setPageSize ( S32  page_size  ) 

S32 LLScrollbar::getPageSize (  )  const [inline]

S32 LLScrollbar::getDocPosMax (  )  const [inline]

void LLScrollbar::pageUp ( S32  overlap  ) 

Definition at line 604 of file llscrollbar.cpp.

References changeLine(), mDocSize, mPageSize, and TRUE.

Referenced by handleKeyHere(), handleMouseDown(), and LLScrollableContainerView::pageUp().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLScrollbar::pageDown ( S32  overlap  ) 

Definition at line 612 of file llscrollbar.cpp.

References changeLine(), mDocSize, mPageSize, and TRUE.

Referenced by handleKeyHere(), handleMouseDown(), and LLScrollableContainerView::pageDown().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLScrollbar::onLineUpBtnPressed ( void *  userdata  )  [static]

Definition at line 621 of file llscrollbar.cpp.

References TRUE.

Referenced by LLScrollbar().

Here is the caller graph for this function:

void LLScrollbar::onLineDownBtnPressed ( void *  userdata  )  [static]

Definition at line 629 of file llscrollbar.cpp.

References TRUE.

Referenced by LLScrollbar().

Here is the caller graph for this function:

void LLScrollbar::setTrackColor ( const LLColor4 color  )  [inline]

Definition at line 106 of file llscrollbar.h.

References mTrackColor.

Referenced by LLTextEditor::setTrackColor().

Here is the caller graph for this function:

void LLScrollbar::setThumbColor ( const LLColor4 color  )  [inline]

Definition at line 107 of file llscrollbar.h.

References mThumbColor.

Referenced by LLTextEditor::setThumbColor().

Here is the caller graph for this function:

void LLScrollbar::setHighlightColor ( const LLColor4 color  )  [inline]

Definition at line 108 of file llscrollbar.h.

References mHighlightColor.

Referenced by LLTextEditor::setHighlightColor().

Here is the caller graph for this function:

void LLScrollbar::setShadowColor ( const LLColor4 color  )  [inline]

Definition at line 109 of file llscrollbar.h.

References mShadowColor.

Referenced by LLTextEditor::setShadowColor().

Here is the caller graph for this function:

void LLScrollbar::setOnScrollEndCallback ( void(*)(void *)  callback,
void *  userdata 
) [inline]

Definition at line 111 of file llscrollbar.h.

References mOnScrollEndCallback, and mOnScrollEndData.

Referenced by LLTextEditor::LLTextEditor(), and LLTextEditor::setOnScrollEndCallback().

Here is the caller graph for this function:

void LLScrollbar::updateThumbRect (  )  [private]

void LLScrollbar::changeLine ( S32  delta,
BOOL  update_thumb 
) [private]

Definition at line 541 of file llscrollbar.cpp.

References getDocPosMax(), llclamp(), mCallbackUserData, mChangeCallback, mDocPos, S32, and updateThumbRect().

Referenced by handleHover(), handleKeyHere(), handleScrollWheel(), pageDown(), and pageUp().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

void(* LLScrollbar::mChangeCallback)(S32 new_pos, LLScrollbar *self, void *userdata) [private]

Referenced by changeLine().

Reimplemented from LLUICtrl.

Definition at line 118 of file llscrollbar.h.

Referenced by changeLine().

Definition at line 120 of file llscrollbar.h.

Referenced by draw(), handleHover(), handleMouseDown(), LLScrollbar(), and updateThumbRect().

Definition at line 123 of file llscrollbar.h.

Referenced by getDocPosMax(), getPageSize(), pageDown(), pageUp(), setPageSize(), and updateThumbRect().

Definition at line 124 of file llscrollbar.h.

Referenced by handleKeyHere(), and handleScrollWheel().

Definition at line 125 of file llscrollbar.h.

Referenced by handleHover(), setDocParams(), setDocPos(), setDocSize(), and setPageSize().

Definition at line 127 of file llscrollbar.h.

Referenced by draw(), handleHover(), handleMouseDown(), and updateThumbRect().

Definition at line 128 of file llscrollbar.h.

Referenced by handleHover(), and handleMouseDown().

Definition at line 129 of file llscrollbar.h.

Referenced by handleHover(), and handleMouseDown().

Definition at line 130 of file llscrollbar.h.

Referenced by draw().

Definition at line 131 of file llscrollbar.h.

Referenced by draw().

Definition at line 133 of file llscrollbar.h.

Referenced by handleHover(), and handleMouseDown().

Definition at line 134 of file llscrollbar.h.

Referenced by handleHover(), and handleMouseDown().

Definition at line 136 of file llscrollbar.h.

Referenced by draw(), and setTrackColor().

Definition at line 137 of file llscrollbar.h.

Referenced by draw(), and setThumbColor().

Definition at line 138 of file llscrollbar.h.

Definition at line 139 of file llscrollbar.h.

Referenced by setHighlightColor().

Definition at line 140 of file llscrollbar.h.

Referenced by setShadowColor().

void(* LLScrollbar::mOnScrollEndCallback)(void *) [private]

Definition at line 143 of file llscrollbar.h.

Referenced by draw(), setOnScrollEndCallback(), and updateThumbRect().


The documentation for this class was generated from the following files:

Generated on Fri May 16 09:02:36 2008 for SecondLife by  doxygen 1.5.5