LLSpinCtrl Class Reference

#include <llspinctrl.h>

Inheritance diagram for LLSpinCtrl:

Inheritance graph
[legend]
Collaboration diagram for LLSpinCtrl:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 LLSpinCtrl (const LLString &name, const LLRect &rect, const LLString &label, const LLFontGL *font, void(*commit_callback)(LLUICtrl *, void *), void *callback_userdata, F32 initial_value, F32 min_value, F32 max_value, F32 increment, const LLString &control_name=LLString(), S32 label_width=SPINCTRL_DEFAULT_LABEL_WIDTH)
virtual ~LLSpinCtrl ()
virtual LLXMLNodePtr getXML (bool save_children=true) const
virtual void forceSetValue (const LLSD &value)
virtual void setValue (const LLSD &value)
virtual LLSD getValue () const
F32 get () const
void set (F32 value)
virtual void setMinValue (LLSD min_value)
virtual void setMaxValue (LLSD max_value)
BOOL isMouseHeldDown () const
virtual void setEnabled (BOOL b)
virtual void setFocus (BOOL b)
virtual void clear ()
virtual BOOL isDirty () const
virtual void setPrecision (S32 precision)
virtual void setMinValue (F32 min)
virtual void setMaxValue (F32 max)
virtual void setIncrement (F32 inc)
virtual F32 getMinValue ()
virtual F32 getMaxValue ()
virtual F32 getIncrement ()
void setLabel (const LLStringExplicit &label)
void setLabelColor (const LLColor4 &c)
void setDisabledLabelColor (const LLColor4 &c)
virtual void onTabInto ()
virtual void setTentative (BOOL b)
virtual void onCommit ()
void forceEditorCommit ()
virtual BOOL handleScrollWheel (S32 x, S32 y, S32 clicks)
virtual BOOL handleKeyHere (KEY key, MASK mask)
virtual void draw ()

Static Public Member Functions

static LLViewfromXML (LLXMLNodePtr node, LLView *parent, class LLUICtrlFactory *factory)
static void onEditorCommit (LLUICtrl *caller, void *userdata)
static void onEditorGainFocus (LLFocusableElement *caller, void *userdata)
static void onEditorChangeFocus (LLUICtrl *caller, S32 direction, void *userdata)
static void onUpBtn (void *userdata)
static void onDownBtn (void *userdata)

Private Member Functions

void updateEditor ()
void reportInvalidData ()

Private Attributes

F32 mValue
F32 mInitialValue
F32 mMaxValue
F32 mMinValue
F32 mIncrement
S32 mPrecision
class LLTextBoxmLabelBox
class LLLineEditormEditor
LLColor4 mTextEnabledColor
LLColor4 mTextDisabledColor
class LLButtonmUpBtn
class LLButtonmDownBtn
BOOL mbHasBeenSet


Detailed Description

Definition at line 51 of file llspinctrl.h.


Constructor & Destructor Documentation

LLSpinCtrl::LLSpinCtrl ( const LLString name,
const LLRect rect,
const LLString label,
const LLFontGL font,
void(*)(LLUICtrl *, void *)  commit_callback,
void *  callback_userdata,
F32  initial_value,
F32  min_value,
F32  max_value,
F32  increment,
const LLString control_name = LLString(),
S32  label_width = SPINCTRL_DEFAULT_LABEL_WIDTH 
)

virtual LLSpinCtrl::~LLSpinCtrl (  )  [inline, virtual]

Definition at line 64 of file llspinctrl.h.


Member Function Documentation

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

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

Reimplemented from LLUICtrl.

Definition at line 495 of file llspinctrl.cpp.

References LLView::createRect(), LLRectBase< Type >::getWidth(), LLUICtrl::initFromXML(), llmin(), LLSpinCtrl(), NULL, S32, LLView::selectFont(), and setPrecision().

Here is the call graph for this function:

void LLSpinCtrl::forceSetValue ( const LLSD value  )  [virtual]

Definition at line 253 of file llspinctrl.cpp.

References LLSD::asReal(), mbHasBeenSet, mValue, TRUE, and updateEditor().

Referenced by LLFloaterSnapshot::Impl::resetSnapshotSizeOnUI().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Reimplemented from LLView.

Definition at line 237 of file llspinctrl.cpp.

References LLSD::asReal(), LLUICtrl::hasFocus(), mbHasBeenSet, mEditor, mValue, TRUE, and updateEditor().

Referenced by clear(), LLPanelLandMedia::refresh(), set(), LLFloaterDayCycle::syncMenu(), and LLFloaterSettingsDebug::updateControl().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Reimplemented from LLUICtrl.

Definition at line 71 of file llspinctrl.h.

References mValue.

Referenced by get(), LLFloaterDayCycle::onTimeRateChanged(), and updateEditor().

Here is the caller graph for this function:

F32 LLSpinCtrl::get (  )  const [inline]

void LLSpinCtrl::set ( F32  value  )  [inline]

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

Reimplemented from LLUICtrl.

Definition at line 75 of file llspinctrl.h.

References LLSD::asReal().

Referenced by LLPanelObject::getState(), and LLFloaterSettingsDebug::updateControl().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Reimplemented from LLUICtrl.

Definition at line 76 of file llspinctrl.h.

References LLSD::asReal().

Referenced by LLPanelObject::getState(), LLPanelGroupVoting::impl::setEnableCreateProposal(), and LLFloaterSettingsDebug::updateControl().

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL LLSpinCtrl::isMouseHeldDown (  )  const

Definition at line 363 of file llspinctrl.cpp.

References LLView::hasMouseCapture(), mDownBtn, and mUpBtn.

Here is the call graph for this function:

void LLSpinCtrl::setEnabled ( BOOL  b  )  [virtual]

void LLSpinCtrl::setFocus ( BOOL  b  )  [virtual]

Reimplemented from LLUICtrl.

Definition at line 343 of file llspinctrl.cpp.

References mEditor, LLLineEditor::setFocus(), and LLUICtrl::setFocus().

Here is the call graph for this function:

void LLSpinCtrl::clear ( void   )  [virtual]

Reimplemented from LLUICtrl.

Definition at line 265 of file llspinctrl.cpp.

References LLLineEditor::clear(), FALSE, mbHasBeenSet, mEditor, mMinValue, and setValue().

Referenced by LLPanelObject::getState().

Here is the call graph for this function:

Here is the caller graph for this function:

virtual BOOL LLSpinCtrl::isDirty (  )  const [inline, virtual]

Reimplemented from LLUICtrl.

Definition at line 83 of file llspinctrl.h.

References mInitialValue, and mValue.

void LLSpinCtrl::setPrecision ( S32  precision  )  [virtual]

Definition at line 378 of file llspinctrl.cpp.

References llendl, llerrs, mPrecision, and updateEditor().

Referenced by fromXML(), LLFloaterEditUI::LLFloaterEditUI(), LLPanelGroupGeneral::postBuild(), LLPanelFace::postBuild(), and LLFloaterSettingsDebug::updateControl().

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void LLSpinCtrl::setMinValue ( F32  min  )  [inline, virtual]

Definition at line 86 of file llspinctrl.h.

References mMinValue.

virtual void LLSpinCtrl::setMaxValue ( F32  max  )  [inline, virtual]

Definition at line 87 of file llspinctrl.h.

References mMaxValue.

virtual void LLSpinCtrl::setIncrement ( F32  inc  )  [inline, virtual]

Definition at line 88 of file llspinctrl.h.

References mIncrement.

Referenced by LLPanelObject::getState(), and LLFloaterSettingsDebug::updateControl().

Here is the caller graph for this function:

virtual F32 LLSpinCtrl::getMinValue (  )  [inline, virtual]

Definition at line 89 of file llspinctrl.h.

References mMinValue.

virtual F32 LLSpinCtrl::getMaxValue (  )  [inline, virtual]

Definition at line 90 of file llspinctrl.h.

References mMaxValue.

virtual F32 LLSpinCtrl::getIncrement (  )  [inline, virtual]

Definition at line 91 of file llspinctrl.h.

References mIncrement.

void LLSpinCtrl::setLabel ( const LLStringExplicit label  ) 

Definition at line 390 of file llspinctrl.cpp.

References LLView::getName(), llendl, llwarns, mLabelBox, and LLTextBox::setText().

Referenced by LLFloaterSettingsDebug::updateControl().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLSpinCtrl::setLabelColor ( const LLColor4 c  )  [inline]

Definition at line 94 of file llspinctrl.h.

References mTextEnabledColor.

Referenced by LLPanelObject::draw().

Here is the caller graph for this function:

void LLSpinCtrl::setDisabledLabelColor ( const LLColor4 c  )  [inline]

Definition at line 95 of file llspinctrl.h.

References mTextDisabledColor.

void LLSpinCtrl::onTabInto (  )  [virtual]

Reimplemented from LLUICtrl.

Definition at line 402 of file llspinctrl.cpp.

References mEditor, and LLLineEditor::onTabInto().

Here is the call graph for this function:

void LLSpinCtrl::setTentative ( BOOL  b  )  [virtual]

Reimplemented from LLUICtrl.

Definition at line 356 of file llspinctrl.cpp.

References mEditor, and LLUICtrl::setTentative().

Referenced by onCommit().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLSpinCtrl::onCommit (  )  [virtual]

Reimplemented from LLUICtrl.

Definition at line 370 of file llspinctrl.cpp.

References FALSE, mValue, LLUICtrl::onCommit(), LLView::setControlValue(), and setTentative().

Here is the call graph for this function:

void LLSpinCtrl::forceEditorCommit (  ) 

Definition at line 337 of file llspinctrl.cpp.

References mEditor, and onEditorCommit().

Here is the call graph for this function:

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

Reimplemented from LLView.

Definition at line 423 of file llspinctrl.cpp.

References onDownBtn(), onUpBtn(), and TRUE.

Here is the call graph for this function:

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

Reimplemented from LLView.

Definition at line 441 of file llspinctrl.cpp.

References FALSE, LLUICtrl::hasFocus(), KEY_DOWN, KEY_ESCAPE, KEY_UP, mEditor, onDownBtn(), onUpBtn(), LLLineEditor::setFocus(), TRUE, and updateEditor().

Here is the call graph for this function:

void LLSpinCtrl::draw ( void   )  [virtual]

Reimplemented from LLView.

Definition at line 413 of file llspinctrl.cpp.

References LLView::draw(), LLView::getEnabled(), mLabelBox, mTextDisabledColor, mTextEnabledColor, and LLTextBox::setColor().

Here is the call graph for this function:

void LLSpinCtrl::onEditorCommit ( LLUICtrl caller,
void *  userdata 
) [static]

Definition at line 291 of file llspinctrl.cpp.

References FALSE, llassert, mMinValue, LLLineEditor::postvalidateFloat(), TRUE, and LLLocale::USER_LOCALE.

Referenced by forceEditorCommit(), and LLSpinCtrl().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLSpinCtrl::onEditorGainFocus ( LLFocusableElement caller,
void *  userdata 
) [static]

Definition at line 229 of file llspinctrl.cpp.

References llassert.

Referenced by LLSpinCtrl().

Here is the caller graph for this function:

static void LLSpinCtrl::onEditorChangeFocus ( LLUICtrl caller,
S32  direction,
void *  userdata 
) [static]

void LLSpinCtrl::onUpBtn ( void *  userdata  )  [static]

Definition at line 163 of file llspinctrl.cpp.

References clamp_precision(), and llmin().

Referenced by handleKeyHere(), handleScrollWheel(), and LLSpinCtrl().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLSpinCtrl::onDownBtn ( void *  userdata  )  [static]

Definition at line 196 of file llspinctrl.cpp.

References clamp_precision(), and llmax().

Referenced by handleKeyHere(), handleScrollWheel(), and LLSpinCtrl().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLSpinCtrl::updateEditor (  )  [private]

Definition at line 274 of file llspinctrl.cpp.

References clamp_precision(), indra::ipc::russ::format(), getValue(), llformat(), mEditor, mPrecision, LLLineEditor::setText(), and LLLocale::USER_LOCALE.

Referenced by forceSetValue(), handleKeyHere(), LLSpinCtrl(), setPrecision(), and setValue().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLSpinCtrl::reportInvalidData (  )  [private]

Definition at line 408 of file llspinctrl.cpp.

References make_ui_sound().

Here is the call graph for this function:


Member Data Documentation

Definition at line 120 of file llspinctrl.h.

Referenced by forceSetValue(), getValue(), isDirty(), onCommit(), and setValue().

Definition at line 121 of file llspinctrl.h.

Referenced by getXML(), isDirty(), and set().

Definition at line 122 of file llspinctrl.h.

Referenced by getMaxValue(), getXML(), and setMaxValue().

Definition at line 123 of file llspinctrl.h.

Referenced by clear(), getMinValue(), getXML(), onEditorCommit(), and setMinValue().

Definition at line 124 of file llspinctrl.h.

Referenced by getIncrement(), getXML(), and setIncrement().

Definition at line 126 of file llspinctrl.h.

Referenced by getXML(), setPrecision(), and updateEditor().

class LLTextBox* LLSpinCtrl::mLabelBox [private]

Definition at line 127 of file llspinctrl.h.

Referenced by draw(), getXML(), LLSpinCtrl(), and setLabel().

Definition at line 130 of file llspinctrl.h.

Referenced by draw(), getXML(), and setLabelColor().

Definition at line 131 of file llspinctrl.h.

Referenced by draw(), getXML(), and setDisabledLabelColor().

class LLButton* LLSpinCtrl::mUpBtn [private]

Definition at line 133 of file llspinctrl.h.

Referenced by isMouseHeldDown(), and LLSpinCtrl().

class LLButton* LLSpinCtrl::mDownBtn [private]

Definition at line 134 of file llspinctrl.h.

Referenced by isMouseHeldDown(), and LLSpinCtrl().

Definition at line 136 of file llspinctrl.h.

Referenced by clear(), forceSetValue(), and setValue().


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

Generated on Fri May 16 09:06:43 2008 for SecondLife by  doxygen 1.5.5