2000-09-17 15:17:13 -04:00
|
|
|
// rc2xml.h
|
|
|
|
//
|
|
|
|
//////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#if !defined(RC2XML_H)
|
|
|
|
#define RC2XML_H
|
|
|
|
|
|
|
|
#include "wx/file.h"
|
2005-09-19 18:32:30 -04:00
|
|
|
#include "wx/ffile.h"
|
|
|
|
#include "wx/list.h"
|
2000-09-17 15:17:13 -04:00
|
|
|
|
|
|
|
|
2004-06-11 09:14:23 -04:00
|
|
|
class rc2xml : public wxObject
|
2000-09-17 15:17:13 -04:00
|
|
|
{
|
|
|
|
public:
|
2000-10-18 17:51:04 -04:00
|
|
|
wxString m_workingpath;
|
|
|
|
wxString m_targetpath;
|
2000-09-26 17:59:37 -04:00
|
|
|
void WriteIcon(wxString iconname);
|
|
|
|
void ParseNormalMSControl();
|
|
|
|
bool Convert(wxString rcfile, wxString xmlfile);
|
|
|
|
rc2xml();
|
|
|
|
~rc2xml();
|
2000-09-17 15:17:13 -04:00
|
|
|
|
|
|
|
protected:
|
2004-06-11 09:14:23 -04:00
|
|
|
wxString LookUpId(wxString id);
|
|
|
|
|
2000-09-26 17:59:37 -04:00
|
|
|
void ParseResourceHeader();
|
|
|
|
void WriteBitmap(wxString bitmapname);
|
|
|
|
void ParseListCtrl(wxString label,wxString varname);
|
|
|
|
void ParseCalendar(wxString label,wxString varname);
|
|
|
|
void ParseTreeCtrl(wxString label,wxString varname);
|
|
|
|
void ParseScrollBar();
|
|
|
|
void ParseWeirdMSControl();
|
|
|
|
void ParseStaticBitmap(wxString label,wxString varname);
|
|
|
|
wxString CleanName(wxString name);
|
|
|
|
void ParseIcon(wxString varname);
|
|
|
|
wxList * m_iconlist;
|
|
|
|
void ParseIconStatic();
|
|
|
|
void ParseMenuItem();
|
2004-06-11 09:14:23 -04:00
|
|
|
|
2000-09-17 15:17:13 -04:00
|
|
|
//Functions
|
2000-09-26 17:59:37 -04:00
|
|
|
bool SplitHelp(wxString msg, wxString &shorthelp, wxString &longhelp);
|
|
|
|
bool LookUpString(wxString strid,wxString & st);
|
|
|
|
void ParseStringTable(wxString varname);
|
|
|
|
void WriteToolButton(wxString name,int index,int width,int height,wxBitmap bitmap);
|
|
|
|
wxString LookupString(wxString varname,wxStringList id,wxStringList msg);
|
|
|
|
void ParseToolBar(wxString varname);
|
|
|
|
void SecondPass();
|
|
|
|
void FirstPass();
|
|
|
|
void ParseBitmap(wxString varname);
|
|
|
|
void ParseSpinCtrl(wxString label,wxString varname);
|
|
|
|
void ParseRichEdit(wxString label, wxString varname);
|
|
|
|
void ParseDialog(wxString dlgname);
|
|
|
|
void ParseControls();
|
2002-12-16 06:03:05 -05:00
|
|
|
void ParseListBox(wxString varname);
|
|
|
|
void ParseStaticText(wxString phrase,wxString varname);
|
|
|
|
void ParseTextCtrl(wxString varname);
|
|
|
|
void ParseRadioButton(wxString phrase,wxString varname);
|
|
|
|
void ParseCheckBox(wxString phrase,wxString varname);
|
|
|
|
void ParsePushButton(wxString phrase, wxString varname);
|
2005-05-31 05:20:43 -04:00
|
|
|
bool Separator(int ch);
|
2002-12-16 06:03:05 -05:00
|
|
|
void ParseGroupBox(wxString phrase, wxString varname);
|
2001-04-14 14:03:41 -04:00
|
|
|
bool ReadRect(int & x, int & y, int & width, int & height);
|
2005-05-31 05:20:43 -04:00
|
|
|
wxString GetToken(bool *listseparator = 0);
|
2000-09-26 17:59:37 -04:00
|
|
|
wxString GetQuoteField();
|
2002-12-16 06:03:05 -05:00
|
|
|
wxString GetStringQuote();
|
2000-09-26 17:59:37 -04:00
|
|
|
void ReadChar(int &ch);
|
2002-12-16 06:03:05 -05:00
|
|
|
void ParseComboBox(wxString varname);
|
2000-09-26 17:59:37 -04:00
|
|
|
void ParseMenu(wxString varname);
|
|
|
|
void ParsePopupMenu();
|
|
|
|
wxString PeekToken();
|
|
|
|
void ParseControlMS();
|
|
|
|
void ParseSlider(wxString label, wxString varname);
|
|
|
|
void ParseProgressBar(wxString label, wxString varname);
|
|
|
|
bool ReadOrs(wxString & w);
|
|
|
|
void ParseCtrlButton(wxString label, wxString varname);
|
|
|
|
void WriteStyle(wxString style);
|
|
|
|
void WriteBasicInfo(int x,int y,int width,int height,wxString name);
|
|
|
|
void WriteName(wxString name);
|
|
|
|
void WriteTitle(wxString title);
|
|
|
|
void WritePosition(int x,int y);
|
|
|
|
void WriteSize(int width,int height);
|
|
|
|
void WriteLabel(wxString label);
|
2000-09-17 15:17:13 -04:00
|
|
|
//variables
|
2000-09-26 17:59:37 -04:00
|
|
|
wxList * m_stringtable;
|
|
|
|
wxList *m_bitmaplist;
|
|
|
|
wxList * m_resourcelist;
|
|
|
|
wxFile m_rc;
|
|
|
|
wxFFile m_xmlfile;
|
2005-03-04 14:32:40 -05:00
|
|
|
wxFileOffset m_filesize;
|
2000-09-26 17:59:37 -04:00
|
|
|
bool m_done;
|
2000-09-17 15:17:13 -04:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2002-12-04 09:11:26 -05:00
|
|
|
#endif
|