diff options
author | Jacek Antonelli | 2008-09-06 18:24:57 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-09-06 18:25:07 -0500 |
commit | 798d367d54a6c6379ad355bd8345fa40e31e7fe9 (patch) | |
tree | 1921f1708cd0240648c97bc02df2c2ab5f2fc41e /linden/indra/llui/llradiogroup.cpp | |
parent | Second Life viewer sources 1.20.15 (diff) | |
download | meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.zip meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.gz meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.bz2 meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.xz |
Second Life viewer sources 1.21.0-RC
Diffstat (limited to 'linden/indra/llui/llradiogroup.cpp')
-rw-r--r-- | linden/indra/llui/llradiogroup.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/linden/indra/llui/llradiogroup.cpp b/linden/indra/llui/llradiogroup.cpp index d7373f1..e518069 100644 --- a/linden/indra/llui/llradiogroup.cpp +++ b/linden/indra/llui/llradiogroup.cpp | |||
@@ -44,8 +44,8 @@ | |||
44 | 44 | ||
45 | static LLRegisterWidget<LLRadioGroup> r("radio_group"); | 45 | static LLRegisterWidget<LLRadioGroup> r("radio_group"); |
46 | 46 | ||
47 | LLRadioGroup::LLRadioGroup(const LLString& name, const LLRect& rect, | 47 | LLRadioGroup::LLRadioGroup(const std::string& name, const LLRect& rect, |
48 | const LLString& control_name, | 48 | const std::string& control_name, |
49 | LLUICtrlCallback callback, | 49 | LLUICtrlCallback callback, |
50 | void* userdata, | 50 | void* userdata, |
51 | BOOL border) | 51 | BOOL border) |
@@ -56,7 +56,7 @@ LLRadioGroup::LLRadioGroup(const LLString& name, const LLRect& rect, | |||
56 | init(border); | 56 | init(border); |
57 | } | 57 | } |
58 | 58 | ||
59 | LLRadioGroup::LLRadioGroup(const LLString& name, const LLRect& rect, | 59 | LLRadioGroup::LLRadioGroup(const std::string& name, const LLRect& rect, |
60 | S32 initial_index, | 60 | S32 initial_index, |
61 | LLUICtrlCallback callback, | 61 | LLUICtrlCallback callback, |
62 | void* userdata, | 62 | void* userdata, |
@@ -71,7 +71,7 @@ void LLRadioGroup::init(BOOL border) | |||
71 | { | 71 | { |
72 | if (border) | 72 | if (border) |
73 | { | 73 | { |
74 | addChild( new LLViewBorder( "radio group border", | 74 | addChild( new LLViewBorder( std::string("radio group border"), |
75 | LLRect(0, getRect().getHeight(), getRect().getWidth(), 0), | 75 | LLRect(0, getRect().getHeight(), getRect().getWidth(), 0), |
76 | LLViewBorder::BEVEL_NONE, | 76 | LLViewBorder::BEVEL_NONE, |
77 | LLViewBorder::STYLE_LINE, | 77 | LLViewBorder::STYLE_LINE, |
@@ -252,7 +252,7 @@ void LLRadioGroup::draw() | |||
252 | 252 | ||
253 | // When adding a button, we need to ensure that the radio | 253 | // When adding a button, we need to ensure that the radio |
254 | // group gets a message when the button is clicked. | 254 | // group gets a message when the button is clicked. |
255 | LLRadioCtrl* LLRadioGroup::addRadioButton(const LLString& name, const LLString& label, const LLRect& rect, const LLFontGL* font ) | 255 | LLRadioCtrl* LLRadioGroup::addRadioButton(const std::string& name, const std::string& label, const LLRect& rect, const LLFontGL* font ) |
256 | { | 256 | { |
257 | // Highlight will get fixed in draw method above | 257 | // Highlight will get fixed in draw method above |
258 | LLRadioCtrl* radio = new LLRadioCtrl(name, rect, label, font, | 258 | LLRadioCtrl* radio = new LLRadioCtrl(name, rect, label, font, |
@@ -298,7 +298,7 @@ void LLRadioGroup::onClickButton(LLUICtrl* ui_ctrl, void* userdata) | |||
298 | 298 | ||
299 | void LLRadioGroup::setValue( const LLSD& value ) | 299 | void LLRadioGroup::setValue( const LLSD& value ) |
300 | { | 300 | { |
301 | LLString value_name = value.asString(); | 301 | std::string value_name = value.asString(); |
302 | int idx = 0; | 302 | int idx = 0; |
303 | for (button_list_t::const_iterator iter = mRadioButtons.begin(); | 303 | for (button_list_t::const_iterator iter = mRadioButtons.begin(); |
304 | iter != mRadioButtons.end(); ++iter) | 304 | iter != mRadioButtons.end(); ++iter) |
@@ -357,7 +357,7 @@ LLXMLNodePtr LLRadioGroup::getXML(bool save_children) const | |||
357 | 357 | ||
358 | LLXMLNodePtr child_node = radio->LLView::getXML(); | 358 | LLXMLNodePtr child_node = radio->LLView::getXML(); |
359 | child_node->setStringValue(radio->getLabel()); | 359 | child_node->setStringValue(radio->getLabel()); |
360 | child_node->setName("radio_item"); | 360 | child_node->setName(std::string("radio_item")); |
361 | 361 | ||
362 | node->addChild(child_node); | 362 | node->addChild(child_node); |
363 | } | 363 | } |
@@ -368,7 +368,7 @@ LLXMLNodePtr LLRadioGroup::getXML(bool save_children) const | |||
368 | // static | 368 | // static |
369 | LLView* LLRadioGroup::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory) | 369 | LLView* LLRadioGroup::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory) |
370 | { | 370 | { |
371 | LLString name("radio_group"); | 371 | std::string name("radio_group"); |
372 | node->getAttributeString("name", name); | 372 | node->getAttributeString("name", name); |
373 | 373 | ||
374 | U32 initial_value = 0; | 374 | U32 initial_value = 0; |
@@ -387,7 +387,7 @@ LLView* LLRadioGroup::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory | |||
387 | NULL, | 387 | NULL, |
388 | draw_border); | 388 | draw_border); |
389 | 389 | ||
390 | const LLString& contents = node->getValue(); | 390 | const std::string& contents = node->getValue(); |
391 | 391 | ||
392 | LLRect group_rect = radio_group->getRect(); | 392 | LLRect group_rect = radio_group->getRect(); |
393 | 393 | ||
@@ -406,10 +406,10 @@ LLView* LLRadioGroup::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory | |||
406 | 406 | ||
407 | while(token_iter != tokens.end()) | 407 | while(token_iter != tokens.end()) |
408 | { | 408 | { |
409 | const char* line = token_iter->c_str(); | 409 | const std::string& line = *token_iter; |
410 | LLRect rect(HPAD, cur_y, group_rect.getWidth() - (2 * HPAD), cur_y - 15); | 410 | LLRect rect(HPAD, cur_y, group_rect.getWidth() - (2 * HPAD), cur_y - 15); |
411 | cur_y -= VPAD + 15; | 411 | cur_y -= VPAD + 15; |
412 | radio_group->addRadioButton("radio", line, rect, font); | 412 | radio_group->addRadioButton(std::string("radio"), line, rect, font); |
413 | ++token_iter; | 413 | ++token_iter; |
414 | } | 414 | } |
415 | llwarns << "Legacy radio group format used! Please convert to use <radio_item> tags!" << llendl; | 415 | llwarns << "Legacy radio group format used! Please convert to use <radio_item> tags!" << llendl; |
@@ -425,10 +425,10 @@ LLView* LLRadioGroup::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory | |||
425 | LLRect item_rect; | 425 | LLRect item_rect; |
426 | createRect(child, item_rect, radio_group, rect); | 426 | createRect(child, item_rect, radio_group, rect); |
427 | 427 | ||
428 | LLString radioname("radio"); | 428 | std::string radioname("radio"); |
429 | child->getAttributeString("name", radioname); | 429 | child->getAttributeString("name", radioname); |
430 | LLString item_label = child->getTextContents(); | 430 | std::string item_label = child->getTextContents(); |
431 | LLRadioCtrl* radio = radio_group->addRadioButton(radioname, item_label.c_str(), item_rect, font); | 431 | LLRadioCtrl* radio = radio_group->addRadioButton(radioname, item_label, item_rect, font); |
432 | 432 | ||
433 | radio->initFromXML(child, radio_group); | 433 | radio->initFromXML(child, radio_group); |
434 | } | 434 | } |