// virtual LLXMLNodePtr LLSliderCtrl::getXML(bool save_children) const { LLXMLNodePtr node = LLUICtrl::getXML(); node->setName(LL_SLIDER_CTRL_TAG); node->createChild("show_text", TRUE)->setBoolValue(mShowText); node->createChild("can_edit_text", TRUE)->setBoolValue(mCanEditText); node->createChild("volume", TRUE)->setBoolValue(mVolumeSlider); node->createChild("decimal_digits", TRUE)->setIntValue(mPrecision); if (mLabelBox) { node->createChild("label", TRUE)->setStringValue(mLabelBox->getText()); } // TomY TODO: Do we really want to export the transient state of the slider? node->createChild("value", TRUE)->setFloatValue(mValue); if (mSlider) { node->createChild("initial_val", TRUE)->setFloatValue(mSlider->getInitialValue()); node->createChild("min_val", TRUE)->setFloatValue(mSlider->getMinValue()); node->createChild("max_val", TRUE)->setFloatValue(mSlider->getMaxValue()); node->createChild("increment", TRUE)->setFloatValue(mSlider->getIncrement()); } addColorXML(node, mTextEnabledColor, "text_enabled_color", "LabelTextColor"); addColorXML(node, mTextDisabledColor, "text_disabled_color", "LabelDisabledColor"); return node; }
// virtual LLXMLNodePtr LLSpinCtrl::getXML(bool save_children) const { LLXMLNodePtr node = LLUICtrl::getXML(); node->createChild("decimal_digits", TRUE)->setIntValue(mPrecision); if (mLabelBox) { node->createChild("label", TRUE)->setStringValue(mLabelBox->getText()); node->createChild("label_width", TRUE)->setIntValue(mLabelBox->getRect().getWidth()); } node->createChild("initial_val", TRUE)->setFloatValue(mInitialValue); node->createChild("min_val", TRUE)->setFloatValue(mMinValue); node->createChild("max_val", TRUE)->setFloatValue(mMaxValue); node->createChild("increment", TRUE)->setFloatValue(mIncrement); addColorXML(node, mTextEnabledColor, "text_enabled_color", "LabelTextColor"); addColorXML(node, mTextDisabledColor, "text_disabled_color", "LabelDisabledColor"); return node; }
// virtual LLXMLNodePtr LLTextBox::getXML(bool save_children) const { LLXMLNodePtr node = LLUICtrl::getXML(); // Attributes node->createChild("font", TRUE)->setStringValue(LLFontGL::nameFromFont(mFontGL)); node->createChild("halign", TRUE)->setStringValue(LLFontGL::nameFromHAlign(mHAlign)); addColorXML(node, mTextColor, "text_color", "LabelTextColor"); addColorXML(node, mDisabledColor, "disabled_color", "LabelDisabledColor"); addColorXML(node, mBackgroundColor, "bg_color", "DefaultBackgroundColor"); addColorXML(node, mBorderColor, "border_color", "DefaultHighlightLight"); node->createChild("bg_visible", TRUE)->setBoolValue(mBackgroundVisible); node->createChild("border_visible", TRUE)->setBoolValue(mBorderVisible); node->createChild("border_drop_shadow_visible", TRUE)->setBoolValue(mBorderDropShadowVisible); node->createChild("h_pad", TRUE)->setIntValue(mHPad); node->createChild("v_pad", TRUE)->setIntValue(mVPad); // Contents node->setStringValue(mText); return node; }