aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llui/llradiogroup.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/llui/llradiogroup.cpp66
1 files changed, 65 insertions, 1 deletions
diff --git a/linden/indra/llui/llradiogroup.cpp b/linden/indra/llui/llradiogroup.cpp
index eda54b1..0104998 100644
--- a/linden/indra/llui/llradiogroup.cpp
+++ b/linden/indra/llui/llradiogroup.cpp
@@ -169,7 +169,7 @@ BOOL LLRadioGroup::handleKeyHere(KEY key, MASK mask, BOOL called_from_parent)
169{ 169{
170 BOOL handled = FALSE; 170 BOOL handled = FALSE;
171 // do any of the tab buttons have keyboard focus? 171 // do any of the tab buttons have keyboard focus?
172 if (getEnabled() && !called_from_parent) 172 if (getEnabled() && !called_from_parent && mask == MASK_NONE)
173 { 173 {
174 switch(key) 174 switch(key)
175 { 175 {
@@ -441,6 +441,69 @@ LLView* LLRadioGroup::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory
441 return radio_group; 441 return radio_group;
442} 442}
443 443
444// LLCtrlSelectionInterface functions
445BOOL LLRadioGroup::setCurrentByID( const LLUUID& id )
446{
447 return FALSE;
448}
449
450LLUUID LLRadioGroup::getCurrentID()
451{
452 return LLUUID::null;
453}
454
455BOOL LLRadioGroup::setSelectedByValue(LLSD value, BOOL selected)
456{
457 S32 idx = 0;
458 std::string value_string = value.asString();
459 for (button_list_t::const_iterator iter = mRadioButtons.begin();
460 iter != mRadioButtons.end(); ++iter)
461 {
462 if((*iter)->getName() == value_string)
463 {
464 setSelectedIndex(idx);
465 return TRUE;
466 }
467 idx++;
468 }
469
470 return FALSE;
471}
472
473LLSD LLRadioGroup::getSimpleSelectedValue()
474{
475 return getValue();
476}
477
478BOOL LLRadioGroup::isSelected(LLSD value)
479{
480 S32 idx = 0;
481 std::string value_string = value.asString();
482 for (button_list_t::const_iterator iter = mRadioButtons.begin();
483 iter != mRadioButtons.end(); ++iter)
484 {
485 if((*iter)->getName() == value_string)
486 {
487 if (idx == mSelectedIndex)
488 {
489 return TRUE;
490 }
491 }
492 idx++;
493 }
494 return FALSE;
495}
496
497BOOL LLRadioGroup::operateOnSelection(EOperation op)
498{
499 return FALSE;
500}
501
502BOOL LLRadioGroup::operateOnAll(EOperation op)
503{
504 return FALSE;
505}
506
444 507
445LLRadioCtrl::LLRadioCtrl(const LLString& name, const LLRect& rect, const LLString& label, 508LLRadioCtrl::LLRadioCtrl(const LLString& name, const LLRect& rect, const LLString& label,
446 const LLFontGL* font, void (*commit_callback)(LLUICtrl*, void*), void* callback_userdata) : 509 const LLFontGL* font, void (*commit_callback)(LLUICtrl*, void*), void* callback_userdata) :
@@ -458,3 +521,4 @@ void LLRadioCtrl::setValue(const LLSD& value)
458 LLCheckBoxCtrl::setValue(value); 521 LLCheckBoxCtrl::setValue(value);
459 mButton->setTabStop(value.asBoolean()); 522 mButton->setTabStop(value.asBoolean());
460} 523}
524