LLCheckBoxCtrl Class Reference

#include <llcheckboxctrl.h>

Inheritance diagram for LLCheckBoxCtrl:

Inheritance graph
[legend]
Collaboration diagram for LLCheckBoxCtrl:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LLCheckBoxCtrl (const LLString &name, const LLRect &rect, const LLString &label, const LLFontGL *font=NULL, void(*commit_callback)(LLUICtrl *, void *)=NULL, void *callback_userdata=NULL, BOOL initial_value=FALSE, BOOL use_radio_style=FALSE, const LLString &control_which=LLString::null)
virtual ~LLCheckBoxCtrl ()
virtual EWidgetType getWidgetType () const
virtual LLString getWidgetTag () const
virtual LLXMLNodePtr getXML (bool save_children=true) const
virtual void setEnabled (BOOL b)
virtual void draw ()
virtual void reshape (S32 width, S32 height, BOOL called_from_parent)
virtual void setValue (const LLSD &value)
virtual LLSD getValue () const
BOOL get ()
void set (BOOL value)
virtual void setTentative (BOOL b)
virtual BOOL getTentative () const
virtual BOOL setLabelArg (const LLString &key, const LLStringExplicit &text)
virtual void clear ()
virtual void onCommit ()
virtual BOOL toggle ()
void setEnabledColor (const LLColor4 &color)
void setDisabledColor (const LLColor4 &color)
void setLabel (const LLStringExplicit &label)
LLString getLabel () const
virtual void setControlName (const LLString &control_name, LLView *context)
virtual LLString getControlName () const
virtual BOOL isDirty () const
virtual void resetDirty ()

Static Public Member Functions

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

Protected Attributes

LLButtonmButton
LLTextBoxmLabel
const LLFontGLmFont
LLColor4 mTextEnabledColor
LLColor4 mTextDisabledColor
BOOL mRadioStyle
BOOL mInitialValue
BOOL mSetValue
BOOL mKeyboardFocusOnClick
LLViewBordermBorder

Detailed Description

Definition at line 64 of file llcheckboxctrl.h.


Constructor & Destructor Documentation

LLCheckBoxCtrl::LLCheckBoxCtrl ( const LLString name,
const LLRect rect,
const LLString label,
const LLFontGL font = NULL,
void(*)(LLUICtrl *, void *)  commit_callback = NULL,
void callback_userdata = NULL,
BOOL  initial_value = FALSE,
BOOL  use_radio_style = FALSE,
const LLString control_which = LLString::null 
)

LLCheckBoxCtrl::~LLCheckBoxCtrl (  )  [virtual]

Definition at line 140 of file llcheckboxctrl.cpp.


Member Function Documentation

void LLCheckBoxCtrl::clear (  )  [virtual]

Reimplemented from LLUICtrl.

Definition at line 187 of file llcheckboxctrl.cpp.

References FALSE, and setValue().

void LLCheckBoxCtrl::draw (  )  [virtual]

Reimplemented from LLView.

Definition at line 217 of file llcheckboxctrl.cpp.

References LLView::draw(), LLView::mEnabled, mLabel, mTextDisabledColor, mTextEnabledColor, and LLTextBox::setColor().

Referenced by LLScrollListCheck::drawToWidth().

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

Definition at line 317 of file llcheckboxctrl.cpp.

References LLSD::asBoolean(), LLView::createRect(), FALSE, LLUICtrlFactory::getAttributeColor(), LLControlGroup::getColor(), getValue(), LLUICtrl::initFromXML(), LLCheckboxCtrl, NULL, LLUI::sColorsGroup, LLView::selectFont(), setDisabledColor(), setEnabledColor(), and setValue().

BOOL LLCheckBoxCtrl::get (  )  [inline]

Definition at line 91 of file llcheckboxctrl.h.

References LLSD::asBoolean(), and getValue().

Referenced by LLPanelGroupGeneral::apply(), LLPanelFaceSetTEFunctor::apply(), LLPanelDebug::apply(), LLPanelDisplay::applyResolution(), LLPanelGroupRolesSubTab::handleActionCheck(), LLFloaterScriptSearch::handleBtnReplace(), LLFloaterScriptSearch::handleBtnReplaceAll(), LLFloaterScriptSearch::handleBtnSearch(), LLFloaterColorPicker::handleMouseDown(), LLFloaterColorPicker::handleMouseUp(), LLFloaterTexturePicker::onApplyImmediateCheck(), LLFloaterSnapshot::Impl::onClickAutoSnap(), LLFloaterSnapshot::Impl::onClickHUDCheck(), LLFloaterSnapshot::Impl::onClickKeepAspectCheck(), LLFloaterSnapshot::Impl::onClickKeepOpenCheck(), LLFloaterChat::onClickToggleShowMute(), LLFloaterSnapshot::Impl::onClickUICheck(), LLPanelLandGeneral::onCommitAny(), LLPanelDirLand::onCommitArea(), LLPanelWeb::onCommitCookies(), LLFloaterSnapshot::Impl::onCommitFreezeFrame(), LLPanelPermissions::onCommitPerm(), LLFloaterProperties::onCommitPermissions(), LLPanelNetwork::onCommitPort(), LLPanelDirLand::onCommitPrice(), LLLiveLSLEditor::onRunningCheckboxClicked(), LLFloaterTexturePicker::onShowFolders(), LLFloaterLandmark::onShowFolders(), LLFloaterColorPicker::onTextEntryChanged(), LLFloaterBuyLandUI::refreshUI(), LLLiveLSLEditor::saveIfNeeded(), LLPanelObject::sendCastShadows(), LLPanelClassified::sendClassifiedInfoUpdate(), LLPanelFace::sendFullbright(), LLPanelObject::sendIsPhantom(), LLPanelObject::sendIsPhysical(), LLPanelObject::sendIsTemporary(), LLPanelPick::sendPickInfoUpdate(), LLPanelPermissions::setAllSaleInfo(), and LLFloaterTools::updatePopup().

LLString LLCheckBoxCtrl::getControlName (  )  const [virtual]

Reimplemented from LLView.

Definition at line 264 of file llcheckboxctrl.cpp.

References LLView::getControlName(), and mButton.

LLString LLCheckBoxCtrl::getLabel (  )  const

Definition at line 251 of file llcheckboxctrl.cpp.

References LLTextBox::getText(), and mLabel.

virtual BOOL LLCheckBoxCtrl::getTentative (  )  const [inline, virtual]

Reimplemented from LLUICtrl.

Definition at line 95 of file llcheckboxctrl.h.

References LLUICtrl::getTentative(), and mButton.

Referenced by LLPanelFaceSetTEFunctor::apply().

LLSD LLCheckBoxCtrl::getValue (  )  const [virtual]

Reimplemented from LLUICtrl.

Definition at line 240 of file llcheckboxctrl.cpp.

References LLButton::getToggleState(), and mButton.

Referenced by fromXML(), get(), LLFloaterEventLog::updateList(), LLFloaterEventLog::updateWindow(), and LLAlertDialog::~LLAlertDialog().

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

Implements LLView.

Definition at line 79 of file llcheckboxctrl.h.

References LL_CHECK_BOX_CTRL_TAG.

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

Implements LLView.

Definition at line 78 of file llcheckboxctrl.h.

References WIDGET_TYPE_CHECKBOX.

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

Reimplemented from LLUICtrl.

Definition at line 299 of file llcheckboxctrl.cpp.

References LLView::getControlName(), LLTextBox::getText(), LLUICtrl::getXML(), mButton, mFont, mInitialValue, mLabel, mRadioStyle, LLFontGL::nameFromFont(), and TRUE.

BOOL LLCheckBoxCtrl::isDirty (  )  const [virtual]

Reimplemented from LLUICtrl.

Definition at line 277 of file llcheckboxctrl.cpp.

References FALSE, LLButton::getToggleState(), mButton, and mSetValue.

Referenced by LLPanelClassified::checkDirty().

void LLCheckBoxCtrl::onButtonPress ( void userdata  )  [static]

Definition at line 147 of file llcheckboxctrl.cpp.

References TRUE.

Referenced by LLScrollListCheck::handleClick().

void LLCheckBoxCtrl::onCommit (  )  [virtual]

Reimplemented from LLUICtrl.

Definition at line 172 of file llcheckboxctrl.cpp.

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

void LLCheckBoxCtrl::resetDirty (  )  [virtual]

Reimplemented from LLUICtrl.

Definition at line 288 of file llcheckboxctrl.cpp.

References LLButton::getToggleState(), mButton, and mSetValue.

Referenced by LLPanelClassified::confirmPublish().

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

Reimplemented from LLView.

Definition at line 192 of file llcheckboxctrl.cpp.

References LLFontGL::getLineHeight(), LLTextBox::getText(), LLFontGL::getWidth(), LLCHECKBOXCTRL_BTN_SIZE, LLCHECKBOXCTRL_HPAD, LLCHECKBOXCTRL_SPACING, LLCHECKBOXCTRL_VPAD, llmax(), llround(), mButton, mFont, mLabel, LLView::reshape(), S32, LLRectBase< Type >::setOriginAndSize(), and LLView::setRect().

Referenced by setLabel(), and setLabelArg().

void LLCheckBoxCtrl::set ( BOOL  value  )  [inline]

Definition at line 92 of file llcheckboxctrl.h.

References setValue().

Referenced by LLPanelGroupRolesSubTab::addActionCB(), LLPanelObject::clearCtrls(), LLLiveLSLEditor::draw(), LLPanelLandOptions::draw(), LLPanelObject::getState(), LLPanelGroupRolesSubTab::handleActionCheck(), LLPanelGroupMembersSubTab::handleMemberSelect(), LLPanelGroupRolesSubTab::handleRoleSelect(), LLFloaterColorPicker::LLFloaterColorPicker(), LLPanelDisplay::onKeystrokeAspectRatio(), LLLiveLSLEditor::onRunningCheckboxClicked(), LLPanelDisplay::onSelectAspectRatio(), LLPanelGroupGeneral::postBuild(), LLPanelDisplay::postBuild(), LLFloaterColorPicker::postBuild(), LLLiveLSLEditor::processScriptRunningReply(), LLPreviewGesture::refresh(), LLPanelLandBan::refresh(), LLPanelLandAccess::refresh(), LLPanelLandMedia::refresh(), LLPanelLandOptions::refresh(), LLPanelLandGeneral::refresh(), LLFloaterProperties::refreshFromItem(), LLPanelGroupGeneral::update(), LLFloaterBuyLandUI::updateCovenantInfo(), LLFloaterBuyLandUI::updateCovenantText(), and LLFloaterTools::updatePopup().

void LLCheckBoxCtrl::setControlName ( const LLString control_name,
LLView context 
) [virtual]

Reimplemented from LLView.

Definition at line 270 of file llcheckboxctrl.cpp.

References mButton, and LLView::setControlName().

void LLCheckBoxCtrl::setDisabledColor ( const LLColor4 color  )  [inline]

Definition at line 106 of file llcheckboxctrl.h.

References mTextDisabledColor.

Referenced by fromXML().

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

Reimplemented from LLView.

Definition at line 181 of file llcheckboxctrl.cpp.

References mButton, and LLView::setEnabled().

Referenced by LLPanelObject::clearCtrls(), LLLiveLSLEditor::draw(), LLPanelLandOptions::draw(), LLFloaterColorPicker::draw(), LLPanelObject::getState(), LLPanelGroupMembersSubTab::handleMemberSelect(), LLPanelGroupRolesSubTab::handleRoleSelect(), LLFloaterColorPicker::LLFloaterColorPicker(), LLPanelGroupGeneral::postBuild(), LLPanelLandOptions::postBuild(), LLPreviewGesture::refresh(), LLPanelPick::refresh(), LLPanelClassified::refresh(), LLPanelLandBan::refresh(), LLPanelLandAccess::refresh(), LLPanelLandMedia::refresh(), LLPanelLandOptions::refresh(), LLPanelLandGeneral::refresh(), LLPanelDisplay3::refreshEnabledState(), LLPanelDisplay2::refreshEnabledState(), LLScrollListCheck::setEnabled(), LLPanelGroupGeneral::update(), LLFloaterBuyLandUI::updateCovenantInfo(), LLFloaterBuyLandUI::updateCovenantText(), and LLFloaterTools::updatePopup().

void LLCheckBoxCtrl::setEnabledColor ( const LLColor4 color  )  [inline]

Definition at line 105 of file llcheckboxctrl.h.

References mTextEnabledColor.

Referenced by fromXML().

void LLCheckBoxCtrl::setLabel ( const LLStringExplicit label  ) 

Definition at line 245 of file llcheckboxctrl.cpp.

References FALSE, LLView::getRect(), mLabel, reshape(), and LLTextBox::setText().

Referenced by LLLiveLSLEditor::draw(), and LLPanelLandOptions::refresh().

BOOL LLCheckBoxCtrl::setLabelArg ( const LLString key,
const LLStringExplicit text 
) [virtual]

Reimplemented from LLUICtrl.

Definition at line 256 of file llcheckboxctrl.cpp.

References FALSE, LLView::getRect(), mLabel, reshape(), and LLTextBox::setTextArg().

Referenced by LLPanelLandBan::refresh(), LLPanelLandAccess::refresh(), and LLPanelLandAccess::refreshNames().

virtual void LLCheckBoxCtrl::setTentative ( BOOL  b  )  [inline, virtual]

Reimplemented from LLUICtrl.

Definition at line 94 of file llcheckboxctrl.h.

References mButton, and LLUICtrl::setTentative().

Referenced by LLPanelObject::getState(), LLPanelGroupMembersSubTab::handleMemberSelect(), onCommit(), and LLFloaterProperties::refreshFromItem().

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

Reimplemented from LLView.

Reimplemented in LLRadioCtrl.

Definition at line 233 of file llcheckboxctrl.cpp.

References LLSD::asBoolean(), mButton, mSetValue, and LLButton::setToggleState().

Referenced by clear(), fromXML(), set(), LLAlertDialog::setCheckBox(), and LLRadioCtrl::setValue().

virtual BOOL LLCheckBoxCtrl::toggle (  )  [inline, virtual]

Definition at line 103 of file llcheckboxctrl.h.

References mButton, and LLButton::toggleState().


Member Data Documentation

LLViewBorder* LLCheckBoxCtrl::mBorder [protected]

Definition at line 130 of file llcheckboxctrl.h.

LLButton* LLCheckBoxCtrl::mButton [protected]

Definition at line 121 of file llcheckboxctrl.h.

Referenced by getControlName(), getTentative(), getValue(), getXML(), isDirty(), resetDirty(), reshape(), setControlName(), setEnabled(), setTentative(), LLRadioCtrl::setValue(), setValue(), and toggle().

const LLFontGL* LLCheckBoxCtrl::mFont [protected]

Definition at line 123 of file llcheckboxctrl.h.

Referenced by getXML(), and reshape().

BOOL LLCheckBoxCtrl::mInitialValue [protected]

Definition at line 127 of file llcheckboxctrl.h.

Referenced by getXML().

BOOL LLCheckBoxCtrl::mKeyboardFocusOnClick [protected]

Definition at line 129 of file llcheckboxctrl.h.

LLTextBox* LLCheckBoxCtrl::mLabel [protected]

Definition at line 122 of file llcheckboxctrl.h.

Referenced by draw(), getLabel(), getXML(), reshape(), setLabel(), and setLabelArg().

BOOL LLCheckBoxCtrl::mRadioStyle [protected]

Definition at line 126 of file llcheckboxctrl.h.

Referenced by getXML().

BOOL LLCheckBoxCtrl::mSetValue [protected]

Definition at line 128 of file llcheckboxctrl.h.

Referenced by isDirty(), resetDirty(), and setValue().

LLColor4 LLCheckBoxCtrl::mTextDisabledColor [protected]

Definition at line 125 of file llcheckboxctrl.h.

Referenced by draw(), and setDisabledColor().

LLColor4 LLCheckBoxCtrl::mTextEnabledColor [protected]

Definition at line 124 of file llcheckboxctrl.h.

Referenced by draw(), and setEnabledColor().


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