From 92a19c2e7757ba742846f83e56356de0a607bdc2 Mon Sep 17 00:00:00 2001 From: George Tasker Date: Tue, 30 Oct 2001 13:33:34 +0000 Subject: [PATCH] All occurances of #include changed to #include "wx/wxprec.h" git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12212 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- contrib/samples/applet/applet.cpp | 2 +- contrib/samples/applet/combobox.cpp | 2 +- contrib/samples/ogl/ogledit/doc.cpp | 2 +- contrib/samples/ogl/ogledit/ogledit.cpp | 2 +- contrib/samples/ogl/ogledit/palette.cpp | 2 +- contrib/samples/ogl/ogledit/view.cpp | 2 +- contrib/samples/ogl/studio/cspalette.cpp | 2 +- contrib/samples/ogl/studio/csprint.cpp | 2 +- contrib/samples/ogl/studio/dialogs.cpp | 2 +- contrib/samples/ogl/studio/doc.cpp | 2 +- contrib/samples/ogl/studio/shapes.cpp | 2 +- contrib/samples/ogl/studio/symbols.cpp | 2 +- contrib/samples/ogl/studio/view.cpp | 2 +- contrib/src/mmedia/g711.cpp | 2 +- contrib/src/mmedia/g721.cpp | 2 +- contrib/src/mmedia/g723_24.cpp | 2 +- contrib/src/mmedia/g723_40.cpp | 2 +- contrib/src/mmedia/g72x.cpp | 2 +- contrib/src/mmedia/sndbase.cpp | 2 +- contrib/src/mmedia/sndfile.cpp | 2 +- contrib/src/mmedia/sndg72x.cpp | 2 +- contrib/src/mmedia/sndmsad.cpp | 2 +- contrib/src/mmedia/sndpcm.cpp | 2 +- contrib/src/mmedia/sndwav.cpp | 2 +- contrib/src/mmedia/vidbase.cpp | 2 +- contrib/src/mmedia/vidxanm.cpp | 2 +- contrib/src/ogl/basic.cpp | 2 +- contrib/src/ogl/basic2.cpp | 2 +- contrib/src/ogl/bmpshape.cpp | 2 +- contrib/src/ogl/canvas.cpp | 2 +- contrib/src/ogl/composit.cpp | 2 +- contrib/src/ogl/constrnt.cpp | 2 +- contrib/src/ogl/divided.cpp | 2 +- contrib/src/ogl/drawn.cpp | 2 +- contrib/src/ogl/lines.cpp | 2 +- contrib/src/ogl/mfutils.cpp | 2 +- contrib/src/ogl/misc.cpp | 2 +- contrib/src/ogl/ogldiag.cpp | 2 +- contrib/src/ogl/oglmisc.cpp | 2 +- contrib/utils/convertrc/convert.cpp | 2 +- contrib/utils/convertrc/rc2wxr.cpp | 557 ++++++++++++++++++++++- contrib/utils/convertrc/rc2xml.cpp | 10 +- samples/caret/caret.cpp | 2 +- samples/font/font.cpp | 2 +- samples/html/about/about.cpp | 2 +- samples/html/help/help.cpp | 2 +- samples/html/helpview/helpview.cpp | 2 +- samples/html/printing/printing.cpp | 2 +- samples/html/test/test.cpp | 2 +- samples/html/virtual/virtual.cpp | 2 +- samples/html/widget/widget.cpp | 2 +- samples/html/zip/zip.cpp | 2 +- samples/menu/menu.cpp | 2 +- samples/richedit/wxLayout.cpp | 2 +- samples/richedit/wxllist.cpp | 2 +- samples/richedit/wxlparser.cpp | 2 +- samples/richedit/wxlwindow.cpp | 2 +- samples/toolbar/toolbar.cpp | 2 +- utils/Install/builder/wxib.cpp | 2 +- 59 files changed, 622 insertions(+), 59 deletions(-) diff --git a/contrib/samples/applet/applet.cpp b/contrib/samples/applet/applet.cpp index 7046f7c5db..16fb1fb66c 100644 --- a/contrib/samples/applet/applet.cpp +++ b/contrib/samples/applet/applet.cpp @@ -27,7 +27,7 @@ ****************************************************************************/ // For compilers that support precompilation, includes "wx/wx.h". -#include +#include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop #endif diff --git a/contrib/samples/applet/combobox.cpp b/contrib/samples/applet/combobox.cpp index b7dcac51cc..4214c41c0f 100644 --- a/contrib/samples/applet/combobox.cpp +++ b/contrib/samples/applet/combobox.cpp @@ -28,7 +28,7 @@ ****************************************************************************/ // For compilers that support precompilation, includes "wx/wx.h". -#include +#include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop #endif diff --git a/contrib/samples/ogl/ogledit/doc.cpp b/contrib/samples/ogl/ogledit/doc.cpp index 25dae364c8..017f34f868 100644 --- a/contrib/samples/ogl/ogledit/doc.cpp +++ b/contrib/samples/ogl/ogledit/doc.cpp @@ -14,7 +14,7 @@ #endif // For compilers that support precompilation, includes "wx.h". -#include +#include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop diff --git a/contrib/samples/ogl/ogledit/ogledit.cpp b/contrib/samples/ogl/ogledit/ogledit.cpp index 87f19e6e85..905b42f30d 100644 --- a/contrib/samples/ogl/ogledit/ogledit.cpp +++ b/contrib/samples/ogl/ogledit/ogledit.cpp @@ -14,7 +14,7 @@ #endif // For compilers that support precompilation, includes "wx.h". -#include +#include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop diff --git a/contrib/samples/ogl/ogledit/palette.cpp b/contrib/samples/ogl/ogledit/palette.cpp index 84348c5982..5df3af51e3 100644 --- a/contrib/samples/ogl/ogledit/palette.cpp +++ b/contrib/samples/ogl/ogledit/palette.cpp @@ -14,7 +14,7 @@ #endif // For compilers that support precompilation, includes "wx.h". -#include +#include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop diff --git a/contrib/samples/ogl/ogledit/view.cpp b/contrib/samples/ogl/ogledit/view.cpp index 1784068187..2b5e571684 100644 --- a/contrib/samples/ogl/ogledit/view.cpp +++ b/contrib/samples/ogl/ogledit/view.cpp @@ -14,7 +14,7 @@ #endif // For compilers that support precompilation, includes "wx.h". -#include +#include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop diff --git a/contrib/samples/ogl/studio/cspalette.cpp b/contrib/samples/ogl/studio/cspalette.cpp index 6d18c070ab..27eedbe400 100644 --- a/contrib/samples/ogl/studio/cspalette.cpp +++ b/contrib/samples/ogl/studio/cspalette.cpp @@ -14,7 +14,7 @@ #endif // For compilers that support precompilation, includes "wx.h". -#include +#include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop diff --git a/contrib/samples/ogl/studio/csprint.cpp b/contrib/samples/ogl/studio/csprint.cpp index 6bf5dad26e..3b2b1499f6 100644 --- a/contrib/samples/ogl/studio/csprint.cpp +++ b/contrib/samples/ogl/studio/csprint.cpp @@ -14,7 +14,7 @@ #endif // For compilers that support precompilation, includes "wx.h". -#include +#include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop diff --git a/contrib/samples/ogl/studio/dialogs.cpp b/contrib/samples/ogl/studio/dialogs.cpp index 9fef6d120f..62b0ca2edd 100644 --- a/contrib/samples/ogl/studio/dialogs.cpp +++ b/contrib/samples/ogl/studio/dialogs.cpp @@ -14,7 +14,7 @@ #endif // For compilers that support precompilation, includes "wx.h". -#include +#include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop diff --git a/contrib/samples/ogl/studio/doc.cpp b/contrib/samples/ogl/studio/doc.cpp index ea8cb82eb7..bfedc4071e 100644 --- a/contrib/samples/ogl/studio/doc.cpp +++ b/contrib/samples/ogl/studio/doc.cpp @@ -14,7 +14,7 @@ #endif // For compilers that support precompilation, includes "wx.h". -#include +#include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop diff --git a/contrib/samples/ogl/studio/shapes.cpp b/contrib/samples/ogl/studio/shapes.cpp index 7bf02edb5c..84177d1331 100644 --- a/contrib/samples/ogl/studio/shapes.cpp +++ b/contrib/samples/ogl/studio/shapes.cpp @@ -14,7 +14,7 @@ #endif // For compilers that support precompilation, includes "wx.h". -#include +#include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop diff --git a/contrib/samples/ogl/studio/symbols.cpp b/contrib/samples/ogl/studio/symbols.cpp index 9b0ab16f6b..b96fb69317 100644 --- a/contrib/samples/ogl/studio/symbols.cpp +++ b/contrib/samples/ogl/studio/symbols.cpp @@ -14,7 +14,7 @@ #endif // For compilers that support precompilation, includes "wx.h". -#include +#include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop diff --git a/contrib/samples/ogl/studio/view.cpp b/contrib/samples/ogl/studio/view.cpp index 6a66902f5a..f24da9d60c 100644 --- a/contrib/samples/ogl/studio/view.cpp +++ b/contrib/samples/ogl/studio/view.cpp @@ -14,7 +14,7 @@ #endif // For compilers that support precompilation, includes "wx.h". -#include +#include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop diff --git a/contrib/src/mmedia/g711.cpp b/contrib/src/mmedia/g711.cpp index 99fb3cafc0..42c3abb639 100644 --- a/contrib/src/mmedia/g711.cpp +++ b/contrib/src/mmedia/g711.cpp @@ -24,7 +24,7 @@ * Mountain View, California 94043 */ -#include +#include "wx/wxprec.h" /* * g711.c diff --git a/contrib/src/mmedia/g721.cpp b/contrib/src/mmedia/g721.cpp index 60b8f1c5ff..bfc561a7a6 100644 --- a/contrib/src/mmedia/g721.cpp +++ b/contrib/src/mmedia/g721.cpp @@ -24,7 +24,7 @@ * Mountain View, California 94043 */ -#include +#include "wx/wxprec.h" /* * g721.c diff --git a/contrib/src/mmedia/g723_24.cpp b/contrib/src/mmedia/g723_24.cpp index fe581c3de8..f17b1d676a 100644 --- a/contrib/src/mmedia/g723_24.cpp +++ b/contrib/src/mmedia/g723_24.cpp @@ -37,7 +37,7 @@ * of workstation attributes, such as hardware 2's complement arithmetic. * */ -#include +#include "wx/wxprec.h" #include "wx/mmedia/internal/g72x.h" /* diff --git a/contrib/src/mmedia/g723_40.cpp b/contrib/src/mmedia/g723_40.cpp index e736a5c249..9a71969c63 100644 --- a/contrib/src/mmedia/g723_40.cpp +++ b/contrib/src/mmedia/g723_40.cpp @@ -45,7 +45,7 @@ * the name of the module which it is implementing. * */ -#include +#include "wx/wxprec.h" #include "wx/mmedia/internal/g72x.h" /* diff --git a/contrib/src/mmedia/g72x.cpp b/contrib/src/mmedia/g72x.cpp index d4e0740634..c6f2a016c2 100644 --- a/contrib/src/mmedia/g72x.cpp +++ b/contrib/src/mmedia/g72x.cpp @@ -30,7 +30,7 @@ * Common routines for G.721 and G.723 conversions. */ -#include +#include "wx/wxprec.h" #include #include "wx/mmedia/internal/g72x.h" diff --git a/contrib/src/mmedia/sndbase.cpp b/contrib/src/mmedia/sndbase.cpp index ccd9882652..e331e0edce 100644 --- a/contrib/src/mmedia/sndbase.cpp +++ b/contrib/src/mmedia/sndbase.cpp @@ -9,7 +9,7 @@ #pragma implementation "sndbase.cpp" #endif -#include +#include "wx/wxprec.h" #ifndef WX_PRECOMP #include "wx/defs.h" diff --git a/contrib/src/mmedia/sndfile.cpp b/contrib/src/mmedia/sndfile.cpp index 48677ec113..54e333b6c8 100644 --- a/contrib/src/mmedia/sndfile.cpp +++ b/contrib/src/mmedia/sndfile.cpp @@ -5,7 +5,7 @@ // Author: Guilhem Lavaux (C) 1999, 2000 // CVSID: $Id$ // -------------------------------------------------------------------------- -#include +#include "wx/wxprec.h" #ifndef WX_PRECOMP #include diff --git a/contrib/src/mmedia/sndg72x.cpp b/contrib/src/mmedia/sndg72x.cpp index 91245524b9..f9ce3ca810 100644 --- a/contrib/src/mmedia/sndg72x.cpp +++ b/contrib/src/mmedia/sndg72x.cpp @@ -9,7 +9,7 @@ #pragma implementation "sndg72x.cpp" #endif -#include +#include "wx/wxprec.h" #ifndef WX_PRECOMP #include "wx/defs.h" diff --git a/contrib/src/mmedia/sndmsad.cpp b/contrib/src/mmedia/sndmsad.cpp index 81068016fc..6024e8e4c1 100644 --- a/contrib/src/mmedia/sndmsad.cpp +++ b/contrib/src/mmedia/sndmsad.cpp @@ -9,7 +9,7 @@ #pragma implementation "sndmsad.cpp" #endif -#include +#include "wx/wxprec.h" #ifndef WX_PRECOMP #include "wx/defs.h" diff --git a/contrib/src/mmedia/sndpcm.cpp b/contrib/src/mmedia/sndpcm.cpp index 0c1bc67a3c..a6a5a70080 100644 --- a/contrib/src/mmedia/sndpcm.cpp +++ b/contrib/src/mmedia/sndpcm.cpp @@ -9,7 +9,7 @@ #pragma implementation "sndpcm.cpp" #endif -#include +#include "wx/wxprec.h" #ifndef WX_PRECOMP #include "wx/defs.h" diff --git a/contrib/src/mmedia/sndwav.cpp b/contrib/src/mmedia/sndwav.cpp index 267f5a4090..a9712d8189 100644 --- a/contrib/src/mmedia/sndwav.cpp +++ b/contrib/src/mmedia/sndwav.cpp @@ -9,7 +9,7 @@ #pragma implementation "sndwav.cpp" #endif -#include +#include "wx/wxprec.h" #ifndef WX_PRECOMP #include "wx/defs.h" diff --git a/contrib/src/mmedia/vidbase.cpp b/contrib/src/mmedia/vidbase.cpp index 1cd5a0632c..b3c8ac9195 100644 --- a/contrib/src/mmedia/vidbase.cpp +++ b/contrib/src/mmedia/vidbase.cpp @@ -11,7 +11,7 @@ #pragma implementation "vidbase.h" #endif -#include +#include "wx/wxprec.h" #ifndef WX_PRECOMP #include diff --git a/contrib/src/mmedia/vidxanm.cpp b/contrib/src/mmedia/vidxanm.cpp index 60a45d87d4..9da2da3403 100644 --- a/contrib/src/mmedia/vidxanm.cpp +++ b/contrib/src/mmedia/vidxanm.cpp @@ -12,7 +12,7 @@ #pragma implementation "vidxanm.h" #endif -#include +#include "wx/wxprec.h" #ifndef WX_PRECOMP #include diff --git a/contrib/src/ogl/basic.cpp b/contrib/src/ogl/basic.cpp index 0a85bbb517..f5bdab84e5 100644 --- a/contrib/src/ogl/basic.cpp +++ b/contrib/src/ogl/basic.cpp @@ -14,7 +14,7 @@ #endif // For compilers that support precompilation, includes "wx.h". -#include +#include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop diff --git a/contrib/src/ogl/basic2.cpp b/contrib/src/ogl/basic2.cpp index 1cac6443a6..f329aa5654 100644 --- a/contrib/src/ogl/basic2.cpp +++ b/contrib/src/ogl/basic2.cpp @@ -14,7 +14,7 @@ #endif // For compilers that support precompilation, includes "wx.h". -#include +#include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop diff --git a/contrib/src/ogl/bmpshape.cpp b/contrib/src/ogl/bmpshape.cpp index fc6218e234..10b1748517 100644 --- a/contrib/src/ogl/bmpshape.cpp +++ b/contrib/src/ogl/bmpshape.cpp @@ -14,7 +14,7 @@ #endif // For compilers that support precompilation, includes "wx.h". -#include +#include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop diff --git a/contrib/src/ogl/canvas.cpp b/contrib/src/ogl/canvas.cpp index e05066d402..ac81c3d692 100644 --- a/contrib/src/ogl/canvas.cpp +++ b/contrib/src/ogl/canvas.cpp @@ -14,7 +14,7 @@ #endif // For compilers that support precompilation, includes "wx.h". -#include +#include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop diff --git a/contrib/src/ogl/composit.cpp b/contrib/src/ogl/composit.cpp index 6dbc6190a7..fd88350efc 100644 --- a/contrib/src/ogl/composit.cpp +++ b/contrib/src/ogl/composit.cpp @@ -14,7 +14,7 @@ #endif // For compilers that support precompilation, includes "wx.h". -#include +#include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop diff --git a/contrib/src/ogl/constrnt.cpp b/contrib/src/ogl/constrnt.cpp index ed2562b2ab..c2addad443 100644 --- a/contrib/src/ogl/constrnt.cpp +++ b/contrib/src/ogl/constrnt.cpp @@ -14,7 +14,7 @@ #endif // For compilers that support precompilation, includes "wx.h". -#include +#include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop diff --git a/contrib/src/ogl/divided.cpp b/contrib/src/ogl/divided.cpp index 8f66677315..16cbc34878 100644 --- a/contrib/src/ogl/divided.cpp +++ b/contrib/src/ogl/divided.cpp @@ -14,7 +14,7 @@ #endif // For compilers that support precompilation, includes "wx.h". -#include +#include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop diff --git a/contrib/src/ogl/drawn.cpp b/contrib/src/ogl/drawn.cpp index b410537294..67aa63f3fd 100644 --- a/contrib/src/ogl/drawn.cpp +++ b/contrib/src/ogl/drawn.cpp @@ -15,7 +15,7 @@ #endif // For compilers that support precompilation, includes "wx.h". -#include +#include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop diff --git a/contrib/src/ogl/lines.cpp b/contrib/src/ogl/lines.cpp index fb7322ab3e..60365d3a2d 100644 --- a/contrib/src/ogl/lines.cpp +++ b/contrib/src/ogl/lines.cpp @@ -15,7 +15,7 @@ #endif // For compilers that support precompilation, includes "wx.h". -#include +#include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop diff --git a/contrib/src/ogl/mfutils.cpp b/contrib/src/ogl/mfutils.cpp index b2684836a1..d64f41a2d4 100644 --- a/contrib/src/ogl/mfutils.cpp +++ b/contrib/src/ogl/mfutils.cpp @@ -14,7 +14,7 @@ #endif // For compilers that support precompilation, includes "wx.h". -#include +#include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop diff --git a/contrib/src/ogl/misc.cpp b/contrib/src/ogl/misc.cpp index 169fc2c484..a9a466c2da 100644 --- a/contrib/src/ogl/misc.cpp +++ b/contrib/src/ogl/misc.cpp @@ -14,7 +14,7 @@ #endif // For compilers that support precompilation, includes "wx.h". -#include +#include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop diff --git a/contrib/src/ogl/ogldiag.cpp b/contrib/src/ogl/ogldiag.cpp index 4d7e36843c..f6731b8400 100644 --- a/contrib/src/ogl/ogldiag.cpp +++ b/contrib/src/ogl/ogldiag.cpp @@ -14,7 +14,7 @@ #endif // For compilers that support precompilation, includes "wx.h". -#include +#include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop diff --git a/contrib/src/ogl/oglmisc.cpp b/contrib/src/ogl/oglmisc.cpp index 169fc2c484..a9a466c2da 100644 --- a/contrib/src/ogl/oglmisc.cpp +++ b/contrib/src/ogl/oglmisc.cpp @@ -14,7 +14,7 @@ #endif // For compilers that support precompilation, includes "wx.h". -#include +#include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop diff --git a/contrib/utils/convertrc/convert.cpp b/contrib/utils/convertrc/convert.cpp index c4871d112c..3368af3eb9 100644 --- a/contrib/utils/convertrc/convert.cpp +++ b/contrib/utils/convertrc/convert.cpp @@ -11,7 +11,7 @@ #endif // For compilers that support precompilation, includes "wx/wx.h". -#include +#include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop diff --git a/contrib/utils/convertrc/rc2wxr.cpp b/contrib/utils/convertrc/rc2wxr.cpp index 4d141c7edd..30a0262a6c 100644 --- a/contrib/utils/convertrc/rc2wxr.cpp +++ b/contrib/utils/convertrc/rc2wxr.cpp @@ -1,555 +1,1110 @@ // rc2wxr.cpp: implementation of the rc2wxr class. + // + ////////////////////////////////////////////////////////////////////// + //Author: Brian Gavin 9/24/00 + //License: wxWindows License + /* + WARNING- I know this code has some bugs to work out but + I don't plan to fix them since I feel that wxr files will + not be used much longer. + This code was used as a starting point for my rc2xml converter + */ + #ifdef __GNUG__ + #pragma implementation "rc2wxr.cpp" + #pragma interface "rc2wxr.cpp" + #endif + + // For compilers that support precompilation, includes "wx/wx.h". -#include + +#include "wx/wxprec.h" + + #ifdef __BORLANDC__ + #pragma hdrstop + #endif + + // for all others, include the necessary headers (this file is usually all you + // need because it includes almost all "standard" wxWindows headers + #ifndef WX_PRECOMP + #include + #endif + + + #include "rc2wxr.h" + #include "wx/image.h" + #include "wx/resource.h" + ////////////////////////////////////////////////////////////////////// + // Construction/Destruction + ////////////////////////////////////////////////////////////////////// + + rc2wxr::rc2wxr() + { + m_done=FALSE; + m_controlid=6000; + } + + rc2wxr::~rc2wxr() + { + + } + + void rc2wxr::Convert(wxString wxrfile, wxString rcfile) + { + m_rc.Open(rcfile); + m_filesize=m_rc.Length(); + if( (m_wxr = fopen( wxrfile, "wt" )) == NULL ) + { + return; + } + + + wxString tok,prevtok; + + + while (!m_done) + { + + tok=GetToken(); + + if (tok=="DIALOG") + { + ParseDialog(prevtok); + } + + + if (tok=="MENU") + { + ParseMenu(prevtok); + } + + prevtok=tok; + } + + fclose(m_wxr); + //fclose(m_rc); + m_rc.Close(); + + } + + + /* + Example .rc + Microsoft style as of v5.0 + IDD_ABOUTBOX DIALOG DISCARDABLE 0, 0, 217, 55 + STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU + CAPTION "About Funimator" + FONT 8, "MS Sans Serif" + + Borland 4.5 style rc + IDD_DIBATTR DIALOG 7, 16, 172, 119 + STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU + CAPTION "DIB Attributes" + FONT 8, "MS Sans Serif" + { + DEFPUSHBUTTON "Ok", IDOK, 114, 8, 50, 14 + PUSHBUTTON "Cancel", IDCANCEL, 114, 28, 50, 14 + + + + */ + void rc2wxr::ParseDialog(wxString dlgname) + { + wxString tok; + static int dlgid=999; + dlgid++; + /* Make sure that this really is a dialog + microsoft reuses the keyword DIALOG for other things + */ + tok=PeekToken(); + //Microsoft notation? + if (tok=="DISCARDABLE") + { + tok=GetToken(); + tok=PeekToken(); + } + //This isn't a Dialog resource eject eject + if (!tok.IsNumber()) + return; + //Generate Dialog text + fprintf(m_wxr,"static char *dialog%i = \"dialog(name = '%s',\\\n",dlgid,dlgname); + //be lazy about style for now. add it later + fprintf(m_wxr,"style = 'wxRAISED_BORDER | wxCAPTION | wxTHICK_FRAME | wxSYSTEM_MENU',\\\n"); + + fprintf(m_wxr,"id = %i,\\\n",dlgid); + + //Record x,y,width,height + int x,y,width,height; + ReadRect(x,y,width,height); + fprintf(m_wxr,"x = %i, y = %i, width = %i, height = %i,\\\n",x,y,width,height); + + + //CAPTION "About Funimator" + //Get Title + tok=GetToken(); + wxString title; + + while ((tok!="BEGIN")&(tok!="{")) + { + if (tok=="CAPTION") + { + title=GetQuoteField(); + fprintf(m_wxr,"title = '%s',\\\n",title); + } + tok=GetToken(); + } + fprintf(m_wxr,"use_dialog_units = 1,\\\n"); + fprintf(m_wxr,"use_system_defaults = 0,\\\n"); + + fprintf(m_wxr,"font = [8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Sans Serif'],\\\n"); + ParseControls(); + fprintf(m_wxr,").\";\n\n"); + } + + /* + BEGIN + + + + EDITTEXT IDC_BANDS,36,83,22,14,ES_AUTOHSCROLL | ES_NUMBER | NOT + WS_TABSTOP + LTEXT "Bands",IDC_STATIC,11,86,21,8 + EDITTEXT IDC_NAME,10,3,75,14,ES_AUTOHSCROLL + END + */ + void rc2wxr::ParseControls() + { + wxString tok; + + tok=GetToken(); + while ((tok!="END")&(tok!="}")) + { + if (tok=="LTEXT") + ParseStaticText(); + if (tok=="EDITTEXT") + ParseTextCtrl(); + if (tok=="PUSHBUTTON") + ParsePushButton(); + if (tok=="DEFPUSHBUTTON") + ParsePushButton(); + if (tok=="GROUPBOX") + ParseGroupBox(); + if (tok=="COMBOBOX") + ParseComboBox(); + if (tok=="CONTROL") + ParseControlMS(); + + tok=GetToken(); + } + + } + //LTEXT "Radius",IDC_STATIC,9,67,23,8 + void rc2wxr::ParseStaticText() + { + wxString tok; + wxString phrase,varname; + phrase=GetQuoteField(); + varname=GetToken(); + m_controlid++; + int x,y,width,height; + ReadRect(x,y,width,height); + fprintf(m_wxr," control = [%i,wxStaticText,'%s','0','%s',",m_controlid,phrase,varname); + fprintf(m_wxr,"%i,%i,%i,%i,'',\\\n",x,y,width,height); + fprintf(m_wxr,"[8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Sans Serif']],\\\n"); + } + //EDITTEXT IDC_RADIUS,36,65,40,14,ES_AUTOHSCROLL + void rc2wxr::ParseTextCtrl() + { + wxString tok; + wxString varname; + varname=GetToken(); + m_controlid++; + int x,y,width,height; + ReadRect(x,y,width,height); + fprintf(m_wxr," control = [%i,wxTextCtrl,'','0','%s',",m_controlid,varname); + fprintf(m_wxr,"%i,%i,%i,%i,'',\\\n",x,y,width,height); + fprintf(m_wxr,"[8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Sans Serif']],\\\n"); + + } + //PUSHBUTTON "Create/Update",IDC_CREATE,15,25,53,13,NOT WS_TABSTOP + void rc2wxr::ParsePushButton() + { + wxString tok; + wxString phrase,varname; + phrase=GetQuoteField(); + varname=GetToken(); + int c; + m_controlid++; + c=m_controlid; + if (varname=="IDOK") + c=wxID_OK; + + if (varname=="IDCANCEL") + c=wxID_CANCEL; + + if (varname=="IDAPPLY") + c=wxID_APPLY; + + int x,y,width,height; + ReadRect(x,y,width,height); + fprintf(m_wxr," control = [%i,wxButton,'%s','0','%s',",c,phrase,varname); + fprintf(m_wxr,"%i,%i,%i,%i,'',\\\n",x,y,width,height); + fprintf(m_wxr,"[8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Sans Serif']],\\\n"); + + } + + + bool rc2wxr::Seperator(int ch) + { + if ((ch==' ')|(ch==',')|(ch==13)|(ch==10)|(ch=='|')) + return TRUE; + + if (ch==EOF) + { + m_done=TRUE; + return TRUE; + } + return FALSE; + } + + void rc2wxr::ParseGroupBox() + { + // GROUPBOX "Rotate",IDC_STATIC,1,1,71,79 + wxString tok; + wxString phrase,varname; + phrase=GetQuoteField(); + varname=GetToken(); + m_controlid++; + int x,y,width,height; + ReadRect(x,y,width,height); + fprintf(m_wxr," control = [%i,wxStaticBox,'%s','0','%s',",m_controlid,phrase,varname); + fprintf(m_wxr,"%i,%i,%i,%i,'',\\\n",x,y,width,height); + fprintf(m_wxr,"[8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Sans Serif']],\\\n"); + + + } + + void rc2wxr::ReadRect(int & x, int & y, int & width, int & height) + { + x=atoi(GetToken()); + y=atoi(GetToken()); + width=atoi(GetToken()); + height=atoi(GetToken()); + + } + + wxString rc2wxr::GetToken() + { + wxString tok=""; + + if (m_rc.Eof()) + { + m_done=TRUE; + return tok; + } + + int ch=0; + ReadChar(ch); + if (ch==EOF) + { + m_done=TRUE; + return tok; + } + + while (Seperator(ch)) + { + ReadChar(ch); + if (m_done) + return tok; + } + + if (ch==EOF) + { + m_done=TRUE; + + } + + + while (!Seperator(ch)) + { + tok+=(char)ch; + ReadChar(ch); + + } + + if (ch==EOF) + m_done=TRUE; + + + return tok; + } + + wxString rc2wxr::GetQuoteField() + { + wxString phrase; + //ASCII code 34 " + int ch=0; + ReadChar(ch); + + while (ch!=34) + ReadChar(ch); + + ReadChar(ch); + + while (ch!=34) + { + phrase+=(char)ch; + ReadChar(ch); + } + return phrase; + } + + void rc2wxr::ReadChar(int &ch) + { + int result; + result=m_rc.Tell(); + + 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; + } + + void rc2wxr::ParseComboBox() + { + /* COMBOBOX IDC_SCALECOMBO,10,110,48,52,CBS_DROPDOWNLIST | CBS_SORT | + WS_VSCROLL | WS_TABSTOP */ + wxString tok; + wxString varname; + varname=GetToken(); + m_controlid++; + int x,y,width,height; + ReadRect(x,y,width,height); + + fprintf(m_wxr," control = [%i,wxChoice,'','0','%s',",m_controlid,varname); + fprintf(m_wxr,"%i,%i,%i,%i,[],\\\n",x,y,width,height); + fprintf(m_wxr,"[8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Sans Serif']],\\\n"); + + + } + + void rc2wxr::ParseMenu(wxString name) + { + wxString tok=""; + static int menuid=0; + menuid++; + fprintf(m_wxr,"static char *MenuBar%i = \"menu(name = '%s',\\\n",menuid,name); + fprintf(m_wxr,"menu = \\\n"); + fprintf(m_wxr,"[\\\n"); + + while ((tok!="BEGIN")&(tok!="{")) + tok=GetToken(); + + while ((tok!="END")&(tok!="}")) + { + tok=GetToken(); + if (tok=="POPUP") + { + ParsePopupMenu(); + fprintf(m_wxr," ],\\\n"); + } + } + + fprintf(m_wxr,"]).\";\n\n"); + } + + void rc2wxr::ParsePopupMenu() + { + static int menuitem=99; + menuitem++; + + wxString tok; + tok=GetQuoteField(); + int spot; + //Remove /t because it causes problems + spot=tok.First("\\t"); + tok=tok.Left(spot); + fprintf(m_wxr," ['%s',%i,'',\\\n",tok,menuitem); + while ((tok!="BEGIN")&(tok!="{")) + tok=GetToken(); + + while ((tok!="END")&(tok!="}")) + { + tok=GetToken(); + if (tok=="MENUITEM") + { + if (PeekToken()=="SEPARATOR") + fprintf(m_wxr," [],\\\n"); + else + { + tok=GetQuoteField(); + //Remove /t because it causes problems + spot=tok.First("\\t"); + tok=tok.Left(spot); + menuitem++; + fprintf(m_wxr," ['%s',%i,''],\\\n",tok,menuitem); + } + } + + } + + + } + + wxString rc2wxr::PeekToken() + { + wxString tok; + int p; + p=m_rc.Tell(); + tok=GetToken(); + + m_rc.Seek(p); + return tok; + } + //Windows pain in the butt CONTROL + void rc2wxr::ParseControlMS() + { + wxString label,varname,kindctrl,tok; + label=GetQuoteField(); + varname=GetToken(); + kindctrl=GetQuoteField(); + kindctrl.MakeUpper(); + + + if (kindctrl=="MSCTLS_TRACKBAR32") + ParseSlider(label,varname); + if (kindctrl=="MSCTLS_PROGRESS32") + ParseProgressBar(label,varname); + if (kindctrl=="BUTTON") + ParseCtrlButton(label,varname); + } + /* CONTROL "Slider1",IDC_SLIDER1,"msctls_trackbar32",TBS_BOTH | + TBS_NOTICKS | WS_TABSTOP,52,73,100,15 + */ + + void rc2wxr::ParseSlider(wxString label, wxString varname) + { + wxString tok; + while (ReadOrs(tok)); + fprintf(m_wxr," control = [%i,wxSlider,'','wxSL_HORIZONTAL','%s',",m_controlid,varname); + int x,y,width,height; + ReadRect(x,y,width,height); + fprintf(m_wxr,"%i,%i,%i,%i,",x,y,width,height); + fprintf(m_wxr," 1, 1, 10,\\\n"); + fprintf(m_wxr,"[8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Sans Serif']],\\\n"); + } + /* + CONTROL "Progress1",CG_IDC_PROGDLG_PROGRESS,"msctls_progress32", + WS_BORDER,15,52,154,13 + */ + void rc2wxr::ParseProgressBar(wxString label, wxString varname) + { + wxString tok; + while (ReadOrs(tok)); + fprintf(m_wxr," control = [%i,wxGauge,'','wxGA_HORIZONTAL','%s',",m_controlid,varname); + int x,y,width,height; + ReadRect(x,y,width,height); + fprintf(m_wxr,"%i,%i,%i,%i,",x,y,width,height); + fprintf(m_wxr," 0, 10,\\\n"); + fprintf(m_wxr,"[8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Sans Serif']],\\\n"); + } + + bool rc2wxr::ReadOrs(wxString & w) + { + wxString tok; + tok=PeekToken(); + if (tok.IsNumber()) + return false; + w=GetToken(); + return TRUE; + } + + //Is it a check button or a radio button + void rc2wxr::ParseCtrlButton(wxString label, wxString varname) + { + wxString tok; + tok=GetToken(); + + m_controlid++; + int x,y,width,height; + + if (tok=="BS_AUTOCHECKBOX") + { + fprintf(m_wxr," control = [%i,wxCheckBox,'%s','0','%s',",m_controlid,label,varname); + while (ReadOrs(tok)); + ReadRect(x,y,width,height); + fprintf(m_wxr,"%i,%i,%i,%i,0,\\\n",x,y,width,height); + fprintf(m_wxr,"[8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Sans Serif']],\\\n"); + } + + if (tok=="BS_AUTORADIOBUTTON") + { + fprintf(m_wxr," control = [%i,wxRadioButton,'%s','0','%s',",m_controlid,label,varname); + while(ReadOrs(tok)); + ReadRect(x,y,width,height); + fprintf(m_wxr,"%i,%i,%i,%i,0,\\\n",x,y,width,height); + fprintf(m_wxr,"[8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Sans Serif']],\\\n"); + } + + + + } + + diff --git a/contrib/utils/convertrc/rc2xml.cpp b/contrib/utils/convertrc/rc2xml.cpp index 15f7ac44ee..ee909b0256 100644 --- a/contrib/utils/convertrc/rc2xml.cpp +++ b/contrib/utils/convertrc/rc2xml.cpp @@ -21,7 +21,7 @@ cross platform (wxGTK,etc) #endif // For compilers that support precompilation, includes "wx/wx.h". -#include +#include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop @@ -68,11 +68,16 @@ bool rc2xml::Convert(wxString rcfile, wxString xmlfile) m_rc.Open(rcfile.c_str()); m_filesize=m_rc.Length(); + m_workingpath=wxPathOnly(rcfile); + m_targetpath=wxPathOnly(xmlfile)+"\\"; + + wxSetWorkingDirectory(m_workingpath); + bool result; result=m_xmlfile.Open(xmlfile.c_str(),"w+t"); wxASSERT_MSG(result,"Couldn't create XML file"); @@ -1029,7 +1034,9 @@ wxString rc2xml::CleanName(wxString name) name.Replace("idr_",""); name.Replace("idb_",""); name.Replace("idc_",""); + name.Replace(".ico",""); + name.Replace(".bmp",""); return name; } @@ -1184,6 +1191,7 @@ void rc2xml::WriteBitmap(wxString bitmapname) wxString *bitmappath; bitmappath=(wxString *)node->Data(); + bitmapname=wxFileNameFromPath(*bitmappath); wxBitmap bitmap; if (!bitmap.LoadFile(*bitmappath,wxBITMAP_TYPE_BMP )) diff --git a/samples/caret/caret.cpp b/samples/caret/caret.cpp index 600c6e5b0d..7415922ae0 100644 --- a/samples/caret/caret.cpp +++ b/samples/caret/caret.cpp @@ -10,7 +10,7 @@ ///////////////////////////////////////////////////////////////////////////// // For compilers that support precompilation, includes "wx/wx.h". -#include +#include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop diff --git a/samples/font/font.cpp b/samples/font/font.cpp index 472ac4a4ab..66fc9350d5 100644 --- a/samples/font/font.cpp +++ b/samples/font/font.cpp @@ -10,7 +10,7 @@ ///////////////////////////////////////////////////////////////////////////// // For compilers that support precompilation, includes "wx/wx.h". -#include +#include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop diff --git a/samples/html/about/about.cpp b/samples/html/about/about.cpp index a97c5e58c3..4675c6085f 100644 --- a/samples/html/about/about.cpp +++ b/samples/html/about/about.cpp @@ -9,7 +9,7 @@ #endif // For compilers that support precompilation, includes "wx/wx.h". -#include +#include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop diff --git a/samples/html/help/help.cpp b/samples/html/help/help.cpp index 457fb96e0f..2519d60d92 100644 --- a/samples/html/help/help.cpp +++ b/samples/html/help/help.cpp @@ -10,7 +10,7 @@ #endif // For compilers that support precompilation, includes "wx/wx.h". -#include +#include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop diff --git a/samples/html/helpview/helpview.cpp b/samples/html/helpview/helpview.cpp index f8cb26d42a..3e1e1b1d21 100644 --- a/samples/html/helpview/helpview.cpp +++ b/samples/html/helpview/helpview.cpp @@ -10,7 +10,7 @@ #endif // For compilers that support precompilation, includes "wx/wx.h". -#include +#include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop diff --git a/samples/html/printing/printing.cpp b/samples/html/printing/printing.cpp index afbe534fd9..561b77f33f 100644 --- a/samples/html/printing/printing.cpp +++ b/samples/html/printing/printing.cpp @@ -5,7 +5,7 @@ // For compilers that support precompilation, includes "wx/wx.h". -#include +#include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop diff --git a/samples/html/test/test.cpp b/samples/html/test/test.cpp index 0bbf21fd5f..2b7fe2a9ed 100644 --- a/samples/html/test/test.cpp +++ b/samples/html/test/test.cpp @@ -9,7 +9,7 @@ #endif // For compilers that support precompilation, includes "wx/wx.h". -#include +#include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop diff --git a/samples/html/virtual/virtual.cpp b/samples/html/virtual/virtual.cpp index f036f4b200..a45604a6fb 100644 --- a/samples/html/virtual/virtual.cpp +++ b/samples/html/virtual/virtual.cpp @@ -10,7 +10,7 @@ #endif // For compilers that support precompilation, includes "wx/wx.h". -#include +#include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop diff --git a/samples/html/widget/widget.cpp b/samples/html/widget/widget.cpp index 43f03c55ed..7c48e1971a 100644 --- a/samples/html/widget/widget.cpp +++ b/samples/html/widget/widget.cpp @@ -10,7 +10,7 @@ #endif // For compilers that support precompilation, includes "wx/wx.h". -#include +#include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop diff --git a/samples/html/zip/zip.cpp b/samples/html/zip/zip.cpp index 2b0fa15f98..6f1dad4658 100644 --- a/samples/html/zip/zip.cpp +++ b/samples/html/zip/zip.cpp @@ -9,7 +9,7 @@ #endif // For compilers that support precompilation, includes "wx/wx.h". -#include +#include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop diff --git a/samples/menu/menu.cpp b/samples/menu/menu.cpp index dbe71040e2..6ecd953448 100644 --- a/samples/menu/menu.cpp +++ b/samples/menu/menu.cpp @@ -18,7 +18,7 @@ // ---------------------------------------------------------------------------- // For compilers that support precompilation, includes "wx/wx.h". -#include +#include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop diff --git a/samples/richedit/wxLayout.cpp b/samples/richedit/wxLayout.cpp index e70db238f9..a37c580265 100644 --- a/samples/richedit/wxLayout.cpp +++ b/samples/richedit/wxLayout.cpp @@ -11,7 +11,7 @@ #pragma implementation "wxLayout.h" #endif -#include +#include "wx/wxprec.h" #ifdef __BORLANDC__ # pragma hdrstop #endif diff --git a/samples/richedit/wxllist.cpp b/samples/richedit/wxllist.cpp index a674ae577d..316ee18129 100644 --- a/samples/richedit/wxllist.cpp +++ b/samples/richedit/wxllist.cpp @@ -25,7 +25,7 @@ # pragma implementation "wxllist.h" #endif -#include +#include "wx/wxprec.h" #ifdef __BORLANDC__ # pragma hdrstop diff --git a/samples/richedit/wxlparser.cpp b/samples/richedit/wxlparser.cpp index d666c16fa2..dc457fb85d 100644 --- a/samples/richedit/wxlparser.cpp +++ b/samples/richedit/wxlparser.cpp @@ -10,7 +10,7 @@ # pragma implementation "wxlparser.h" #endif -#include +#include "wx/wxprec.h" #ifdef __BORLANDC__ # pragma hdrstop diff --git a/samples/richedit/wxlwindow.cpp b/samples/richedit/wxlwindow.cpp index 1d5869b2a3..b8158f2e5b 100644 --- a/samples/richedit/wxlwindow.cpp +++ b/samples/richedit/wxlwindow.cpp @@ -18,7 +18,7 @@ # pragma implementation "wxlwindow.h" #endif -#include +#include "wx/wxprec.h" #ifdef __BORLANDC__ # pragma hdrstop diff --git a/samples/toolbar/toolbar.cpp b/samples/toolbar/toolbar.cpp index c839ceee55..8ec29ca590 100644 --- a/samples/toolbar/toolbar.cpp +++ b/samples/toolbar/toolbar.cpp @@ -18,7 +18,7 @@ // ---------------------------------------------------------------------------- // For compilers that support precompilation, includes "wx/wx.h". -#include +#include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop diff --git a/utils/Install/builder/wxib.cpp b/utils/Install/builder/wxib.cpp index 73abbcaab9..c3febebc29 100644 --- a/utils/Install/builder/wxib.cpp +++ b/utils/Install/builder/wxib.cpp @@ -16,7 +16,7 @@ // ---------------------------------------------------------------------------- // For compilers that support precompilation, includes "wx/wx.h". -#include +#include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop -- 2.45.2