// virtual LLXMLNodePtr LLRadioGroup::getXML(bool save_children) const { LLXMLNodePtr node = LLUICtrl::getXML(); node->setName(LL_RADIO_GROUP_TAG); // Attributes node->createChild("draw_border", TRUE)->setBoolValue(mHasBorder); node->createChild("allow_deselect", TRUE)->setBoolValue(mAllowDeselect); // Contents for (button_list_t::const_iterator iter = mRadioButtons.begin(); iter != mRadioButtons.end(); ++iter) { LLRadioCtrl* radio = *iter; LLXMLNodePtr child_node = radio->getXML(); node->addChild(child_node); } return node; }
// virtual LLXMLNodePtr LLPanel::getXML(bool save_children) const { LLXMLNodePtr node = LLUICtrl::getXML(); node->setName(LL_PANEL_TAG); if (mBorder && mBorder->getVisible()) { node->createChild("border", TRUE)->setBoolValue(TRUE); } if (!mRectControl.empty()) { node->createChild("rect_control", TRUE)->setStringValue(mRectControl); } if (!mLabel.empty()) { node->createChild("label", TRUE)->setStringValue(mLabel); } ui_string_map_t::const_iterator i = mUIStrings.begin(); ui_string_map_t::const_iterator end = mUIStrings.end(); for (; i != end; ++i) { LLXMLNodePtr child_node = node->createChild("string", FALSE); child_node->setStringValue(i->second); child_node->createChild("name", TRUE)->setStringValue(i->first); } if (save_children) { LLView::child_list_const_reverse_iter_t rit; for (rit = getChildList()->rbegin(); rit != getChildList()->rend(); ++rit) { LLView* childp = *rit; if (childp->getSaveToXML()) { LLXMLNodePtr xml_node = childp->getXML(); node->addChild(xml_node); } } } return node; }
// virtual LLXMLNodePtr LLScrollableContainerView::getXML(bool save_children) const { LLXMLNodePtr node = LLUICtrl::getXML(); node->setName(LL_SCROLLABLE_CONTAINER_VIEW_TAG); // Attributes node->createChild("opaque", TRUE)->setBoolValue(mIsOpaque); if (mIsOpaque) { node->createChild("color", TRUE)->setFloatValue(4, mBackgroundColor.mV); } // Contents LLXMLNodePtr child_node = mScrolledView->getXML(); node->addChild(child_node); return node; }
// virtual LLXMLNodePtr LLPanel::getXML(bool save_children) const { LLXMLNodePtr node = LLView::getXML(); if (mBorder && mBorder->getVisible()) { node->createChild("border", TRUE)->setBoolValue(TRUE); } if (!mRectControl.empty()) { node->createChild("rect_control", TRUE)->setStringValue(mRectControl); } if (!mLabel.empty()) { node->createChild("label", TRUE)->setStringValue(mLabel); } if (save_children) { LLView::child_list_const_reverse_iter_t rit; for (rit = getChildList()->rbegin(); rit != getChildList()->rend(); ++rit) { LLView* childp = *rit; if (childp->getSaveToXML()) { LLXMLNodePtr xml_node = childp->getXML(); node->addChild(xml_node); } } } return node; }
LLXMLNodePtr LLLayoutStack::getXML(bool save_children) const { LLXMLNodePtr node = LLView::getXML(); node->setName(LL_LAYOUT_STACK_TAG); if (mOrientation == HORIZONTAL) { node->createChild("orientation", TRUE)->setStringValue("horizontal"); } else { node->createChild("orientation", TRUE)->setStringValue("vertical"); } if (save_children) { LLView::child_list_const_reverse_iter_t rit; for (rit = getChildList()->rbegin(); rit != getChildList()->rend(); ++rit) { LLView* childp = *rit; if (childp->getSaveToXML()) { LLXMLNodePtr xml_node = childp->getXML(); if (xml_node->hasName(LL_PANEL_TAG)) { xml_node->setName(LL_LAYOUT_PANEL_TAG); } node->addChild(xml_node); } } } return node; }
// virtual LLXMLNodePtr LLRadioGroup::getXML(bool save_children) const { LLXMLNodePtr node = LLUICtrl::getXML(); // Attributes node->createChild("draw_border", TRUE)->setBoolValue(mHasBorder); // Contents for (button_list_t::const_iterator iter = mRadioButtons.begin(); iter != mRadioButtons.end(); ++iter) { LLRadioCtrl* radio = *iter; LLXMLNodePtr child_node = radio->LLView::getXML(); child_node->setStringValue(radio->getLabel()); child_node->setName(std::string("radio_item")); node->addChild(child_node); } return node; }