#include <llradiogroup.h>
Public Member Functions | |
LLRadioGroup (const LLString &name, const LLRect &rect, const LLString &control_name, LLUICtrlCallback callback=NULL, void *userdata=NULL, BOOL border=TRUE) | |
LLRadioGroup (const LLString &name, const LLRect &rect, S32 initial_index, LLUICtrlCallback callback=NULL, void *userdata=NULL, BOOL border=TRUE) | |
virtual | ~LLRadioGroup () |
virtual BOOL | handleKeyHere (KEY key, MASK mask) |
virtual void | setEnabled (BOOL enabled) |
virtual LLXMLNodePtr | getXML (bool save_children=true) const |
void | setIndexEnabled (S32 index, BOOL enabled) |
S32 | getSelectedIndex () const |
BOOL | setSelectedIndex (S32 index, BOOL from_event=FALSE) |
virtual void | setValue (const LLSD &value) |
virtual LLSD | getValue () const |
void | draw () |
LLRadioCtrl * | addRadioButton (const LLString &name, const LLString &label, const LLRect &rect, const LLFontGL *font) |
LLRadioCtrl * | getRadioButton (const S32 &index) |
LLCtrlSelectionInterface * | getSelectionInterface () |
S32 | getItemCount () const |
BOOL | getCanSelect () const |
BOOL | selectFirstItem () |
BOOL | selectNthItem (S32 index) |
BOOL | selectItemRange (S32 first, S32 last) |
S32 | getFirstSelectedIndex () const |
BOOL | setCurrentByID (const LLUUID &id) |
LLUUID | getCurrentID () const |
BOOL | setSelectedByValue (const LLSD &value, BOOL selected) |
LLSD | getSelectedValue () |
BOOL | isSelected (const LLSD &value) const |
BOOL | operateOnSelection (EOperation op) |
BOOL | operateOnAll (EOperation op) |
Static Public Member Functions | |
static LLView * | fromXML (LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory) |
static void | onClickButton (LLUICtrl *radio, void *userdata) |
Private Types | |
typedef std::vector < LLRadioCtrl * > | button_list_t |
Private Member Functions | |
void | init (BOOL border) |
Private Attributes | |
S32 | mSelectedIndex |
button_list_t | mRadioButtons |
BOOL | mHasBorder |
Definition at line 63 of file llradiogroup.h.
typedef std::vector<LLRadioCtrl*> LLRadioGroup::button_list_t [private] |
Definition at line 137 of file llradiogroup.h.
LLRadioGroup::LLRadioGroup | ( | const LLString & | name, | |
const LLRect & | rect, | |||
const LLString & | control_name, | |||
LLUICtrlCallback | callback = NULL , |
|||
void * | userdata = NULL , |
|||
BOOL | border = TRUE | |||
) |
Definition at line 47 of file llradiogroup.cpp.
References init(), NULL, and LLView::setControlName().
Referenced by fromXML().
LLRadioGroup::LLRadioGroup | ( | const LLString & | name, | |
const LLRect & | rect, | |||
S32 | initial_index, | |||
LLUICtrlCallback | callback = NULL , |
|||
void * | userdata = NULL , |
|||
BOOL | border = TRUE | |||
) |
Definition at line 59 of file llradiogroup.cpp.
References init().
LLRadioGroup::~LLRadioGroup | ( | ) | [virtual] |
Definition at line 86 of file llradiogroup.cpp.
Reimplemented from LLView.
Definition at line 165 of file llradiogroup.cpp.
References FALSE, getSelectedIndex(), KEY_DOWN, KEY_LEFT, KEY_RIGHT, KEY_UP, make_ui_sound(), MASK_NONE, LLUICtrl::onCommit(), setSelectedIndex(), and TRUE.
void LLRadioGroup::setEnabled | ( | BOOL | enabled | ) | [virtual] |
Reimplemented from LLView.
Definition at line 92 of file llradiogroup.cpp.
References LLView::getChildList(), and LLView::setEnabled().
Referenced by LLFloaterTOS::onNavigateComplete(), LLFloaterTOS::postBuild(), LLPreviewGesture::refresh(), LLPanelPermissions::refresh(), LLPanelLandMedia::refresh(), LLPanelDisplay::refreshEnabledState(), LLPanelGroupVoting::impl::setEnableCreateProposal(), LLPanelGroupVoting::impl::setEnableListProposals(), LLPanelGroupVoting::impl::setEnableVoteProposal(), and LLFloaterTOS::setSiteIsAlive().
LLXMLNodePtr LLRadioGroup::getXML | ( | bool | save_children = true |
) | const [virtual] |
Reimplemented from LLUICtrl.
Definition at line 343 of file llradiogroup.cpp.
References LLCheckBoxCtrl::getLabel(), LLUICtrl::getXML(), mHasBorder, mRadioButtons, and TRUE.
LLView * LLRadioGroup::fromXML | ( | LLXMLNodePtr | node, | |
LLView * | parent, | |||
LLUICtrlFactory * | factory | |||
) | [static] |
Reimplemented from LLUICtrl.
Definition at line 369 of file llradiogroup.cpp.
References addRadioButton(), LLView::createRect(), LLRectBase< Type >::getHeight(), LLView::getRect(), LLRectBase< Type >::getWidth(), HPAD, LLUICtrl::initFromXML(), llendl, LLRadioGroup(), llwarns, LLPointer< Type >::notNull(), NULL, S32, LLView::selectFont(), TRUE, and VPAD.
Definition at line 103 of file llradiogroup.cpp.
References FALSE, LLView::getEnabled(), mRadioButtons, mSelectedIndex, S32, LLCheckBoxCtrl::setEnabled(), and setSelectedIndex().
Referenced by LLPanelDisplay::refreshEnabledState().
S32 LLRadioGroup::getSelectedIndex | ( | ) | const [inline] |
Definition at line 94 of file llradiogroup.h.
References mSelectedIndex.
Referenced by getFirstSelectedIndex(), getValue(), handleKeyHere(), LLPanelGroupVoting::impl::sendStartGroupProposal(), LLPanelPermissions::setAllSaleInfo(), setSelectedIndex(), and LLFloaterProperties::updateSaleInfo().
Definition at line 148 of file llradiogroup.cpp.
References FALSE, getSelectedIndex(), mRadioButtons, mSelectedIndex, S32, LLView::setControlValue(), and TRUE.
Referenced by handleKeyHere(), LLPreviewGesture::refresh(), LLPanelPermissions::refresh(), LLPanelLandMedia::refresh(), LLFloaterProperties::refreshFromItem(), selectFirstItem(), selectItemRange(), selectNthItem(), LLPanelGroupVoting::impl::setEnableVoteProposal(), setIndexEnabled(), setSelectedByValue(), setValue(), and LLFloaterSnapshot::Impl::updateControls().
void LLRadioGroup::setValue | ( | const LLSD & | value | ) | [virtual] |
Reimplemented from LLView.
Definition at line 299 of file llradiogroup.cpp.
References LLSD::asInteger(), LLSD::asString(), LLView::getName(), LLSD::isInteger(), llendl, llwarns, mRadioButtons, S32, setSelectedIndex(), and TRUE.
Referenced by LLPanelDisplay::refreshEnabledState().
LLSD LLRadioGroup::getValue | ( | ) | const [virtual] |
Reimplemented from LLUICtrl.
Definition at line 329 of file llradiogroup.cpp.
References getSelectedIndex(), and mRadioButtons.
Referenced by getSelectedValue().
void LLRadioGroup::draw | ( | void | ) | [virtual] |
Reimplemented from LLView.
Definition at line 224 of file llradiogroup.cpp.
References LLFocusMgr::childHasKeyboardFocus(), LLView::draw(), FALSE, LLUICtrl::focusFirstItem(), gFocusMgr, mRadioButtons, mSelectedIndex, S32, LLRadioCtrl::setValue(), and TRUE.
LLRadioCtrl * LLRadioGroup::addRadioButton | ( | const LLString & | name, | |
const LLString & | label, | |||
const LLRect & | rect, | |||
const LLFontGL * | font | |||
) |
Definition at line 255 of file llradiogroup.cpp.
References LLView::addChild(), mRadioButtons, and onClickButton().
Referenced by fromXML(), and LLFloaterTestImpl::LLFloaterTestImpl().
LLRadioCtrl* LLRadioGroup::getRadioButton | ( | const S32 & | index | ) | [inline] |
void LLRadioGroup::onClickButton | ( | LLUICtrl * | radio, | |
void * | userdata | |||
) | [static] |
Definition at line 269 of file llradiogroup.cpp.
References llendl, llwarns, and S32.
Referenced by addRadioButton().
LLCtrlSelectionInterface* LLRadioGroup::getSelectionInterface | ( | ) | [inline, virtual] |
S32 LLRadioGroup::getItemCount | ( | ) | const [inline, virtual] |
Implements LLCtrlSelectionInterface.
Definition at line 118 of file llradiogroup.h.
References mRadioButtons.
Referenced by LLPanelDisplay::refreshEnabledState().
BOOL LLRadioGroup::getCanSelect | ( | ) | const [inline, virtual] |
Implements LLCtrlSelectionInterface.
Definition at line 119 of file llradiogroup.h.
References TRUE.
BOOL LLRadioGroup::selectFirstItem | ( | ) | [inline, virtual] |
Implements LLCtrlSelectionInterface.
Definition at line 120 of file llradiogroup.h.
References setSelectedIndex().
Implements LLCtrlSelectionInterface.
Definition at line 121 of file llradiogroup.h.
References setSelectedIndex().
Implements LLCtrlSelectionInterface.
Definition at line 122 of file llradiogroup.h.
References setSelectedIndex().
S32 LLRadioGroup::getFirstSelectedIndex | ( | ) | const [inline, virtual] |
Implements LLCtrlSelectionInterface.
Definition at line 123 of file llradiogroup.h.
References getSelectedIndex().
Implements LLCtrlSelectionInterface.
Definition at line 444 of file llradiogroup.cpp.
References FALSE.
LLUUID LLRadioGroup::getCurrentID | ( | ) | const [virtual] |
Implements LLCtrlSelectionInterface.
Definition at line 449 of file llradiogroup.cpp.
References LLUUID::null.
Implements LLCtrlSelectionInterface.
Definition at line 454 of file llradiogroup.cpp.
References LLSD::asString(), FALSE, mRadioButtons, S32, setSelectedIndex(), and TRUE.
LLSD LLRadioGroup::getSelectedValue | ( | ) | [virtual] |
Implements LLCtrlSelectionInterface.
Definition at line 472 of file llradiogroup.cpp.
References getValue().
Implements LLCtrlSelectionInterface.
Definition at line 477 of file llradiogroup.cpp.
References LLSD::asString(), FALSE, mRadioButtons, mSelectedIndex, S32, and TRUE.
BOOL LLRadioGroup::operateOnSelection | ( | EOperation | op | ) | [virtual] |
Implements LLCtrlSelectionInterface.
Definition at line 496 of file llradiogroup.cpp.
References FALSE.
BOOL LLRadioGroup::operateOnAll | ( | EOperation | op | ) | [virtual] |
Implements LLCtrlSelectionInterface.
Definition at line 501 of file llradiogroup.cpp.
References FALSE.
void LLRadioGroup::init | ( | BOOL | border | ) | [private] |
Definition at line 70 of file llradiogroup.cpp.
References LLView::addChild(), LLViewBorder::BEVEL_NONE, LLView::getRect(), mHasBorder, and LLViewBorder::STYLE_LINE.
Referenced by LLRadioGroup().
S32 LLRadioGroup::mSelectedIndex [private] |
Definition at line 136 of file llradiogroup.h.
Referenced by draw(), getSelectedIndex(), isSelected(), setIndexEnabled(), and setSelectedIndex().
button_list_t LLRadioGroup::mRadioButtons [private] |
Definition at line 138 of file llradiogroup.h.
Referenced by addRadioButton(), draw(), getItemCount(), getRadioButton(), getValue(), getXML(), isSelected(), setIndexEnabled(), setSelectedByValue(), setSelectedIndex(), and setValue().
BOOL LLRadioGroup::mHasBorder [private] |