]> git.saurik.com Git - wxWidgets.git/blob - contrib/utils/convertrc/rc2xml.h
corrections for Mac OS X compilation
[wxWidgets.git] / contrib / utils / convertrc / rc2xml.h
1 // rc2xml.h
2 //
3 //////////////////////////////////////////////////////////////////////
4
5 #if !defined(RC2XML_H)
6 #define RC2XML_H
7
8 #include "wx/file.h"
9 #include <wx/ffile.h>
10 #include <wx/list.h>
11
12
13 class rc2xml : public wxObject
14 {
15 public:
16 wxString m_workingpath;
17 wxString m_targetpath;
18 void WriteIcon(wxString iconname);
19 void ParseNormalMSControl();
20 bool Convert(wxString rcfile, wxString xmlfile);
21 rc2xml();
22 ~rc2xml();
23
24 protected:
25 wxString LookUpId(wxString id);
26
27 void ParseResourceHeader();
28 void WriteBitmap(wxString bitmapname);
29 void ParseListCtrl(wxString label,wxString varname);
30 void ParseCalendar(wxString label,wxString varname);
31 void ParseTreeCtrl(wxString label,wxString varname);
32 void ParseScrollBar();
33 void ParseWeirdMSControl();
34 void ParseStaticBitmap(wxString label,wxString varname);
35 wxString CleanName(wxString name);
36 void ParseIcon(wxString varname);
37 wxList * m_iconlist;
38 void ParseIconStatic();
39 void ParseMenuItem();
40
41 //Functions
42 bool SplitHelp(wxString msg, wxString &shorthelp, wxString &longhelp);
43 bool LookUpString(wxString strid,wxString & st);
44 void ParseStringTable(wxString varname);
45 void WriteToolButton(wxString name,int index,int width,int height,wxBitmap bitmap);
46 wxString LookupString(wxString varname,wxStringList id,wxStringList msg);
47 void ParseToolBar(wxString varname);
48 void SecondPass();
49 void FirstPass();
50 void ParseBitmap(wxString varname);
51 void ParseSpinCtrl(wxString label,wxString varname);
52 void ParseRichEdit(wxString label, wxString varname);
53 void ParseDialog(wxString dlgname);
54 void ParseControls();
55 void ParseListBox();
56 void ParseStaticText();
57 void ParseTextCtrl();
58 void ParseRadioButton();
59 void ParseCheckBox();
60 void ParsePushButton();
61 bool Seperator(int ch);
62 void ParseGroupBox();
63 bool ReadRect(int & x, int & y, int & width, int & height);
64 wxString GetToken(bool *listseperator = 0);
65 wxString GetQuoteField();
66 void ReadChar(int &ch);
67 void ParseComboBox();
68 void ParseMenu(wxString varname);
69 void ParsePopupMenu();
70 wxString PeekToken();
71 void ParseControlMS();
72 void ParseSlider(wxString label, wxString varname);
73 void ParseProgressBar(wxString label, wxString varname);
74 bool ReadOrs(wxString & w);
75 void ParseCtrlButton(wxString label, wxString varname);
76 void WriteStyle(wxString style);
77 void WriteBasicInfo(int x,int y,int width,int height,wxString name);
78 void WriteName(wxString name);
79 void WriteTitle(wxString title);
80 void WritePosition(int x,int y);
81 void WriteSize(int width,int height);
82 void WriteLabel(wxString label);
83 //variables
84 wxList * m_stringtable;
85 wxList *m_bitmaplist;
86 wxList * m_resourcelist;
87 wxFile m_rc;
88 wxFFile m_xmlfile;
89 int m_filesize;
90 bool m_done;
91
92 };
93
94
95 #endif