Better wxFile support, warning fixes and minor source cleaning.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32604 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -675,41 +675,24 @@ return phrase;
|
||||
|
||||
|
||||
void rc2wxr::ReadChar(int &ch)
|
||||
|
||||
{
|
||||
wxFileOffset result = m_rc.Tell();
|
||||
|
||||
int result;
|
||||
if ( result >= m_filesize )
|
||||
m_done=true;
|
||||
|
||||
result=m_rc.Tell();
|
||||
result = m_rc.Read(&ch,1);
|
||||
|
||||
if ( result==wxInvalidOffset )
|
||||
m_done=true;
|
||||
|
||||
|
||||
if((result>=m_filesize))
|
||||
|
||||
m_done=true;
|
||||
|
||||
|
||||
|
||||
result=m_rc.Read(&ch,1);
|
||||
|
||||
|
||||
|
||||
if((result==-1))
|
||||
|
||||
m_done=true;
|
||||
|
||||
|
||||
|
||||
if(ch==EOF)
|
||||
|
||||
m_done=true;
|
||||
|
||||
if(ch==EOF)
|
||||
m_done=true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void rc2wxr::ParseComboBox()
|
||||
|
||||
{
|
||||
|
||||
/* COMBOBOX IDC_SCALECOMBO,10,110,48,52,CBS_DROPDOWNLIST | CBS_SORT |
|
||||
|
@@ -11,37 +11,36 @@
|
||||
class rc2wxr : public wxObject
|
||||
{
|
||||
public:
|
||||
rc2wxr();
|
||||
~rc2wxr();
|
||||
void Convert(wxString wxrfile, wxString rcfile);
|
||||
rc2wxr();
|
||||
~rc2wxr();
|
||||
void Convert(wxString wxrfile, wxString rcfile);
|
||||
|
||||
private:
|
||||
wxFile m_rc;
|
||||
FILE *m_wxr;
|
||||
int m_filesize;
|
||||
bool m_done;
|
||||
int m_controlid;
|
||||
void ParseDialog(wxString dlgname);
|
||||
void ParseControls();
|
||||
void ParseStaticText();
|
||||
void ParseTextCtrl();
|
||||
void ParsePushButton();
|
||||
bool Seperator(int ch);
|
||||
void ParseGroupBox();
|
||||
void ReadRect(int & x, int & y, int & width, int & height);
|
||||
wxString GetToken();
|
||||
wxString GetQuoteField();
|
||||
void ReadChar(int &ch);
|
||||
void ParseComboBox();
|
||||
void ParseMenu(wxString name);
|
||||
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);
|
||||
|
||||
wxFile m_rc;
|
||||
FILE *m_wxr;
|
||||
wxFileOffset m_filesize;
|
||||
bool m_done;
|
||||
int m_controlid;
|
||||
void ParseDialog(wxString dlgname);
|
||||
void ParseControls();
|
||||
void ParseStaticText();
|
||||
void ParseTextCtrl();
|
||||
void ParsePushButton();
|
||||
bool Seperator(int ch);
|
||||
void ParseGroupBox();
|
||||
void ReadRect(int & x, int & y, int & width, int & height);
|
||||
wxString GetToken();
|
||||
wxString GetQuoteField();
|
||||
void ReadChar(int &ch);
|
||||
void ParseComboBox();
|
||||
void ParseMenu(wxString name);
|
||||
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);
|
||||
};
|
||||
|
||||
|
||||
|
@@ -901,7 +901,8 @@ void rc2xml::FirstPass()
|
||||
|
||||
void rc2xml::ParseBitmap(wxString varname)
|
||||
{
|
||||
wxString token,*bitmapfile;
|
||||
wxString token;
|
||||
wxString *bitmapfile;
|
||||
|
||||
token=PeekToken();
|
||||
//Microsoft notation?
|
||||
@@ -1138,7 +1139,8 @@ void rc2xml::ParseIconStatic()
|
||||
//IDR_MAINFRAME ICON DISCARDABLE "res\\mfcexample.ico"
|
||||
void rc2xml::ParseIcon(wxString varname)
|
||||
{
|
||||
wxString token,*iconfile;
|
||||
wxString token;
|
||||
wxString *iconfile;
|
||||
iconfile=new wxString;
|
||||
token=PeekToken();
|
||||
|
||||
|
@@ -87,7 +87,7 @@ protected:
|
||||
wxList * m_resourcelist;
|
||||
wxFile m_rc;
|
||||
wxFFile m_xmlfile;
|
||||
int m_filesize;
|
||||
wxFileOffset m_filesize;
|
||||
bool m_done;
|
||||
|
||||
};
|
||||
|
Reference in New Issue
Block a user