result = m_xmlfile.Open(xmlfile.c_str(), _T("w+t"));
wxASSERT_MSG(result, _T("Couldn't create XML file"));
if (!result)
result = m_xmlfile.Open(xmlfile.c_str(), _T("w+t"));
wxASSERT_MSG(result, _T("Couldn't create XML file"));
if (!result)
result = m_table.ParseResourceFile(wxrfile);
wxASSERT_MSG(result, _T("Couldn't Load WXR file"));
if (!result)
result = m_table.ParseResourceFile(wxrfile);
wxASSERT_MSG(result, _T("Couldn't Load WXR file"));
if (!result)
// Write basic xml header
m_xmlfile.Write(_T("<?xml version=\"1.0\" ?>\n"));
m_xmlfile.Write(_T("<resource>\n"));
// Write basic xml header
m_xmlfile.Write(_T("<?xml version=\"1.0\" ?>\n"));
m_xmlfile.Write(_T("<resource>\n"));
if (style & wxTAB_TRAVERSAL)
s += _T("wxTAB_TRAVERSAL|");
if (style & wxWS_EX_VALIDATE_RECURSIVELY)
if (style & wxTAB_TRAVERSAL)
s += _T("wxTAB_TRAVERSAL|");
if (style & wxWS_EX_VALIDATE_RECURSIVELY)
- if (style & wxTHICK_FRAME)
- s += _T("wxTHICK_FRAME|");
+ if (style & wxRESIZE_BORDER)
+ s += _T("wxRESIZE_BORDER|");
+#if WXWIN_COMPATIBILITY_2_6
if (style & wxRESIZE_BORDER)
s += _T("wxRESIZE_BORDER|");
if (style & wxSYSTEM_MENU)
if (style & wxRESIZE_BORDER)
s += _T("wxRESIZE_BORDER|");
if (style & wxSYSTEM_MENU)
if (style & wxTAB_TRAVERSAL)
s += _T("wxTAB_TRAVERSAL|");
if (style & wxWS_EX_VALIDATE_RECURSIVELY)
s += _T("wxWS_EX_VALIDATE_RECURSIVELY|");
}
if (style & wxTAB_TRAVERSAL)
s += _T("wxTAB_TRAVERSAL|");
if (style & wxWS_EX_VALIDATE_RECURSIVELY)
s += _T("wxWS_EX_VALIDATE_RECURSIVELY|");
}
{
if (style & wxGA_HORIZONTAL)
s += _T("wxGA_HORIZONTAL|");
if (style & wxGA_VERTICAL)
s += _T("wxGA_VERTICAL|");
{
if (style & wxGA_HORIZONTAL)
s += _T("wxGA_HORIZONTAL|");
if (style & wxGA_VERTICAL)
s += _T("wxGA_VERTICAL|");
m_xmlfile.Write(_T("\t\t\t<object class=\"wxMenu\" "));
wxString menuname;
menuname << _T("name = \"menu_") << res->GetValue1() << _T("\"");
m_xmlfile.Write(_T("\t\t\t<object class=\"wxMenu\" "));
wxString menuname;
menuname << _T("name = \"menu_") << res->GetValue1() << _T("\"");
m_xmlfile.Write(_T(">\n"));
m_xmlfile.Write(_T("\t\t\t\t<label>")
+ FixMenuString(res->GetTitle()) + _T("</label>\n"));
m_xmlfile.Write(_T(">\n"));
m_xmlfile.Write(_T("\t\t\t\t<label>")
+ FixMenuString(res->GetTitle()) + _T("</label>\n"));
m_xmlfile.Write(_T("\t\t\t<object class=\"separator\"/>\n"));
} else {
m_xmlfile.Write(_T("\t\t\t\t<object class=\"wxMenuItem\" "));
m_xmlfile.Write(_T("\t\t\t<object class=\"separator\"/>\n"));
} else {
m_xmlfile.Write(_T("\t\t\t\t<object class=\"wxMenuItem\" "));
menuname << _T("name = \"menuitem_") << res->GetValue1() << _T("\"");
m_xmlfile.Write(menuname);
m_xmlfile.Write(_T(">\n"));
menuname << _T("name = \"menuitem_") << res->GetValue1() << _T("\"");
m_xmlfile.Write(menuname);
m_xmlfile.Write(_T(">\n"));
void wxr2xml::PanelStuff(wxItemResource * res)
{
if ((res->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS) != 0)
void wxr2xml::PanelStuff(wxItemResource * res)
{
if ((res->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS) != 0)
// If this is true ignore fonts, background color and use system
// defaults instead
if ((res->GetResourceStyle() & wxRESOURCE_USE_DEFAULTS) != 0)
// If this is true ignore fonts, background color and use system
// defaults instead
if ((res->GetResourceStyle() & wxRESOURCE_USE_DEFAULTS) != 0)
bitmapname += _T(".bmp");
bitmap.SaveFile(bitmapname, wxBITMAP_TYPE_BMP);
m_xmlfile.Write(_T("\t\t\t\t<bitmap>") + bitmapname + _T("</bitmap>\n"));
bitmapname += _T(".bmp");
bitmap.SaveFile(bitmapname, wxBITMAP_TYPE_BMP);
m_xmlfile.Write(_T("\t\t\t\t<bitmap>") + bitmapname + _T("</bitmap>\n"));