// for all others, include the necessary headers (this file is usually all you
-// need because it includes almost all "standard" wxWindows headers
+// need because it includes almost all "standard" wxWidgets headers
#ifndef WX_PRECOMP
{
-m_done=FALSE;
+m_done=false;
m_controlid=6000;
void rc2wxr::Convert(wxString wxrfile, wxString rcfile)
-
{
+ m_rc.Open(rcfile);
+ m_filesize=m_rc.Length();
+ if( (m_wxr = wxFopen( wxrfile.fn_str(), _T("wt") )) == NULL )
+ {
+ return;
+ }
-m_rc.Open(rcfile);
-
-m_filesize=m_rc.Length();
-
-if( (m_wxr = wxFopen( wxrfile, _T("wt") )) == NULL )
-
-{
-
- return;
-
-}
-
-
-
-
-
-wxString tok,prevtok;
-
-
-
-
-
-while (!m_done)
-
-{
-
-
-
-tok=GetToken();
-
-
-
-if (tok==_T("DIALOG"))
-
-{
-
-ParseDialog(prevtok);
-
-}
-
-
-
-
-
-if (tok==_T("MENU"))
-
-{
-
-ParseMenu(prevtok);
-
-}
-
-
-
-prevtok=tok;
-
-}
-
-
+ wxString tok,prevtok;
-fclose(m_wxr);
+ while (!m_done)
+ {
+ tok=GetToken();
-//fclose(m_rc);
+ if (tok==_T("DIALOG"))
+ {
+ ParseDialog(prevtok);
+ }
-m_rc.Close();
+ if (tok==_T("MENU"))
+ {
+ ParseMenu(prevtok);
+ }
+ prevtok=tok;
+ }
+ fclose(m_wxr);
+ m_rc.Close();
}
if ((ch==' ')|(ch==',')|(ch==13)|(ch==10)|(ch=='|'))
- return TRUE;
+ return true;
{
-m_done=TRUE;
+m_done=true;
-return TRUE;
+return true;
}
-return FALSE;
+return false;
}
{
-m_done=TRUE;
+m_done=true;
return tok;
{
-m_done=TRUE;
+m_done=true;
return tok;
{
-m_done=TRUE;
+m_done=true;
if (ch==EOF)
- m_done=TRUE;
+ m_done=true;
{
- int result;
+ int result;
result=m_rc.Tell();
if((result>=m_filesize))
- m_done=TRUE;
+ m_done=true;
if((result==-1))
- m_done=TRUE;
+ m_done=true;
if(ch==EOF)
- m_done=TRUE;
+ m_done=true;
}
if (tok==_T("POPUP"))
- {
+ {
ParsePopupMenu();
- wxFprintf(m_wxr,_T(" ],\\\n"));
+ wxFprintf(m_wxr,_T(" ],\\\n"));
- }
+ }
}
wxString tok;
-while (ReadOrs(tok));
+while (ReadOrs(tok))
+ ;
wxFprintf(m_wxr,_T(" control = [%i,wxSlider,'','wxSL_HORIZONTAL','%s',"),m_controlid,varname.c_str());
wxString tok;
-while (ReadOrs(tok));
+while (ReadOrs(tok))
+ ;
wxFprintf(m_wxr,_T(" control = [%i,wxGauge,'','wxGA_HORIZONTAL','%s',"),m_controlid,varname.c_str());
w=GetToken();
-return TRUE;
+return true;
}
wxFprintf(m_wxr,_T(" control = [%i,wxCheckBox,'%s','0','%s',"),m_controlid,label.c_str(),varname.c_str());
- while (ReadOrs(tok));
+ while (ReadOrs(tok))
+ ;
ReadRect(x,y,width,height);
wxFprintf(m_wxr,_T(" control = [%i,wxRadioButton,'%s','0','%s',"),m_controlid,label.c_str(),varname.c_str());
- while(ReadOrs(tok));
+ while(ReadOrs(tok))
+ ;
ReadRect(x,y,width,height);