+void
+wxLayoutObjectCmd::Write(wxString &ostr)
+{
+ ostr << WXLO_TYPE_CMD << '\n'
+ << m_StyleInfo->size << '\n'
+ << m_StyleInfo->family << '\n'
+ << m_StyleInfo->style << '\n'
+ << m_StyleInfo->weight << '\n'
+ << m_StyleInfo->underline << '\n'
+ << m_StyleInfo->m_fg_valid << '\n'
+ << m_StyleInfo->m_bg_valid << '\n';
+ if(m_StyleInfo->m_fg_valid)
+ {
+ ostr << m_StyleInfo->m_fg.Red() << '\n'
+ << m_StyleInfo->m_fg.Green() << '\n'
+ << m_StyleInfo->m_fg.Blue() << '\n';
+ }
+ if(m_StyleInfo->m_bg_valid)
+ {
+ ostr << m_StyleInfo->m_bg.Red() << '\n'
+ << m_StyleInfo->m_bg.Green() << '\n'
+ << m_StyleInfo->m_bg.Blue() << '\n';
+ }
+}
+/* static */
+wxLayoutObjectCmd *
+wxLayoutObjectCmd::Read(wxString &istr)
+{
+ wxLayoutObjectCmd *obj = new wxLayoutObjectCmd;
+
+ wxString tmp;
+ ReadString(tmp, istr);
+ sscanf(tmp.c_str(),"%d", &obj->m_StyleInfo->size);
+ ReadString(tmp, istr);
+ sscanf(tmp.c_str(),"%d", &obj->m_StyleInfo->family);
+ ReadString(tmp, istr);
+ sscanf(tmp.c_str(),"%d", &obj->m_StyleInfo->style);
+ ReadString(tmp, istr);
+ sscanf(tmp.c_str(),"%d", &obj->m_StyleInfo->weight);
+ ReadString(tmp, istr);
+ sscanf(tmp.c_str(),"%d", &obj->m_StyleInfo->underline);
+ ReadString(tmp, istr);
+ sscanf(tmp.c_str(),"%d", &obj->m_StyleInfo->m_fg_valid);
+ ReadString(tmp, istr);
+ sscanf(tmp.c_str(),"%d", &obj->m_StyleInfo->m_bg_valid);
+ if(obj->m_StyleInfo->m_fg_valid)
+ {
+ int red, green, blue;
+ ReadString(tmp, istr);
+ sscanf(tmp.c_str(),"%d", &red);
+ ReadString(tmp, istr);
+ sscanf(tmp.c_str(),"%d", &green);
+ ReadString(tmp, istr);
+ sscanf(tmp.c_str(),"%d", &blue);
+ obj->m_StyleInfo->m_fg = wxColour(red, green, blue);
+ }
+ if(obj->m_StyleInfo->m_bg_valid)
+ {
+ int red, green, blue;
+ ReadString(tmp, istr);
+ sscanf(tmp.c_str(),"%d", &red);
+ ReadString(tmp, istr);
+ sscanf(tmp.c_str(),"%d", &green);
+ ReadString(tmp, istr);
+ sscanf(tmp.c_str(),"%d", &blue);
+ obj->m_StyleInfo->m_bg = wxColour(red, green, blue);
+ }
+ return obj;
+}
+