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<panel");
97 WriteControlInfo(res
);
98 m_xmlfile
.Write("\n");
99 m_xmlfile
.Write("\t\t<children>\n");
101 m_xmlfile
.Write(" \t\t</children>\n");
102 m_xmlfile
.Write("\t</panel>\n\n");
105 void wxr2xml::ParseDialog(wxItemResource
* res
)
108 m_xmlfile
.Write("\t<dialog");
109 WriteControlInfo(res
);
110 m_xmlfile
.Write(GetTitle(res
));
112 m_xmlfile
.Write("\n");
113 m_xmlfile
.Write("\t\t<children>\n");
115 m_xmlfile
.Write("\t\t</children>\n");
116 m_xmlfile
.Write("\t</dialog>\n\n");
119 void wxr2xml::ParseControls(wxItemResource
* res
)
121 wxNode
*node
= res
->GetChildren().First();
124 wxItemResource
*res
= (wxItemResource
*) node
->Data();
125 wxString
resType(res
->GetType());
126 if (resType
== "wxButton")
128 else if ((resType
== "wxTextCtrl") | (resType
== "wxText")
129 | (resType
== "wxMultiText"))
131 else if (resType
== "wxCheckBox")
133 else if (resType
== "wxRadioBox")
135 else if (resType
== "wxListBox")
137 else if ((resType
== "wxStaticText") | (resType
== "wxMessage"))
138 ParseStaticText(res
);
139 else if (resType
== "wxChoice")
141 else if (resType
== "wxGauge")
143 else if (resType
== "wxSlider")
145 else if (resType
== "wxComboBox")
147 else if (resType
== "wxRadioButton")
148 ParseRadioButton(res
);
149 else if (resType
== "wxStaticBitmap")
150 ParseStaticBitmap(res
);
151 else if (resType
== "wxScrollBar")
153 else if ((resType
== "wxStaticBox") | (resType
== "wxGroupBox"))
155 else if (resType
== "wxBitmapButton")
156 ParseBitmapButton(res
);
158 wxLogError("Found unsupported resource " + resType
);
163 // Write out basic stuff every control has
164 // name,position,size,bg,fg
165 void wxr2xml::WriteControlInfo(wxItemResource
* res
)
167 m_xmlfile
.Write(GenerateName(res
));
168 m_xmlfile
.Write(">\n");
169 m_xmlfile
.Write(GetPosition(res
));
170 m_xmlfile
.Write(GetSize(res
));
171 m_xmlfile
.Write(GetStyles(res
));
175 wxString
wxr2xml::GetSize(wxItemResource
* res
)
179 msg
<< "\t\t\t\t<size>" << res
->GetWidth() << "," << res
->GetHeight() << "d</size>\n";
181 msg
<< "\t\t\t\t<size>" << res
->GetWidth() << "," << res
->GetHeight() << "</size>\n";
185 wxString
wxr2xml::GetPosition(wxItemResource
* res
)
189 msg
<< "\t\t\t\t<pos>" << res
->GetX() << "," << res
->GetY() << "d</pos>\n";
191 msg
<< "\t\t\t\t<pos>" << res
->GetX() << "," << res
->GetY() << "</pos>\n";
195 void wxr2xml::ParseButton(wxItemResource
* res
)
197 m_xmlfile
.Write("\t\t\t<button");
198 WriteControlInfo(res
);
199 m_xmlfile
.Write(GetLabel(res
));
200 m_xmlfile
.Write("\t\t\t</button>\n");
203 void wxr2xml::ParseTextCtrl(wxItemResource
* res
)
205 m_xmlfile
.Write("\t\t\t<textctrl");
206 WriteControlInfo(res
);
207 m_xmlfile
.Write(GetValue4(res
));
208 m_xmlfile
.Write("\t\t\t</textctrl>\n");
212 wxString
wxr2xml::GetTitle(wxItemResource
* res
)
215 msg
= _T("\t\t\t\t<title>" + res
->GetTitle() + "</title>");
219 wxString
wxr2xml::GetValue4(wxItemResource
* res
)
222 msg
= _T("\t\t\t\t<value>" + res
->GetValue4() + "</value>\n");
226 void wxr2xml::ParseCheckBox(wxItemResource
* res
)
228 m_xmlfile
.Write("\t\t\t<checkbox");
229 WriteControlInfo(res
);
230 m_xmlfile
.Write(GetLabel(res
));
231 m_xmlfile
.Write(GetCheckStatus(res
));
232 m_xmlfile
.Write("\t\t\t</checkbox>\n");
235 wxString
wxr2xml::GetLabel(wxItemResource
* res
)
237 return _T("\t\t\t\t<label>" + res
->GetTitle() + "</label>\n");
240 void wxr2xml::ParseRadioBox(wxItemResource
* res
)
242 m_xmlfile
.Write("\t\t\t<radiobox");
243 WriteControlInfo(res
);
244 m_xmlfile
.Write(GetLabel(res
));
245 // Add radio box items
246 WriteStringList(res
);
248 m_xmlfile
.Write(GetDimension(res
));
249 m_xmlfile
.Write("\t\t\t</radiobox>\n");
252 void wxr2xml::ParseListBox(wxItemResource
* res
)
254 m_xmlfile
.Write("\t\t\t<listbox");
255 WriteControlInfo(res
);
256 WriteStringList(res
);
257 m_xmlfile
.Write("\t\t\t</listbox>\n");
260 void wxr2xml::ParseStaticText(wxItemResource
* res
)
262 m_xmlfile
.Write("\t\t\t<statictext");
263 WriteControlInfo(res
);
264 m_xmlfile
.Write(GetLabel(res
));
265 m_xmlfile
.Write("\t\t\t</statictext>\n");
268 void wxr2xml::ParseStaticBox(wxItemResource
* res
)
270 m_xmlfile
.Write("\t\t\t<staticbox");
271 WriteControlInfo(res
);
272 m_xmlfile
.Write(GetLabel(res
));
273 m_xmlfile
.Write("\t\t\t</staticbox>\n");
276 void wxr2xml::WriteStringList(wxItemResource
* res
)
278 m_xmlfile
.Write("\t\t\t\t<content>\n");
279 for (wxStringListNode
* node
= res
->GetStringValues().GetFirst();
280 node
;node
= node
->GetNext()) {
281 const wxString s1
= node
->GetData();
282 m_xmlfile
.Write("\t\t\t\t\t<item>" + s1
+ "</item>\n");
284 m_xmlfile
.Write("\t\t\t\t</content>\n");
287 void wxr2xml::ParseChoice(wxItemResource
* res
)
289 m_xmlfile
.Write("\t\t\t<choice");
290 WriteControlInfo(res
);
292 WriteStringList(res
);
293 m_xmlfile
.Write("\t\t\t</choice>\n");
296 void wxr2xml::ParseGauge(wxItemResource
* res
)
298 m_xmlfile
.Write("\t\t\t<gauge");
299 WriteControlInfo(res
);
300 m_xmlfile
.Write(GetValue1(res
));
301 m_xmlfile
.Write(GetRange(res
));
302 m_xmlfile
.Write("\n\t\t\t</gauge>\n");
305 wxString
wxr2xml::GetValue1(wxItemResource
* res
)
308 msg
<< "\t\t\t\t<value>" << res
->GetValue1() << "</value>\n";
312 wxString
wxr2xml::GetRange(wxItemResource
* res
)
315 msg
<< "\t\t\t\t<range>" << res
->GetValue2() << "</range>";
319 void wxr2xml::ParseSlider(wxItemResource
* res
)
321 m_xmlfile
.Write("\t\t\t<slider");
322 WriteControlInfo(res
);
323 m_xmlfile
.Write(GetValue1(res
));
324 m_xmlfile
.Write(GetMax(res
));
325 m_xmlfile
.Write(GetMin(res
));
326 m_xmlfile
.Write("\n\t\t\t</slider>\n");
329 wxString
wxr2xml::GetMax(wxItemResource
* res
)
332 msg
<< "\t\t\t\t<max>" << res
->GetValue3() << "</max>\n";
336 wxString
wxr2xml::GetMin(wxItemResource
* res
)
339 msg
<< "\t\t\t\t<min>" << res
->GetValue2() << "</min>";
343 void wxr2xml::ParseComboBox(wxItemResource
* res
)
345 m_xmlfile
.Write("\t\t\t<combobox");
346 WriteControlInfo(res
);
348 WriteStringList(res
);
349 m_xmlfile
.Write("\n\t\t\t</combobox>\n");
352 void wxr2xml::ParseRadioButton(wxItemResource
* res
)
354 m_xmlfile
.Write("\t\t\t<radiobutton");
355 WriteControlInfo(res
);
356 m_xmlfile
.Write(GetLabel(res
));
359 m_xmlfile
.Write(GetValue1(res
));
360 m_xmlfile
.Write(GetCheckStatus(res
));
361 m_xmlfile
.Write("\t\t\t</radiobutton>\n");
364 void wxr2xml::ParseScrollBar(wxItemResource
* res
)
366 m_xmlfile
.Write("\t\t\t<scrollbar");
367 WriteControlInfo(res
);
368 m_xmlfile
.Write(GetValue1(res
));
369 m_xmlfile
.Write("\t\t\t\t<thumbsize>"+GetValue2(res
)+"</thumbsize>\n");
370 m_xmlfile
.Write("\t\t\t\t<range>"+GetValue3(res
)+"</range>\n");
371 m_xmlfile
.Write("\t\t\t\t<pagesize>"+GetValue5(res
)+"</pagesize>\n");
372 m_xmlfile
.Write("\t\t\t</scrollbar>\n");
375 wxString
wxr2xml::GetCheckStatus(wxItemResource
* res
)
378 msg
<< "\t\t\t\t<checked>" << res
->GetValue1() << "</checked>\n";
382 wxString
wxr2xml::GetStyles(wxItemResource
* res
)
384 // Very crude way to get styles
387 restype
= res
->GetType();
388 style
= res
->GetStyle();
390 s
= "\t\t\t\t<style>";
392 // Common styles for all controls
393 if (style
& wxSIMPLE_BORDER
)
394 s
+= "wxSIMPLE_BORDER|";
395 if (style
& wxSUNKEN_BORDER
)
396 s
+= "wxSUNKEN_BORDER|";
397 if (style
& wxSIMPLE_BORDER
)
398 s
+= "wxSIMPLE_BORDER|";
399 if (style
& wxDOUBLE_BORDER
)
400 s
+= "wxDOUBLE_BORDER|";
401 if (style
& wxRAISED_BORDER
)
402 s
+= "wxRAISED_BORDER|";
403 if (style
& wxTRANSPARENT_WINDOW
)
404 s
+= "wxTRANSPARENT_WINDOW|";
405 if (style
& wxWANTS_CHARS
)
406 s
+= "wxWANTS_CHARS|";
407 if (style
& wxNO_FULL_REPAINT_ON_RESIZE
)
408 s
+= "wxNO_FULL_REPAINT_ON_RESIZE|";
410 if (restype
== "wxDialog")
412 if (style
& wxDIALOG_MODAL
)
413 s
+= "wxDIALOG_MODAL|";
414 if (style
& wxDEFAULT_DIALOG_STYLE
)
415 s
+= "wxDEFAULT_DIALOG_STYLE|";
416 if (style
& wxDIALOG_MODELESS
)
417 s
+= "wxDIALOG_MODELESS|";
420 if (style
& wxTAB_TRAVERSAL
)
421 s
+= "wxTAB_TRAVERSAL|";
422 if (style
& wxWS_EX_VALIDATE_RECURSIVELY
)
423 s
+= "wxWS_EX_VALIDATE_RECURSIVELY|";
424 if (style
& wxSTAY_ON_TOP
)
425 s
+= "wxSTAY_ON_TOP|";
426 if (style
& wxCAPTION
)
428 if (style
& wxTHICK_FRAME
)
429 s
+= "wxTHICK_FRAME|";
430 if (style
& wxRESIZE_BOX
)
431 s
+= "wxRESIZE_BOX|";
432 if (style
& wxRESIZE_BORDER
)
433 s
+= "wxRESIZE_BORDER|";
434 if (style
& wxSYSTEM_MENU
)
435 s
+= "wxSYSTEM_MENU|";
436 if (style
& wxCLIP_CHILDREN
)
437 s
+= "wxCLIP_CHILDREN|";
440 if (restype
== "wxPanel")
442 if (style
& wxCLIP_CHILDREN
)
443 s
+= "wxCLIP_CHILDREN|";
446 if (style
& wxTAB_TRAVERSAL
)
447 s
+= "wxTAB_TRAVERSAL|";
448 if (style
& wxWS_EX_VALIDATE_RECURSIVELY
)
449 s
+= "wxWS_EX_VALIDATE_RECURSIVELY|";
452 if (restype
== "wxComboBox")
454 if (style
& wxCB_SORT
)
456 if (style
& wxCB_SIMPLE
)
458 if (style
& wxCB_READONLY
)
459 s
+= "wxCB_READONLY|";
460 if (style
& wxCB_DROPDOWN
)
461 s
+= "wxCB_DROPDOWN|";
464 if (restype
== "wxGauge")
466 if (style
& wxGA_HORIZONTAL
)
467 s
+= "wxGA_HORIZONTAL|";
468 if (style
& wxGA_VERTICAL
)
469 s
+= "wxGA_VERTICAL|";
470 if (style
& wxGA_PROGRESSBAR
)
471 s
+= "wxGA_PROGRESSBAR|";
473 if (style
& wxGA_SMOOTH
)
477 if (restype
== "wxRadioButton")
479 if (style
& wxRB_GROUP
)
483 if (restype
== "wxStaticText")
485 if (style
& wxST_NO_AUTORESIZE
)
486 s
+= "wxST_NO_AUTORESIZEL|";
489 if (restype
== "wxRadioBox")
491 if (style
& wxRA_HORIZONTAL
)
492 s
+= "wxRA_HORIZONTAL|";
493 if (style
& wxRA_SPECIFY_COLS
)
494 s
+= "wxRA_SPECIFY_COLS|";
495 if (style
& wxRA_SPECIFY_ROWS
)
496 s
+= "wxRA_SPECIFY_ROWS|";
497 if (style
& wxRA_VERTICAL
)
498 s
+= "wxRA_VERTICAL|";
501 if (restype
== "wxListBox")
503 if (style
& wxLB_SINGLE
)
505 if (style
& wxLB_MULTIPLE
)
506 s
+= "wxLB_MULTIPLE|";
507 if (style
& wxLB_EXTENDED
)
508 s
+= "wxLB_EXTENDED|";
509 if (style
& wxLB_HSCROLL
)
510 s
+= "wxLB_HSCROLL|";
511 if (style
& wxLB_ALWAYS_SB
)
512 s
+= "wxLB_ALWAYS_SB|";
513 if (style
& wxLB_NEEDED_SB
)
514 s
+= "wxLB_NEEDED_SB|";
515 if (style
& wxLB_SORT
)
519 if (restype
== "wxTextCtrl")
521 if (style
& wxTE_PROCESS_ENTER
)
522 s
+= "wxTE_PROCESS_ENTER|";
523 if (style
& wxTE_PROCESS_TAB
)
524 s
+= "wxTE_PROCESS_TAB|";
525 if (style
& wxTE_MULTILINE
)
526 s
+= "wxTE_MULTILINE|";
527 if (style
& wxTE_PASSWORD
)
528 s
+= "wxTE_PASSWORD|";
529 if (style
& wxTE_READONLY
)
530 s
+= "wxTE_READONLY|";
531 if (style
& wxHSCROLL
)
536 if (restype
== "wxScrollBar")
538 if (style
& wxSB_HORIZONTAL
)
539 s
+= "wxSB_HORIZONTAL|";
540 if (style
& wxSB_VERTICAL
)
541 s
+= "wxSB_VERTICAL|";
550 s
= s
.Truncate(l
- 1);
556 wxString
wxr2xml::GetDimension(wxItemResource
* res
)
559 msg
<< "\t\t\t\t<dimension>" << res
->GetValue1() << "</dimension>\n";
563 wxString
wxr2xml::GenerateName(wxItemResource
* res
)
566 name
= _T(" name=\"");
567 switch (res
->GetId()) {
569 name
+= _T("wxID_OK");
572 name
+= _T("wxID_CANCEL");
575 name
+= res
->GetName();
582 void wxr2xml::ParseMenuBar(wxItemResource
* res
)
584 wxItemResource
*child
;
585 wxNode
*node
= res
->GetChildren().First();
587 m_xmlfile
.Write("\t<menubar ");
588 m_xmlfile
.Write(GenerateName(res
));
589 m_xmlfile
.Write(">\n");
590 m_xmlfile
.Write("\t\t<children>\n");
592 child
= (wxItemResource
*) node
->Data();
597 m_xmlfile
.Write("\t\t</children>\n");
598 m_xmlfile
.Write("\t</menubar> \n\n");
601 void wxr2xml::ParseMenu(wxItemResource
* res
)
603 wxItemResource
*child
;
604 wxNode
*node
= res
->GetChildren().First();
606 m_xmlfile
.Write("\t\t\t<menu ");
608 menuname
<< "name = \"menu_" << res
->GetValue1() << "\"";
609 m_xmlfile
.Write(menuname
);
610 m_xmlfile
.Write(">\n");
611 m_xmlfile
.Write("\t\t\t\t<label>"
612 + FixMenuString(res
->GetTitle()) + "</label>\n");
613 if (res
->GetValue4() != "")
614 m_xmlfile
.Write("\t\t\t\t<help>" + res
->GetValue4() +
616 m_xmlfile
.Write("\t\t\t<children>\n");
617 // Read in menu items and additional menus
619 child
= (wxItemResource
*) node
->Data();
620 if (!child
->GetChildren().First())
621 ParseMenuItem(child
);
626 m_xmlfile
.Write("\t\t\t</children>\n");
627 m_xmlfile
.Write("\t\t\t</menu> \n");
630 void wxr2xml::ParseMenuItem(wxItemResource
* res
)
632 // Get Menu Item or Separator
633 if (res
->GetTitle() == "") {
634 m_xmlfile
.Write("\t\t\t<separator/>\n");
636 m_xmlfile
.Write("\t\t\t\t<menuitem ");
638 menuname
<< "name = \"menuitem_" << res
->GetValue1() << "\"";
639 m_xmlfile
.Write(menuname
);
640 m_xmlfile
.Write(">\n");
641 m_xmlfile
.Write(" <label>"
642 + FixMenuString(res
->GetTitle()) + "</label>\n");
643 if (res
->GetValue4() != "")
644 m_xmlfile
.Write(" <help>" +
645 res
->GetValue4() + "</help>\n");
646 if (res
->GetValue2())
647 m_xmlfile
.Write("\t\t\t\t<checkable>1</checkable>\n");
648 m_xmlfile
.Write("\t\t\t</menuitem> \n");
652 wxString
wxr2xml::FixMenuString(wxString phrase
)
654 phrase
.Replace("&", "$");
658 void wxr2xml::ParseStaticBitmap(wxItemResource
* res
)
660 m_xmlfile
.Write("\t\t\t<staticbitmap");
661 WriteControlInfo(res
);
662 // value4 holds bitmap name
664 bitmapname
= res
->GetValue4();
666 bitmap
= wxResourceCreateBitmap(bitmapname
, &m_table
);
667 bitmapname
+= _T(".bmp");
668 bitmap
.SaveFile(bitmapname
, wxBITMAP_TYPE_BMP
);
669 m_xmlfile
.Write("\n\t\t\t\t<bitmap>" + bitmapname
+ "</bitmap>");
670 m_xmlfile
.Write("\t\t\t</staticbitmap>\n");
673 //Parse a bitmap resource
674 void wxr2xml::ParseBitmap(wxItemResource
* res
)
676 m_xmlfile
.Write("\t<bitmap ");
677 m_xmlfile
.Write(GenerateName(res
)+">");
679 bitmapname
= res
->GetName();
681 bitmap
= wxResourceCreateBitmap(bitmapname
, &m_table
);
682 bitmapname
+= _T(".bmp");
683 bitmap
.SaveFile(bitmapname
, wxBITMAP_TYPE_BMP
);
684 m_xmlfile
.Write(bitmapname
);
685 m_xmlfile
.Write("</bitmap>\n\n");
688 void wxr2xml::PanelStuff(wxItemResource
* res
)
690 if ((res
->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS
) != 0)
695 // If this is true ignore fonts, background color and use system
697 if ((res
->GetResourceStyle() & wxRESOURCE_USE_DEFAULTS
) != 0)
698 m_systemdefaults
= TRUE
;
700 m_systemdefaults
= FALSE
;
704 wxString
wxr2xml::GetValue2(wxItemResource
*res
)
707 msg
<< res
->GetValue2();
711 wxString
wxr2xml::GetValue3(wxItemResource
*res
)
714 msg
<< res
->GetValue3();
719 wxString
wxr2xml::GetValue5(wxItemResource
*res
)
722 msg
<< res
->GetValue5();
727 void wxr2xml::ParseBitmapButton(wxItemResource
*res
)
730 m_xmlfile
.Write("\t\t\t<bitmapbutton");
731 WriteControlInfo(res
);
732 // value4 holds bitmap name
734 bitmapname
= res
->GetValue4();
736 bitmap
= wxResourceCreateBitmap(bitmapname
, &m_table
);
737 bitmapname
+= _T(".bmp");
738 bitmap
.SaveFile(bitmapname
, wxBITMAP_TYPE_BMP
);
739 m_xmlfile
.Write("\t\t\t\t<bitmap>" + bitmapname
+ "</bitmap>\n");
741 m_xmlfile
.Write("\t\t\t</bitmapbutton>\n");
744 void wxr2xml::WriteFontInfo(wxItemResource
*res
)
746 //if systems_defaults true just ignore the fonts
747 if (m_systemdefaults
)
751 if (!font
.GetRefData())
754 m_xmlfile
.Write("\t\t\t<font>\n");
755 //Get font point size,font family,weight,font style,underline
758 pt
=font
.GetPointSize();
759 msg
<<"\t\t\t\t<size>"<<pt
<<"</size>\n";
760 m_xmlfile
.Write(msg
);
765 if (font
.GetUnderlined())
766 m_xmlfile
.Write("\t\t\t\t<underlined>1</underlined>\n");
768 m_xmlfile
.Write("\t\t\t</font>\n");
771 //WARNING possible make here
772 //I wasn't really sure the right way to do this.
773 void wxr2xml::GetFontFace(wxFont font
)
775 int family
=font
.GetFamily();
782 m_xmlfile
.Write("\t\t\t\t<face>Decorative</face>\n");
785 m_xmlfile
.Write("\t\t\t\t<face>Roman</face>\n");
788 m_xmlfile
.Write("\t\t\t\t<face>Script</face>\n");
791 m_xmlfile
.Write("\t\t\t\t<face>Swiss</face>\n");
794 m_xmlfile
.Write("\t\t\t\t<face>Modern</face>\n");
797 wxLogError("Unknown font face");
801 void wxr2xml::GetFontStyle(wxFont font
)
804 int style
=font
.GetStyle();
808 //since this is default no point in making file any larger
812 m_xmlfile
.Write("<style>italic</style>\n");
815 m_xmlfile
.Write("<style>slant</style>\n");
818 wxLogError("Unknown font style");
822 void wxr2xml::GetFontWeight(wxFont font
)
824 int weight
=font
.GetWeight();
828 //since this is default no point in making file any larger
832 m_xmlfile
.Write("\t\t\t\t<weight>light</weight>\n");
835 m_xmlfile
.Write("\t\t\t\t<weight>bold</weight>\n");
838 wxLogError("Unknown font weight");