LLMultiSlider Class Reference

#include <llmultislider.h>

Inheritance diagram for LLMultiSlider:

Inheritance graph
[legend]
Collaboration diagram for LLMultiSlider:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 LLMultiSlider (const LLString &name, const LLRect &rect, void(*on_commit_callback)(LLUICtrl *ctrl, void *userdata), void *callback_userdata, F32 initial_value, F32 min_value, F32 max_value, F32 increment, S32 max_sliders, BOOL allow_overlap, BOOL draw_track, BOOL use_triangle, const LLString &control_name=LLString::null)
virtual LLXMLNodePtr getXML (bool save_children=true) const
void setSliderValue (const LLString &name, F32 value, BOOL from_event=FALSE)
F32 getSliderValue (const LLString &name) const
const LLStringgetCurSlider () const
F32 getCurSliderValue () const
void setCurSlider (const LLString &name)
void setCurSliderValue (F32 val, BOOL from_event=false)
virtual void setValue (const LLSD &value)
virtual LLSD getValue () const
virtual void setMinValue (LLSD min_value)
virtual void setMaxValue (LLSD max_value)
F32 getInitialValue () const
F32 getMinValue () const
F32 getMaxValue () const
F32 getIncrement () const
void setMinValue (F32 min_value)
void setMaxValue (F32 max_value)
void setIncrement (F32 increment)
void setMouseDownCallback (void(*cb)(LLUICtrl *ctrl, void *userdata))
void setMouseUpCallback (void(*cb)(LLUICtrl *ctrl, void *userdata))
bool findUnusedValue (F32 &initVal)
const LLStringaddSlider ()
const LLStringaddSlider (F32 val)
void deleteSlider (const LLString &name)
void deleteCurSlider ()
void clear ()
virtual BOOL handleHover (S32 x, S32 y, MASK mask)
virtual BOOL handleMouseUp (S32 x, S32 y, MASK mask)
virtual BOOL handleMouseDown (S32 x, S32 y, MASK mask)
virtual BOOL handleKeyHere (KEY key, MASK mask)
virtual void draw ()

Static Public Member Functions

static LLViewfromXML (LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)

Protected Attributes

LLSD mValue
F32 mInitialValue
F32 mMinValue
F32 mMaxValue
F32 mIncrement
LLString mCurSlider
S32 mMaxNumSliders
BOOL mAllowOverlap
BOOL mDrawTrack
BOOL mUseTriangle
S32 mMouseOffset
 hacked in toggle to use a triangle
LLRect mDragStartThumbRect
std::map< LLString, LLRectmThumbRects
LLColor4 mTrackColor
LLColor4 mThumbOutlineColor
LLColor4 mThumbCenterColor
LLColor4 mThumbCenterSelectedColor
LLColor4 mDisabledThumbColor
LLColor4 mTriangleColor
void(* mMouseDownCallback )(LLUICtrl *ctrl, void *userdata)
void(* mMouseUpCallback )(LLUICtrl *ctrl, void *userdata)

Static Protected Attributes

static S32 mNameCounter = 0


Detailed Description

Definition at line 40 of file llmultislider.h.


Constructor & Destructor Documentation

LLMultiSlider::LLMultiSlider ( const LLString name,
const LLRect rect,
void(*)(LLUICtrl *ctrl, void *userdata)  on_commit_callback,
void *  callback_userdata,
F32  initial_value,
F32  min_value,
F32  max_value,
F32  increment,
S32  max_sliders,
BOOL  allow_overlap,
BOOL  draw_track,
BOOL  use_triangle,
const LLString control_name = LLString::null 
)

Definition at line 56 of file llmultislider.cpp.

References LLSD::emptyMap(), getValue(), mCurSlider, mValue, NULL, LLStringBase< char >::null, LLView::setControlName(), and setValue().

Referenced by fromXML().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Function Documentation

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

Reimplemented from LLUICtrl.

Definition at line 569 of file llmultislider.cpp.

References getIncrement(), getInitialValue(), getMaxValue(), getMinValue(), LLUICtrl::getXML(), and TRUE.

Here is the call graph for this function:

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

Reimplemented from LLUICtrl.

Definition at line 583 of file llmultislider.cpp.

References LLView::createRect(), FALSE, LLUICtrl::initFromXML(), LLMultiSlider(), NULL, S32, and TRUE.

Here is the call graph for this function:

void LLMultiSlider::setSliderValue ( const LLString name,
F32  value,
BOOL  from_event = FALSE 
)

F32 LLMultiSlider::getSliderValue ( const LLString name  )  const

Definition at line 177 of file llmultislider.cpp.

References LLSD::asReal(), and mValue.

Referenced by getCurSliderValue().

Here is the call graph for this function:

Here is the caller graph for this function:

const LLString& LLMultiSlider::getCurSlider (  )  const [inline]

Definition at line 64 of file llmultislider.h.

References mCurSlider.

Referenced by LLMultiSliderCtrl::deleteCurSlider(), LLMultiSliderCtrl::getCurSlider(), and LLMultiSliderCtrl::setCurSliderValue().

Here is the caller graph for this function:

F32 LLMultiSlider::getCurSliderValue (  )  const [inline]

void LLMultiSlider::setCurSlider ( const LLString name  ) 

Definition at line 182 of file llmultislider.cpp.

References LLSD::has(), mCurSlider, and mValue.

Referenced by LLMultiSliderCtrl::setCurSlider().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLMultiSlider::setCurSliderValue ( F32  val,
BOOL  from_event = false 
) [inline]

Definition at line 67 of file llmultislider.h.

References mCurSlider, and setSliderValue().

Referenced by handleHover(), handleKeyHere(), and handleMouseDown().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Reimplemented from LLView.

Definition at line 162 of file llmultislider.cpp.

References LLSD::beginMap(), LLSD::endMap(), LLSD::isMap(), mCurSlider, setSliderValue(), and TRUE.

Referenced by LLMultiSlider(), and LLMultiSliderCtrl::setValue().

Here is the call graph for this function:

Here is the caller graph for this function:

virtual LLSD LLMultiSlider::getValue (  )  const [inline, virtual]

Reimplemented from LLUICtrl.

Definition at line 70 of file llmultislider.h.

References mValue.

Referenced by LLMultiSliderCtrl::getValue(), and LLMultiSlider().

Here is the caller graph for this function:

virtual void LLMultiSlider::setMinValue ( LLSD  min_value  )  [inline, virtual]

Reimplemented from LLUICtrl.

Definition at line 72 of file llmultislider.h.

References LLSD::asReal().

Referenced by LLMultiSliderCtrl::setMinValue().

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void LLMultiSlider::setMaxValue ( LLSD  max_value  )  [inline, virtual]

Reimplemented from LLUICtrl.

Definition at line 73 of file llmultislider.h.

References LLSD::asReal().

Referenced by LLMultiSliderCtrl::setMaxValue().

Here is the call graph for this function:

Here is the caller graph for this function:

F32 LLMultiSlider::getInitialValue (  )  const [inline]

Definition at line 75 of file llmultislider.h.

References mInitialValue.

Referenced by LLMultiSliderCtrl::getXML(), and getXML().

Here is the caller graph for this function:

F32 LLMultiSlider::getMinValue (  )  const [inline]

Definition at line 76 of file llmultislider.h.

References mMinValue.

Referenced by LLMultiSliderCtrl::getMinValue(), LLMultiSliderCtrl::getXML(), and getXML().

Here is the caller graph for this function:

F32 LLMultiSlider::getMaxValue (  )  const [inline]

Definition at line 77 of file llmultislider.h.

References mMaxValue.

Referenced by LLMultiSliderCtrl::getMaxValue(), LLMultiSliderCtrl::getXML(), and getXML().

Here is the caller graph for this function:

F32 LLMultiSlider::getIncrement (  )  const [inline]

Definition at line 78 of file llmultislider.h.

References mIncrement.

Referenced by LLMultiSliderCtrl::getXML(), getXML(), and handleKeyHere().

Here is the caller graph for this function:

void LLMultiSlider::setMinValue ( F32  min_value  )  [inline]

Definition at line 79 of file llmultislider.h.

References mMinValue.

void LLMultiSlider::setMaxValue ( F32  max_value  )  [inline]

Definition at line 80 of file llmultislider.h.

References mMaxValue.

void LLMultiSlider::setIncrement ( F32  increment  )  [inline]

Definition at line 81 of file llmultislider.h.

References mIncrement.

Referenced by LLMultiSliderCtrl::setIncrement().

Here is the caller graph for this function:

void LLMultiSlider::setMouseDownCallback ( void(*)(LLUICtrl *ctrl, void *userdata)  cb  )  [inline]

Definition at line 82 of file llmultislider.h.

References mMouseDownCallback.

Referenced by LLMultiSliderCtrl::setSliderMouseDownCallback().

Here is the caller graph for this function:

void LLMultiSlider::setMouseUpCallback ( void(*)(LLUICtrl *ctrl, void *userdata)  cb  )  [inline]

Definition at line 83 of file llmultislider.h.

References mMouseUpCallback.

Referenced by LLMultiSliderCtrl::setSliderMouseUpCallback().

Here is the caller graph for this function:

bool LLMultiSlider::findUnusedValue ( F32 initVal  ) 

Definition at line 225 of file llmultislider.cpp.

References LLSD::beginMap(), LLSD::endMap(), FLOAT_THRESHOLD, llendl, llwarns, mIncrement, mInitialValue, mMaxValue, mMinValue, and mValue.

Referenced by addSlider().

Here is the call graph for this function:

Here is the caller graph for this function:

const LLString & LLMultiSlider::addSlider (  ) 

Definition at line 189 of file llmultislider.cpp.

References mInitialValue.

Referenced by LLMultiSliderCtrl::addSlider().

Here is the caller graph for this function:

const LLString & LLMultiSlider::addSlider ( F32  val  ) 

void LLMultiSlider::deleteSlider ( const LLString name  ) 

Definition at line 272 of file llmultislider.cpp.

References LLSD::erase(), mCurSlider, mThumbRects, mValue, and LLSD::size().

Referenced by deleteCurSlider(), and LLMultiSliderCtrl::deleteSlider().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLMultiSlider::deleteCurSlider (  )  [inline]

Definition at line 89 of file llmultislider.h.

References deleteSlider(), and mCurSlider.

Referenced by clear().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLMultiSlider::clear ( void   )  [virtual]

Reimplemented from LLUICtrl.

Definition at line 291 of file llmultislider.cpp.

References LLUICtrl::clear(), deleteCurSlider(), and mThumbRects.

Referenced by LLMultiSliderCtrl::clear().

Here is the call graph for this function:

Here is the caller graph for this function:

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

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

Reimplemented from LLView.

Definition at line 325 of file llmultislider.cpp.

References FALSE, LLFocusMgr::getMouseCapture(), gFocusMgr, make_ui_sound(), LLUICtrl::mCallbackUserData, mMouseUpCallback, NULL, LLFocusMgr::setMouseCapture(), and TRUE.

Here is the call graph for this function:

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

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

Reimplemented from LLView.

Definition at line 398 of file llmultislider.cpp.

References FALSE, getCurSliderValue(), getIncrement(), KEY_DOWN, KEY_LEFT, KEY_RIGHT, KEY_UP, LLUICtrl::onCommit(), setCurSliderValue(), and TRUE.

Here is the call graph for this function:

void LLMultiSlider::draw ( void   )  [virtual]


Member Data Documentation

Definition at line 100 of file llmultislider.h.

Referenced by addSlider(), findUnusedValue(), getInitialValue(), and handleMouseDown().

Definition at line 103 of file llmultislider.h.

Referenced by findUnusedValue(), getIncrement(), setIncrement(), and setSliderValue().

S32 LLMultiSlider::mNameCounter = 0 [static, protected]

Definition at line 105 of file llmultislider.h.

Referenced by addSlider().

Definition at line 107 of file llmultislider.h.

Referenced by addSlider().

Definition at line 108 of file llmultislider.h.

Referenced by setSliderValue().

Definition at line 109 of file llmultislider.h.

Referenced by draw().

Definition at line 110 of file llmultislider.h.

Referenced by draw().

hacked in toggle to use a triangle

Definition at line 112 of file llmultislider.h.

Referenced by handleHover(), and handleMouseDown().

Definition at line 113 of file llmultislider.h.

Referenced by draw(), and handleMouseDown().

std::map<LLString, LLRect> LLMultiSlider::mThumbRects [protected]

Definition at line 115 of file llmultislider.h.

Referenced by addSlider(), clear(), deleteSlider(), draw(), handleMouseDown(), and setSliderValue().

Definition at line 116 of file llmultislider.h.

Referenced by draw().

Definition at line 117 of file llmultislider.h.

Definition at line 118 of file llmultislider.h.

Referenced by draw().

Definition at line 119 of file llmultislider.h.

Referenced by draw().

Definition at line 120 of file llmultislider.h.

Definition at line 121 of file llmultislider.h.

Referenced by draw().

void(* LLMultiSlider::mMouseDownCallback)(LLUICtrl *ctrl, void *userdata) [protected]

void(* LLMultiSlider::mMouseUpCallback)(LLUICtrl *ctrl, void *userdata) [protected]


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

Generated on Fri May 16 08:54:15 2008 for SecondLife by  doxygen 1.5.5