1 // wxr2xml.cpp: implementation of the wxr2xml class.
3 // only tested on wxMSW so far
4 //License: wxWindows Liscense
5 // ////////////////////////////////////////////////////////////////////
12 trans->Convert("Myfile.wxr","Myfile.xml");
15 #pragma implementation "wxr2xml.h"
18 // For compilers that support precompilation, includes "wx/wx.h".
19 #include "wx/wxprec.h"
31 // ////////////////////////////////////////////////////////////////////
32 // Construction/Destruction
33 // ////////////////////////////////////////////////////////////////////
45 bool wxr2xml::Convert(wxString wxrfile
, wxString xmlfile
)
48 result
= m_xmlfile
.Open(xmlfile
.c_str(), "w+t");
49 wxASSERT_MSG(result
, "Couldn't create XML file");
53 result
= m_table
.ParseResourceFile(wxrfile
);
54 wxASSERT_MSG(result
, "Couldn't Load WXR file");
57 // Write basic xml header
58 m_xmlfile
.Write("<?xml version=\"1.0\" ?>\n");
59 m_xmlfile
.Write("<resource>\n");
60 result
= ParseResources();
61 m_xmlfile
.Write("</resource>\n");
68 bool wxr2xml::ParseResources()
73 while ((node
= m_table
.Next()))
75 wxItemResource
*res
= (wxItemResource
*) node
->Data();
76 wxString
resType(res
->GetType());
77 if (resType
== "wxDialog")
79 else if (resType
== "wxPanel")
81 else if (resType
== "wxPanel")
83 else if (resType
== "wxMenu")
85 else if (resType
== "wxBitmap")
88 wxLogError("Found unsupported resource " + resType
);
93 void wxr2xml::ParsePanel(wxItemResource
* res
)
95 m_xmlfile
.Write("\t<object class=\"wxPanel\"");
97 WriteControlInfo(res
);
98 m_xmlfile
.Write("\n");
100 m_xmlfile
.Write("\t</object>\n\n");
103 void wxr2xml::ParseDialog(wxItemResource
* res
)
106 m_xmlfile
.Write("\t<object class=\"wxDialog\"");
107 WriteControlInfo(res
);
108 m_xmlfile
.Write(GetTitle(res
));
110 m_xmlfile
.Write("\n");
112 m_xmlfile
.Write("\t</object>\n\n");
115 void wxr2xml::ParseControls(wxItemResource
* res
)
117 wxNode
*node
= res
->GetChildren().First();
120 wxItemResource
*res
= (wxItemResource
*) node
->Data();
121 wxString
resType(res
->GetType());
122 if (resType
== "wxButton")
124 else if ((resType
== "wxTextCtrl") | (resType
== "wxText")
125 | (resType
== "wxMultiText"))
127 else if (resType
== "wxCheckBox")
129 else if (resType
== "wxRadioBox")
131 else if (resType
== "wxListBox")
133 else if ((resType
== "wxStaticText") | (resType
== "wxMessage"))
134 ParseStaticText(res
);
135 else if (resType
== "wxChoice")
137 else if (resType
== "wxGauge")
139 else if (resType
== "wxSlider")
141 else if (resType
== "wxComboBox")
143 else if (resType
== "wxRadioButton")
144 ParseRadioButton(res
);
145 else if (resType
== "wxStaticBitmap")
146 ParseStaticBitmap(res
);
147 else if (resType
== "wxScrollBar")
149 else if ((resType
== "wxStaticBox") | (resType
== "wxGroupBox"))
151 else if (resType
== "wxBitmapButton")
152 ParseBitmapButton(res
);
154 wxLogError("Found unsupported resource " + resType
);
159 // Write out basic stuff every control has
160 // name,position,size,bg,fg
161 void wxr2xml::WriteControlInfo(wxItemResource
* res
)
163 m_xmlfile
.Write(GenerateName(res
));
164 m_xmlfile
.Write(">\n");
165 m_xmlfile
.Write(GetPosition(res
));
166 m_xmlfile
.Write(GetSize(res
));
167 m_xmlfile
.Write(GetStyles(res
));
171 wxString
wxr2xml::GetSize(wxItemResource
* res
)
175 msg
<< "\t\t\t\t<size>" << res
->GetWidth() << "," << res
->GetHeight() << "d</size>\n";
177 msg
<< "\t\t\t\t<size>" << res
->GetWidth() << "," << res
->GetHeight() << "</size>\n";
181 wxString
wxr2xml::GetPosition(wxItemResource
* res
)
185 msg
<< "\t\t\t\t<pos>" << res
->GetX() << "," << res
->GetY() << "d</pos>\n";
187 msg
<< "\t\t\t\t<pos>" << res
->GetX() << "," << res
->GetY() << "</pos>\n";
191 void wxr2xml::ParseButton(wxItemResource
* res
)
193 m_xmlfile
.Write("\t\t\t<object class=\"wxButton\"");
194 WriteControlInfo(res
);
195 m_xmlfile
.Write(GetLabel(res
));
196 m_xmlfile
.Write("\t\t\t</object>\n");
199 void wxr2xml::ParseTextCtrl(wxItemResource
* res
)
201 m_xmlfile
.Write("\t\t\t<object class=\"wxTextCtrl\"");
202 WriteControlInfo(res
);
203 m_xmlfile
.Write(GetValue4(res
));
204 m_xmlfile
.Write("\t\t\t</object>\n");
208 wxString
wxr2xml::GetTitle(wxItemResource
* res
)
211 msg
= _T("\t\t\t\t<title>" + res
->GetTitle() + "</title>");
215 wxString
wxr2xml::GetValue4(wxItemResource
* res
)
218 msg
= _T("\t\t\t\t<value>" + res
->GetValue4() + "</value>\n");
222 void wxr2xml::ParseCheckBox(wxItemResource
* res
)
224 m_xmlfile
.Write("\t\t\t<object class=\"wxCheckBox\"");
225 WriteControlInfo(res
);
226 m_xmlfile
.Write(GetLabel(res
));
227 m_xmlfile
.Write(GetCheckStatus(res
));
228 m_xmlfile
.Write("\t\t\t</object>\n");
231 wxString
wxr2xml::GetLabel(wxItemResource
* res
)
233 return _T("\t\t\t\t<label>" + res
->GetTitle() + "</label>\n");
236 void wxr2xml::ParseRadioBox(wxItemResource
* res
)
238 m_xmlfile
.Write("\t\t\t<object class=\"wxRadioBox\"");
239 WriteControlInfo(res
);
240 m_xmlfile
.Write(GetLabel(res
));
241 // Add radio box items
242 WriteStringList(res
);
244 m_xmlfile
.Write(GetDimension(res
));
245 m_xmlfile
.Write("\t\t\t</object>\n");
248 void wxr2xml::ParseListBox(wxItemResource
* res
)
250 m_xmlfile
.Write("\t\t\t<object class=\"wxListBox\"");
251 WriteControlInfo(res
);
252 WriteStringList(res
);
253 m_xmlfile
.Write("\t\t\t</object>\n");
256 void wxr2xml::ParseStaticText(wxItemResource
* res
)
258 m_xmlfile
.Write("\t\t\t<object class=\"wxStaticText\"");
259 WriteControlInfo(res
);
260 m_xmlfile
.Write(GetLabel(res
));
261 m_xmlfile
.Write("\t\t\t</object>\n");
264 void wxr2xml::ParseStaticBox(wxItemResource
* res
)
266 m_xmlfile
.Write("\t\t\t<object class=\"wxStaticBox\"");
267 WriteControlInfo(res
);
268 m_xmlfile
.Write(GetLabel(res
));
269 m_xmlfile
.Write("\t\t\t</object>\n");
272 void wxr2xml::WriteStringList(wxItemResource
* res
)
274 m_xmlfile
.Write("\t\t\t\t<content>\n");
275 for (wxStringListNode
* node
= res
->GetStringValues().GetFirst();
276 node
;node
= node
->GetNext()) {
277 const wxString s1
= node
->GetData();
278 m_xmlfile
.Write("\t\t\t\t\t<item>" + s1
+ "</item>\n");
280 m_xmlfile
.Write("\t\t\t\t</content>\n");
283 void wxr2xml::ParseChoice(wxItemResource
* res
)
285 m_xmlfile
.Write("\t\t\t<object class=\"wxChoice\"");
286 WriteControlInfo(res
);
288 WriteStringList(res
);
289 m_xmlfile
.Write("\t\t\t</object>\n");
292 void wxr2xml::ParseGauge(wxItemResource
* res
)
294 m_xmlfile
.Write("\t\t\t<object class=\"wxGauge\"");
295 WriteControlInfo(res
);
296 m_xmlfile
.Write(GetValue1(res
));
297 m_xmlfile
.Write(GetRange(res
));
298 m_xmlfile
.Write("\n\t\t\t</object>\n");
301 wxString
wxr2xml::GetValue1(wxItemResource
* res
)
304 msg
<< "\t\t\t\t<value>" << res
->GetValue1() << "</value>\n";
308 wxString
wxr2xml::GetRange(wxItemResource
* res
)
311 msg
<< "\t\t\t\t<range>" << res
->GetValue2() << "</range>";
315 void wxr2xml::ParseSlider(wxItemResource
* res
)
317 m_xmlfile
.Write("\t\t\t<object class=\"wxSlider\"");
318 WriteControlInfo(res
);
319 m_xmlfile
.Write(GetValue1(res
));
320 m_xmlfile
.Write(GetMax(res
));
321 m_xmlfile
.Write(GetMin(res
));
322 m_xmlfile
.Write("\n\t\t\t</object>\n");
325 wxString
wxr2xml::GetMax(wxItemResource
* res
)
328 msg
<< "\t\t\t\t<max>" << res
->GetValue3() << "</max>\n";
332 wxString
wxr2xml::GetMin(wxItemResource
* res
)
335 msg
<< "\t\t\t\t<min>" << res
->GetValue2() << "</min>";
339 void wxr2xml::ParseComboBox(wxItemResource
* res
)
341 m_xmlfile
.Write("\t\t\t<object class=\"wxComboBox\"");
342 WriteControlInfo(res
);
344 WriteStringList(res
);
345 m_xmlfile
.Write("\n\t\t\t</object>\n");
348 void wxr2xml::ParseRadioButton(wxItemResource
* res
)
350 m_xmlfile
.Write("\t\t\t<object class=\"wxRadioButton\"");
351 WriteControlInfo(res
);
352 m_xmlfile
.Write(GetLabel(res
));
355 m_xmlfile
.Write(GetValue1(res
));
356 m_xmlfile
.Write(GetCheckStatus(res
));
357 m_xmlfile
.Write("\t\t\t</object>\n");
360 void wxr2xml::ParseScrollBar(wxItemResource
* res
)
362 m_xmlfile
.Write("\t\t\t<object class=\"wxScrollBar\"");
363 WriteControlInfo(res
);
364 m_xmlfile
.Write(GetValue1(res
));
365 m_xmlfile
.Write("\t\t\t\t<thumbsize>"+GetValue2(res
)+"</thumbsize>\n");
366 m_xmlfile
.Write("\t\t\t\t<range>"+GetValue3(res
)+"</range>\n");
367 m_xmlfile
.Write("\t\t\t\t<pagesize>"+GetValue5(res
)+"</pagesize>\n");
368 m_xmlfile
.Write("\t\t\t</object>\n");
371 wxString
wxr2xml::GetCheckStatus(wxItemResource
* res
)
374 msg
<< "\t\t\t\t<checked>" << res
->GetValue1() << "</checked>\n";
378 wxString
wxr2xml::GetStyles(wxItemResource
* res
)
380 // Very crude way to get styles
383 restype
= res
->GetType();
384 style
= res
->GetStyle();
386 s
= "\t\t\t\t<style>";
388 // Common styles for all controls
389 if (style
& wxSIMPLE_BORDER
)
390 s
+= "wxSIMPLE_BORDER|";
391 if (style
& wxSUNKEN_BORDER
)
392 s
+= "wxSUNKEN_BORDER|";
393 if (style
& wxSIMPLE_BORDER
)
394 s
+= "wxSIMPLE_BORDER|";
395 if (style
& wxDOUBLE_BORDER
)
396 s
+= "wxDOUBLE_BORDER|";
397 if (style
& wxRAISED_BORDER
)
398 s
+= "wxRAISED_BORDER|";
399 if (style
& wxTRANSPARENT_WINDOW
)
400 s
+= "wxTRANSPARENT_WINDOW|";
401 if (style
& wxWANTS_CHARS
)
402 s
+= "wxWANTS_CHARS|";
403 if (style
& wxNO_FULL_REPAINT_ON_RESIZE
)
404 s
+= "wxNO_FULL_REPAINT_ON_RESIZE|";
406 if (restype
== "wxDialog")
408 if (style
& wxDIALOG_MODAL
)
409 s
+= "wxDIALOG_MODAL|";
410 if (style
& wxDEFAULT_DIALOG_STYLE
)
411 s
+= "wxDEFAULT_DIALOG_STYLE|";
412 if (style
& wxDIALOG_MODELESS
)
413 s
+= "wxDIALOG_MODELESS|";
416 if (style
& wxTAB_TRAVERSAL
)
417 s
+= "wxTAB_TRAVERSAL|";
418 if (style
& wxWS_EX_VALIDATE_RECURSIVELY
)
419 s
+= "wxWS_EX_VALIDATE_RECURSIVELY|";
420 if (style
& wxSTAY_ON_TOP
)
421 s
+= "wxSTAY_ON_TOP|";
422 if (style
& wxCAPTION
)
424 if (style
& wxTHICK_FRAME
)
425 s
+= "wxTHICK_FRAME|";
426 if (style
& wxRESIZE_BOX
)
427 s
+= "wxRESIZE_BOX|";
428 if (style
& wxRESIZE_BORDER
)
429 s
+= "wxRESIZE_BORDER|";
430 if (style
& wxSYSTEM_MENU
)
431 s
+= "wxSYSTEM_MENU|";
432 if (style
& wxCLIP_CHILDREN
)
433 s
+= "wxCLIP_CHILDREN|";
436 if (restype
== "wxPanel")
438 if (style
& wxCLIP_CHILDREN
)
439 s
+= "wxCLIP_CHILDREN|";
442 if (style
& wxTAB_TRAVERSAL
)
443 s
+= "wxTAB_TRAVERSAL|";
444 if (style
& wxWS_EX_VALIDATE_RECURSIVELY
)
445 s
+= "wxWS_EX_VALIDATE_RECURSIVELY|";
448 if (restype
== "wxComboBox")
450 if (style
& wxCB_SORT
)
452 if (style
& wxCB_SIMPLE
)
454 if (style
& wxCB_READONLY
)
455 s
+= "wxCB_READONLY|";
456 if (style
& wxCB_DROPDOWN
)
457 s
+= "wxCB_DROPDOWN|";
460 if (restype
== "wxGauge")
462 if (style
& wxGA_HORIZONTAL
)
463 s
+= "wxGA_HORIZONTAL|";
464 if (style
& wxGA_VERTICAL
)
465 s
+= "wxGA_VERTICAL|";
466 if (style
& wxGA_PROGRESSBAR
)
467 s
+= "wxGA_PROGRESSBAR|";
469 if (style
& wxGA_SMOOTH
)
473 if (restype
== "wxRadioButton")
475 if (style
& wxRB_GROUP
)
479 if (restype
== "wxStaticText")
481 if (style
& wxST_NO_AUTORESIZE
)
482 s
+= "wxST_NO_AUTORESIZEL|";
485 if (restype
== "wxRadioBox")
487 if (style
& wxRA_HORIZONTAL
)
488 s
+= "wxRA_HORIZONTAL|";
489 if (style
& wxRA_SPECIFY_COLS
)
490 s
+= "wxRA_SPECIFY_COLS|";
491 if (style
& wxRA_SPECIFY_ROWS
)
492 s
+= "wxRA_SPECIFY_ROWS|";
493 if (style
& wxRA_VERTICAL
)
494 s
+= "wxRA_VERTICAL|";
497 if (restype
== "wxListBox")
499 if (style
& wxLB_SINGLE
)
501 if (style
& wxLB_MULTIPLE
)
502 s
+= "wxLB_MULTIPLE|";
503 if (style
& wxLB_EXTENDED
)
504 s
+= "wxLB_EXTENDED|";
505 if (style
& wxLB_HSCROLL
)
506 s
+= "wxLB_HSCROLL|";
507 if (style
& wxLB_ALWAYS_SB
)
508 s
+= "wxLB_ALWAYS_SB|";
509 if (style
& wxLB_NEEDED_SB
)
510 s
+= "wxLB_NEEDED_SB|";
511 if (style
& wxLB_SORT
)
515 if (restype
== "wxTextCtrl")
517 if (style
& wxTE_PROCESS_ENTER
)
518 s
+= "wxTE_PROCESS_ENTER|";
519 if (style
& wxTE_PROCESS_TAB
)
520 s
+= "wxTE_PROCESS_TAB|";
521 if (style
& wxTE_MULTILINE
)
522 s
+= "wxTE_MULTILINE|";
523 if (style
& wxTE_PASSWORD
)
524 s
+= "wxTE_PASSWORD|";
525 if (style
& wxTE_READONLY
)
526 s
+= "wxTE_READONLY|";
527 if (style
& wxHSCROLL
)
532 if (restype
== "wxScrollBar")
534 if (style
& wxSB_HORIZONTAL
)
535 s
+= "wxSB_HORIZONTAL|";
536 if (style
& wxSB_VERTICAL
)
537 s
+= "wxSB_VERTICAL|";
546 s
= s
.Truncate(l
- 1);
552 wxString
wxr2xml::GetDimension(wxItemResource
* res
)
555 msg
<< "\t\t\t\t<dimension>" << res
->GetValue1() << "</dimension>\n";
559 wxString
wxr2xml::GenerateName(wxItemResource
* res
)
562 name
= _T(" name=\"");
563 switch (res
->GetId()) {
565 name
+= _T("wxID_OK");
568 name
+= _T("wxID_CANCEL");
571 name
+= res
->GetName();
578 void wxr2xml::ParseMenuBar(wxItemResource
* res
)
580 wxItemResource
*child
;
581 wxNode
*node
= res
->GetChildren().First();
583 m_xmlfile
.Write("\t<object class=\"wxMenuBar\" ");
584 m_xmlfile
.Write(GenerateName(res
));
585 m_xmlfile
.Write(">\n");
587 child
= (wxItemResource
*) node
->Data();
592 m_xmlfile
.Write("\t</object> \n\n");
595 void wxr2xml::ParseMenu(wxItemResource
* res
)
597 wxItemResource
*child
;
598 wxNode
*node
= res
->GetChildren().First();
600 m_xmlfile
.Write("\t\t\t<object class=\"wxMenu\" ");
602 menuname
<< "name = \"menu_" << res
->GetValue1() << "\"";
603 m_xmlfile
.Write(menuname
);
604 m_xmlfile
.Write(">\n");
605 m_xmlfile
.Write("\t\t\t\t<label>"
606 + FixMenuString(res
->GetTitle()) + "</label>\n");
607 if (res
->GetValue4() != "")
608 m_xmlfile
.Write("\t\t\t\t<help>" + res
->GetValue4() +
610 // Read in menu items and additional menus
612 child
= (wxItemResource
*) node
->Data();
613 if (!child
->GetChildren().First())
614 ParseMenuItem(child
);
619 m_xmlfile
.Write("\t\t\t</object> \n");
622 void wxr2xml::ParseMenuItem(wxItemResource
* res
)
624 // Get Menu Item or Separator
625 if (res
->GetTitle() == "") {
626 m_xmlfile
.Write("\t\t\t<object class=\"separator\"/>\n");
628 m_xmlfile
.Write("\t\t\t\t<object class=\"wxMenuItem\" ");
630 menuname
<< "name = \"menuitem_" << res
->GetValue1() << "\"";
631 m_xmlfile
.Write(menuname
);
632 m_xmlfile
.Write(">\n");
633 m_xmlfile
.Write(" <label>"
634 + FixMenuString(res
->GetTitle()) + "</label>\n");
635 if (res
->GetValue4() != "")
636 m_xmlfile
.Write(" <help>" +
637 res
->GetValue4() + "</help>\n");
638 if (res
->GetValue2())
639 m_xmlfile
.Write("\t\t\t\t<checkable>1</checkable>\n");
640 m_xmlfile
.Write("\t\t\t</object> \n");
644 wxString
wxr2xml::FixMenuString(wxString phrase
)
646 phrase
.Replace("&", "$");
650 void wxr2xml::ParseStaticBitmap(wxItemResource
* res
)
652 m_xmlfile
.Write("\t\t\t<object class=\"wxStaticBitmap\"");
653 WriteControlInfo(res
);
654 // value4 holds bitmap name
656 bitmapname
= res
->GetValue4();
658 bitmap
= wxResourceCreateBitmap(bitmapname
, &m_table
);
659 bitmapname
+= _T(".bmp");
660 bitmap
.SaveFile(bitmapname
, wxBITMAP_TYPE_BMP
);
661 m_xmlfile
.Write("\n\t\t\t\t<bitmap>" + bitmapname
+ "</bitmap>");
662 m_xmlfile
.Write("\t\t\t</object>\n");
665 //Parse a bitmap resource
666 void wxr2xml::ParseBitmap(wxItemResource
* res
)
668 m_xmlfile
.Write("\t<object class=\"wxBitmap\" ");
669 m_xmlfile
.Write(GenerateName(res
)+">");
671 bitmapname
= res
->GetName();
673 bitmap
= wxResourceCreateBitmap(bitmapname
, &m_table
);
674 bitmapname
+= _T(".bmp");
675 bitmap
.SaveFile(bitmapname
, wxBITMAP_TYPE_BMP
);
676 m_xmlfile
.Write(bitmapname
);
677 m_xmlfile
.Write("</object>\n\n");
680 void wxr2xml::PanelStuff(wxItemResource
* res
)
682 if ((res
->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS
) != 0)
687 // If this is true ignore fonts, background color and use system
689 if ((res
->GetResourceStyle() & wxRESOURCE_USE_DEFAULTS
) != 0)
690 m_systemdefaults
= TRUE
;
692 m_systemdefaults
= FALSE
;
696 wxString
wxr2xml::GetValue2(wxItemResource
*res
)
699 msg
<< res
->GetValue2();
703 wxString
wxr2xml::GetValue3(wxItemResource
*res
)
706 msg
<< res
->GetValue3();
711 wxString
wxr2xml::GetValue5(wxItemResource
*res
)
714 msg
<< res
->GetValue5();
719 void wxr2xml::ParseBitmapButton(wxItemResource
*res
)
722 m_xmlfile
.Write("\t\t\t<object class=\"wxBitmapButton\"");
723 WriteControlInfo(res
);
724 // value4 holds bitmap name
726 bitmapname
= res
->GetValue4();
728 bitmap
= wxResourceCreateBitmap(bitmapname
, &m_table
);
729 bitmapname
+= _T(".bmp");
730 bitmap
.SaveFile(bitmapname
, wxBITMAP_TYPE_BMP
);
731 m_xmlfile
.Write("\t\t\t\t<bitmap>" + bitmapname
+ "</bitmap>\n");
733 m_xmlfile
.Write("\t\t\t</object>\n");
736 void wxr2xml::WriteFontInfo(wxItemResource
*res
)
738 //if systems_defaults true just ignore the fonts
739 if (m_systemdefaults
)
743 if (!font
.GetRefData())
746 m_xmlfile
.Write("\t\t\t<font>\n");
747 //Get font point size,font family,weight,font style,underline
750 pt
=font
.GetPointSize();
751 msg
<<"\t\t\t\t<size>"<<pt
<<"</size>\n";
752 m_xmlfile
.Write(msg
);
757 if (font
.GetUnderlined())
758 m_xmlfile
.Write("\t\t\t\t<underlined>1</underlined>\n");
760 m_xmlfile
.Write("\t\t\t</font>\n");
763 //WARNING possible make here
764 //I wasn't really sure the right way to do this.
765 void wxr2xml::GetFontFace(wxFont font
)
767 int family
=font
.GetFamily();
774 m_xmlfile
.Write("\t\t\t\t<face>decorative</face>\n");
777 m_xmlfile
.Write("\t\t\t\t<face>roman</face>\n");
780 m_xmlfile
.Write("\t\t\t\t<face>script</face>\n");
783 m_xmlfile
.Write("\t\t\t\t<face>swiss</face>\n");
786 m_xmlfile
.Write("\t\t\t\t<face>modern</face>\n");
789 wxLogError("Unknown font face");
793 void wxr2xml::GetFontStyle(wxFont font
)
796 int style
=font
.GetStyle();
800 //since this is default no point in making file any larger
804 m_xmlfile
.Write("<style>italic</style>\n");
807 m_xmlfile
.Write("<style>slant</style>\n");
810 wxLogError("Unknown font style");
814 void wxr2xml::GetFontWeight(wxFont font
)
816 int weight
=font
.GetWeight();
820 //since this is default no point in making file any larger
824 m_xmlfile
.Write("\t\t\t\t<weight>light</weight>\n");
827 m_xmlfile
.Write("\t\t\t\t<weight>bold</weight>\n");
830 wxLogError("Unknown font weight");