diff --git a/BuildCVS.txt b/BuildCVS.txt index 25e5e53cf7..c630582fcc 100644 --- a/BuildCVS.txt +++ b/BuildCVS.txt @@ -19,30 +19,29 @@ varaibles and PATH entries. Continue with item c) below. -b) If using the GNU Mingw32 or GNU Cygwin32 compilers +b) If using the MinGW or Cygwin compilers -You can get Mingw32 from http://www.mingw.org +You can get MinGW from http://www.mingw.org/ -Cygwin32 is available at http://www.cygwin.com +Cygwin is available at http://sources.redhat.com/cygwin/ The makefile might have small problems with Cygwin's tools -so it is recommended to use Mingw32 and its toolchain instead +so it is recommended to use MinGW and its toolchain instead if possible. -> Set your path so that it includes the directory where your compiler and tools reside --> If your are using an old Mingw32 version (gcc-2.95 or older), +-> If your are using an old MinGW version (gcc-2.95 or older), you might need to fix some headers with the patches contained in the wxWin\Mingw32-gcc295.patches file. PLEASE APPLY THESE PATCHES BY HAND! There are apparently a few different versions of the headers floating around. Note that these patches are - not needed if you are using Mingw32 gcc-2.95.2 or newer. + not needed if you are using MinGW gcc-2.95.2 or newer. -> Edit wx/src/makeg95.env and set the MINGW32 variable at the top of - the file to either 1 (you have Mingw32) or 0 (you have Cygwin32). - If using MINGW32, also set the MINGW32VERSION variable - appropiately. + the file to either 1 (you have MinGW) or 0 (you have Cygwin). + Also set the MINGW32VERSION variable appropiately. c) Build instructions @@ -51,19 +50,8 @@ c) Build instructions into c:\wxWin -> Copy c:\wxWin\include\wx\msw\setup0.h to c:\wxWin\include\wx\msw\setup.h --> Edit c:\wxWin\include\wx\msw\setup.h so that - most features are enabled (i.e. defined to 1), for example: - #define wxUSE_ODBC 0 - #define wxUSE_SOCKETS 1 - #define wxUSE_HTML 1 - #define wxUSE_THREADS 1 - #define wxUSE_FS_INET 0 - #define wxUSE_FS_ZIP 1 - #define wxUSE_BUSYINFO 1 - #define wxUSE_DYNLIB_CLASS 1 - #define wxUSE_ZIPSTREAM 1 - #define wxUSE_LIBJPEG 1 - #define wxUSE_LIBPNG 1 +-> Edit c:\wxWin\include\wx\msw\setup.h to choose + the features you would like to compile wxWindows with[out]. and std iostreams are disabled with #define wxUSE_STD_IOSTREAM 0 @@ -72,6 +60,8 @@ c) Build instructions -> type: make -f makefile.g95 (if using GNU tools) or type: nmake -f makefile.vc (if using MS VC++) + See also docs/msw/install.txt for additional compilation options. + d) Borland (including free command line tools) Download tools from http://www.borland.com/downloads/ @@ -117,11 +107,10 @@ yet complete). III) Windows using configure ---------------------------------------- -Take a look at Unix->Windows cross compiling. With minor -modifications, this should work in Windows if you've got the cygnus -utilities (bash, GNU make, etc) and either mingw32 or cygwin32 installed. -See http://www.cygnus.com for these programs, or go straight to their -ftp server at ftp://sourceware.cygnus.com/pub/cygwin/. +wxWindows can be built on Windows using MSYS (see +http://www.mingw.org/), which is a POSIX build environment +for Windows. With MSYS you can just ./configure && make (see also VII, +Unix->Windows cross-compiling using configure). Of course, you can also build the library using plain makefiles (see section I). @@ -168,17 +157,17 @@ VI) OS/2 VII) Unix->Windows cross-compiling using configure -------------------------------------------------- -First you'll need a cross-compiler; linux glibc binaries of mingw32 and -cygwin32 (both based on egcs) can be found at +First you'll need a cross-compiler; linux glibc binaries of MinGW and +Cygwin (both based on egcs) can be found at ftp://ftp.objsw.com/pub/crossgcc/linux-x-win32. Alternative binaries, based on the latest MinGW release can be found at -http://members.telering.at/jessich/mingw/mingwcross/mingw_cross.html +http://members.telering.at/jessich/mingw/mingwcross/mingw_cross.html Otherwise you can compile one yourself. -[ A Note about cygwin32 and mingw32: the main difference is that cygwin32 +[ A Note about Cygwin and MinGW: the main difference is that Cygwin binaries are always linked against cygwin.dll. This dll encapsulates most standard Unix C extensions, which is very handy if you're porting unix -software to windows. However, wxMSW doesn't need this, so mingw32 is +software to windows. However, wxMSW doesn't need this, so MinGW is preferable if you write portable C(++). ] You might want to build both Unix and Windows binaries in the same source @@ -203,7 +192,7 @@ yourself: DLLTOOL=i586-mingw32-dlltool LD=i586-mingw32-ld NM=i586-mingw32-nm \ ../configure --host=i586-mingw32 --with-mingw -(all assuming you're using mingw32) +(all assuming you're using MinGW) By default this will compile a DLL, if you want a static library, specify --disable-shared. @@ -215,7 +204,7 @@ will be a compile error :-) NB: if you are using a very old compiler you risk to get quite a few warnings about "ANSI C++ forbids implicit conversion from 'void *'" in all places where va_arg macro is used. This is due to a bug in (some versions of) - mingw32 headers which may be corrected by upgrading your compier, + MinGW headers which may be corrected by upgrading your compier, otherwise you might edit the file ${install_prefix}/lib/gcc-lib/i586-mingw32/egcs-2.91.57/include/stdarg.h @@ -238,7 +227,7 @@ typedef void *__gnuc_va_list; __gnuc_va_list is char *. If this is successful, you end up with a wx23_2.dll/libwx23_2.a in win32/lib -( or just libwx_msw.a if you opted for a static build ). +(or just libwx_msw.a if you opted for a static build). Now try building the minimal sample: -> cd samples/minimal diff --git a/Makefile.in b/Makefile.in index bce0b0c21c..7062b4ec7a 100644 --- a/Makefile.in +++ b/Makefile.in @@ -391,11 +391,23 @@ afminstall: preinstall $(INSTALL) -d $(datadir)/wx/$(VER_MAJMIN)/gs_afm $(INSTALL_DATA) $(top_srcdir)/misc/afm/*.afm $(datadir)/wx/$(VER_MAJMIN)/afm $(INSTALL_DATA) $(top_srcdir)/misc/gs_afm/*.afm $(datadir)/wx/$(VER_MAJMIN)/gs_afm - + m4datainstall: preinstall $(INSTALL) -d $(datadir)/aclocal $(INSTALL_DATA) $(top_srcdir)/wxwin.m4 $(datadir)/aclocal +win32install: preinstall + $(INSTALL) -d $(includedir)/wx/msw + $(INSTALL) -d $(includedir)/wx/msw/gnuwin32 + $(INSTALL) -d $(includedir)/wx/msw/gnuwin32/gl + $(INSTALL_DATA) $(top_srcdir)/include/wx/msw/*.cur \ + $(top_srcdir)/include/wx/msw/*.ico \ + $(top_srcdir)/include/wx/msw/*.bmp \ + $(top_srcdir)/include/wx/msw/wx.rc \ + $(includedir)/wx/msw + $(INSTALL_DATA) $(top_srcdir)/include/wx/msw/gnuwin32/*.h $(includedir)/wx/msw/gnuwin32 + $(INSTALL_DATA) $(top_srcdir)/include/wx/msw/gnuwin32/gl/*.h $(includedir)/wx/msw/gnuwin32/gl + # this is the real install target: copies the library, wx-config and the # headers to the installation directory preinstall: $(build_libdir)/@WX_TARGET_LIBRARY@ $(top_builddir)/wx@TOOLCHAIN_NAME@-config @@ -462,7 +474,7 @@ preinstall_gl: $(build_libdir)/@WX_TARGET_LIBRARY_GL@ @if test ! -d $(libdir); then $(INSTALL) -d $(libdir); fi @INSTALL_LIBRARY@ $(build_libdir)/@WX_TARGET_LIBRARY_GL@ $(libdir)/@WX_TARGET_LIBRARY_GL@ -install: @AFMINSTALL@ @WX_ALL_INSTALLED@ m4datainstall +install: @AFMINSTALL@ @WX_ALL_INSTALLED@ m4datainstall @WIN32INSTALL@ @echo " " @echo " The installation of wxWindows is finished. On certain" @echo " platforms (e.g. Linux) you'll now have to run ldconfig" @@ -493,7 +505,7 @@ uninstall: @$(RM) $(bindir)/wx@TOOLCHAIN_NAME@-config @$(RM) $(datadir)/wx/$(VER_MAJMIN)/afm/* @$(RM) $(datadir)/wx/$(VER_MAJMIN)/gs_afm/* -# FIXME: wxBase doesnt install these next 3 dirs. + # FIXME: wxBase doesnt install these next 3 dirs. @-rmdir $(datadir)/wx/$(VER_MAJMIN)/gs_afm @-rmdir $(datadir)/wx/$(VER_MAJMIN)/afm @-rmdir $(datadir)/wx/$(VER_MAJMIN) @@ -502,6 +514,7 @@ uninstall: @list='$(HEADERS)'; for p in $$list; do \ $(RM) $(includedir)/wx/$$p; \ done + # TODO: uninstall the files installed by win32install @echo " Removing i18n files..." @-for p in $(WX_LINGUAS); do \ $(RM) $(localedir)/$$p/LC_MESSAGES/wxstd.mo; \ @@ -536,6 +549,7 @@ ALL_DIST: distclean cp $(WXDIR)/install-sh $(DISTDIR) cp $(WXDIR)/mkinstalldirs $(DISTDIR) cp $(WXDIR)/wx-config.in $(DISTDIR) + cp $(WXDIR)/version-script.in $(DISTDIR) cp $(WXDIR)/setup.h.in $(DISTDIR) cp $(WXDIR)/setup.h_vms $(DISTDIR) cp $(WXDIR)/descrip.mms $(DISTDIR) @@ -580,7 +594,8 @@ ALL_GUI_DIST: ALL_DIST if test -f $(DOCDIR)/$(TOOLKITDIR)/changes.txt ; then \ cp $(DOCDIR)/$(TOOLKITDIR)/changes.txt $(DISTDIR)/CHANGES-$(TOOLKIT).txt ; fi cp $(DOCDIR)/$(TOOLKITDIR)/readme.txt $(DISTDIR)/README-$(TOOLKIT).txt - cp $(DOCDIR)/$(TOOLKITDIR)/todo.txt $(DISTDIR)/TODO.txt + if test -f $(DOCDIR)/$(TOOLKITDIR)/todo.txt ; then \ + cp $(DOCDIR)/$(TOOLKITDIR)/todo.txt $(DISTDIR)/TODO.txt ; fi mkdir $(DISTDIR)/include mkdir $(DISTDIR)/include/wx mkdir $(DISTDIR)/include/wx/$(TOOLKITDIR) @@ -777,16 +792,28 @@ MSW_ZIP_TEXT_DIST: ALL_GUI_DIST cp $(SRCDIR)/*.??? $(DISTDIR)/src cp $(SRCDIR)/*.?? $(DISTDIR)/src cp $(MSWDIR)/?ake*.* $(DISTDIR)/src/msw + mkdir $(DISTDIR)/contrib + cp -R $(WXDIR)/contrib $(DISTDIR) UNIV_DIST: ALL_GUI_DIST mkdir $(DISTDIR)/include/wx/univ mkdir $(DISTDIR)/src/univ mkdir $(DISTDIR)/src/univ/themes cp $(INCDIR)/wx/univ/*.h $(DISTDIR)/include/wx/univ + cp $(INCDIR)/wx/univ/setup0.h $(DISTDIR)/include/wx/univ/setup.h cp $(SRCDIR)/univ/files.lst $(DISTDIR)/src/univ cp $(SRCDIR)/univ/*.cpp $(DISTDIR)/src/univ cp $(SRCDIR)/univ/themes/*.cpp $(DISTDIR)/src/univ/themes +MGL_DIST: UNIV_DIST + cp $(WXDIR)/wxMGL.spec $(DISTDIR) + cp $(INCDIR)/wx/mgl/*.h $(DISTDIR)/include/wx/mgl + cp $(SRCDIR)/mgl/files.lst $(DISTDIR)/src/mgl + cp $(SRCDIR)/mgl/make* $(DISTDIR)/src/mgl + cp $(SRCDIR)/mgl/*.cpp $(DISTDIR)/src/mgl + mkdir $(DISTDIR)/contrib + cp -R $(WXDIR)/contrib $(DISTDIR) + DEMOS_DIST: ALL_GUI_DIST mkdir $(DISTDIR)/demos cp $(DEMODIR)/Makefile.in $(DISTDIR)/demos @@ -842,6 +869,13 @@ SAMPLES_DIST: ALL_GUI_DIST cp $(SAMPDIR)/configure $(DISTDIR)/samples cp $(SAMPDIR)/configure.in $(DISTDIR)/samples + mkdir $(DISTDIR)/samples/artprov + cp $(SAMPDIR)/artprov/Makefile.in $(DISTDIR)/samples/artprov + cp $(SAMPDIR)/artprov/makefile.unx $(DISTDIR)/samples/artprov + cp $(SAMPDIR)/artprov/*.cpp $(DISTDIR)/samples/artprov + cp $(SAMPDIR)/artprov/*.h $(DISTDIR)/samples/artprov + cp $(SAMPDIR)/artprov/*.xpm $(DISTDIR)/samples/artprov + mkdir $(DISTDIR)/samples/calendar cp $(SAMPDIR)/calendar/Makefile.in $(DISTDIR)/samples/calendar cp $(SAMPDIR)/calendar/makefile.unx $(DISTDIR)/samples/calendar @@ -1018,7 +1052,7 @@ SAMPLES_DIST: ALL_GUI_DIST cp $(SAMPDIR)/image/makefile.unx $(DISTDIR)/samples/image cp $(SAMPDIR)/image/*.cpp $(DISTDIR)/samples/image cp $(SAMPDIR)/image/*.mms $(DISTDIR)/samples/image - cp $(SAMPDIR)/image/horse.* $(DISTDIR)/samples/image + cp $(SAMPDIR)/image/horse*.* $(DISTDIR)/samples/image cp $(SAMPDIR)/image/smile.xbm $(DISTDIR)/samples/image cp $(SAMPDIR)/image/smile.xpm $(DISTDIR)/samples/image @@ -1053,6 +1087,10 @@ SAMPLES_DIST: ALL_GUI_DIST cp $(SAMPDIR)/joytest/*.h $(DISTDIR)/samples/joytest cp $(SAMPDIR)/joytest/*.wav $(DISTDIR)/samples/joytest + mkdir $(DISTDIR)/samples/keyboard + cp $(SAMPDIR)/keyboard/Makefile.in $(DISTDIR)/samples/keyboard + cp $(SAMPDIR)/keyboard/*.cpp $(DISTDIR)/samples/keyboard + mkdir $(DISTDIR)/samples/layout cp $(SAMPDIR)/layout/Makefile.in $(DISTDIR)/samples/layout cp $(SAMPDIR)/layout/makefile.unx $(DISTDIR)/samples/layout @@ -1110,7 +1148,12 @@ SAMPLES_DIST: ALL_GUI_DIST cp $(SAMPDIR)/mobile/wxedit/Makefile.in $(DISTDIR)/samples/mobile/wxedit cp $(SAMPDIR)/mobile/wxedit/*.cpp $(DISTDIR)/samples/mobile/wxedit cp $(SAMPDIR)/mobile/wxedit/*.h $(DISTDIR)/samples/mobile/wxedit - + mkdir $(DISTDIR)/samples/mobile/styles + cp $(SAMPDIR)/mobile/styles/Makefile.in $(DISTDIR)/samples/mobile/styles + cp $(SAMPDIR)/mobile/styles/*.cpp $(DISTDIR)/samples/mobile/styles + cp $(SAMPDIR)/mobile/styles/*.h $(DISTDIR)/samples/mobile/styles + cp $(SAMPDIR)/mobile/styles/*.jpg $(DISTDIR)/samples/mobile/styles + mkdir $(DISTDIR)/samples/dialup cp $(SAMPDIR)/dialup/Makefile.in $(DISTDIR)/samples/dialup cp $(SAMPDIR)/dialup/makefile.unx $(DISTDIR)/samples/dialup @@ -1214,6 +1257,12 @@ SAMPLES_DIST: ALL_GUI_DIST cp $(SAMPDIR)/scrollsub/makefile.unx $(DISTDIR)/samples/scrollsub cp $(SAMPDIR)/scrollsub/*.cpp $(DISTDIR)/samples/scrollsub + mkdir $(DISTDIR)/samples/shaped + cp $(SAMPDIR)/shaped/Makefile.in $(DISTDIR)/samples/shaped + cp $(SAMPDIR)/shaped/makefile.unx $(DISTDIR)/samples/shaped + cp $(SAMPDIR)/shaped/*.cpp $(DISTDIR)/samples/shaped + cp $(SAMPDIR)/shaped/*.png $(DISTDIR)/samples/shaped + mkdir $(DISTDIR)/samples/sockets cp $(SAMPDIR)/sockets/Makefile.in $(DISTDIR)/samples/sockets cp $(SAMPDIR)/sockets/makefile.unx $(DISTDIR)/samples/sockets @@ -1305,6 +1354,18 @@ UTILS_DIST: ALL_GUI_DIST cp $(UTILSDIR)/tex2rtf/src/*.cpp $(DISTDIR)/utils/tex2rtf/src cp $(UTILSDIR)/tex2rtf/src/tex2rtf.* $(DISTDIR)/utils/tex2rtf/src + mkdir $(DISTDIR)/utils/emulator + mkdir $(DISTDIR)/utils/emulator/src + mkdir $(DISTDIR)/utils/emulator/docs + cp $(UTILSDIR)/emulator/*.in $(DISTDIR)/utils/emulator + cp $(UTILSDIR)/emulator/src/*.h $(DISTDIR)/utils/emulator/src + cp $(UTILSDIR)/emulator/src/*.in $(DISTDIR)/utils/emulator/src + cp $(UTILSDIR)/emulator/src/*.cpp $(DISTDIR)/utils/emulator/src + cp $(UTILSDIR)/emulator/src/*.jpg $(DISTDIR)/utils/emulator/src + cp $(UTILSDIR)/emulator/src/*.wxe $(DISTDIR)/utils/emulator/src + cp $(UTILSDIR)/emulator/docs/*.txt $(DISTDIR)/utils/emulator/docs + cp $(UTILSDIR)/emulator/docs/*.jpg $(DISTDIR)/utils/emulator/docs + mkdir $(DISTDIR)/utils/makegen mkdir $(DISTDIR)/utils/makegen/templates cp $(UTILSDIR)/makegen/Makefile.in $(DISTDIR)/utils/makegen @@ -1319,7 +1380,29 @@ UTILS_DIST: ALL_GUI_DIST cp $(UTILSDIR)/HelpGen/Makefile.in $(DISTDIR)/utils/HelpGen cp $(UTILSDIR)/HelpGen/src/*.* $(DISTDIR)/utils/HelpGen/src - cp -R $(UTILSDIR)/dialoged $(DISTDIR)/utils/dialoged + mkdir $(DISTDIR)/utils/dialoged + mkdir $(DISTDIR)/utils/dialoged/src + mkdir $(DISTDIR)/utils/dialoged/src/bitmaps + mkdir $(DISTDIR)/utils/dialoged/docs + cp $(UTILSDIR)/dialoged/Makefile.in $(DISTDIR)/utils/dialoged + cp $(UTILSDIR)/dialoged/src/*.h $(DISTDIR)/utils/dialoged/src + cp $(UTILSDIR)/dialoged/src/*.cpp $(DISTDIR)/utils/dialoged/src + cp $(UTILSDIR)/dialoged/src/Makefile.in $(DISTDIR)/utils/dialoged/src + cp $(UTILSDIR)/dialoged/src/makefile.unx $(DISTDIR)/utils/dialoged/src + cp $(UTILSDIR)/dialoged/src/bitmaps/*.xpm $(DISTDIR)/utils/dialoged/src/bitmaps + cp $(UTILSDIR)/dialoged/docs/*.tex $(DISTDIR)/utils/dialoged/docs + cp $(UTILSDIR)/dialoged/docs/*.ini $(DISTDIR)/utils/dialoged/docs + cp $(UTILSDIR)/dialoged/docs/*.gif $(DISTDIR)/utils/dialoged/docs + + mkdir $(DISTDIR)/utils/helpview + mkdir $(DISTDIR)/utils/helpview/src + mkdir $(DISTDIR)/utils/helpview/src/bitmaps + cp $(UTILSDIR)/helpview/Makefile.in $(DISTDIR)/utils/helpview + cp $(UTILSDIR)/helpview/src/*.h $(DISTDIR)/utils/helpview/src + cp $(UTILSDIR)/helpview/src/*.cpp $(DISTDIR)/utils/helpview/src + cp $(UTILSDIR)/helpview/src/Makefile.in $(DISTDIR)/utils/helpview/src + cp $(UTILSDIR)/helpview/src/test.zip $(DISTDIR)/utils/helpview/src + cp $(UTILSDIR)/helpview/src/bitmaps/*.xpm $(DISTDIR)/utils/helpview/src/bitmaps MISC_DIST: ALL_GUI_DIST mkdir $(DISTDIR)/misc @@ -1347,62 +1430,73 @@ MANUAL_DIST: # this target does not generate a complete wxPython dist, it only includes # those files needed for the Debian source package. -# see utils/wxPython/distrib for scripts to make a proper wxPython dist. +# see wxPython/distrib for scripts to make a proper wxPython dist. +# +# first copy everything and then clean up the CVS stuff and etc... PYTHON_DIST: - mkdir $(DISTDIR)/wxPython - mkdir $(DISTDIR)/wxPython/contrib - mkdir $(DISTDIR)/wxPython/contrib/dllwidget - mkdir $(DISTDIR)/wxPython/contrib/gizmos - mkdir $(DISTDIR)/wxPython/contrib/glcanvas - mkdir $(DISTDIR)/wxPython/contrib/glcanvas/gtk - mkdir $(DISTDIR)/wxPython/contrib/ogl - mkdir $(DISTDIR)/wxPython/contrib/stc - mkdir $(DISTDIR)/wxPython/contrib/stc/gtk - mkdir $(DISTDIR)/wxPython/contrib/xrc - mkdir $(DISTDIR)/wxPython/demo - mkdir $(DISTDIR)/wxPython/demo/bitmaps - mkdir $(DISTDIR)/wxPython/demo/bmp_source - mkdir $(DISTDIR)/wxPython/demo/data - mkdir $(DISTDIR)/wxPython/demo/dllwidget - mkdir $(DISTDIR)/wxPython/src - mkdir $(DISTDIR)/wxPython/src/gtk - mkdir $(DISTDIR)/wxPython/scripts - mkdir $(DISTDIR)/wxPython/wxPython - mkdir $(DISTDIR)/wxPython/wxPython/lib - mkdir $(DISTDIR)/wxPython/wxPython/lib/PyCrust - mkdir $(DISTDIR)/wxPython/wxPython/lib/editor - mkdir $(DISTDIR)/wxPython/wxPython/lib/mixins - mkdir $(DISTDIR)/wxPython/wxPython/tools - mkdir $(DISTDIR)/wxPython/wxPython/tools/XRCed - - cp $(WXDIR)/wxPython/*.txt $(DISTDIR)/wxPython - cp $(WXDIR)/wxPython/*.py $(DISTDIR)/wxPython - cp $(WXDIR)/wxPython/setup.cfg $(DISTDIR)/wxPython - cp $(WXDIR)/wxPython/MANIFEST.in $(DISTDIR)/wxPython - cp $(WXDIR)/wxPython/contrib/dllwidget/*.{py,cpp,h,i} $(DISTDIR)/wxPython/contrib/dllwidget - cp $(WXDIR)/wxPython/contrib/gizmos/*.{py,cpp,i} $(DISTDIR)/wxPython/contrib/gizmos - -cp $(WXDIR)/wxPython/contrib/glcanvas/* $(DISTDIR)/wxPython/contrib/glcanvas - cp $(WXDIR)/wxPython/contrib/glcanvas/gtk/glcanvas.* $(DISTDIR)/wxPython/contrib/glcanvas/gtk - -cp $(WXDIR)/wxPython/contrib/ogl/* $(DISTDIR)/wxPython/contrib/ogl - -cp $(WXDIR)/wxPython/contrib/stc/* $(DISTDIR)/wxPython/contrib/stc - -cp $(WXDIR)/wxPython/contrib/stc/gtk/* $(DISTDIR)/wxPython/contrib/stc/gtk - -cp $(WXDIR)/wxPython/contrib/xrc/xrc.* $(DISTDIR)/wxPython/contrib/xrc - -cp $(WXDIR)/wxPython/demo/* $(DISTDIR)/wxPython/demo - -cp $(WXDIR)/wxPython/demo/bitmaps/* $(DISTDIR)/wxPython/demo/bitmaps - -cp $(WXDIR)/wxPython/demo/bmp_source/* $(DISTDIR)/wxPython/demo/bmp_source - -cp $(WXDIR)/wxPython/demo/data/* $(DISTDIR)/wxPython/demo/data - -cp $(WXDIR)/wxPython/demo/dllwidget/Makefile $(DISTDIR)/wxPython/demo/dllwidget - -cp $(WXDIR)/wxPython/demo/dllwidget/test_* $(DISTDIR)/wxPython/demo/dllwidget - -cp $(WXDIR)/wxPython/scripts/* $(DISTDIR)/wxPython/scripts - -cp $(WXDIR)/wxPython/src/* $(DISTDIR)/wxPython/src - cp $(WXDIR)/wxPython/src/gtk/*.py $(DISTDIR)/wxPython/src/gtk - cp $(WXDIR)/wxPython/src/gtk/*.cpp $(DISTDIR)/wxPython/src/gtk - cp $(WXDIR)/wxPython/wxPython/lib/*.py $(DISTDIR)/wxPython/wxPython/lib - cp $(WXDIR)/wxPython/wxPython/lib/PyCrust/*.py $(DISTDIR)/wxPython/wxPython/lib/PyCrust - cp $(WXDIR)/wxPython/wxPython/lib/editor/*.py $(DISTDIR)/wxPython/wxPython/lib/editor - cp $(WXDIR)/wxPython/wxPython/lib/mixins/*.py $(DISTDIR)/wxPython/wxPython/lib/mixins - cp $(WXDIR)/wxPython/wxPython/tools/*.py $(DISTDIR)/wxPython/wxPython/tools - cp $(WXDIR)/wxPython/wxPython/tools/XRCed/*.{py,ico,sh,xrc} $(DISTDIR)/wxPython/wxPython/tools/XRCed + for dir in \ + wxPython \ + wxPython/contrib \ + wxPython/contrib/dllwidget \ + wxPython/contrib/gizmos \ + wxPython/contrib/glcanvas \ + wxPython/contrib/glcanvas/gtk \ + wxPython/contrib/ogl \ + wxPython/contrib/stc \ + wxPython/contrib/stc/gtk \ + wxPython/contrib/xrc \ + wxPython/demo \ + wxPython/demo/bitmaps \ + wxPython/demo/bmp_source \ + wxPython/demo/data \ + wxPython/demo/dllwidget \ + wxPython/samples/StyleEditor \ + wxPython/samples/doodle \ + wxPython/samples/embedded \ + wxPython/samples/frogedit \ + wxPython/samples/pySketch \ + wxPython/samples/pySketch/images \ + wxPython/samples/wxProject \ + wxPython/samples/wx_examples \ + wxPython/samples/wx_examples/basic \ + wxPython/samples/wx_examples/hello \ + wxPython/samples/wx_examples/screenshots \ + wxPython/distutils \ + wxPython/distutils/command \ + wxPython/scripts \ + wxPython/src \ + wxPython/src/gtk \ + wxPython/wx \ + wxPython/wx/lib \ + wxPython/wx/lib/colourchooser \ + wxPython/wx/lib/editor \ + wxPython/wx/lib/mixins \ + wxPython/wx/py \ + wxPython/wxPython \ + wxPython/wxPython/lib \ + wxPython/wxPython/lib/PyCrust \ + wxPython/wxPython/lib/colourchooser \ + wxPython/wxPython/lib/editor \ + wxPython/wxPython/lib/mixins \ + wxPython/wxPython/tools \ + wxPython/wxPython/tools/XRCed \ + wxPython/wxPython/tools/XRCed/src-images \ + wxPython/wxPython/py \ + wxPython/wxPython/py/tests \ + wxPython/wxPython/py/wxd \ + ; do \ + echo "Copying dir: $$dir..."; \ + mkdir $(DISTDIR)/$$dir; \ + cp $(WXDIR)/$$dir/* $(DISTDIR)/$$dir > /dev/null 2>&1; \ + done; \ + \ + find $(DISTDIR)/wxPython -name "*~" > RM_FILES; \ + find $(DISTDIR)/wxPython -name "*.pyc" >> RM_FILES; \ + find $(DISTDIR)/wxPython -name "*.bat" >> RM_FILES; \ + find $(DISTDIR)/wxPython -name "core" >> RM_FILES; \ + find $(DISTDIR)/wxPython -name "core.[0-9]*" >> RM_FILES; \ + for f in `cat RM_FILES`; do rm $$f; done; \ + rm RM_FILES distclean: $(RM) -r _dist_dir @@ -1426,6 +1520,11 @@ dist-only: dist: @GUIDIST@ @echo "*** Creating wxWindows distribution in $(DISTDIR)..." + @# now prune away a lot of the crap included by using cp -R + @# in other dist targets. + find $(DISTDIR) \( -name "CVS" -o -name ".cvsignore" -o -name "*.dsp" -o -name "*.dsw" -o -name "*.hh*" -o \ + \( -name "makefile.*" -a ! -name "makefile.unx" \) \) \ + -print0 | xargs -0 rm -rf @cd _dist_dir && tar ch $(DISTDIRNAME) | gzip -f9 > ../$(WXARCHIVE); @if test "$(USE_GUI)" = 1; then \ cd $(DISTDIR); \ @@ -1499,6 +1598,7 @@ debian-dist: debian-native-dist debian-msw-dirs MSW_DIST mv $(DISTDIR) $(WXDIR)/../wxwindows$(WX_MAJOR_VERSION_NUMBER).$(WX_MINOR_VERSION_NUMBER)-$(WX_MAJOR_VERSION_NUMBER).$(WX_MINOR_VERSION_NUMBER).$(WX_RELEASE_NUMBER) debian-native-dist: @GUIDIST@ UNIV_DIST MANUAL_DIST PYTHON_DIST + cp $(SRCDIR)/files.lst $(DISTDIR)/src debian-msw-dirs: mkdir $(DISTDIR)/include/wx/msw diff --git a/acinclude.m4 b/acinclude.m4 index 47508a0fbc..e49126ddcb 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -19,7 +19,7 @@ dnl --------------------------------------------------------------------------- AC_DEFUN([WX_PATH_FIND_INCLUDES], [ ac_find_includes= -for ac_dir in $1; +for ac_dir in $1 /usr/include; do if test -f "$ac_dir/$2"; then ac_find_includes=$ac_dir @@ -35,7 +35,7 @@ dnl --------------------------------------------------------------------------- AC_DEFUN([WX_PATH_FIND_LIBRARIES], [ ac_find_libraries= -for ac_dir in $1; +for ac_dir in $1 /usr/lib; do for ac_extension in a so sl dylib; do if test -f "$ac_dir/lib$2.$ac_extension"; then @@ -51,13 +51,17 @@ dnl Path to include, already defined dnl --------------------------------------------------------------------------- AC_DEFUN([WX_INCLUDE_PATH_EXIST], [ - ac_path_to_include=$1 - echo "$2" | grep "\-I$1" > /dev/null - result=$? - if test $result = 0; then + dnl never add -I/usr/include to the CPPFLAGS + if test "x$1" = "x/usr/include"; then ac_path_to_include="" else - ac_path_to_include=" -I$1" + echo "$2" | grep "\-I$1" > /dev/null + result=$? + if test $result = 0; then + ac_path_to_include="" + else + ac_path_to_include=" -I$1" + fi fi ]) @@ -378,6 +382,59 @@ AC_DEFUN([WX_ARG_ENABLE], ]) +dnl =========================================================================== +dnl Linker features test +dnl =========================================================================== + +dnl --------------------------------------------------------------------------- +dnl WX_VERSIONED_SYMBOLS checks whether the linker can create versioned +dnl symbols. If it can, sets LDFLAGS_VERSIONING to $CXX flags needed to use +dnl version script file named versionfile +dnl +dnl call WX_VERSIONED_SYMBOLS(versionfile) +dnl --------------------------------------------------------------------------- +AC_DEFUN([WX_VERSIONED_SYMBOLS], +[ + found_versioning=no + + dnl FIXME - doesn't work, Solaris linker doesn't accept wildcards + dnl in the script. + dnl dnl Check for known non-gcc cases: + dnl case "${host}" in + dnl *-*-solaris2* ) + dnl if test "x$GCC" != "xyes" ; then + dnl LDFLAGS_VERSIONING="-M $1" + dnl found_versioning=yes + dnl fi + dnl ;; + dnl esac + + dnl Generic check for GCC or GCC-like behaviour (Intel C++, GCC): + if test $found_versioning = no ; then + AC_CACHE_CHECK([if the linker accepts --version-script], wx_cv_version_script, + [ + echo "VER_1 { *; };" >conftest.sym + echo "int main() { return 0; }" >conftest.cpp + + if AC_TRY_COMMAND([ + $CXX -o conftest.output $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.cpp + -Wl,--version-script,conftest.sym >/dev/null 2>conftest.stderr]) ; then + if test -s conftest.stderr ; then + wx_cv_version_script=no + else + wx_cv_version_script=yes + fi + else + wx_cv_version_script=no + fi + rm -f conftest.output conftest.stderr conftest.sym conftest.cpp + ]) + if test $wx_cv_version_script = yes ; then + LDFLAGS_VERSIONING="-Wl,--version-script,$1" + fi + fi +]) + dnl =========================================================================== dnl "3rd party" macros included here because they are not widely available diff --git a/aclocal.m4 b/aclocal.m4 index 808ecf4a94..5bec16026b 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,4 +1,4 @@ -dnl aclocal.m4 generated automatically by aclocal 1.4-p5 +dnl aclocal.m4 generated automatically by aclocal 1.4-p6 dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation @@ -31,7 +31,7 @@ dnl --------------------------------------------------------------------------- AC_DEFUN([WX_PATH_FIND_INCLUDES], [ ac_find_includes= -for ac_dir in $1; +for ac_dir in $1 /usr/include; do if test -f "$ac_dir/$2"; then ac_find_includes=$ac_dir @@ -47,7 +47,7 @@ dnl --------------------------------------------------------------------------- AC_DEFUN([WX_PATH_FIND_LIBRARIES], [ ac_find_libraries= -for ac_dir in $1; +for ac_dir in $1 /usr/lib; do for ac_extension in a so sl dylib; do if test -f "$ac_dir/lib$2.$ac_extension"; then @@ -63,13 +63,17 @@ dnl Path to include, already defined dnl --------------------------------------------------------------------------- AC_DEFUN([WX_INCLUDE_PATH_EXIST], [ - ac_path_to_include=$1 - echo "$2" | grep "\-I$1" > /dev/null - result=$? - if test $result = 0; then + dnl never add -I/usr/include to the CPPFLAGS + if test "x$1" = "x/usr/include"; then ac_path_to_include="" else - ac_path_to_include=" -I$1" + echo "$2" | grep "\-I$1" > /dev/null + result=$? + if test $result = 0; then + ac_path_to_include="" + else + ac_path_to_include=" -I$1" + fi fi ]) @@ -349,6 +353,10 @@ AC_DEFUN([WX_ARG_WITH], dnl like WX_ARG_WITH but uses AC_ARG_ENABLE instead of AC_ARG_WITH dnl usage: WX_ARG_ENABLE(option, helpmessage, variable-name, enablestring) +dnl +dnl enablestring is a hack and allows to show "checking for --disable-foo" +dnl message when running configure instead of the default "checking for +dnl --enable-foo" one whih is useful for the options enabled by default AC_DEFUN([WX_ARG_ENABLE], [ enablestring=$4 @@ -386,6 +394,59 @@ AC_DEFUN([WX_ARG_ENABLE], ]) +dnl =========================================================================== +dnl Linker features test +dnl =========================================================================== + +dnl --------------------------------------------------------------------------- +dnl WX_VERSIONED_SYMBOLS checks whether the linker can create versioned +dnl symbols. If it can, sets LDFLAGS_VERSIONING to $CXX flags needed to use +dnl version script file named versionfile +dnl +dnl call WX_VERSIONED_SYMBOLS(versionfile) +dnl --------------------------------------------------------------------------- +AC_DEFUN([WX_VERSIONED_SYMBOLS], +[ + found_versioning=no + + dnl FIXME - doesn't work, Solaris linker doesn't accept wildcards + dnl in the script. + dnl dnl Check for known non-gcc cases: + dnl case "${host}" in + dnl *-*-solaris2* ) + dnl if test "x$GCC" != "xyes" ; then + dnl LDFLAGS_VERSIONING="-M $1" + dnl found_versioning=yes + dnl fi + dnl ;; + dnl esac + + dnl Generic check for GCC or GCC-like behaviour (Intel C++, GCC): + if test $found_versioning = no ; then + AC_CACHE_CHECK([if the linker accepts --version-script], wx_cv_version_script, + [ + echo "VER_1 { *; };" >conftest.sym + echo "int main() { return 0; }" >conftest.cpp + + if AC_TRY_COMMAND([ + $CXX -o conftest.output $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.cpp + -Wl,--version-script,conftest.sym >/dev/null 2>conftest.stderr]) ; then + if test -s conftest.stderr ; then + wx_cv_version_script=no + else + wx_cv_version_script=yes + fi + else + wx_cv_version_script=no + fi + rm -f conftest.output conftest.stderr conftest.sym conftest.cpp + ]) + if test $wx_cv_version_script = yes ; then + LDFLAGS_VERSIONING="-Wl,--version-script,$1" + fi + fi +]) + dnl =========================================================================== dnl "3rd party" macros included here because they are not widely available @@ -729,64 +790,6 @@ main () rm -f conf.gtktest ]) - -dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not) -dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page -dnl also defines GSTUFF_PKG_ERRORS on error -AC_DEFUN(PKG_CHECK_MODULES, [ - succeeded=no - - if test -z "$PKG_CONFIG"; then - AC_PATH_PROG(PKG_CONFIG, pkg-config, no) - fi - - if test "$PKG_CONFIG" = "no" ; then - echo "*** The pkg-config script could not be found. Make sure it is" - echo "*** in your path, or set the PKG_CONFIG environment variable" - echo "*** to the full path to pkg-config." - echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - AC_MSG_CHECKING(for $2) - - if $PKG_CONFIG --exists "$2" ; then - AC_MSG_RESULT(yes) - succeeded=yes - - AC_MSG_CHECKING($1_CFLAGS) - $1_CFLAGS=`$PKG_CONFIG --cflags "$2"` - AC_MSG_RESULT($$1_CFLAGS) - - AC_MSG_CHECKING($1_LIBS) - $1_LIBS=`$PKG_CONFIG --libs "$2"` - AC_MSG_RESULT($$1_LIBS) - else - $1_CFLAGS="" - $1_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` - ifelse([$4], ,echo $$1_PKG_ERRORS,) - fi - - AC_SUBST($1_CFLAGS) - AC_SUBST($1_LIBS) - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi - - if test $succeeded = yes; then - ifelse([$3], , :, [$3]) - else - ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4]) - fi -]) - - - # Configure paths for GTK+ # Owen Taylor 97-11-3 @@ -982,3 +985,61 @@ main () rm -f conf.gtktest ]) + +dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not) +dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page +dnl also defines GSTUFF_PKG_ERRORS on error +AC_DEFUN(PKG_CHECK_MODULES, [ + succeeded=no + + if test -z "$PKG_CONFIG"; then + AC_PATH_PROG(PKG_CONFIG, pkg-config, no) + fi + + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + AC_MSG_CHECKING(for $2) + + if $PKG_CONFIG --exists "$2" ; then + AC_MSG_RESULT(yes) + succeeded=yes + + AC_MSG_CHECKING($1_CFLAGS) + $1_CFLAGS=`$PKG_CONFIG --cflags "$2"` + AC_MSG_RESULT($$1_CFLAGS) + + AC_MSG_CHECKING($1_LIBS) + $1_LIBS=`$PKG_CONFIG --libs "$2"` + AC_MSG_RESULT($$1_LIBS) + else + $1_CFLAGS="" + $1_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` + ifelse([$4], ,echo $$1_PKG_ERRORS,) + fi + + AC_SUBST($1_CFLAGS) + AC_SUBST($1_LIBS) + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi + + if test $succeeded = yes; then + ifelse([$3], , :, [$3]) + else + ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4]) + fi +]) + + + diff --git a/art/wxwin.ico b/art/wxwin.ico new file mode 100644 index 0000000000..8d2dc18c6b Binary files /dev/null and b/art/wxwin.ico differ diff --git a/art/wxwin16x16.png b/art/wxwin16x16.png new file mode 100644 index 0000000000..e07faeb73f Binary files /dev/null and b/art/wxwin16x16.png differ diff --git a/art/wxwin16x16.xpm b/art/wxwin16x16.xpm new file mode 100644 index 0000000000..9964e69313 --- /dev/null +++ b/art/wxwin16x16.xpm @@ -0,0 +1,25 @@ +/* XPM */ +static char *wxwin16x16_xpm[] = { +"16 16 6 1", +" c None", +". c #000000", +"X c #000084", +"o c #FFFFFF", +"O c #FFFF00", +"+ c #FF0000", +" ", +" ", +" ", +" ....... ", +" .XXXXX. ", +" .oXXXX. ", +" .oXXX.......", +".....oXXX.OOOOO.", +".+++.XXXX.oOOOO.", +".o++......oOOOO.", +".o++++. .oOOOO.", +".o++++. .OOOOO.", +".+++++. .......", +"....... ", +" ", +" "}; diff --git a/art/wxwin32x32.png b/art/wxwin32x32.png new file mode 100644 index 0000000000..20eda44161 Binary files /dev/null and b/art/wxwin32x32.png differ diff --git a/art/wxwin32x32.xpm b/art/wxwin32x32.xpm new file mode 100644 index 0000000000..34b841a0e8 --- /dev/null +++ b/art/wxwin32x32.xpm @@ -0,0 +1,41 @@ +/* XPM */ +static char *wxwin32x32_xpm[] = { +"32 32 6 1", +" c None", +". c #000000", +"X c #000084", +"o c #FFFFFF", +"O c #FFFF00", +"+ c #FF0000", +" ", +" ", +" ", +" ", +" ", +" .............. ", +" .XXXXXXXXXXXX. ", +" .XXXXXXXXXXXX. ", +" .XooXXXXXXXXX. ", +" .XooXXXXXXXXX. ", +" .XooXXXXXXXXX. ", +" .XooXXXXXX..............", +" .XooXXXXXX.OOOOOOOOOOOO.", +".........XooXXXXXX.OOOOOOOOOOOO.", +".+++++++.XooXXXXXX.OooOOOOOOOOO.", +".+++++++.XooXXXXXX.OooOOOOOOOOO.", +".+oo++++.XXXXXXXXX.OooOOOOOOOOO.", +".+oo++++.XXXXXXXXX.OooOOOOOOOOO.", +".+oo++++...........OooOOOOOOOOO.", +".+oo+++++++++. .OooOOOOOOOOO.", +".+oo+++++++++. .OooOOOOOOOOO.", +".+oo+++++++++. .OooOOOOOOOOO.", +".+oo+++++++++. .OOOOOOOOOOOO.", +".+oo+++++++++. .OOOOOOOOOOOO.", +".++++++++++++. ..............", +".++++++++++++. ", +".............. ", +" ", +" ", +" ", +" ", +" "}; diff --git a/config.guess b/config.guess index dff9e481b7..9b1384be4b 100755 --- a/config.guess +++ b/config.guess @@ -1,9 +1,9 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 -# Free Software Foundation, Inc. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002 Free Software Foundation, Inc. -timestamp='2001-09-04' +timestamp='2002-11-30' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -24,8 +24,9 @@ timestamp='2001-09-04' # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. -# Written by Per Bothner . -# Please send patches to . +# Originally written by Per Bothner . +# Please send patches to . Submit a context +# diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and @@ -87,30 +88,40 @@ if test $# != 0; then exit 1 fi +trap 'exit 1' 1 2 15 -dummy=dummy-$$ -trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15 +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. -# CC_FOR_BUILD -- compiler used by this script. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. -set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int dummy(){}" > $dummy.c ; - for c in cc gcc c89 ; do - ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; - if test $? = 0 ; then +# This shell variable is my proudest work .. or something. --bje + +set_cc_for_build='tmpdir=${TMPDIR-/tmp}/config-guess-$$ ; +(old=`umask` && umask 077 && mkdir $tmpdir && umask $old && unset old) + || (echo "$me: cannot create $tmpdir" >&2 && exit 1) ; +dummy=$tmpdir/dummy ; +files="$dummy.c $dummy.o $dummy.rel $dummy" ; +trap '"'"'rm -f $files; rmdir $tmpdir; exit 1'"'"' 1 2 15 ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; - rm -f $dummy.c $dummy.o $dummy.rel ; + rm -f $files ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac' +esac ; +unset files' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) @@ -127,29 +138,30 @@ UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) - # Netbsd (nbsd) targets should (where applicable) match one or + # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. - # Determine the machine/vendor (is the vendor relevant). - case "${UNAME_MACHINE}" in - amiga) machine=m68k-unknown ;; - arm32) machine=arm-unknown ;; - atari*) machine=m68k-atari ;; - sun3*) machine=m68k-sun ;; - mac68k) machine=m68k-apple ;; - macppc) machine=powerpc-apple ;; - hp3[0-9][05]) machine=m68k-hp ;; - ibmrt|romp-ibm) machine=romp-ibm ;; - *) machine=${UNAME_MACHINE}-unknown ;; + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. - case "${UNAME_MACHINE}" in - i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k) + case "${UNAME_MACHINE_ARCH}" in + arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null @@ -166,12 +178,62 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in ;; esac # The OS release - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "${UNAME_VERSION}" in + Debian*) + release='-gnu' + ;; + *) + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + ;; + esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit 0 ;; + amiga:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + arc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + hp300:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mac68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + macppc:OpenBSD:*:*) + echo powerpc-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme88k:OpenBSD:*:*) + echo m88k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvmeppc:OpenBSD:*:*) + echo powerpc-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + pmax:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sgi:OpenBSD:*:*) + echo mipseb-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sun3:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + wgrisc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + *:OpenBSD:*:*) + echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; alpha:OSF1:*:*) if test $UNAME_RELEASE = "V4.0"; then UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` @@ -180,6 +242,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. + eval $set_cc_for_build cat <$dummy.s .data \$Lformat: @@ -205,10 +268,9 @@ main: jsr \$26,exit .end main EOF - eval $set_cc_for_build - $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null + $CC_FOR_BUILD -o $dummy $dummy.s 2>/dev/null if test "$?" = 0 ; then - case `./$dummy` in + case `$dummy` in 0-0) UNAME_MACHINE="alpha" ;; @@ -230,9 +292,12 @@ EOF 2-1307) UNAME_MACHINE="alphaev68" ;; + 3-1307) + UNAME_MACHINE="alphaev7" + ;; esac fi - rm -f $dummy.s $dummy + rm -f $dummy.s $dummy && rmdir $tmpdir echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit 0 ;; Alpha\ *:Windows_NT*:*) @@ -247,29 +312,11 @@ EOF Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit 0;; - amiga:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit 0 ;; - arc64:OpenBSD:*:*) - echo mips64el-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - arc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - hkmips:OpenBSD:*:*) - echo mips-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - pmax:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sgi:OpenBSD:*:*) - echo mips-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - wgrisc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos exit 0 ;; *:OS/390:*:*) echo i370-ibm-openedition @@ -291,6 +338,10 @@ EOF NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit 0 ;; + DRS?6000:UNIX_SV:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7 && exit 0 ;; + esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; @@ -319,7 +370,7 @@ EOF echo m68k-sun-sunos${UNAME_RELEASE} exit 0 ;; sun*:*:4.2BSD:*) - UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) @@ -333,12 +384,6 @@ EOF aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit 0 ;; - sparc*:NetBSD:*) - echo `uname -p`-unknown-netbsd${UNAME_RELEASE} - exit 0 ;; - atari*:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor @@ -365,18 +410,6 @@ EOF *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit 0 ;; - sun3*:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mac68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme88k:OpenBSD:*:*) - echo m88k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit 0 ;; @@ -415,15 +448,21 @@ EOF exit (-1); } EOF - $CC_FOR_BUILD $dummy.c -o $dummy \ - && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ - && rm -f $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy + $CC_FOR_BUILD -o $dummy $dummy.c \ + && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ + && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 + rm -f $dummy.c $dummy && rmdir $tmpdir echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit 0 ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit 0 ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit 0 ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit 0 ;; @@ -496,8 +535,8 @@ EOF exit(0); } EOF - $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy + $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 + rm -f $dummy.c $dummy && rmdir $tmpdir echo rs6000-ibm-aix3.2.5 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 @@ -506,7 +545,7 @@ EOF fi exit 0 ;; *:AIX:*:[45]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else @@ -546,10 +585,8 @@ EOF 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) - case "${HPUX_REV}" in - 11.[0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 @@ -558,13 +595,13 @@ EOF case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac - fi ;; - esac - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include @@ -597,10 +634,10 @@ EOF exit (0); } EOF - (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` - if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi - rm -f $dummy.c $dummy - fi ;; + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi + rm -f $dummy.c $dummy && rmdir $tmpdir + fi ;; esac echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; @@ -635,8 +672,8 @@ EOF exit (0); } EOF - $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy + $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 + rm -f $dummy.c $dummy && rmdir $tmpdir echo unknown-hitachi-hiuxwe2 exit 0 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) @@ -664,9 +701,6 @@ EOF parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit 0 ;; - hppa*:OpenBSD:*:*) - echo hppa-unknown-openbsd - exit 0 ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit 0 ;; @@ -685,9 +719,6 @@ EOF C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit 0 ;; - CRAY*X-MP:*:*:*) - echo xmp-cray-unicos - exit 0 ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; @@ -709,18 +740,12 @@ EOF CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; - CRAY-2:*:*:*) - echo cray2-cray-unicos - exit 0 ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit 0 ;; - hp300:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit 0 ;; @@ -731,10 +756,19 @@ EOF echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit 0 ;; - *:OpenBSD:*:*) - echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + # Determine whether the default compiler uses glibc. + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + #if __GLIBC__ >= 2 + LIBC=gnu + #else + LIBC= + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` + rm -f $dummy.c && rmdir $tmpdir + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} exit 0 ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin @@ -745,11 +779,17 @@ EOF i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit 0 ;; + x86:Interix*:3*) + echo i586-pc-interix3 + exit 0 ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks + exit 0 ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? - echo i386-pc-interix + echo i586-pc-interix exit 0 ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin @@ -770,16 +810,50 @@ EOF echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux + echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; mips:Linux:*:*) - case `sed -n '/^byte/s/^.*: \(.*\) endian/\1/p' < /proc/cpuinfo` in - big) echo mips-unknown-linux-gnu && exit 0 ;; - little) echo mipsel-unknown-linux-gnu && exit 0 ;; - esac + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips + #undef mipsel + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mipsel + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` + rm -f $dummy.c && rmdir $tmpdir + test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 + ;; + mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips64 + #undef mips64el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mips64el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips64 + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` + rm -f $dummy.c && rmdir $tmpdir + test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu @@ -828,7 +902,8 @@ EOF # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. - ld_supported_targets=`cd /; ld --help 2>&1 \ + # Set LC_ALL=C to ensure ld outputs messages in English. + ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// @@ -840,7 +915,7 @@ EOF ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit 0 ;; + exit 0 ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit 0 ;; @@ -852,32 +927,29 @@ EOF esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build - cat >$dummy.c < -#ifdef __cplusplus -#include /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif -#ifdef __ELF__ -# ifdef __GLIBC__ -# if __GLIBC__ >= 2 - printf ("%s-pc-linux-gnu\n", argv[1]); -# else - printf ("%s-pc-linux-gnulibc1\n", argv[1]); -# endif -# else - printf ("%s-pc-linux-gnulibc1\n", argv[1]); -# endif -#else - printf ("%s-pc-linux-gnuaout\n", argv[1]); -#endif - return 0; -} + sed 's/^ //' << EOF >$dummy.c + #include + #ifdef __ELF__ + # ifdef __GLIBC__ + # if __GLIBC__ >= 2 + LIBC=gnu + # else + LIBC=gnulibc1 + # endif + # else + LIBC=gnulibc1 + # endif + #else + #ifdef __INTEL_COMPILER + LIBC=gnu + #else + LIBC=gnuaout + #endif + #endif EOF - $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` + rm -f $dummy.c && rmdir $tmpdir + test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 ;; i*86:DYNIX/ptx:4*:*) @@ -894,6 +966,23 @@ EOF # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit 0 ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit 0 ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit 0 ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit 0 ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit 0 ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then @@ -915,22 +1004,19 @@ EOF UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` - (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 - (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \ + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 - (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \ + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit 0 ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit 0 ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about @@ -954,9 +1040,15 @@ EOF # "miniframe" echo m68010-convergent-sysv exit 0 ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit 0 ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit 0 ;; M68*:*:R3V[567]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; - 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) + 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` @@ -973,9 +1065,6 @@ EOF mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit 0 ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; @@ -1047,6 +1136,9 @@ EOF SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit 0 ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit 0 ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit 0 ;; @@ -1057,15 +1149,17 @@ EOF echo `uname -p`-apple-darwin${UNAME_RELEASE} exit 0 ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) - if test "${UNAME_MACHINE}" = "x86pc"; then + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then + UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi - echo `uname -p`-${UNAME_MACHINE}-nto-qnx + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit 0 ;; *:QNX:*:4*) echo i386-pc-qnx exit 0 ;; - NSR-[KW]:NONSTOP_KERNEL:*:*) + NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit 0 ;; *:NonStop-UX:*:*) @@ -1088,11 +1182,6 @@ EOF fi echo ${UNAME_MACHINE}-unknown-plan9 exit 0 ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx - exit 0 ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit 0 ;; @@ -1111,12 +1200,6 @@ EOF *:ITS:*:*) echo pdp10-unknown-its exit 0 ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop - exit 0 ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos - exit 0 ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 @@ -1237,8 +1320,8 @@ main () } EOF -$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0 -rm -f $dummy.c $dummy +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 +rm -f $dummy.c $dummy && rmdir $tmpdir # Apollos put the system type in the environment. diff --git a/config.sub b/config.sub index 393f13d373..04baf3d80d 100755 --- a/config.sub +++ b/config.sub @@ -1,9 +1,9 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 -# Free Software Foundation, Inc. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. -timestamp='2001-09-07' +timestamp='2003-01-03' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -29,7 +29,8 @@ timestamp='2001-09-07' # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. -# Please send patches to . +# Please send patches to . Submit a context +# diff and a properly formatted ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. @@ -117,7 +118,7 @@ esac # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in - nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-*) + nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; @@ -226,32 +227,44 @@ case $basic_machine in 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ - | c4x | clipper \ - | d10v | d30v | dsp16xx \ - | fr30 \ + | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ + | ip2k \ | m32r | m68000 | m68k | m88k | mcore \ - | mips16 | mips64 | mips64el | mips64orion | mips64orionel \ - | mips64vr4100 | mips64vr4100el | mips64vr4300 \ - | mips64vr4300el | mips64vr5000 | mips64vr5000el \ - | mipsbe | mipseb | mipsel | mipsle | mipstx39 | mipstx39el \ - | mipsisa32 \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64vr | mips64vrel \ + | mips64orion | mips64orionel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ + | msp430 \ | ns16k | ns32k \ - | openrisc \ + | openrisc | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ - | s390 | s390x \ - | sh | sh[34] | sh[34]eb | shbe | shle \ - | sparc | sparc64 | sparclet | sparclite | sparcv9 | sparcv9b \ - | stormy16 | strongarm \ + | sh | sh[1234] | sh3e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ + | strongarm \ | tahoe | thumb | tic80 | tron \ - | v850 \ + | v850 | v850e \ | we32k \ - | x86 | xscale \ + | x86 | xscale | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; @@ -278,38 +291,53 @@ case $basic_machine in 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alphapca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armv*-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* \ | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c54x-* \ - | clipper-* | cray2-* | cydra-* \ - | d10v-* | d30v-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* \ + | clipper-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ | elxsi-* \ - | f30[01]-* | f700-* | fr30-* | fx80-* \ + | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* \ | m32r-* \ - | m68000-* | m680[01234]0-* | m68360-* | m683?2-* | m68k-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | mcore-* \ - | mips-* | mips16-* | mips64-* | mips64el-* | mips64orion-* \ - | mips64orionel-* | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* | mipsbe-* | mipseb-* \ - | mipsle-* | mipsel-* | mipstx39-* | mipstx39el-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipstx39-* | mipstx39el-* \ + | msp430-* \ + | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ - | s390-* | s390x-* \ - | sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* \ - | sparc-* | sparc64-* | sparc86x-* | sparclite-* \ - | sparcv9-* | sparcv9b-* | stormy16-* | strongarm-* | sv1-* \ - | t3e-* | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \ - | v850-* | vax-* \ + | sh-* | sh[1234]-* | sh3e-* | sh[34]eb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ + | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ + | tahoe-* | thumb-* | tic30-* | tic4x-* | tic54x-* | tic80-* | tron-* \ + | v850-* | v850e-* | vax-* \ | we32k-* \ - | x86-* | x86_64-* | xmp-* | xps100-* | xscale-* \ + | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ + | xtensa-* \ | ymp-* \ | z8k-*) ;; @@ -374,6 +402,10 @@ case $basic_machine in basic_machine=ns32k-sequent os=-dynix ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; convex-c1) basic_machine=c1-convex os=-bsd @@ -394,16 +426,8 @@ case $basic_machine in basic_machine=c38-convex os=-bsd ;; - cray | ymp) - basic_machine=ymp-cray - os=-unicos - ;; - cray2) - basic_machine=cray2-cray - os=-unicos - ;; - [cjt]90) - basic_machine=${basic_machine}-cray + cray | j90) + basic_machine=j90-cray os=-unicos ;; crds | unos) @@ -418,6 +442,14 @@ case $basic_machine in decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola @@ -598,14 +630,6 @@ case $basic_machine in basic_machine=m68k-atari os=-mint ;; - mipsel*-linux*) - basic_machine=mipsel-unknown - os=-linux-gnu - ;; - mips*-linux*) - basic_machine=mips-unknown - os=-linux-gnu - ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; @@ -620,6 +644,10 @@ case $basic_machine in basic_machine=m68k-rom68k os=-coff ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; msdos) basic_machine=i386-pc os=-msdos @@ -692,6 +720,10 @@ case $basic_machine in np1) basic_machine=np1-gould ;; + nv1) + basic_machine=nv1-cray + os=-unicosmp + ;; nsr-tandem) basic_machine=nsr-tandem ;; @@ -699,6 +731,10 @@ case $basic_machine in basic_machine=hppa1.1-oki os=-proelf ;; + or32 | or32-*) + basic_machine=or32-unknown + os=-coff + ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose @@ -721,19 +757,19 @@ case $basic_machine in pbb) basic_machine=m68k-tti ;; - pc532 | pc532-*) + pc532 | pc532-*) basic_machine=ns32k-pc532 ;; - pentium | p5 | k5 | k6 | nexgen) + pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; - pentiumpro | p6 | 6x86 | athlon) + pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2) basic_machine=i686-pc ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-*) + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) @@ -748,22 +784,22 @@ case $basic_machine in power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown - ;; + ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown - ;; + ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown - ;; + ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown - ;; + ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; @@ -784,10 +820,22 @@ case $basic_machine in rtpc | rtpc-*) basic_machine=romp-ibm ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; sa29200) basic_machine=a29k-amd os=-udi ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; sequent) basic_machine=i386-sequent ;; @@ -795,7 +843,7 @@ case $basic_machine in basic_machine=sh-hitachi os=-hms ;; - sparclite-wrs) + sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; @@ -862,9 +910,17 @@ case $basic_machine in os=-dynix ;; t3e) - basic_machine=t3e-cray + basic_machine=alphaev5-cray os=-unicos ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tic4x | c4x*) + basic_machine=tic4x-unknown + os=-coff + ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff @@ -875,6 +931,10 @@ case $basic_machine in tx39el) basic_machine=mipstx39el-unknown ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; tower | tower-32) basic_machine=m68k-ncr ;; @@ -899,8 +959,8 @@ case $basic_machine in os=-vms ;; vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; + basic_machine=f301-fujitsu + ;; vxworks960) basic_machine=i960-wrs os=-vxworks @@ -921,17 +981,13 @@ case $basic_machine in basic_machine=hppa1.1-winbond os=-proelf ;; - windows32) - basic_machine=i386-pc - os=-windows32-msvcrt - ;; - xmp) - basic_machine=xmp-cray - os=-unicos - ;; - xps | xps100) + xps | xps100) basic_machine=xps100-honeywell ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim @@ -952,13 +1008,6 @@ case $basic_machine in op60c) basic_machine=hppa1.1-oki ;; - mips) - if [ x$os = x-linux-gnu ]; then - basic_machine=mips-unknown - else - basic_machine=mips-mips - fi - ;; romp) basic_machine=romp-ibm ;; @@ -978,13 +1027,16 @@ case $basic_machine in we32k) basic_machine=we32k-att ;; - sh3 | sh4 | sh3eb | sh4eb) + sh3 | sh4 | sh3eb | sh4eb | sh[1234]le | sh3ele) basic_machine=sh-unknown ;; + sh64) + basic_machine=sh64-unknown + ;; sparc | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; - cydra) + cydra) basic_machine=cydra-cydrome ;; orion) @@ -999,10 +1051,6 @@ case $basic_machine in pmac | pmac-mpw) basic_machine=powerpc-apple ;; - c4x*) - basic_machine=c4x-none - os=-coff - ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; @@ -1065,10 +1113,12 @@ case $os in | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos*) + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -microbsd*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1080,8 +1130,10 @@ case $os in ;; esac ;; + -nto-qnx*) + ;; -nto*) - os=-nto-qnx + os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ @@ -1120,14 +1172,20 @@ case $os in -acis*) os=-aos ;; + -atheos*) + os=-atheos + ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; + -nova*) + os=-rtmk-nova + ;; -ns2 ) - os=-nextstep2 + os=-nextstep2 ;; -nsk*) os=-nsk @@ -1166,8 +1224,8 @@ case $os in -xenix) os=-xenix ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint ;; -none) ;; @@ -1200,10 +1258,11 @@ case $basic_machine in arm*-semi) os=-aout ;; + # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; - pdp11-*) + pdp11-*) os=-none ;; *-dec | vax-*) @@ -1230,6 +1289,9 @@ case $basic_machine in mips*-*) os=-elf ;; + or32-*) + os=-coff + ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; @@ -1293,19 +1355,19 @@ case $basic_machine in *-next) os=-nextstep3 ;; - *-gould) + *-gould) os=-sysv ;; - *-highlevel) + *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; - *-sgi) + *-sgi) os=-irix ;; - *-siemens) + *-siemens) os=-sysv4 ;; *-masscomp) @@ -1377,7 +1439,7 @@ case $basic_machine in -ptx*) vendor=sequent ;; - -vxsim* | -vxworks*) + -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) diff --git a/configure b/configure index 53b06bcd3a..dceb8c21d9 100755 --- a/configure +++ b/configure @@ -52,6 +52,9 @@ + + + @@ -61,16 +64,16 @@ - - - - - # Configure paths for GTK+ # Owen Taylor 97-11-3 + + + + + # Guess values for system-dependent variables and create Makefiles. # Generated automatically using autoconf version 2.13 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. @@ -1014,7 +1017,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:1018: checking host system type" >&5 +echo "configure:1021: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -1035,7 +1038,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$host" 1>&6 echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:1039: checking target system type" >&5 +echo "configure:1042: checking target system type" >&5 target_alias=$target case "$target_alias" in @@ -1053,7 +1056,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$target" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:1057: checking build system type" >&5 +echo "configure:1060: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -1078,15 +1081,15 @@ test "$host_alias" != "$target_alias" && WX_MAJOR_VERSION_NUMBER=2 -WX_MINOR_VERSION_NUMBER=3 -WX_RELEASE_NUMBER=3 +WX_MINOR_VERSION_NUMBER=4 +WX_RELEASE_NUMBER=1 WX_VERSION=$WX_MAJOR_VERSION_NUMBER.$WX_MINOR_VERSION_NUMBER.$WX_RELEASE_NUMBER WX_RELEASE=$WX_MAJOR_VERSION_NUMBER.$WX_MINOR_VERSION_NUMBER WX_MSW_VERSION=$WX_MAJOR_VERSION_NUMBER$WX_MINOR_VERSION_NUMBER$WX_RELEASE_NUMBER -WX_CURRENT=2 +WX_CURRENT=0 WX_REVISION=0 WX_AGE=0 @@ -1239,11 +1242,11 @@ EOF USE_BSD=1 USE_OPENBSD=1 cat >> confdefs.h <<\EOF -#define __FREEBSD__ 1 +#define __OPENBSD__ 1 EOF cat >> confdefs.h <<\EOF -#define __OPENBSD__ 1 +#define __BSD__ 1 EOF DEFAULT_DEFAULT_wxUSE_GTK=1 @@ -1252,11 +1255,11 @@ EOF USE_BSD=1 USE_NETBSD=1 cat >> confdefs.h <<\EOF -#define __FREEBSD__ 1 +#define __NETBSD__ 1 EOF cat >> confdefs.h <<\EOF -#define __NETBSD__ 1 +#define __BSD__ 1 EOF DEFAULT_DEFAULT_wxUSE_GTK=1 @@ -1305,7 +1308,7 @@ EOF USE_AIX=1 USE_SYSV=1 USE_SVR4=1 - SO_SUFFIX=a + SO_SUFFIX=a cat >> confdefs.h <<\EOF #define __AIX__ 1 EOF @@ -1648,8 +1651,8 @@ else DEFAULT_wxUSE_DOC_VIEW_ARCHITECTURE=yes DEFAULT_wxUSE_PRINTING_ARCHITECTURE=yes - DEFAULT_wxUSE_PROLOGIO=yes - DEFAULT_wxUSE_RESOURCES=yes + DEFAULT_wxUSE_PROLOGIO=no + DEFAULT_wxUSE_RESOURCES=no DEFAULT_wxUSE_CONSTRAINTS=yes DEFAULT_wxUSE_IPC=yes DEFAULT_wxUSE_HELP=yes @@ -1759,7 +1762,7 @@ done enablestring= echo $ac_n "checking for --${enablestring:-enable}-gui""... $ac_c" 1>&6 -echo "configure:1763: checking for --${enablestring:-enable}-gui" >&5 +echo "configure:1766: checking for --${enablestring:-enable}-gui" >&5 no_cache=0 # Check whether --enable-gui or --disable-gui was given. if test "${enable_gui+set}" = set; then @@ -1802,7 +1805,7 @@ if test "$wxUSE_GUI" = "yes"; then enablestring= echo $ac_n "checking for --${enablestring:-enable}-universal""... $ac_c" 1>&6 -echo "configure:1806: checking for --${enablestring:-enable}-universal" >&5 +echo "configure:1809: checking for --${enablestring:-enable}-universal" >&5 no_cache=0 # Check whether --enable-universal or --disable-universal was given. if test "${enable_universal+set}" = set; then @@ -1896,7 +1899,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-nanox""... $ac_c" 1>&6 -echo "configure:1900: checking for --${enablestring:-enable}-nanox" >&5 +echo "configure:1903: checking for --${enablestring:-enable}-nanox" >&5 no_cache=0 # Check whether --enable-nanox or --disable-nanox was given. if test "${enable_nanox+set}" = set; then @@ -1937,7 +1940,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-gtk2""... $ac_c" 1>&6 -echo "configure:1941: checking for --${enablestring:-enable}-gtk2" >&5 +echo "configure:1944: checking for --${enablestring:-enable}-gtk2" >&5 no_cache=0 # Check whether --enable-gtk2 or --disable-gtk2 was given. if test "${enable_gtk2+set}" = set; then @@ -1977,7 +1980,7 @@ fi echo $ac_n "checking for --with-libpng""... $ac_c" 1>&6 -echo "configure:1981: checking for --with-libpng" >&5 +echo "configure:1984: checking for --with-libpng" >&5 no_cache=0 # Check whether --with-libpng or --without-libpng was given. if test "${with_libpng+set}" = set; then @@ -2028,7 +2031,7 @@ fi echo $ac_n "checking for --with-libjpeg""... $ac_c" 1>&6 -echo "configure:2032: checking for --with-libjpeg" >&5 +echo "configure:2035: checking for --with-libjpeg" >&5 no_cache=0 # Check whether --with-libjpeg or --without-libjpeg was given. if test "${with_libjpeg+set}" = set; then @@ -2079,7 +2082,7 @@ fi echo $ac_n "checking for --with-libtiff""... $ac_c" 1>&6 -echo "configure:2083: checking for --with-libtiff" >&5 +echo "configure:2086: checking for --with-libtiff" >&5 no_cache=0 # Check whether --with-libtiff or --without-libtiff was given. if test "${with_libtiff+set}" = set; then @@ -2130,7 +2133,7 @@ fi echo $ac_n "checking for --with-opengl""... $ac_c" 1>&6 -echo "configure:2134: checking for --with-opengl" >&5 +echo "configure:2137: checking for --with-opengl" >&5 no_cache=0 # Check whether --with-opengl or --without-opengl was given. if test "${with_opengl+set}" = set; then @@ -2172,7 +2175,7 @@ fi echo $ac_n "checking for --with-dmalloc""... $ac_c" 1>&6 -echo "configure:2176: checking for --with-dmalloc" >&5 +echo "configure:2179: checking for --with-dmalloc" >&5 no_cache=0 # Check whether --with-dmalloc or --without-dmalloc was given. if test "${with_dmalloc+set}" = set; then @@ -2211,7 +2214,7 @@ fi echo $ac_n "checking for --with-regex""... $ac_c" 1>&6 -echo "configure:2215: checking for --with-regex" >&5 +echo "configure:2218: checking for --with-regex" >&5 no_cache=0 # Check whether --with-regex or --without-regex was given. if test "${with_regex+set}" = set; then @@ -2262,7 +2265,7 @@ fi echo $ac_n "checking for --with-zlib""... $ac_c" 1>&6 -echo "configure:2266: checking for --with-zlib" >&5 +echo "configure:2269: checking for --with-zlib" >&5 no_cache=0 # Check whether --with-zlib or --without-zlib was given. if test "${with_zlib+set}" = set; then @@ -2313,7 +2316,7 @@ fi echo $ac_n "checking for --with-odbc""... $ac_c" 1>&6 -echo "configure:2317: checking for --with-odbc" >&5 +echo "configure:2320: checking for --with-odbc" >&5 no_cache=0 # Check whether --with-odbc or --without-odbc was given. if test "${with_odbc+set}" = set; then @@ -2355,7 +2358,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-shared""... $ac_c" 1>&6 -echo "configure:2359: checking for --${enablestring:-enable}-shared" >&5 +echo "configure:2362: checking for --${enablestring:-enable}-shared" >&5 no_cache=0 # Check whether --enable-shared or --disable-shared was given. if test "${enable_shared+set}" = set; then @@ -2395,7 +2398,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-soname""... $ac_c" 1>&6 -echo "configure:2399: checking for --${enablestring:-enable}-soname" >&5 +echo "configure:2402: checking for --${enablestring:-enable}-soname" >&5 no_cache=0 # Check whether --enable-soname or --disable-soname was given. if test "${enable_soname+set}" = set; then @@ -2435,7 +2438,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-optimise""... $ac_c" 1>&6 -echo "configure:2439: checking for --${enablestring:-enable}-optimise" >&5 +echo "configure:2442: checking for --${enablestring:-enable}-optimise" >&5 no_cache=0 # Check whether --enable-optimise or --disable-optimise was given. if test "${enable_optimise+set}" = set; then @@ -2475,7 +2478,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-debug""... $ac_c" 1>&6 -echo "configure:2479: checking for --${enablestring:-enable}-debug" >&5 +echo "configure:2482: checking for --${enablestring:-enable}-debug" >&5 no_cache=0 # Check whether --enable-debug or --disable-debug was given. if test "${enable_debug+set}" = set; then @@ -2516,7 +2519,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-precomp""... $ac_c" 1>&6 -echo "configure:2520: checking for --${enablestring:-enable}-precomp" >&5 +echo "configure:2523: checking for --${enablestring:-enable}-precomp" >&5 no_cache=0 # Check whether --enable-precomp or --disable-precomp was given. if test "${enable_precomp+set}" = set; then @@ -2565,7 +2568,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-debug_flag""... $ac_c" 1>&6 -echo "configure:2569: checking for --${enablestring:-enable}-debug_flag" >&5 +echo "configure:2572: checking for --${enablestring:-enable}-debug_flag" >&5 no_cache=0 # Check whether --enable-debug_flag or --disable-debug_flag was given. if test "${enable_debug_flag+set}" = set; then @@ -2605,7 +2608,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-debug_info""... $ac_c" 1>&6 -echo "configure:2609: checking for --${enablestring:-enable}-debug_info" >&5 +echo "configure:2612: checking for --${enablestring:-enable}-debug_info" >&5 no_cache=0 # Check whether --enable-debug_info or --disable-debug_info was given. if test "${enable_debug_info+set}" = set; then @@ -2645,7 +2648,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-debug_gdb""... $ac_c" 1>&6 -echo "configure:2649: checking for --${enablestring:-enable}-debug_gdb" >&5 +echo "configure:2652: checking for --${enablestring:-enable}-debug_gdb" >&5 no_cache=0 # Check whether --enable-debug_gdb or --disable-debug_gdb was given. if test "${enable_debug_gdb+set}" = set; then @@ -2685,7 +2688,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-debug_cntxt""... $ac_c" 1>&6 -echo "configure:2689: checking for --${enablestring:-enable}-debug_cntxt" >&5 +echo "configure:2692: checking for --${enablestring:-enable}-debug_cntxt" >&5 no_cache=0 # Check whether --enable-debug_cntxt or --disable-debug_cntxt was given. if test "${enable_debug_cntxt+set}" = set; then @@ -2725,7 +2728,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-mem_tracing""... $ac_c" 1>&6 -echo "configure:2729: checking for --${enablestring:-enable}-mem_tracing" >&5 +echo "configure:2732: checking for --${enablestring:-enable}-mem_tracing" >&5 no_cache=0 # Check whether --enable-mem_tracing or --disable-mem_tracing was given. if test "${enable_mem_tracing+set}" = set; then @@ -2765,7 +2768,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-profile""... $ac_c" 1>&6 -echo "configure:2769: checking for --${enablestring:-enable}-profile" >&5 +echo "configure:2772: checking for --${enablestring:-enable}-profile" >&5 no_cache=0 # Check whether --enable-profile or --disable-profile was given. if test "${enable_profile+set}" = set; then @@ -2805,7 +2808,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-no_rtti""... $ac_c" 1>&6 -echo "configure:2809: checking for --${enablestring:-enable}-no_rtti" >&5 +echo "configure:2812: checking for --${enablestring:-enable}-no_rtti" >&5 no_cache=0 # Check whether --enable-no_rtti or --disable-no_rtti was given. if test "${enable_no_rtti+set}" = set; then @@ -2845,7 +2848,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-no_exceptions""... $ac_c" 1>&6 -echo "configure:2849: checking for --${enablestring:-enable}-no_exceptions" >&5 +echo "configure:2852: checking for --${enablestring:-enable}-no_exceptions" >&5 no_cache=0 # Check whether --enable-no_exceptions or --disable-no_exceptions was given. if test "${enable_no_exceptions+set}" = set; then @@ -2885,7 +2888,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-permissive""... $ac_c" 1>&6 -echo "configure:2889: checking for --${enablestring:-enable}-permissive" >&5 +echo "configure:2892: checking for --${enablestring:-enable}-permissive" >&5 no_cache=0 # Check whether --enable-permissive or --disable-permissive was given. if test "${enable_permissive+set}" = set; then @@ -2925,7 +2928,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-no_deps""... $ac_c" 1>&6 -echo "configure:2929: checking for --${enablestring:-enable}-no_deps" >&5 +echo "configure:2932: checking for --${enablestring:-enable}-no_deps" >&5 no_cache=0 # Check whether --enable-no_deps or --disable-no_deps was given. if test "${enable_no_deps+set}" = set; then @@ -2966,7 +2969,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-compat20""... $ac_c" 1>&6 -echo "configure:2970: checking for --${enablestring:-enable}-compat20" >&5 +echo "configure:2973: checking for --${enablestring:-enable}-compat20" >&5 no_cache=0 # Check whether --enable-compat20 or --disable-compat20 was given. if test "${enable_compat20+set}" = set; then @@ -3006,7 +3009,7 @@ fi enablestring=disable echo $ac_n "checking for --${enablestring:-enable}-compat22""... $ac_c" 1>&6 -echo "configure:3010: checking for --${enablestring:-enable}-compat22" >&5 +echo "configure:3013: checking for --${enablestring:-enable}-compat22" >&5 no_cache=0 # Check whether --enable-compat22 or --disable-compat22 was given. if test "${enable_compat22+set}" = set; then @@ -3060,7 +3063,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-intl""... $ac_c" 1>&6 -echo "configure:3064: checking for --${enablestring:-enable}-intl" >&5 +echo "configure:3067: checking for --${enablestring:-enable}-intl" >&5 no_cache=0 # Check whether --enable-intl or --disable-intl was given. if test "${enable_intl+set}" = set; then @@ -3100,7 +3103,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-config""... $ac_c" 1>&6 -echo "configure:3104: checking for --${enablestring:-enable}-config" >&5 +echo "configure:3107: checking for --${enablestring:-enable}-config" >&5 no_cache=0 # Check whether --enable-config or --disable-config was given. if test "${enable_config+set}" = set; then @@ -3141,7 +3144,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-protocols""... $ac_c" 1>&6 -echo "configure:3145: checking for --${enablestring:-enable}-protocols" >&5 +echo "configure:3148: checking for --${enablestring:-enable}-protocols" >&5 no_cache=0 # Check whether --enable-protocols or --disable-protocols was given. if test "${enable_protocols+set}" = set; then @@ -3181,7 +3184,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-ftp""... $ac_c" 1>&6 -echo "configure:3185: checking for --${enablestring:-enable}-ftp" >&5 +echo "configure:3188: checking for --${enablestring:-enable}-ftp" >&5 no_cache=0 # Check whether --enable-ftp or --disable-ftp was given. if test "${enable_ftp+set}" = set; then @@ -3221,7 +3224,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-http""... $ac_c" 1>&6 -echo "configure:3225: checking for --${enablestring:-enable}-http" >&5 +echo "configure:3228: checking for --${enablestring:-enable}-http" >&5 no_cache=0 # Check whether --enable-http or --disable-http was given. if test "${enable_http+set}" = set; then @@ -3261,7 +3264,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-fileproto""... $ac_c" 1>&6 -echo "configure:3265: checking for --${enablestring:-enable}-fileproto" >&5 +echo "configure:3268: checking for --${enablestring:-enable}-fileproto" >&5 no_cache=0 # Check whether --enable-fileproto or --disable-fileproto was given. if test "${enable_fileproto+set}" = set; then @@ -3301,7 +3304,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-sockets""... $ac_c" 1>&6 -echo "configure:3305: checking for --${enablestring:-enable}-sockets" >&5 +echo "configure:3308: checking for --${enablestring:-enable}-sockets" >&5 no_cache=0 # Check whether --enable-sockets or --disable-sockets was given. if test "${enable_sockets+set}" = set; then @@ -3341,7 +3344,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-ole""... $ac_c" 1>&6 -echo "configure:3345: checking for --${enablestring:-enable}-ole" >&5 +echo "configure:3348: checking for --${enablestring:-enable}-ole" >&5 no_cache=0 # Check whether --enable-ole or --disable-ole was given. if test "${enable_ole+set}" = set; then @@ -3381,7 +3384,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-dataobj""... $ac_c" 1>&6 -echo "configure:3385: checking for --${enablestring:-enable}-dataobj" >&5 +echo "configure:3388: checking for --${enablestring:-enable}-dataobj" >&5 no_cache=0 # Check whether --enable-dataobj or --disable-dataobj was given. if test "${enable_dataobj+set}" = set; then @@ -3422,7 +3425,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-ipc""... $ac_c" 1>&6 -echo "configure:3426: checking for --${enablestring:-enable}-ipc" >&5 +echo "configure:3429: checking for --${enablestring:-enable}-ipc" >&5 no_cache=0 # Check whether --enable-ipc or --disable-ipc was given. if test "${enable_ipc+set}" = set; then @@ -3463,7 +3466,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-cmdline""... $ac_c" 1>&6 -echo "configure:3467: checking for --${enablestring:-enable}-cmdline" >&5 +echo "configure:3470: checking for --${enablestring:-enable}-cmdline" >&5 no_cache=0 # Check whether --enable-cmdline or --disable-cmdline was given. if test "${enable_cmdline+set}" = set; then @@ -3503,7 +3506,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-datetime""... $ac_c" 1>&6 -echo "configure:3507: checking for --${enablestring:-enable}-datetime" >&5 +echo "configure:3510: checking for --${enablestring:-enable}-datetime" >&5 no_cache=0 # Check whether --enable-datetime or --disable-datetime was given. if test "${enable_datetime+set}" = set; then @@ -3543,7 +3546,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-timedate""... $ac_c" 1>&6 -echo "configure:3547: checking for --${enablestring:-enable}-timedate" >&5 +echo "configure:3550: checking for --${enablestring:-enable}-timedate" >&5 no_cache=0 # Check whether --enable-timedate or --disable-timedate was given. if test "${enable_timedate+set}" = set; then @@ -3583,7 +3586,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-stopwatch""... $ac_c" 1>&6 -echo "configure:3587: checking for --${enablestring:-enable}-stopwatch" >&5 +echo "configure:3590: checking for --${enablestring:-enable}-stopwatch" >&5 no_cache=0 # Check whether --enable-stopwatch or --disable-stopwatch was given. if test "${enable_stopwatch+set}" = set; then @@ -3623,7 +3626,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-dialupman""... $ac_c" 1>&6 -echo "configure:3627: checking for --${enablestring:-enable}-dialupman" >&5 +echo "configure:3630: checking for --${enablestring:-enable}-dialupman" >&5 no_cache=0 # Check whether --enable-dialupman or --disable-dialupman was given. if test "${enable_dialupman+set}" = set; then @@ -3663,7 +3666,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-apple_ieee""... $ac_c" 1>&6 -echo "configure:3667: checking for --${enablestring:-enable}-apple_ieee" >&5 +echo "configure:3670: checking for --${enablestring:-enable}-apple_ieee" >&5 no_cache=0 # Check whether --enable-apple_ieee or --disable-apple_ieee was given. if test "${enable_apple_ieee+set}" = set; then @@ -3703,7 +3706,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-timer""... $ac_c" 1>&6 -echo "configure:3707: checking for --${enablestring:-enable}-timer" >&5 +echo "configure:3710: checking for --${enablestring:-enable}-timer" >&5 no_cache=0 # Check whether --enable-timer or --disable-timer was given. if test "${enable_timer+set}" = set; then @@ -3743,7 +3746,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-wave""... $ac_c" 1>&6 -echo "configure:3747: checking for --${enablestring:-enable}-wave" >&5 +echo "configure:3750: checking for --${enablestring:-enable}-wave" >&5 no_cache=0 # Check whether --enable-wave or --disable-wave was given. if test "${enable_wave+set}" = set; then @@ -3783,7 +3786,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-fraction""... $ac_c" 1>&6 -echo "configure:3787: checking for --${enablestring:-enable}-fraction" >&5 +echo "configure:3790: checking for --${enablestring:-enable}-fraction" >&5 no_cache=0 # Check whether --enable-fraction or --disable-fraction was given. if test "${enable_fraction+set}" = set; then @@ -3823,7 +3826,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-dynlib""... $ac_c" 1>&6 -echo "configure:3827: checking for --${enablestring:-enable}-dynlib" >&5 +echo "configure:3830: checking for --${enablestring:-enable}-dynlib" >&5 no_cache=0 # Check whether --enable-dynlib or --disable-dynlib was given. if test "${enable_dynlib+set}" = set; then @@ -3863,7 +3866,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-dynamicloader""... $ac_c" 1>&6 -echo "configure:3867: checking for --${enablestring:-enable}-dynamicloader" >&5 +echo "configure:3870: checking for --${enablestring:-enable}-dynamicloader" >&5 no_cache=0 # Check whether --enable-dynamicloader or --disable-dynamicloader was given. if test "${enable_dynamicloader+set}" = set; then @@ -3903,7 +3906,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-longlong""... $ac_c" 1>&6 -echo "configure:3907: checking for --${enablestring:-enable}-longlong" >&5 +echo "configure:3910: checking for --${enablestring:-enable}-longlong" >&5 no_cache=0 # Check whether --enable-longlong or --disable-longlong was given. if test "${enable_longlong+set}" = set; then @@ -3943,7 +3946,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-geometry""... $ac_c" 1>&6 -echo "configure:3947: checking for --${enablestring:-enable}-geometry" >&5 +echo "configure:3950: checking for --${enablestring:-enable}-geometry" >&5 no_cache=0 # Check whether --enable-geometry or --disable-geometry was given. if test "${enable_geometry+set}" = set; then @@ -3983,7 +3986,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-log""... $ac_c" 1>&6 -echo "configure:3987: checking for --${enablestring:-enable}-log" >&5 +echo "configure:3990: checking for --${enablestring:-enable}-log" >&5 no_cache=0 # Check whether --enable-log or --disable-log was given. if test "${enable_log+set}" = set; then @@ -4023,7 +4026,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-streams""... $ac_c" 1>&6 -echo "configure:4027: checking for --${enablestring:-enable}-streams" >&5 +echo "configure:4030: checking for --${enablestring:-enable}-streams" >&5 no_cache=0 # Check whether --enable-streams or --disable-streams was given. if test "${enable_streams+set}" = set; then @@ -4063,7 +4066,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-file""... $ac_c" 1>&6 -echo "configure:4067: checking for --${enablestring:-enable}-file" >&5 +echo "configure:4070: checking for --${enablestring:-enable}-file" >&5 no_cache=0 # Check whether --enable-file or --disable-file was given. if test "${enable_file+set}" = set; then @@ -4103,7 +4106,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-ffile""... $ac_c" 1>&6 -echo "configure:4107: checking for --${enablestring:-enable}-ffile" >&5 +echo "configure:4110: checking for --${enablestring:-enable}-ffile" >&5 no_cache=0 # Check whether --enable-ffile or --disable-ffile was given. if test "${enable_ffile+set}" = set; then @@ -4143,7 +4146,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-textbuf""... $ac_c" 1>&6 -echo "configure:4147: checking for --${enablestring:-enable}-textbuf" >&5 +echo "configure:4150: checking for --${enablestring:-enable}-textbuf" >&5 no_cache=0 # Check whether --enable-textbuf or --disable-textbuf was given. if test "${enable_textbuf+set}" = set; then @@ -4183,7 +4186,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-textfile""... $ac_c" 1>&6 -echo "configure:4187: checking for --${enablestring:-enable}-textfile" >&5 +echo "configure:4190: checking for --${enablestring:-enable}-textfile" >&5 no_cache=0 # Check whether --enable-textfile or --disable-textfile was given. if test "${enable_textfile+set}" = set; then @@ -4223,7 +4226,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-fontmap""... $ac_c" 1>&6 -echo "configure:4227: checking for --${enablestring:-enable}-fontmap" >&5 +echo "configure:4230: checking for --${enablestring:-enable}-fontmap" >&5 no_cache=0 # Check whether --enable-fontmap or --disable-fontmap was given. if test "${enable_fontmap+set}" = set; then @@ -4263,7 +4266,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-unicode""... $ac_c" 1>&6 -echo "configure:4267: checking for --${enablestring:-enable}-unicode" >&5 +echo "configure:4270: checking for --${enablestring:-enable}-unicode" >&5 no_cache=0 # Check whether --enable-unicode or --disable-unicode was given. if test "${enable_unicode+set}" = set; then @@ -4303,7 +4306,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-mslu""... $ac_c" 1>&6 -echo "configure:4307: checking for --${enablestring:-enable}-mslu" >&5 +echo "configure:4310: checking for --${enablestring:-enable}-mslu" >&5 no_cache=0 # Check whether --enable-mslu or --disable-mslu was given. if test "${enable_mslu+set}" = set; then @@ -4343,7 +4346,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-wxprintfv""... $ac_c" 1>&6 -echo "configure:4347: checking for --${enablestring:-enable}-wxprintfv" >&5 +echo "configure:4350: checking for --${enablestring:-enable}-wxprintfv" >&5 no_cache=0 # Check whether --enable-wxprintfv or --disable-wxprintfv was given. if test "${enable_wxprintfv+set}" = set; then @@ -4383,7 +4386,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-std_iostreams""... $ac_c" 1>&6 -echo "configure:4387: checking for --${enablestring:-enable}-std_iostreams" >&5 +echo "configure:4390: checking for --${enablestring:-enable}-std_iostreams" >&5 no_cache=0 # Check whether --enable-std_iostreams or --disable-std_iostreams was given. if test "${enable_std_iostreams+set}" = set; then @@ -4423,7 +4426,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-filesystem""... $ac_c" 1>&6 -echo "configure:4427: checking for --${enablestring:-enable}-filesystem" >&5 +echo "configure:4430: checking for --${enablestring:-enable}-filesystem" >&5 no_cache=0 # Check whether --enable-filesystem or --disable-filesystem was given. if test "${enable_filesystem+set}" = set; then @@ -4463,7 +4466,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-fs_inet""... $ac_c" 1>&6 -echo "configure:4467: checking for --${enablestring:-enable}-fs_inet" >&5 +echo "configure:4470: checking for --${enablestring:-enable}-fs_inet" >&5 no_cache=0 # Check whether --enable-fs_inet or --disable-fs_inet was given. if test "${enable_fs_inet+set}" = set; then @@ -4503,7 +4506,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-fs_zip""... $ac_c" 1>&6 -echo "configure:4507: checking for --${enablestring:-enable}-fs_zip" >&5 +echo "configure:4510: checking for --${enablestring:-enable}-fs_zip" >&5 no_cache=0 # Check whether --enable-fs_zip or --disable-fs_zip was given. if test "${enable_fs_zip+set}" = set; then @@ -4543,7 +4546,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-zipstream""... $ac_c" 1>&6 -echo "configure:4547: checking for --${enablestring:-enable}-zipstream" >&5 +echo "configure:4550: checking for --${enablestring:-enable}-zipstream" >&5 no_cache=0 # Check whether --enable-zipstream or --disable-zipstream was given. if test "${enable_zipstream+set}" = set; then @@ -4584,7 +4587,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-catch_segvs""... $ac_c" 1>&6 -echo "configure:4588: checking for --${enablestring:-enable}-catch_segvs" >&5 +echo "configure:4591: checking for --${enablestring:-enable}-catch_segvs" >&5 no_cache=0 # Check whether --enable-catch_segvs or --disable-catch_segvs was given. if test "${enable_catch_segvs+set}" = set; then @@ -4624,7 +4627,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-snglinst""... $ac_c" 1>&6 -echo "configure:4628: checking for --${enablestring:-enable}-snglinst" >&5 +echo "configure:4631: checking for --${enablestring:-enable}-snglinst" >&5 no_cache=0 # Check whether --enable-snglinst or --disable-snglinst was given. if test "${enable_snglinst+set}" = set; then @@ -4665,7 +4668,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-mimetype""... $ac_c" 1>&6 -echo "configure:4669: checking for --${enablestring:-enable}-mimetype" >&5 +echo "configure:4672: checking for --${enablestring:-enable}-mimetype" >&5 no_cache=0 # Check whether --enable-mimetype or --disable-mimetype was given. if test "${enable_mimetype+set}" = set; then @@ -4705,7 +4708,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-system_options""... $ac_c" 1>&6 -echo "configure:4709: checking for --${enablestring:-enable}-system_options" >&5 +echo "configure:4712: checking for --${enablestring:-enable}-system_options" >&5 no_cache=0 # Check whether --enable-system_options or --disable-system_options was given. if test "${enable_system_options+set}" = set; then @@ -4746,7 +4749,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-url""... $ac_c" 1>&6 -echo "configure:4750: checking for --${enablestring:-enable}-url" >&5 +echo "configure:4753: checking for --${enablestring:-enable}-url" >&5 no_cache=0 # Check whether --enable-url or --disable-url was given. if test "${enable_url+set}" = set; then @@ -4786,7 +4789,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-protocol""... $ac_c" 1>&6 -echo "configure:4790: checking for --${enablestring:-enable}-protocol" >&5 +echo "configure:4793: checking for --${enablestring:-enable}-protocol" >&5 no_cache=0 # Check whether --enable-protocol or --disable-protocol was given. if test "${enable_protocol+set}" = set; then @@ -4826,7 +4829,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-protocol_http""... $ac_c" 1>&6 -echo "configure:4830: checking for --${enablestring:-enable}-protocol_http" >&5 +echo "configure:4833: checking for --${enablestring:-enable}-protocol_http" >&5 no_cache=0 # Check whether --enable-protocol_http or --disable-protocol_http was given. if test "${enable_protocol_http+set}" = set; then @@ -4866,7 +4869,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-protocol_ftp""... $ac_c" 1>&6 -echo "configure:4870: checking for --${enablestring:-enable}-protocol_ftp" >&5 +echo "configure:4873: checking for --${enablestring:-enable}-protocol_ftp" >&5 no_cache=0 # Check whether --enable-protocol_ftp or --disable-protocol_ftp was given. if test "${enable_protocol_ftp+set}" = set; then @@ -4906,7 +4909,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-protocol_file""... $ac_c" 1>&6 -echo "configure:4910: checking for --${enablestring:-enable}-protocol_file" >&5 +echo "configure:4913: checking for --${enablestring:-enable}-protocol_file" >&5 no_cache=0 # Check whether --enable-protocol_file or --disable-protocol_file was given. if test "${enable_protocol_file+set}" = set; then @@ -4949,7 +4952,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-threads""... $ac_c" 1>&6 -echo "configure:4953: checking for --${enablestring:-enable}-threads" >&5 +echo "configure:4956: checking for --${enablestring:-enable}-threads" >&5 no_cache=0 # Check whether --enable-threads or --disable-threads was given. if test "${enable_threads+set}" = set; then @@ -4993,7 +4996,7 @@ if test "$wxUSE_GUI" = "yes"; then enablestring= echo $ac_n "checking for --${enablestring:-enable}-docview""... $ac_c" 1>&6 -echo "configure:4997: checking for --${enablestring:-enable}-docview" >&5 +echo "configure:5000: checking for --${enablestring:-enable}-docview" >&5 no_cache=0 # Check whether --enable-docview or --disable-docview was given. if test "${enable_docview+set}" = set; then @@ -5033,7 +5036,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-help""... $ac_c" 1>&6 -echo "configure:5037: checking for --${enablestring:-enable}-help" >&5 +echo "configure:5040: checking for --${enablestring:-enable}-help" >&5 no_cache=0 # Check whether --enable-help or --disable-help was given. if test "${enable_help+set}" = set; then @@ -5073,7 +5076,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-mshtmlhelp""... $ac_c" 1>&6 -echo "configure:5077: checking for --${enablestring:-enable}-mshtmlhelp" >&5 +echo "configure:5080: checking for --${enablestring:-enable}-mshtmlhelp" >&5 no_cache=0 # Check whether --enable-mshtmlhelp or --disable-mshtmlhelp was given. if test "${enable_mshtmlhelp+set}" = set; then @@ -5113,7 +5116,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-html""... $ac_c" 1>&6 -echo "configure:5117: checking for --${enablestring:-enable}-html" >&5 +echo "configure:5120: checking for --${enablestring:-enable}-html" >&5 no_cache=0 # Check whether --enable-html or --disable-html was given. if test "${enable_html+set}" = set; then @@ -5153,7 +5156,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-htmlhelp""... $ac_c" 1>&6 -echo "configure:5157: checking for --${enablestring:-enable}-htmlhelp" >&5 +echo "configure:5160: checking for --${enablestring:-enable}-htmlhelp" >&5 no_cache=0 # Check whether --enable-htmlhelp or --disable-htmlhelp was given. if test "${enable_htmlhelp+set}" = set; then @@ -5193,7 +5196,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-constraints""... $ac_c" 1>&6 -echo "configure:5197: checking for --${enablestring:-enable}-constraints" >&5 +echo "configure:5200: checking for --${enablestring:-enable}-constraints" >&5 no_cache=0 # Check whether --enable-constraints or --disable-constraints was given. if test "${enable_constraints+set}" = set; then @@ -5233,7 +5236,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-printarch""... $ac_c" 1>&6 -echo "configure:5237: checking for --${enablestring:-enable}-printarch" >&5 +echo "configure:5240: checking for --${enablestring:-enable}-printarch" >&5 no_cache=0 # Check whether --enable-printarch or --disable-printarch was given. if test "${enable_printarch+set}" = set; then @@ -5273,7 +5276,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-mdi""... $ac_c" 1>&6 -echo "configure:5277: checking for --${enablestring:-enable}-mdi" >&5 +echo "configure:5280: checking for --${enablestring:-enable}-mdi" >&5 no_cache=0 # Check whether --enable-mdi or --disable-mdi was given. if test "${enable_mdi+set}" = set; then @@ -5313,7 +5316,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-loggui""... $ac_c" 1>&6 -echo "configure:5317: checking for --${enablestring:-enable}-loggui" >&5 +echo "configure:5320: checking for --${enablestring:-enable}-loggui" >&5 no_cache=0 # Check whether --enable-loggui or --disable-loggui was given. if test "${enable_loggui+set}" = set; then @@ -5353,7 +5356,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-logwin""... $ac_c" 1>&6 -echo "configure:5357: checking for --${enablestring:-enable}-logwin" >&5 +echo "configure:5360: checking for --${enablestring:-enable}-logwin" >&5 no_cache=0 # Check whether --enable-logwin or --disable-logwin was given. if test "${enable_logwin+set}" = set; then @@ -5393,7 +5396,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-logdialog""... $ac_c" 1>&6 -echo "configure:5397: checking for --${enablestring:-enable}-logdialog" >&5 +echo "configure:5400: checking for --${enablestring:-enable}-logdialog" >&5 no_cache=0 # Check whether --enable-logdialog or --disable-logdialog was given. if test "${enable_logdialog+set}" = set; then @@ -5434,7 +5437,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-postscript""... $ac_c" 1>&6 -echo "configure:5438: checking for --${enablestring:-enable}-postscript" >&5 +echo "configure:5441: checking for --${enablestring:-enable}-postscript" >&5 no_cache=0 # Check whether --enable-postscript or --disable-postscript was given. if test "${enable_postscript+set}" = set; then @@ -5477,7 +5480,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-prologio""... $ac_c" 1>&6 -echo "configure:5481: checking for --${enablestring:-enable}-prologio" >&5 +echo "configure:5484: checking for --${enablestring:-enable}-prologio" >&5 no_cache=0 # Check whether --enable-prologio or --disable-prologio was given. if test "${enable_prologio+set}" = set; then @@ -5517,7 +5520,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-resources""... $ac_c" 1>&6 -echo "configure:5521: checking for --${enablestring:-enable}-resources" >&5 +echo "configure:5524: checking for --${enablestring:-enable}-resources" >&5 no_cache=0 # Check whether --enable-resources or --disable-resources was given. if test "${enable_resources+set}" = set; then @@ -5558,7 +5561,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-xresources""... $ac_c" 1>&6 -echo "configure:5562: checking for --${enablestring:-enable}-xresources" >&5 +echo "configure:5565: checking for --${enablestring:-enable}-xresources" >&5 no_cache=0 # Check whether --enable-xresources or --disable-xresources was given. if test "${enable_xresources+set}" = set; then @@ -5600,7 +5603,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-clipboard""... $ac_c" 1>&6 -echo "configure:5604: checking for --${enablestring:-enable}-clipboard" >&5 +echo "configure:5607: checking for --${enablestring:-enable}-clipboard" >&5 no_cache=0 # Check whether --enable-clipboard or --disable-clipboard was given. if test "${enable_clipboard+set}" = set; then @@ -5640,7 +5643,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-dnd""... $ac_c" 1>&6 -echo "configure:5644: checking for --${enablestring:-enable}-dnd" >&5 +echo "configure:5647: checking for --${enablestring:-enable}-dnd" >&5 no_cache=0 # Check whether --enable-dnd or --disable-dnd was given. if test "${enable_dnd+set}" = set; then @@ -5680,7 +5683,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-metafile""... $ac_c" 1>&6 -echo "configure:5684: checking for --${enablestring:-enable}-metafile" >&5 +echo "configure:5687: checking for --${enablestring:-enable}-metafile" >&5 no_cache=0 # Check whether --enable-metafile or --disable-metafile was given. if test "${enable_metafile+set}" = set; then @@ -5721,7 +5724,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-treelayout""... $ac_c" 1>&6 -echo "configure:5725: checking for --${enablestring:-enable}-treelayout" >&5 +echo "configure:5728: checking for --${enablestring:-enable}-treelayout" >&5 no_cache=0 # Check whether --enable-treelayout or --disable-treelayout was given. if test "${enable_treelayout+set}" = set; then @@ -5763,7 +5766,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-controls""... $ac_c" 1>&6 -echo "configure:5767: checking for --${enablestring:-enable}-controls" >&5 +echo "configure:5770: checking for --${enablestring:-enable}-controls" >&5 no_cache=0 # Check whether --enable-controls or --disable-controls was given. if test "${enable_controls+set}" = set; then @@ -5884,7 +5887,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-accel""... $ac_c" 1>&6 -echo "configure:5888: checking for --${enablestring:-enable}-accel" >&5 +echo "configure:5891: checking for --${enablestring:-enable}-accel" >&5 no_cache=0 # Check whether --enable-accel or --disable-accel was given. if test "${enable_accel+set}" = set; then @@ -5924,7 +5927,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-button""... $ac_c" 1>&6 -echo "configure:5928: checking for --${enablestring:-enable}-button" >&5 +echo "configure:5931: checking for --${enablestring:-enable}-button" >&5 no_cache=0 # Check whether --enable-button or --disable-button was given. if test "${enable_button+set}" = set; then @@ -5964,7 +5967,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-bmpbutton""... $ac_c" 1>&6 -echo "configure:5968: checking for --${enablestring:-enable}-bmpbutton" >&5 +echo "configure:5971: checking for --${enablestring:-enable}-bmpbutton" >&5 no_cache=0 # Check whether --enable-bmpbutton or --disable-bmpbutton was given. if test "${enable_bmpbutton+set}" = set; then @@ -6004,7 +6007,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-calendar""... $ac_c" 1>&6 -echo "configure:6008: checking for --${enablestring:-enable}-calendar" >&5 +echo "configure:6011: checking for --${enablestring:-enable}-calendar" >&5 no_cache=0 # Check whether --enable-calendar or --disable-calendar was given. if test "${enable_calendar+set}" = set; then @@ -6044,7 +6047,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-caret""... $ac_c" 1>&6 -echo "configure:6048: checking for --${enablestring:-enable}-caret" >&5 +echo "configure:6051: checking for --${enablestring:-enable}-caret" >&5 no_cache=0 # Check whether --enable-caret or --disable-caret was given. if test "${enable_caret+set}" = set; then @@ -6084,7 +6087,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-checkbox""... $ac_c" 1>&6 -echo "configure:6088: checking for --${enablestring:-enable}-checkbox" >&5 +echo "configure:6091: checking for --${enablestring:-enable}-checkbox" >&5 no_cache=0 # Check whether --enable-checkbox or --disable-checkbox was given. if test "${enable_checkbox+set}" = set; then @@ -6124,7 +6127,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-checklst""... $ac_c" 1>&6 -echo "configure:6128: checking for --${enablestring:-enable}-checklst" >&5 +echo "configure:6131: checking for --${enablestring:-enable}-checklst" >&5 no_cache=0 # Check whether --enable-checklst or --disable-checklst was given. if test "${enable_checklst+set}" = set; then @@ -6164,7 +6167,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-choice""... $ac_c" 1>&6 -echo "configure:6168: checking for --${enablestring:-enable}-choice" >&5 +echo "configure:6171: checking for --${enablestring:-enable}-choice" >&5 no_cache=0 # Check whether --enable-choice or --disable-choice was given. if test "${enable_choice+set}" = set; then @@ -6204,7 +6207,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-combobox""... $ac_c" 1>&6 -echo "configure:6208: checking for --${enablestring:-enable}-combobox" >&5 +echo "configure:6211: checking for --${enablestring:-enable}-combobox" >&5 no_cache=0 # Check whether --enable-combobox or --disable-combobox was given. if test "${enable_combobox+set}" = set; then @@ -6244,7 +6247,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-gauge""... $ac_c" 1>&6 -echo "configure:6248: checking for --${enablestring:-enable}-gauge" >&5 +echo "configure:6251: checking for --${enablestring:-enable}-gauge" >&5 no_cache=0 # Check whether --enable-gauge or --disable-gauge was given. if test "${enable_gauge+set}" = set; then @@ -6284,7 +6287,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-grid""... $ac_c" 1>&6 -echo "configure:6288: checking for --${enablestring:-enable}-grid" >&5 +echo "configure:6291: checking for --${enablestring:-enable}-grid" >&5 no_cache=0 # Check whether --enable-grid or --disable-grid was given. if test "${enable_grid+set}" = set; then @@ -6324,7 +6327,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-newgrid""... $ac_c" 1>&6 -echo "configure:6328: checking for --${enablestring:-enable}-newgrid" >&5 +echo "configure:6331: checking for --${enablestring:-enable}-newgrid" >&5 no_cache=0 # Check whether --enable-newgrid or --disable-newgrid was given. if test "${enable_newgrid+set}" = set; then @@ -6364,7 +6367,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-imaglist""... $ac_c" 1>&6 -echo "configure:6368: checking for --${enablestring:-enable}-imaglist" >&5 +echo "configure:6371: checking for --${enablestring:-enable}-imaglist" >&5 no_cache=0 # Check whether --enable-imaglist or --disable-imaglist was given. if test "${enable_imaglist+set}" = set; then @@ -6404,7 +6407,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-listbox""... $ac_c" 1>&6 -echo "configure:6408: checking for --${enablestring:-enable}-listbox" >&5 +echo "configure:6411: checking for --${enablestring:-enable}-listbox" >&5 no_cache=0 # Check whether --enable-listbox or --disable-listbox was given. if test "${enable_listbox+set}" = set; then @@ -6444,7 +6447,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-listctrl""... $ac_c" 1>&6 -echo "configure:6448: checking for --${enablestring:-enable}-listctrl" >&5 +echo "configure:6451: checking for --${enablestring:-enable}-listctrl" >&5 no_cache=0 # Check whether --enable-listctrl or --disable-listctrl was given. if test "${enable_listctrl+set}" = set; then @@ -6484,7 +6487,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-notebook""... $ac_c" 1>&6 -echo "configure:6488: checking for --${enablestring:-enable}-notebook" >&5 +echo "configure:6491: checking for --${enablestring:-enable}-notebook" >&5 no_cache=0 # Check whether --enable-notebook or --disable-notebook was given. if test "${enable_notebook+set}" = set; then @@ -6524,7 +6527,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-propsheet""... $ac_c" 1>&6 -echo "configure:6528: checking for --${enablestring:-enable}-propsheet" >&5 +echo "configure:6531: checking for --${enablestring:-enable}-propsheet" >&5 no_cache=0 # Check whether --enable-propsheet or --disable-propsheet was given. if test "${enable_propsheet+set}" = set; then @@ -6564,7 +6567,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-radiobox""... $ac_c" 1>&6 -echo "configure:6568: checking for --${enablestring:-enable}-radiobox" >&5 +echo "configure:6571: checking for --${enablestring:-enable}-radiobox" >&5 no_cache=0 # Check whether --enable-radiobox or --disable-radiobox was given. if test "${enable_radiobox+set}" = set; then @@ -6604,7 +6607,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-radiobtn""... $ac_c" 1>&6 -echo "configure:6608: checking for --${enablestring:-enable}-radiobtn" >&5 +echo "configure:6611: checking for --${enablestring:-enable}-radiobtn" >&5 no_cache=0 # Check whether --enable-radiobtn or --disable-radiobtn was given. if test "${enable_radiobtn+set}" = set; then @@ -6644,7 +6647,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-sash""... $ac_c" 1>&6 -echo "configure:6648: checking for --${enablestring:-enable}-sash" >&5 +echo "configure:6651: checking for --${enablestring:-enable}-sash" >&5 no_cache=0 # Check whether --enable-sash or --disable-sash was given. if test "${enable_sash+set}" = set; then @@ -6684,7 +6687,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-scrollbar""... $ac_c" 1>&6 -echo "configure:6688: checking for --${enablestring:-enable}-scrollbar" >&5 +echo "configure:6691: checking for --${enablestring:-enable}-scrollbar" >&5 no_cache=0 # Check whether --enable-scrollbar or --disable-scrollbar was given. if test "${enable_scrollbar+set}" = set; then @@ -6724,7 +6727,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-slider""... $ac_c" 1>&6 -echo "configure:6728: checking for --${enablestring:-enable}-slider" >&5 +echo "configure:6731: checking for --${enablestring:-enable}-slider" >&5 no_cache=0 # Check whether --enable-slider or --disable-slider was given. if test "${enable_slider+set}" = set; then @@ -6764,7 +6767,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-spinbtn""... $ac_c" 1>&6 -echo "configure:6768: checking for --${enablestring:-enable}-spinbtn" >&5 +echo "configure:6771: checking for --${enablestring:-enable}-spinbtn" >&5 no_cache=0 # Check whether --enable-spinbtn or --disable-spinbtn was given. if test "${enable_spinbtn+set}" = set; then @@ -6804,7 +6807,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-spinctrl""... $ac_c" 1>&6 -echo "configure:6808: checking for --${enablestring:-enable}-spinctrl" >&5 +echo "configure:6811: checking for --${enablestring:-enable}-spinctrl" >&5 no_cache=0 # Check whether --enable-spinctrl or --disable-spinctrl was given. if test "${enable_spinctrl+set}" = set; then @@ -6844,7 +6847,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-splitter""... $ac_c" 1>&6 -echo "configure:6848: checking for --${enablestring:-enable}-splitter" >&5 +echo "configure:6851: checking for --${enablestring:-enable}-splitter" >&5 no_cache=0 # Check whether --enable-splitter or --disable-splitter was given. if test "${enable_splitter+set}" = set; then @@ -6884,7 +6887,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-statbmp""... $ac_c" 1>&6 -echo "configure:6888: checking for --${enablestring:-enable}-statbmp" >&5 +echo "configure:6891: checking for --${enablestring:-enable}-statbmp" >&5 no_cache=0 # Check whether --enable-statbmp or --disable-statbmp was given. if test "${enable_statbmp+set}" = set; then @@ -6924,7 +6927,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-statbox""... $ac_c" 1>&6 -echo "configure:6928: checking for --${enablestring:-enable}-statbox" >&5 +echo "configure:6931: checking for --${enablestring:-enable}-statbox" >&5 no_cache=0 # Check whether --enable-statbox or --disable-statbox was given. if test "${enable_statbox+set}" = set; then @@ -6964,7 +6967,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-statline""... $ac_c" 1>&6 -echo "configure:6968: checking for --${enablestring:-enable}-statline" >&5 +echo "configure:6971: checking for --${enablestring:-enable}-statline" >&5 no_cache=0 # Check whether --enable-statline or --disable-statline was given. if test "${enable_statline+set}" = set; then @@ -7004,7 +7007,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-stattext""... $ac_c" 1>&6 -echo "configure:7008: checking for --${enablestring:-enable}-stattext" >&5 +echo "configure:7011: checking for --${enablestring:-enable}-stattext" >&5 no_cache=0 # Check whether --enable-stattext or --disable-stattext was given. if test "${enable_stattext+set}" = set; then @@ -7044,7 +7047,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-statusbar""... $ac_c" 1>&6 -echo "configure:7048: checking for --${enablestring:-enable}-statusbar" >&5 +echo "configure:7051: checking for --${enablestring:-enable}-statusbar" >&5 no_cache=0 # Check whether --enable-statusbar or --disable-statusbar was given. if test "${enable_statusbar+set}" = set; then @@ -7084,7 +7087,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-tabdialog""... $ac_c" 1>&6 -echo "configure:7088: checking for --${enablestring:-enable}-tabdialog" >&5 +echo "configure:7091: checking for --${enablestring:-enable}-tabdialog" >&5 no_cache=0 # Check whether --enable-tabdialog or --disable-tabdialog was given. if test "${enable_tabdialog+set}" = set; then @@ -7124,7 +7127,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-textctrl""... $ac_c" 1>&6 -echo "configure:7128: checking for --${enablestring:-enable}-textctrl" >&5 +echo "configure:7131: checking for --${enablestring:-enable}-textctrl" >&5 no_cache=0 # Check whether --enable-textctrl or --disable-textctrl was given. if test "${enable_textctrl+set}" = set; then @@ -7164,7 +7167,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-togglebtn""... $ac_c" 1>&6 -echo "configure:7168: checking for --${enablestring:-enable}-togglebtn" >&5 +echo "configure:7171: checking for --${enablestring:-enable}-togglebtn" >&5 no_cache=0 # Check whether --enable-togglebtn or --disable-togglebtn was given. if test "${enable_togglebtn+set}" = set; then @@ -7204,7 +7207,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-toolbar""... $ac_c" 1>&6 -echo "configure:7208: checking for --${enablestring:-enable}-toolbar" >&5 +echo "configure:7211: checking for --${enablestring:-enable}-toolbar" >&5 no_cache=0 # Check whether --enable-toolbar or --disable-toolbar was given. if test "${enable_toolbar+set}" = set; then @@ -7244,7 +7247,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-tbarnative""... $ac_c" 1>&6 -echo "configure:7248: checking for --${enablestring:-enable}-tbarnative" >&5 +echo "configure:7251: checking for --${enablestring:-enable}-tbarnative" >&5 no_cache=0 # Check whether --enable-tbarnative or --disable-tbarnative was given. if test "${enable_tbarnative+set}" = set; then @@ -7284,7 +7287,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-tbarsmpl""... $ac_c" 1>&6 -echo "configure:7288: checking for --${enablestring:-enable}-tbarsmpl" >&5 +echo "configure:7291: checking for --${enablestring:-enable}-tbarsmpl" >&5 no_cache=0 # Check whether --enable-tbarsmpl or --disable-tbarsmpl was given. if test "${enable_tbarsmpl+set}" = set; then @@ -7324,7 +7327,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-treectrl""... $ac_c" 1>&6 -echo "configure:7328: checking for --${enablestring:-enable}-treectrl" >&5 +echo "configure:7331: checking for --${enablestring:-enable}-treectrl" >&5 no_cache=0 # Check whether --enable-treectrl or --disable-treectrl was given. if test "${enable_treectrl+set}" = set; then @@ -7364,7 +7367,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-tipwindow""... $ac_c" 1>&6 -echo "configure:7368: checking for --${enablestring:-enable}-tipwindow" >&5 +echo "configure:7371: checking for --${enablestring:-enable}-tipwindow" >&5 no_cache=0 # Check whether --enable-tipwindow or --disable-tipwindow was given. if test "${enable_tipwindow+set}" = set; then @@ -7404,7 +7407,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-popupwin""... $ac_c" 1>&6 -echo "configure:7408: checking for --${enablestring:-enable}-popupwin" >&5 +echo "configure:7411: checking for --${enablestring:-enable}-popupwin" >&5 no_cache=0 # Check whether --enable-popupwin or --disable-popupwin was given. if test "${enable_popupwin+set}" = set; then @@ -7446,7 +7449,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-commondlg""... $ac_c" 1>&6 -echo "configure:7450: checking for --${enablestring:-enable}-commondlg" >&5 +echo "configure:7453: checking for --${enablestring:-enable}-commondlg" >&5 no_cache=0 # Check whether --enable-commondlg or --disable-commondlg was given. if test "${enable_commondlg+set}" = set; then @@ -7486,7 +7489,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-choicedlg""... $ac_c" 1>&6 -echo "configure:7490: checking for --${enablestring:-enable}-choicedlg" >&5 +echo "configure:7493: checking for --${enablestring:-enable}-choicedlg" >&5 no_cache=0 # Check whether --enable-choicedlg or --disable-choicedlg was given. if test "${enable_choicedlg+set}" = set; then @@ -7526,7 +7529,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-coldlg""... $ac_c" 1>&6 -echo "configure:7530: checking for --${enablestring:-enable}-coldlg" >&5 +echo "configure:7533: checking for --${enablestring:-enable}-coldlg" >&5 no_cache=0 # Check whether --enable-coldlg or --disable-coldlg was given. if test "${enable_coldlg+set}" = set; then @@ -7566,7 +7569,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-filedlg""... $ac_c" 1>&6 -echo "configure:7570: checking for --${enablestring:-enable}-filedlg" >&5 +echo "configure:7573: checking for --${enablestring:-enable}-filedlg" >&5 no_cache=0 # Check whether --enable-filedlg or --disable-filedlg was given. if test "${enable_filedlg+set}" = set; then @@ -7606,7 +7609,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-finddlg""... $ac_c" 1>&6 -echo "configure:7610: checking for --${enablestring:-enable}-finddlg" >&5 +echo "configure:7613: checking for --${enablestring:-enable}-finddlg" >&5 no_cache=0 # Check whether --enable-finddlg or --disable-finddlg was given. if test "${enable_finddlg+set}" = set; then @@ -7646,7 +7649,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-fontdlg""... $ac_c" 1>&6 -echo "configure:7650: checking for --${enablestring:-enable}-fontdlg" >&5 +echo "configure:7653: checking for --${enablestring:-enable}-fontdlg" >&5 no_cache=0 # Check whether --enable-fontdlg or --disable-fontdlg was given. if test "${enable_fontdlg+set}" = set; then @@ -7686,7 +7689,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-dirdlg""... $ac_c" 1>&6 -echo "configure:7690: checking for --${enablestring:-enable}-dirdlg" >&5 +echo "configure:7693: checking for --${enablestring:-enable}-dirdlg" >&5 no_cache=0 # Check whether --enable-dirdlg or --disable-dirdlg was given. if test "${enable_dirdlg+set}" = set; then @@ -7726,7 +7729,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-msgdlg""... $ac_c" 1>&6 -echo "configure:7730: checking for --${enablestring:-enable}-msgdlg" >&5 +echo "configure:7733: checking for --${enablestring:-enable}-msgdlg" >&5 no_cache=0 # Check whether --enable-msgdlg or --disable-msgdlg was given. if test "${enable_msgdlg+set}" = set; then @@ -7766,7 +7769,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-numberdlg""... $ac_c" 1>&6 -echo "configure:7770: checking for --${enablestring:-enable}-numberdlg" >&5 +echo "configure:7773: checking for --${enablestring:-enable}-numberdlg" >&5 no_cache=0 # Check whether --enable-numberdlg or --disable-numberdlg was given. if test "${enable_numberdlg+set}" = set; then @@ -7806,7 +7809,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-splash""... $ac_c" 1>&6 -echo "configure:7810: checking for --${enablestring:-enable}-splash" >&5 +echo "configure:7813: checking for --${enablestring:-enable}-splash" >&5 no_cache=0 # Check whether --enable-splash or --disable-splash was given. if test "${enable_splash+set}" = set; then @@ -7846,7 +7849,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-textdlg""... $ac_c" 1>&6 -echo "configure:7850: checking for --${enablestring:-enable}-textdlg" >&5 +echo "configure:7853: checking for --${enablestring:-enable}-textdlg" >&5 no_cache=0 # Check whether --enable-textdlg or --disable-textdlg was given. if test "${enable_textdlg+set}" = set; then @@ -7886,7 +7889,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-tipdlg""... $ac_c" 1>&6 -echo "configure:7890: checking for --${enablestring:-enable}-tipdlg" >&5 +echo "configure:7893: checking for --${enablestring:-enable}-tipdlg" >&5 no_cache=0 # Check whether --enable-tipdlg or --disable-tipdlg was given. if test "${enable_tipdlg+set}" = set; then @@ -7926,7 +7929,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-progressdlg""... $ac_c" 1>&6 -echo "configure:7930: checking for --${enablestring:-enable}-progressdlg" >&5 +echo "configure:7933: checking for --${enablestring:-enable}-progressdlg" >&5 no_cache=0 # Check whether --enable-progressdlg or --disable-progressdlg was given. if test "${enable_progressdlg+set}" = set; then @@ -7966,7 +7969,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-wizarddlg""... $ac_c" 1>&6 -echo "configure:7970: checking for --${enablestring:-enable}-wizarddlg" >&5 +echo "configure:7973: checking for --${enablestring:-enable}-wizarddlg" >&5 no_cache=0 # Check whether --enable-wizarddlg or --disable-wizarddlg was given. if test "${enable_wizarddlg+set}" = set; then @@ -8008,7 +8011,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-menus""... $ac_c" 1>&6 -echo "configure:8012: checking for --${enablestring:-enable}-menus" >&5 +echo "configure:8015: checking for --${enablestring:-enable}-menus" >&5 no_cache=0 # Check whether --enable-menus or --disable-menus was given. if test "${enable_menus+set}" = set; then @@ -8048,7 +8051,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-miniframe""... $ac_c" 1>&6 -echo "configure:8052: checking for --${enablestring:-enable}-miniframe" >&5 +echo "configure:8055: checking for --${enablestring:-enable}-miniframe" >&5 no_cache=0 # Check whether --enable-miniframe or --disable-miniframe was given. if test "${enable_miniframe+set}" = set; then @@ -8088,7 +8091,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-tooltips""... $ac_c" 1>&6 -echo "configure:8092: checking for --${enablestring:-enable}-tooltips" >&5 +echo "configure:8095: checking for --${enablestring:-enable}-tooltips" >&5 no_cache=0 # Check whether --enable-tooltips or --disable-tooltips was given. if test "${enable_tooltips+set}" = set; then @@ -8128,7 +8131,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-splines""... $ac_c" 1>&6 -echo "configure:8132: checking for --${enablestring:-enable}-splines" >&5 +echo "configure:8135: checking for --${enablestring:-enable}-splines" >&5 no_cache=0 # Check whether --enable-splines or --disable-splines was given. if test "${enable_splines+set}" = set; then @@ -8168,7 +8171,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-validators""... $ac_c" 1>&6 -echo "configure:8172: checking for --${enablestring:-enable}-validators" >&5 +echo "configure:8175: checking for --${enablestring:-enable}-validators" >&5 no_cache=0 # Check whether --enable-validators or --disable-validators was given. if test "${enable_validators+set}" = set; then @@ -8208,7 +8211,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-busyinfo""... $ac_c" 1>&6 -echo "configure:8212: checking for --${enablestring:-enable}-busyinfo" >&5 +echo "configure:8215: checking for --${enablestring:-enable}-busyinfo" >&5 no_cache=0 # Check whether --enable-busyinfo or --disable-busyinfo was given. if test "${enable_busyinfo+set}" = set; then @@ -8248,7 +8251,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-joystick""... $ac_c" 1>&6 -echo "configure:8252: checking for --${enablestring:-enable}-joystick" >&5 +echo "configure:8255: checking for --${enablestring:-enable}-joystick" >&5 no_cache=0 # Check whether --enable-joystick or --disable-joystick was given. if test "${enable_joystick+set}" = set; then @@ -8288,7 +8291,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-metafile""... $ac_c" 1>&6 -echo "configure:8292: checking for --${enablestring:-enable}-metafile" >&5 +echo "configure:8295: checking for --${enablestring:-enable}-metafile" >&5 no_cache=0 # Check whether --enable-metafile or --disable-metafile was given. if test "${enable_metafile+set}" = set; then @@ -8328,7 +8331,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-dragimage""... $ac_c" 1>&6 -echo "configure:8332: checking for --${enablestring:-enable}-dragimage" >&5 +echo "configure:8335: checking for --${enablestring:-enable}-dragimage" >&5 no_cache=0 # Check whether --enable-dragimage or --disable-dragimage was given. if test "${enable_dragimage+set}" = set; then @@ -8370,7 +8373,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-palette""... $ac_c" 1>&6 -echo "configure:8374: checking for --${enablestring:-enable}-palette" >&5 +echo "configure:8377: checking for --${enablestring:-enable}-palette" >&5 no_cache=0 # Check whether --enable-palette or --disable-palette was given. if test "${enable_palette+set}" = set; then @@ -8410,7 +8413,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-image""... $ac_c" 1>&6 -echo "configure:8414: checking for --${enablestring:-enable}-image" >&5 +echo "configure:8417: checking for --${enablestring:-enable}-image" >&5 no_cache=0 # Check whether --enable-image or --disable-image was given. if test "${enable_image+set}" = set; then @@ -8450,7 +8453,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-gif""... $ac_c" 1>&6 -echo "configure:8454: checking for --${enablestring:-enable}-gif" >&5 +echo "configure:8457: checking for --${enablestring:-enable}-gif" >&5 no_cache=0 # Check whether --enable-gif or --disable-gif was given. if test "${enable_gif+set}" = set; then @@ -8490,7 +8493,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-pcx""... $ac_c" 1>&6 -echo "configure:8494: checking for --${enablestring:-enable}-pcx" >&5 +echo "configure:8497: checking for --${enablestring:-enable}-pcx" >&5 no_cache=0 # Check whether --enable-pcx or --disable-pcx was given. if test "${enable_pcx+set}" = set; then @@ -8530,7 +8533,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-iff""... $ac_c" 1>&6 -echo "configure:8534: checking for --${enablestring:-enable}-iff" >&5 +echo "configure:8537: checking for --${enablestring:-enable}-iff" >&5 no_cache=0 # Check whether --enable-iff or --disable-iff was given. if test "${enable_iff+set}" = set; then @@ -8570,7 +8573,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-pnm""... $ac_c" 1>&6 -echo "configure:8574: checking for --${enablestring:-enable}-pnm" >&5 +echo "configure:8577: checking for --${enablestring:-enable}-pnm" >&5 no_cache=0 # Check whether --enable-pnm or --disable-pnm was given. if test "${enable_pnm+set}" = set; then @@ -8610,7 +8613,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-xpm""... $ac_c" 1>&6 -echo "configure:8614: checking for --${enablestring:-enable}-xpm" >&5 +echo "configure:8617: checking for --${enablestring:-enable}-xpm" >&5 no_cache=0 # Check whether --enable-xpm or --disable-xpm was given. if test "${enable_xpm+set}" = set; then @@ -8650,7 +8653,7 @@ fi enablestring= echo $ac_n "checking for --${enablestring:-enable}-ico_cur""... $ac_c" 1>&6 -echo "configure:8654: checking for --${enablestring:-enable}-ico_cur" >&5 +echo "configure:8657: checking for --${enablestring:-enable}-ico_cur" >&5 no_cache=0 # Check whether --enable-ico_cur or --disable-ico_cur was given. if test "${enable_ico_cur+set}" = set; then @@ -8709,7 +8712,7 @@ esac echo $ac_n "checking for toolkit""... $ac_c" 1>&6 -echo "configure:8713: checking for toolkit" >&5 +echo "configure:8716: checking for toolkit" >&5 if test "$wxUSE_GUI" = "yes"; then @@ -8771,56 +8774,6 @@ else echo "$ac_t""base ($host_alias hosted) only" 1>&6 fi -case "${host}" in - *-pc-os2_emx | *-pc-os2-emx ) - LIBS="$LIBS -lstdcpp" - if test "$wxUSE_MOTIF" = 1 -o "$wxUSE_GTK" = 1 -o "$wxUSE_X11" = 1; then - echo $ac_n "checking for drand48 in -lcExt""... $ac_c" 1>&6 -echo "configure:8780: checking for drand48 in -lcExt" >&5 -ac_lib_var=`echo cExt'_'drand48 | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lcExt $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - LIBS="$LIBS -lcExt" -else - echo "$ac_t""no" 1>&6 -fi - - else - RESPROGRAMOBJ="\${top_srcdir}/include/wx/os2/wx.res" - fi - ;; -esac - wants_win32=0 doesnt_want_win32=0 case "${host}" in @@ -8946,7 +8899,7 @@ CFLAGS=${CFLAGS:=} # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:8950: checking for $ac_word" >&5 +echo "configure:8903: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8976,7 +8929,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:8980: checking for $ac_word" >&5 +echo "configure:8933: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9027,7 +8980,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:9031: checking for $ac_word" >&5 +echo "configure:8984: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9059,7 +9012,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:9063: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:9016: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -9070,12 +9023,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 9074 "configure" +#line 9027 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:9079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -9101,12 +9054,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:9105: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:9058: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:9110: checking whether we are using GNU C" >&5 +echo "configure:9063: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9115,7 +9068,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:9119: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:9072: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -9134,7 +9087,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:9138: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:9091: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9167,7 +9120,7 @@ fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:9171: checking how to run the C preprocessor" >&5 +echo "configure:9124: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -9182,13 +9135,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9192: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9145: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -9199,13 +9152,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9209: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9162: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -9216,13 +9169,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9226: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9179: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -9248,13 +9201,13 @@ echo "$ac_t""$CPP" 1>&6 if test $ac_cv_prog_gcc = yes; then echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 -echo "configure:9252: checking whether ${CC-cc} needs -traditional" >&5 +echo "configure:9205: checking whether ${CC-cc} needs -traditional" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_pattern="Autoconf.*'x'" cat > conftest.$ac_ext < Autoconf TIOCGETP @@ -9272,7 +9225,7 @@ rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext < Autoconf TCGETA @@ -9309,7 +9262,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:9313: checking for $ac_word" >&5 +echo "configure:9266: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9341,7 +9294,7 @@ test -n "$CXX" || CXX="gcc" echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:9345: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 +echo "configure:9298: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -9352,12 +9305,12 @@ cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext << EOF -#line 9356 "configure" +#line 9309 "configure" #include "confdefs.h" int main(){return(0);} EOF -if { (eval echo configure:9361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cxx_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -9383,12 +9336,12 @@ if test $ac_cv_prog_cxx_works = no; then { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:9387: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:9340: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 -echo "configure:9392: checking whether we are using GNU C++" >&5 +echo "configure:9345: checking whether we are using GNU C++" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9397,7 +9350,7 @@ else yes; #endif EOF -if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:9401: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:9354: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gxx=yes else ac_cv_prog_gxx=no @@ -9416,7 +9369,7 @@ ac_test_CXXFLAGS="${CXXFLAGS+set}" ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS= echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 -echo "configure:9420: checking whether ${CXX-g++} accepts -g" >&5 +echo "configure:9373: checking whether ${CXX-g++} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9459,7 +9412,7 @@ cross_compiling=$ac_cv_prog_cc_cross # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:9463: checking for $ac_word" >&5 +echo "configure:9416: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9490,7 +9443,7 @@ fi # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:9494: checking for $ac_word" >&5 +echo "configure:9447: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9530,7 +9483,7 @@ fi # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:9534: checking for a BSD compatible install" >&5 +echo "configure:9487: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -9586,6 +9539,8 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' case ${INSTALL} in /* ) # Absolute ;; + ?:* ) # Drive letter, considered as absolute. + ;; *) INSTALL=`pwd`/${INSTALL} ;; esac @@ -9604,7 +9559,7 @@ esac # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:9608: checking for $ac_word" >&5 +echo "configure:9563: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9633,7 +9588,7 @@ fi echo $ac_n "checking if make is GNU make""... $ac_c" 1>&6 -echo "configure:9637: checking if make is GNU make" >&5 +echo "configure:9592: checking if make is GNU make" >&5 if eval "test \"`echo '$''{'wx_cv_prog_makeisgnu'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9659,7 +9614,7 @@ fi if test "x$wx_cv_prog_makeisgnu" != "xyes"; then echo $ac_n "checking if make supports VPATH""... $ac_c" 1>&6 -echo "configure:9663: checking if make supports VPATH" >&5 +echo "configure:9618: checking if make supports VPATH" >&5 if eval "test \"`echo '$''{'wx_cv_prog_makevpath'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9706,7 +9661,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:9710: checking for $ac_word" >&5 +echo "configure:9665: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9740,7 +9695,7 @@ test -n "$YACC" || YACC="yacc" # Extract the first word of "flex", so it can be a program name with args. set dummy flex; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:9744: checking for $ac_word" >&5 +echo "configure:9699: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9774,7 +9729,7 @@ then *) ac_lib=l ;; esac echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6 -echo "configure:9778: checking for yywrap in -l$ac_lib" >&5 +echo "configure:9733: checking for yywrap in -l$ac_lib" >&5 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -9782,7 +9737,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l$ac_lib $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9817,7 +9772,7 @@ fi echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:9821: checking whether ln -s works" >&5 +echo "configure:9776: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9838,23 +9793,73 @@ else fi +case "${host}" in + *-pc-os2_emx | *-pc-os2-emx ) + LIBS="$LIBS -lstdcpp" + if test "$wxUSE_MOTIF" = 1 -o "$wxUSE_GTK" = 1 -o "$wxUSE_X11" = 1; then + echo $ac_n "checking for drand48 in -lcExt""... $ac_c" 1>&6 +echo "configure:9802: checking for drand48 in -lcExt" >&5 +ac_lib_var=`echo cExt'_'drand48 | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lcExt $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + LIBS="$LIBS -lcExt" +else + echo "$ac_t""no" 1>&6 +fi + + else + RESPROGRAMOBJ="\${top_srcdir}/include/wx/os2/wx.res" + fi + ;; +esac + if test "$wxUSE_MAC" != 1; then for ac_hdr in strings.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:9848: checking for $ac_hdr" >&5 +echo "configure:9853: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9858: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9863: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -9886,17 +9891,17 @@ for ac_hdr in stdlib.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:9890: checking for $ac_hdr" >&5 +echo "configure:9895: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9900: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9905: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -9926,17 +9931,17 @@ for ac_hdr in malloc.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:9930: checking for $ac_hdr" >&5 +echo "configure:9935: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9940: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9945: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -9966,17 +9971,17 @@ for ac_hdr in unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:9970: checking for $ac_hdr" >&5 +echo "configure:9975: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9980: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9985: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -10006,17 +10011,17 @@ for ac_hdr in wchar.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:10010: checking for $ac_hdr" >&5 +echo "configure:10015: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10020: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10025: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -10048,17 +10053,17 @@ if test "$ac_cv_header_wchar_h" != "yes"; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:10052: checking for $ac_hdr" >&5 +echo "configure:10057: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10062: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10067: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -10090,17 +10095,17 @@ for ac_hdr in fnmatch.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:10094: checking for $ac_hdr" >&5 +echo "configure:10099: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10104: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10109: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -10131,12 +10136,12 @@ if test "x$ac_cv_header_fnmatch_h" = "xyes"; then for ac_func in fnmatch do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10135: checking for $ac_func" >&5 +echo "configure:10140: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -10189,17 +10194,17 @@ for ac_hdr in langinfo.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:10193: checking for $ac_hdr" >&5 +echo "configure:10198: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10203: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10208: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -10226,23 +10231,31 @@ fi done +case "${host}" in + *-pc-os2_emx | *-pc-os2-emx ) + if test $ac_cv_header_langinfo_h = "yes"; then + LIBS="$LIBS -lintl" + fi + ;; +esac + if test "$wxUSE_GUI" = "yes"; then if test "$wxUSE_UNIX" = "yes"; then for ac_hdr in X11/XKBlib.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:10236: checking for $ac_hdr" >&5 +echo "configure:10249: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10246: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10259: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -10273,12 +10286,12 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:10277: checking for working const" >&5 +echo "configure:10290: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10344: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -10348,21 +10361,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:10352: checking for inline" >&5 +echo "configure:10365: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10379: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -10389,7 +10402,7 @@ esac echo $ac_n "checking size of char""... $ac_c" 1>&6 -echo "configure:10393: checking size of char" >&5 +echo "configure:10406: checking size of char" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10397,9 +10410,10 @@ else ac_cv_sizeof_char=1 else cat > conftest.$ac_ext < +#include main() { FILE *f=fopen("conftestval", "w"); @@ -10408,7 +10422,7 @@ main() exit(0); } EOF -if { (eval echo configure:10412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_char=`cat conftestval` else @@ -10428,7 +10442,7 @@ EOF echo $ac_n "checking size of short""... $ac_c" 1>&6 -echo "configure:10432: checking size of short" >&5 +echo "configure:10446: checking size of short" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10436,9 +10450,10 @@ else ac_cv_sizeof_short=2 else cat > conftest.$ac_ext < +#include main() { FILE *f=fopen("conftestval", "w"); @@ -10447,7 +10462,7 @@ main() exit(0); } EOF -if { (eval echo configure:10451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_short=`cat conftestval` else @@ -10467,7 +10482,7 @@ EOF echo $ac_n "checking size of void *""... $ac_c" 1>&6 -echo "configure:10471: checking size of void *" >&5 +echo "configure:10486: checking size of void *" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10475,9 +10490,10 @@ else ac_cv_sizeof_void_p=4 else cat > conftest.$ac_ext < +#include main() { FILE *f=fopen("conftestval", "w"); @@ -10486,7 +10502,7 @@ main() exit(0); } EOF -if { (eval echo configure:10490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_void_p=`cat conftestval` else @@ -10506,7 +10522,7 @@ EOF echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:10510: checking size of int" >&5 +echo "configure:10526: checking size of int" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10514,9 +10530,10 @@ else ac_cv_sizeof_int=4 else cat > conftest.$ac_ext < +#include main() { FILE *f=fopen("conftestval", "w"); @@ -10525,7 +10542,7 @@ main() exit(0); } EOF -if { (eval echo configure:10529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_int=`cat conftestval` else @@ -10545,7 +10562,7 @@ EOF echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:10549: checking size of long" >&5 +echo "configure:10566: checking size of long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10553,9 +10570,10 @@ else ac_cv_sizeof_long=4 else cat > conftest.$ac_ext < +#include main() { FILE *f=fopen("conftestval", "w"); @@ -10564,7 +10582,7 @@ main() exit(0); } EOF -if { (eval echo configure:10568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long=`cat conftestval` else @@ -10587,7 +10605,7 @@ EOF case "${host}" in arm-*-linux* ) echo $ac_n "checking size of long long""... $ac_c" 1>&6 -echo "configure:10591: checking size of long long" >&5 +echo "configure:10609: checking size of long long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10595,9 +10613,10 @@ else ac_cv_sizeof_long_long=8 else cat > conftest.$ac_ext < +#include main() { FILE *f=fopen("conftestval", "w"); @@ -10606,7 +10625,7 @@ main() exit(0); } EOF -if { (eval echo configure:10610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long_long=`cat conftestval` else @@ -10628,7 +10647,7 @@ EOF ;; *-hp-hpux* ) echo $ac_n "checking size of long long""... $ac_c" 1>&6 -echo "configure:10632: checking size of long long" >&5 +echo "configure:10651: checking size of long long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10636,9 +10655,10 @@ else ac_cv_sizeof_long_long=0 else cat > conftest.$ac_ext < +#include main() { FILE *f=fopen("conftestval", "w"); @@ -10647,7 +10667,7 @@ main() exit(0); } EOF -if { (eval echo configure:10651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long_long=`cat conftestval` else @@ -10672,7 +10692,7 @@ EOF ;; * ) echo $ac_n "checking size of long long""... $ac_c" 1>&6 -echo "configure:10676: checking size of long long" >&5 +echo "configure:10696: checking size of long long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10680,9 +10700,10 @@ else ac_cv_sizeof_long_long=0 else cat > conftest.$ac_ext < +#include main() { FILE *f=fopen("conftestval", "w"); @@ -10691,7 +10712,7 @@ main() exit(0); } EOF -if { (eval echo configure:10695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long_long=`cat conftestval` else @@ -10713,19 +10734,32 @@ EOF esac echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6 -echo "configure:10717: checking size of wchar_t" >&5 +echo "configure:10738: checking size of wchar_t" >&5 if eval "test \"`echo '$''{'wx_cv_sizeof_wchar_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then - wx_cv_sizeof_wchar_t=4 + + case "${host}" in + *-pc-msdosdjgpp ) + wx_cv_sizeof_wchar_t=0 + ;; + * ) + wx_cv_sizeof_wchar_t=4 + ;; + esac + else cat > conftest.$ac_ext < @@ -10745,7 +10779,7 @@ else } EOF -if { (eval echo configure:10749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then wx_cv_sizeof_wchar_t=`cat conftestval` else @@ -10777,13 +10811,13 @@ if test "$enable_largefile" != no; then wx_largefile=no echo $ac_n "checking for _FILE_OFFSET_BITS value needed for large files""... $ac_c" 1>&6 -echo "configure:10781: checking for _FILE_OFFSET_BITS value needed for large files" >&5 +echo "configure:10815: checking for _FILE_OFFSET_BITS value needed for large files" >&5 if eval "test \"`echo '$''{'ac_cv_sys_file_offset_bits'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -10794,7 +10828,7 @@ typedef struct { ; return 0; } EOF -if { (eval echo configure:10798: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_sys_file_offset_bits=64 else @@ -10821,13 +10855,13 @@ EOF if test "x$wx_largefile" != "xyes"; then echo $ac_n "checking for _LARGE_FILES value needed for large files""... $ac_c" 1>&6 -echo "configure:10825: checking for _LARGE_FILES value needed for large files" >&5 +echo "configure:10859: checking for _LARGE_FILES value needed for large files" >&5 if eval "test \"`echo '$''{'ac_cv_sys_large_files'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -10838,7 +10872,7 @@ typedef struct { ; return 0; } EOF -if { (eval echo configure:10842: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10876: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_sys_large_files=1 else @@ -10865,7 +10899,7 @@ EOF fi echo $ac_n "checking if large file support is available""... $ac_c" 1>&6 -echo "configure:10869: checking if large file support is available" >&5 +echo "configure:10903: checking if large file support is available" >&5 if test "x$wx_largefile" = "xyes"; then cat >> confdefs.h <<\EOF #define HAVE_LARGEFILE_SUPPORT 1 @@ -10886,14 +10920,14 @@ if test "x$wx_largefile" = "xyes"; then fi echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:10890: checking whether byte ordering is bigendian" >&5 +echo "configure:10924: checking whether byte ordering is bigendian" >&5 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_bigendian=unknown # See if sys/param.h defines the BYTE_ORDER macro. cat > conftest.$ac_ext < #include @@ -10904,11 +10938,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:10908: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10942: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # It does; now see whether it defined to BIG_ENDIAN or not. cat > conftest.$ac_ext < #include @@ -10919,7 +10953,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:10923: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10957: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -10939,7 +10973,7 @@ if test "$cross_compiling" = yes; then ac_cv_c_bigendian=unknown else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_bigendian=no else @@ -10980,7 +11014,7 @@ fi echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6 -echo "configure:10984: checking how to run the C++ preprocessor" >&5 +echo "configure:11018: checking how to run the C++ preprocessor" >&5 if test -z "$CXXCPP"; then if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -10993,12 +11027,12 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross CXXCPP="${CXX-g++} -E" cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11002: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11036: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -11042,17 +11076,17 @@ cross_compiling=$ac_cv_prog_cxx_cross do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:11046: checking for $ac_hdr" >&5 +echo "configure:11080: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11056: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11090: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -11100,7 +11134,7 @@ cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking if C++ compiler supports bool""... $ac_c" 1>&6 -echo "configure:11104: checking if C++ compiler supports bool" >&5 +echo "configure:11138: checking if C++ compiler supports bool" >&5 if eval "test \"`echo '$''{'wx_cv_cpp_bool'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11115,7 +11149,7 @@ cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11165: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_cpp_bool=yes @@ -11165,7 +11199,7 @@ EOF echo $ac_n "checking if C++ compiler supports the explicit keyword""... $ac_c" 1>&6 -echo "configure:11169: checking if C++ compiler supports the explicit keyword" >&5 +echo "configure:11203: checking if C++ compiler supports the explicit keyword" >&5 if eval "test \"`echo '$''{'wx_cv_explicit'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11180,7 +11214,7 @@ cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11229: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11246: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_explicit=no else @@ -11313,8 +11347,7 @@ SEARCH_INCLUDE="\ /usr/local/x11r5/include \ /usr/lpp/Xamples/include \ \ - /usr/openwin/share/include \ - /usr/include" + /usr/openwin/share/include" SEARCH_LIB="`echo "$SEARCH_INCLUDE" | sed s/include/lib/g` " @@ -11369,13 +11402,13 @@ rm -f confcache if test "$USE_LINUX" = 1; then echo $ac_n "checking for glibc 2.1 or later""... $ac_c" 1>&6 -echo "configure:11373: checking for glibc 2.1 or later" >&5 +echo "configure:11406: checking for glibc 2.1 or later" >&5 if eval "test \"`echo '$''{'wx_cv_lib_glibc21'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -11386,7 +11419,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:11390: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11423: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_lib_glibc21=yes @@ -11434,17 +11467,17 @@ EOF if test "$wxUSE_REGEX" = "sys" -o "$wxUSE_REGEX" = "yes" ; then ac_safe=`echo "regex.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for regex.h""... $ac_c" 1>&6 -echo "configure:11438: checking for regex.h" >&5 +echo "configure:11471: checking for regex.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11448: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11481: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -11463,12 +11496,12 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then for ac_func in regcomp do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11467: checking for $ac_func" >&5 +echo "configure:11500: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -11547,19 +11580,28 @@ EOF if test "$wxUSE_ZLIB" = "sys" -o "$wxUSE_ZLIB" = "yes" ; then - ac_safe=`echo "zlib.h" | sed 'y%./+-%__p_%'` + if test "$USE_DARWIN" = 1; then + system_zlib_h_ok="yes" + else + echo $ac_n "checking for zlib.h >= 1.1.4""... $ac_c" 1>&6 +echo "configure:11588: checking for zlib.h >= 1.1.4" >&5 +if eval "test \"`echo '$''{'ac_cv_header_zlib_h'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + ac_safe=`echo "zlib.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for zlib.h""... $ac_c" 1>&6 -echo "configure:11553: checking for zlib.h" >&5 +echo "configure:11595: checking for zlib.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11563: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11605: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -11575,8 +11617,56 @@ rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 - echo $ac_n "checking for deflate in -lz""... $ac_c" 1>&6 -echo "configure:11580: checking for deflate in -lz" >&5 + : +else + echo "$ac_t""no" 1>&6 +fi + + +else + cat > conftest.$ac_ext < + #include + + int main() + { + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); + fprintf(f, "%s", + ZLIB_VERSION[0] == '1' && + (ZLIB_VERSION[2] > '1' || + (ZLIB_VERSION[2] == '1' && + ZLIB_VERSION[4] >= '4')) ? "yes" : "no"); + exit(0); + } + +EOF +if { (eval echo configure:11648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ac_cv_header_zlib_h=`cat conftestval` +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_header_zlib_h=no +fi +rm -fr conftest* +fi + + +fi + +echo "$ac_t""$ac_cv_header_zlib_h" 1>&6 + + system_zlib_h_ok=$ac_cv_header_zlib_h + fi + + if test "$system_zlib_h_ok" = "yes"; then + echo $ac_n "checking for deflate in -lz""... $ac_c" 1>&6 +echo "configure:11670: checking for deflate in -lz" >&5 ac_lib_var=`echo z'_'deflate | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -11584,7 +11674,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lz $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11615,16 +11705,13 @@ else echo "$ac_t""no" 1>&6 fi -else - echo "$ac_t""no" 1>&6 -fi - + fi if test "x$ZLIB_LINK" = "x" ; then if test "$wxUSE_ZLIB" = "sys" ; then - { echo "configure: error: system zlib compression library not found! Use --with-zlib=builtin to use built-in version" 1>&2; exit 1; } + { echo "configure: error: zlib library not found or too old! Use --with-zlib=builtin to use built-in version" 1>&2; exit 1; } else - echo "configure: warning: system zlib compression library not found, will use built-in instead" 1>&2 + echo "configure: warning: zlib library not found or too old, will use built-in instead" 1>&2 wxUSE_ZLIB=builtin fi else @@ -11658,19 +11745,25 @@ EOF if test "$wxUSE_MGL" != 1 ; then if test "$wxUSE_LIBPNG" = "sys" -o "$wxUSE_LIBPNG" = "yes" ; then - ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for png.h > 0.90""... $ac_c" 1>&6 +echo "configure:11750: checking for png.h > 0.90" >&5 +if eval "test \"`echo '$''{'ac_cv_header_png_h'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for png.h""... $ac_c" 1>&6 -echo "configure:11664: checking for png.h" >&5 +echo "configure:11757: checking for png.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11674: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11767: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -11686,8 +11779,50 @@ rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 - echo $ac_n "checking for png_check_sig in -lpng""... $ac_c" 1>&6 -echo "configure:11691: checking for png_check_sig in -lpng" >&5 + : +else + echo "$ac_t""no" 1>&6 +fi + + +else + cat > conftest.$ac_ext < + #include + + int main() + { + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); + fprintf(f, "%s", + PNG_LIBPNG_VER > 90 ? "yes" : "no"); + exit(0); + } + +EOF +if { (eval echo configure:11807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ac_cv_header_png_h=`cat conftestval` +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_header_png_h=no +fi +rm -fr conftest* +fi + + +fi + +echo "$ac_t""$ac_cv_header_png_h" 1>&6 + + if test "$ac_cv_header_png_h" = "yes"; then + echo $ac_n "checking for png_check_sig in -lpng""... $ac_c" 1>&6 +echo "configure:11826: checking for png_check_sig in -lpng" >&5 ac_lib_var=`echo png'_'png_check_sig | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -11695,7 +11830,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpng -lz -lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11726,21 +11861,17 @@ else echo "$ac_t""no" 1>&6 fi - -else - echo "$ac_t""no" 1>&6 -fi - + fi if test "x$PNG_LINK" = "x" ; then if test "$wxUSE_LIBPNG" = "sys" ; then - { echo "configure: error: system png library not found! Use --with-libpng=builtin to use built-in version" 1>&2; exit 1; } + { echo "configure: error: system png library not found or too old! Use --with-libpng=builtin to use built-in version" 1>&2; exit 1; } else - echo "configure: warning: system png library not found, will use built-in instead" 1>&2 + echo "configure: warning: system png library not found or too old, will use built-in instead" 1>&2 wxUSE_LIBPNG=builtin fi else - wxUSE_LIBPNG=yes + wxUSE_LIBPNG=sys fi fi fi @@ -11769,12 +11900,12 @@ EOF if test "$wxUSE_MGL" != 1 ; then if test "$wxUSE_LIBJPEG" = "sys" -o "$wxUSE_LIBJPEG" = "yes" ; then echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6 -echo "configure:11773: checking for jpeglib.h" >&5 +echo "configure:11904: checking for jpeglib.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_jpeglib_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11921: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_jpeglib_h=yes else @@ -11804,7 +11935,7 @@ fi if test "$ac_cv_header_jpeglib_h" = "yes"; then echo $ac_n "checking for jpeg_read_header in -ljpeg""... $ac_c" 1>&6 -echo "configure:11808: checking for jpeg_read_header in -ljpeg" >&5 +echo "configure:11939: checking for jpeg_read_header in -ljpeg" >&5 ac_lib_var=`echo jpeg'_'jpeg_read_header | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -11812,7 +11943,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ljpeg $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11866,6 +11997,7 @@ fi TIFF_INCLUDE= TIFF_LINK= +TIFF_PREREQ_LINKS=-lm if test "$wxUSE_LIBTIFF" != "no" ; then cat >> confdefs.h <<\EOF #define wxUSE_LIBTIFF 1 @@ -11873,19 +12005,25 @@ EOF if test "$wxUSE_LIBTIFF" = "sys" -o "$wxUSE_LIBTIFF" = "yes" ; then + if test "$wxUSE_LIBJPEG" = "sys"; then + TIFF_PREREQ_LINKS="$TIFF_PREREQ_LINKS $JPEG_LINK" + fi + if test "$wxUSE_ZLIB" = "sys"; then + TIFF_PREREQ_LINKS="$TIFF_PREREQ_LINKS $ZLIB_LINK" + fi ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6 -echo "configure:11879: checking for tiffio.h" >&5 +echo "configure:12017: checking for tiffio.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11889: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12027: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -11902,15 +12040,15 @@ fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for TIFFError in -ltiff""... $ac_c" 1>&6 -echo "configure:11906: checking for TIFFError in -ltiff" >&5 +echo "configure:12044: checking for TIFFError in -ltiff" >&5 ac_lib_var=`echo tiff'_'TIFFError | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-ltiff -lm $LIBS" +LIBS="-ltiff $TIFF_PREREQ_LINKS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11966,6 +12104,7 @@ fi AFMINSTALL= +WIN32INSTALL= TOOLKIT= TOOLKIT_INCLUDE= @@ -11976,17 +12115,17 @@ if test "$USE_WIN32" = 1 ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:11980: checking for $ac_hdr" >&5 +echo "configure:12119: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11990: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12129: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -12014,17 +12153,17 @@ done ac_safe=`echo "windows.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for windows.h""... $ac_c" 1>&6 -echo "configure:12018: checking for windows.h" >&5 +echo "configure:12157: checking for windows.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:12028: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12167: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -12050,13 +12189,13 @@ fi echo $ac_n "checking if w32api has good enough MSIE support""... $ac_c" 1>&6 -echo "configure:12054: checking if w32api has good enough MSIE support" >&5 +echo "configure:12193: checking if w32api has good enough MSIE support" >&5 if eval "test \"`echo '$''{'wx_cv_w32api_win32_ie'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -12072,7 +12211,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:12076: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12215: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_w32api_win32_ie=yes @@ -12108,6 +12247,8 @@ echo "$ac_t""$wx_cv_w32api_win32_ie" 1>&6 RESFLAGS="--include-dir \$(top_srcdir)/include --include-dir \$(top_srcdir)/\$(program_dir) --define __WIN32__ --define __WIN95__ --define __GNUWIN32__" RESPROGRAMOBJ="\$(PROGRAM)_resources.o" + + WIN32INSTALL=win32install fi if test "$USE_DARWIN" = 1; then @@ -12139,7 +12280,7 @@ if test "$wxUSE_GUI" = "yes"; then if test "$wxUSE_GTK" = 1; then echo $ac_n "checking for GTK+ version""... $ac_c" 1>&6 -echo "configure:12143: checking for GTK+ version" >&5 +echo "configure:12284: checking for GTK+ version" >&5 gtk_version_cached=1 if eval "test \"`echo '$''{'wx_cv_lib_gtk'+set}'`\" = set"; then @@ -12154,7 +12295,7 @@ else GTK_MODULES=gthread fi - wx_cv_lib_gtk= + wx_cv_lib_gtk= if test "x$wxUSE_GTK2" = "xyes"; then # Check whether --enable-gtktest or --disable-gtktest was given. if test "${enable_gtktest+set}" = set; then @@ -12180,7 +12321,7 @@ fi # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:12184: checking for $ac_word" >&5 +echo "configure:12325: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12228,7 +12369,7 @@ fi min_gtk_version=2.0.0 echo $ac_n "checking for GTK+ - version >= $min_gtk_version""... $ac_c" 1>&6 -echo "configure:12232: checking for GTK+ - version >= $min_gtk_version" >&5 +echo "configure:12373: checking for GTK+ - version >= $min_gtk_version" >&5 if test x$PKG_CONFIG != xno ; then ## don't try to run the test against uninstalled libtool libs @@ -12263,7 +12404,7 @@ echo "configure:12232: checking for GTK+ - version >= $min_gtk_version" >&5 echo $ac_n "cross compiling; assumed OK... $ac_c" else cat > conftest.$ac_ext < @@ -12338,7 +12479,7 @@ main () } EOF -if { (eval echo configure:12342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -12372,7 +12513,7 @@ fi CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$LIBS $GTK_LIBS" cat > conftest.$ac_ext < @@ -12382,7 +12523,7 @@ int main() { return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ; return 0; } EOF -if { (eval echo configure:12386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GTK+ or finding the wrong" @@ -12413,9 +12554,7 @@ rm -f conftest* rm -f conf.gtktest - fi - - if test -z "$wx_cv_lib_gtk"; then + else # Check whether --with-gtk-prefix or --without-gtk-prefix was given. if test "${with_gtk_prefix+set}" = set; then withval="$with_gtk_prefix" @@ -12466,7 +12605,7 @@ fi # Extract the first word of "gtk-config", so it can be a program name with args. set dummy gtk-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:12470: checking for $ac_word" >&5 +echo "configure:12609: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12501,7 +12640,7 @@ fi min_gtk_version=1.2.7 echo $ac_n "checking for GTK - version >= $min_gtk_version""... $ac_c" 1>&6 -echo "configure:12505: checking for GTK - version >= $min_gtk_version" >&5 +echo "configure:12644: checking for GTK - version >= $min_gtk_version" >&5 no_gtk="" if test "$GTK_CONFIG" = "no" ; then no_gtk=yes @@ -12524,7 +12663,7 @@ echo "configure:12505: checking for GTK - version >= $min_gtk_version" >&5 echo $ac_n "cross compiling; assumed OK... $ac_c" else cat > conftest.$ac_ext < @@ -12602,7 +12741,7 @@ main () } EOF -if { (eval echo configure:12606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -12636,7 +12775,7 @@ fi CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$LIBS $GTK_LIBS" cat > conftest.$ac_ext < @@ -12646,7 +12785,7 @@ int main() { return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ; return 0; } EOF -if { (eval echo configure:12650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GTK or finding the wrong" @@ -12684,10 +12823,9 @@ rm -f conftest* rm -f conf.gtktest - fi - if test -z "$wx_cv_lib_gtk"; then - # Check whether --with-gtk-prefix or --without-gtk-prefix was given. + if test -z "$wx_cv_lib_gtk"; then + # Check whether --with-gtk-prefix or --without-gtk-prefix was given. if test "${with_gtk_prefix+set}" = set; then withval="$with_gtk_prefix" gtk_config_prefix="$withval" @@ -12737,7 +12875,7 @@ fi # Extract the first word of "gtk-config", so it can be a program name with args. set dummy gtk-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:12741: checking for $ac_word" >&5 +echo "configure:12879: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12772,7 +12910,7 @@ fi min_gtk_version=1.2.3 echo $ac_n "checking for GTK - version >= $min_gtk_version""... $ac_c" 1>&6 -echo "configure:12776: checking for GTK - version >= $min_gtk_version" >&5 +echo "configure:12914: checking for GTK - version >= $min_gtk_version" >&5 no_gtk="" if test "$GTK_CONFIG" = "no" ; then no_gtk=yes @@ -12795,7 +12933,7 @@ echo "configure:12776: checking for GTK - version >= $min_gtk_version" >&5 echo $ac_n "cross compiling; assumed OK... $ac_c" else cat > conftest.$ac_ext < @@ -12873,7 +13011,7 @@ main () } EOF -if { (eval echo configure:12877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -12907,7 +13045,7 @@ fi CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$LIBS $GTK_LIBS" cat > conftest.$ac_ext < @@ -12917,7 +13055,7 @@ int main() { return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ; return 0; } EOF -if { (eval echo configure:12921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GTK or finding the wrong" @@ -12955,6 +13093,7 @@ rm -f conftest* rm -f conf.gtktest + fi fi if test -z "$wx_cv_lib_gtk"; then @@ -12974,6 +13113,7 @@ fi case "$wx_cv_lib_gtk" in 2.0) WXGTK20=1 + TOOLKIT_VERSION=2 ;; 1.2.7) WXGTK127=1 WXGTK12=1 @@ -12998,7 +13138,7 @@ equivalent variable and GTK+ is version 1.2.3 or above. # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:13002: checking for $ac_word" >&5 +echo "configure:13142: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -13042,19 +13182,19 @@ fi PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then echo $ac_n "checking for pangoft2""... $ac_c" 1>&6 -echo "configure:13046: checking for pangoft2" >&5 +echo "configure:13186: checking for pangoft2" >&5 if $PKG_CONFIG --exists "pangoft2" ; then echo "$ac_t""yes" 1>&6 succeeded=yes echo $ac_n "checking PANGOFT2_CFLAGS""... $ac_c" 1>&6 -echo "configure:13053: checking PANGOFT2_CFLAGS" >&5 +echo "configure:13193: checking PANGOFT2_CFLAGS" >&5 PANGOFT2_CFLAGS=`$PKG_CONFIG --cflags "pangoft2"` echo "$ac_t""$PANGOFT2_CFLAGS" 1>&6 echo $ac_n "checking PANGOFT2_LIBS""... $ac_c" 1>&6 -echo "configure:13058: checking PANGOFT2_LIBS" >&5 +echo "configure:13198: checking PANGOFT2_LIBS" >&5 PANGOFT2_LIBS=`$PKG_CONFIG --libs "pangoft2"` echo "$ac_t""$PANGOFT2_LIBS" 1>&6 else @@ -13088,6 +13228,69 @@ echo "configure:13058: checking PANGOFT2_LIBS" >&5 fi fi + else + if test "$wxUSE_UNICODE" = "yes"; then + echo "configure: warning: Unicode configuration not supported with GTK+ 1.x" 1>&2 + wxUSE_UNICODE=no + fi + fi + + if test "$USE_DARWIN" != 1; then + for ac_func in poll +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:13243: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:13271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + fi TOOLKIT_INCLUDE="$wx_cv_cflags_gtk" @@ -13098,7 +13301,7 @@ echo "configure:13058: checking PANGOFT2_LIBS" >&5 GUIDIST=GTK_DIST echo $ac_n "checking for gdk_im_open in -lgdk""... $ac_c" 1>&6 -echo "configure:13102: checking for gdk_im_open in -lgdk" >&5 +echo "configure:13305: checking for gdk_im_open in -lgdk" >&5 ac_lib_var=`echo gdk'_'gdk_im_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -13106,7 +13309,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgdk $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -13144,7 +13347,7 @@ fi if test "$wxUSE_MGL" = 1; then echo $ac_n "checking for SciTech MGL library""... $ac_c" 1>&6 -echo "configure:13148: checking for SciTech MGL library" >&5 +echo "configure:13351: checking for SciTech MGL library" >&5 if test "x$MGL_ROOT" = x ; then echo "$ac_t""not found" 1>&6 { echo "configure: error: Cannot find MGL library. Make sure MGL_ROOT is set." 1>&2; exit 1; } @@ -13152,33 +13355,50 @@ echo "configure:13148: checking for SciTech MGL library" >&5 echo "$ac_t""$MGL_ROOT" 1>&6 fi + echo $ac_n "checking for libmgl location""... $ac_c" 1>&6 +echo "configure:13360: checking for libmgl location" >&5 case "${host}" in *-*-linux* ) - mgl_os=linux/gcc/glibc + if test "x$wxUSE_SHARED" = xyes ; then + mgl_os_candidates="linux/gcc/glibc.so linux/gcc/glibc" + else + mgl_os_candidates="linux/gcc/glibc linux/gcc/glibc.so" + fi ;; *-pc-msdosdjgpp ) - mgl_os=dos32/dj2 + mgl_os_candidates="dos32/dj2" ;; *) { echo "configure: error: This system type ${host} is not yet supported by wxMGL." 1>&2; exit 1; } esac mgl_lib_type="" + mgl_os="" - if test "$wxUSE_DEBUG_FLAG" = yes ; then - if test -f $MGL_ROOT/lib/debug/$mgl_os/libmgl.a -o \ - -f $MGL_ROOT/lib/debug/$mgl_os/libmgl.so; then - mgl_lib_type=debug - fi - fi - if test "x$mgl_lib_type" = x ; then - if test -f $MGL_ROOT/lib/release/$mgl_os/libmgl.a -o \ - -f $MGL_ROOT/lib/release/$mgl_os/libmgl.so; then - mgl_lib_type=release - else - { echo "configure: error: Cannot find MGL libraries, make sure they are compiled." 1>&2; exit 1; } + for mgl_os_i in $mgl_os_candidates ; do + if test "x$mgl_os" = x ; then + if test "$wxUSE_DEBUG_FLAG" = yes ; then + if test -f $MGL_ROOT/lib/debug/$mgl_os_i/libmgl.a -o \ + -f $MGL_ROOT/lib/debug/$mgl_os_i/libmgl.so; then + mgl_lib_type=debug + mgl_os=$mgl_os_i + fi + fi + if test "x$mgl_lib_type" = x ; then + if test -f $MGL_ROOT/lib/release/$mgl_os_i/libmgl.a -o \ + -f $MGL_ROOT/lib/release/$mgl_os_i/libmgl.so; then + mgl_lib_type=release + mgl_os=$mgl_os_i + fi + fi fi + done + + if test "x$mgl_os" = x ; then + echo "$ac_t""not found" 1>&6 + { echo "configure: error: Cannot find MGL libraries, make sure they are compiled." 1>&2; exit 1; } fi + echo "$ac_t"""$MGL_ROOT/lib/$mgl_lib_type/$mgl_os"" 1>&6 wxUSE_UNIVERSAL="yes" @@ -13192,7 +13412,7 @@ echo "configure:13148: checking for SciTech MGL library" >&5 if test "$wxUSE_MICROWIN" = 1; then echo $ac_n "checking for MicroWindows""... $ac_c" 1>&6 -echo "configure:13196: checking for MicroWindows" >&5 +echo "configure:13416: checking for MicroWindows" >&5 if test "x$MICROWINDOWS" = x ; then echo "$ac_t""not found" 1>&6 { echo "configure: error: Cannot find MicroWindows library. Make sure MICROWINDOWS is set." 1>&2; exit 1; } @@ -13224,7 +13444,7 @@ echo "configure:13196: checking for MicroWindows" >&5 # Uses ac_ vars as temps to allow command line to override cache and checks. # --without-x overrides everything else, but does not touch the cache. echo $ac_n "checking for X""... $ac_c" 1>&6 -echo "configure:13228: checking for X" >&5 +echo "configure:13448: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -13286,12 +13506,12 @@ if test "$ac_x_includes" = NO; then # First, try using that file with no special directory specified. cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:13295: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:13515: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -13360,14 +13580,14 @@ if test "$ac_x_libraries" = NO; then ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* LIBS="$ac_save_LIBS" # We can link X programs with no special library path. @@ -13473,17 +13693,17 @@ else case "`(uname -sr) 2>/dev/null`" in "SunOS 5"*) echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6 -echo "configure:13477: checking whether -R must be followed by a space" >&5 +echo "configure:13697: checking whether -R must be followed by a space" >&5 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_nospace=yes else @@ -13499,14 +13719,14 @@ rm -f conftest* else LIBS="$ac_xsave_LIBS -R $x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_space=yes else @@ -13538,7 +13758,7 @@ rm -f conftest* # libraries were built with DECnet support. And karl@cs.umb.edu says # the Alpha needs dnet_stub (dnet does not exist). echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 -echo "configure:13542: checking for dnet_ntoa in -ldnet" >&5 +echo "configure:13762: checking for dnet_ntoa in -ldnet" >&5 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -13546,7 +13766,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldnet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -13579,7 +13799,7 @@ fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6 -echo "configure:13583: checking for dnet_ntoa in -ldnet_stub" >&5 +echo "configure:13803: checking for dnet_ntoa in -ldnet_stub" >&5 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -13587,7 +13807,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldnet_stub $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -13627,12 +13847,12 @@ fi # The nsl library prevents programs from opening the X display # on Irix 5.2, according to dickey@clark.net. echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:13631: checking for gethostbyname" >&5 +echo "configure:13851: checking for gethostbyname" >&5 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gethostbyname=yes" else @@ -13676,7 +13896,7 @@ fi if test $ac_cv_func_gethostbyname = no; then echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:13680: checking for gethostbyname in -lnsl" >&5 +echo "configure:13900: checking for gethostbyname in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -13684,7 +13904,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -13725,12 +13945,12 @@ fi # -lsocket must be given before -lnsl if both are needed. # We assume that if connect needs -lnsl, so does gethostbyname. echo $ac_n "checking for connect""... $ac_c" 1>&6 -echo "configure:13729: checking for connect" >&5 +echo "configure:13949: checking for connect" >&5 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_connect=yes" else @@ -13774,7 +13994,7 @@ fi if test $ac_cv_func_connect = no; then echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 -echo "configure:13778: checking for connect in -lsocket" >&5 +echo "configure:13998: checking for connect in -lsocket" >&5 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -13782,7 +14002,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -13817,12 +14037,12 @@ fi # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. echo $ac_n "checking for remove""... $ac_c" 1>&6 -echo "configure:13821: checking for remove" >&5 +echo "configure:14041: checking for remove" >&5 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_remove=yes" else @@ -13866,7 +14086,7 @@ fi if test $ac_cv_func_remove = no; then echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 -echo "configure:13870: checking for remove in -lposix" >&5 +echo "configure:14090: checking for remove in -lposix" >&5 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -13874,7 +14094,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lposix $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -13909,12 +14129,12 @@ fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. echo $ac_n "checking for shmat""... $ac_c" 1>&6 -echo "configure:13913: checking for shmat" >&5 +echo "configure:14133: checking for shmat" >&5 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_shmat=yes" else @@ -13958,7 +14178,7 @@ fi if test $ac_cv_func_shmat = no; then echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 -echo "configure:13962: checking for shmat in -lipc" >&5 +echo "configure:14182: checking for shmat in -lipc" >&5 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -13966,7 +14186,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lipc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -14010,7 +14230,7 @@ fi # libraries we check for below, so use a different variable. # --interran@uluru.Stanford.EDU, kb@cs.umb.edu. echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6 -echo "configure:14014: checking for IceConnectionNumber in -lICE" >&5 +echo "configure:14234: checking for IceConnectionNumber in -lICE" >&5 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -14018,7 +14238,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lICE $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -14065,7 +14285,7 @@ fi if test "$wxUSE_NANOX" = "yes"; then echo $ac_n "checking for MicroWindows/NanoX distribution""... $ac_c" 1>&6 -echo "configure:14069: checking for MicroWindows/NanoX distribution" >&5 +echo "configure:14289: checking for MicroWindows/NanoX distribution" >&5 if test "x$MICROWIN" = x ; then echo "$ac_t""not found" 1>&6 { echo "configure: error: Cannot find MicroWindows library. Make sure MICROWIN is set." 1>&2; exit 1; } @@ -14080,10 +14300,10 @@ EOF xpm_link= echo $ac_n "checking for Xpm library""... $ac_c" 1>&6 -echo "configure:14084: checking for Xpm library" >&5 +echo "configure:14304: checking for Xpm library" >&5 ac_find_libraries= -for ac_dir in $SEARCH_LIB; +for ac_dir in $SEARCH_LIB /usr/lib; do for ac_extension in a so sl dylib; do if test -f "$ac_dir/libXpm.$ac_extension"; then @@ -14112,7 +14332,7 @@ EOF echo "$ac_t""found at $ac_find_libraries" 1>&6 else cat > conftest.$ac_ext < @@ -14124,7 +14344,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:14128: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:14348: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* xpm_link=" -lXpm" @@ -14148,6 +14368,295 @@ fi rm -f conftest* fi + if test "$wxUSE_UNICODE" = "yes"; then + + succeeded=no + + if test -z "$PKG_CONFIG"; then + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:14380: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$PKG_CONFIG" in + /*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; +esac +fi +PKG_CONFIG="$ac_cv_path_PKG_CONFIG" +if test -n "$PKG_CONFIG"; then + echo "$ac_t""$PKG_CONFIG" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + fi + + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + echo $ac_n "checking for pangox""... $ac_c" 1>&6 +echo "configure:14424: checking for pangox" >&5 + + if $PKG_CONFIG --exists "pangox" ; then + echo "$ac_t""yes" 1>&6 + succeeded=yes + + echo $ac_n "checking PANGOX_CFLAGS""... $ac_c" 1>&6 +echo "configure:14431: checking PANGOX_CFLAGS" >&5 + PANGOX_CFLAGS=`$PKG_CONFIG --cflags "pangox"` + echo "$ac_t""$PANGOX_CFLAGS" 1>&6 + + echo $ac_n "checking PANGOX_LIBS""... $ac_c" 1>&6 +echo "configure:14436: checking PANGOX_LIBS" >&5 + PANGOX_LIBS=`$PKG_CONFIG --libs "pangox"` + echo "$ac_t""$PANGOX_LIBS" 1>&6 + else + PANGOX_CFLAGS="" + PANGOX_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + PANGOX_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "pangox"` + + fi + + + + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi + + if test $succeeded = yes; then + + CXXFLAGS="$CXXFLAGS $PANGOX_CFLAGS" + LIBS="$LIBS $PANGOX_LIBS" + + else + + { echo "configure: error: pangox library not found, library cannot be compiled in Unicode mode" 1>&2; exit 1; } + + + fi + + + succeeded=no + + if test -z "$PKG_CONFIG"; then + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:14475: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$PKG_CONFIG" in + /*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; +esac +fi +PKG_CONFIG="$ac_cv_path_PKG_CONFIG" +if test -n "$PKG_CONFIG"; then + echo "$ac_t""$PKG_CONFIG" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + fi + + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + echo $ac_n "checking for pangoft2""... $ac_c" 1>&6 +echo "configure:14519: checking for pangoft2" >&5 + + if $PKG_CONFIG --exists "pangoft2" ; then + echo "$ac_t""yes" 1>&6 + succeeded=yes + + echo $ac_n "checking PANGOFT2_CFLAGS""... $ac_c" 1>&6 +echo "configure:14526: checking PANGOFT2_CFLAGS" >&5 + PANGOFT2_CFLAGS=`$PKG_CONFIG --cflags "pangoft2"` + echo "$ac_t""$PANGOFT2_CFLAGS" 1>&6 + + echo $ac_n "checking PANGOFT2_LIBS""... $ac_c" 1>&6 +echo "configure:14531: checking PANGOFT2_LIBS" >&5 + PANGOFT2_LIBS=`$PKG_CONFIG --libs "pangoft2"` + echo "$ac_t""$PANGOFT2_LIBS" 1>&6 + else + PANGOFT2_CFLAGS="" + PANGOFT2_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + PANGOFT2_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "pangoft2"` + + fi + + + + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi + + if test $succeeded = yes; then + + CXXFLAGS="$CXXFLAGS $PANGOFT2_CFLAGS" + LIBS="$LIBS $PANGOFT2_LIBS" + + else + + echo "configure: warning: pangoft2 library not found, library will be compiled without printing support" 1>&2 + wxUSE_PRINTING_ARCHITECTURE="no" + + + fi + + + succeeded=no + + if test -z "$PKG_CONFIG"; then + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:14571: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$PKG_CONFIG" in + /*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; +esac +fi +PKG_CONFIG="$ac_cv_path_PKG_CONFIG" +if test -n "$PKG_CONFIG"; then + echo "$ac_t""$PKG_CONFIG" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + fi + + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + echo $ac_n "checking for pangoxft""... $ac_c" 1>&6 +echo "configure:14615: checking for pangoxft" >&5 + + if $PKG_CONFIG --exists "pangoxft" ; then + echo "$ac_t""yes" 1>&6 + succeeded=yes + + echo $ac_n "checking PANGOXFT_CFLAGS""... $ac_c" 1>&6 +echo "configure:14622: checking PANGOXFT_CFLAGS" >&5 + PANGOXFT_CFLAGS=`$PKG_CONFIG --cflags "pangoxft"` + echo "$ac_t""$PANGOXFT_CFLAGS" 1>&6 + + echo $ac_n "checking PANGOXFT_LIBS""... $ac_c" 1>&6 +echo "configure:14627: checking PANGOXFT_LIBS" >&5 + PANGOXFT_LIBS=`$PKG_CONFIG --libs "pangoxft"` + echo "$ac_t""$PANGOXFT_LIBS" 1>&6 + else + PANGOXFT_CFLAGS="" + PANGOXFT_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + PANGOXFT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "pangoxft"` + + fi + + + + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi + + if test $succeeded = yes; then + + CXXFLAGS="$CXXFLAGS $PANGOXFT_CFLAGS" + LIBS="$LIBS $PANGOXFT_LIBS" + + else + + echo "configure: warning: pangoxft library not found, library will be compiled without anti-aliasing support" 1>&2 + + + fi + + fi + wxUSE_UNIVERSAL="yes" if test "$wxUSE_NANOX" = "yes"; then @@ -14166,17 +14675,17 @@ rm -f conftest* if test "$wxUSE_WINE" = 1; then ac_safe=`echo "windows.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for windows.h""... $ac_c" 1>&6 -echo "configure:14170: checking for windows.h" >&5 +echo "configure:14679: checking for windows.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:14180: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:14689: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -14203,10 +14712,10 @@ fi xpm_link= echo $ac_n "checking for Xpm library""... $ac_c" 1>&6 -echo "configure:14207: checking for Xpm library" >&5 +echo "configure:14716: checking for Xpm library" >&5 ac_find_libraries= -for ac_dir in $SEARCH_LIB; +for ac_dir in $SEARCH_LIB /usr/lib; do for ac_extension in a so sl dylib; do if test -f "$ac_dir/libXpm.$ac_extension"; then @@ -14231,10 +14740,10 @@ EOF mesa_link= echo $ac_n "checking for Mesa library""... $ac_c" 1>&6 -echo "configure:14235: checking for Mesa library" >&5 +echo "configure:14744: checking for Mesa library" >&5 ac_find_libraries= -for ac_dir in $SEARCH_LIB; +for ac_dir in $SEARCH_LIB /usr/lib; do for ac_extension in a so sl dylib; do if test -f "$ac_dir/libMesaGL.$ac_extension"; then @@ -14281,17 +14790,17 @@ else case "`(uname -sr) 2>/dev/null`" in "SunOS 5"*) echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6 -echo "configure:14285: checking whether -R must be followed by a space" >&5 +echo "configure:14794: checking whether -R must be followed by a space" >&5 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_nospace=yes else @@ -14307,14 +14816,14 @@ rm -f conftest* else LIBS="$ac_xsave_LIBS -R $x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_space=yes else @@ -14346,7 +14855,7 @@ rm -f conftest* # libraries were built with DECnet support. And karl@cs.umb.edu says # the Alpha needs dnet_stub (dnet does not exist). echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 -echo "configure:14350: checking for dnet_ntoa in -ldnet" >&5 +echo "configure:14859: checking for dnet_ntoa in -ldnet" >&5 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -14354,7 +14863,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldnet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -14387,7 +14896,7 @@ fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6 -echo "configure:14391: checking for dnet_ntoa in -ldnet_stub" >&5 +echo "configure:14900: checking for dnet_ntoa in -ldnet_stub" >&5 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -14395,7 +14904,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldnet_stub $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -14435,12 +14944,12 @@ fi # The nsl library prevents programs from opening the X display # on Irix 5.2, according to dickey@clark.net. echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:14439: checking for gethostbyname" >&5 +echo "configure:14948: checking for gethostbyname" >&5 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gethostbyname=yes" else @@ -14484,7 +14993,7 @@ fi if test $ac_cv_func_gethostbyname = no; then echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:14488: checking for gethostbyname in -lnsl" >&5 +echo "configure:14997: checking for gethostbyname in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -14492,7 +15001,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -14533,12 +15042,12 @@ fi # -lsocket must be given before -lnsl if both are needed. # We assume that if connect needs -lnsl, so does gethostbyname. echo $ac_n "checking for connect""... $ac_c" 1>&6 -echo "configure:14537: checking for connect" >&5 +echo "configure:15046: checking for connect" >&5 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_connect=yes" else @@ -14582,7 +15091,7 @@ fi if test $ac_cv_func_connect = no; then echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 -echo "configure:14586: checking for connect in -lsocket" >&5 +echo "configure:15095: checking for connect in -lsocket" >&5 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -14590,7 +15099,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -14625,12 +15134,12 @@ fi # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. echo $ac_n "checking for remove""... $ac_c" 1>&6 -echo "configure:14629: checking for remove" >&5 +echo "configure:15138: checking for remove" >&5 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_remove=yes" else @@ -14674,7 +15183,7 @@ fi if test $ac_cv_func_remove = no; then echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 -echo "configure:14678: checking for remove in -lposix" >&5 +echo "configure:15187: checking for remove in -lposix" >&5 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -14682,7 +15191,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lposix $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -14717,12 +15226,12 @@ fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. echo $ac_n "checking for shmat""... $ac_c" 1>&6 -echo "configure:14721: checking for shmat" >&5 +echo "configure:15230: checking for shmat" >&5 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_shmat=yes" else @@ -14766,7 +15275,7 @@ fi if test $ac_cv_func_shmat = no; then echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 -echo "configure:14770: checking for shmat in -lipc" >&5 +echo "configure:15279: checking for shmat in -lipc" >&5 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -14774,7 +15283,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lipc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -14818,7 +15327,7 @@ fi # libraries we check for below, so use a different variable. # --interran@uluru.Stanford.EDU, kb@cs.umb.edu. echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6 -echo "configure:14822: checking for IceConnectionNumber in -lICE" >&5 +echo "configure:15331: checking for IceConnectionNumber in -lICE" >&5 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -14826,7 +15335,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lICE $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -14866,16 +15375,16 @@ fi { echo "configure: error: X11 not found" 1>&2; exit 1; } fi - GUI_TK_LIBRARY="$X_LIBS" - TOOLKIT_INCLUDE="$X_CFLAGS" + GUI_TK_LIBRARY=`echo $X_LIBS | sed 's/ -LNONE//'` + TOOLKIT_INCLUDE=`echo $X_CFLAGS | sed 's/ -INONE//'` AFMINSTALL=afminstall COMPILED_X_PROGRAM=0 echo $ac_n "checking for Motif/Lesstif headers""... $ac_c" 1>&6 -echo "configure:14876: checking for Motif/Lesstif headers" >&5 +echo "configure:15385: checking for Motif/Lesstif headers" >&5 ac_find_includes= -for ac_dir in $SEARCH_INCLUDE; +for ac_dir in $SEARCH_INCLUDE /usr/include; do if test -f "$ac_dir/Xm/Xm.h"; then ac_find_includes=$ac_dir @@ -14886,19 +15395,22 @@ for ac_dir in $SEARCH_INCLUDE; if test "$ac_find_includes" != "" ; then echo "$ac_t""found in $ac_find_includes" 1>&6 - ac_path_to_include=$ac_find_includes - echo "$TOOLKIT_INCLUDE" | grep "\-I$ac_find_includes" > /dev/null - result=$? - if test $result = 0; then + if test "x$ac_find_includes" = "x/usr/include"; then ac_path_to_include="" else - ac_path_to_include=" -I$ac_find_includes" + echo "$TOOLKIT_INCLUDE" | grep "\-I$ac_find_includes" > /dev/null + result=$? + if test $result = 0; then + ac_path_to_include="" + else + ac_path_to_include=" -I$ac_find_includes" + fi fi TOOLKIT_INCLUDE="$TOOLKIT_INCLUDE$ac_path_to_include" else cat > conftest.$ac_ext < @@ -14910,7 +15422,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:14914: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:15426: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""found in default search path" 1>&6 @@ -14931,10 +15443,10 @@ rm -f conftest* if test "$COMPILED_X_PROGRAM" = 0; then echo $ac_n "checking for Motif/Lesstif library""... $ac_c" 1>&6 -echo "configure:14935: checking for Motif/Lesstif library" >&5 +echo "configure:15447: checking for Motif/Lesstif library" >&5 ac_find_libraries= -for ac_dir in $SEARCH_LIB; +for ac_dir in $SEARCH_LIB /usr/lib; do for ac_extension in a so sl dylib; do if test -f "$ac_dir/libXm.$ac_extension"; then @@ -14962,7 +15474,7 @@ for ac_dir in $SEARCH_LIB; CFLAGS="$CFLAGS $TOOLKIT_INCLUDE" cat > conftest.$ac_ext < @@ -14974,7 +15486,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:14978: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:15490: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""found in default search path" 1>&6 @@ -14998,10 +15510,10 @@ rm -f conftest* xpm_link= echo $ac_n "checking for Xpm library""... $ac_c" 1>&6 -echo "configure:15002: checking for Xpm library" >&5 +echo "configure:15514: checking for Xpm library" >&5 ac_find_libraries= -for ac_dir in $SEARCH_LIB; +for ac_dir in $SEARCH_LIB /usr/lib; do for ac_extension in a so sl dylib; do if test -f "$ac_dir/libXpm.$ac_extension"; then @@ -15034,7 +15546,7 @@ EOF CFLAGS="$CFLAGS $TOOLKIT_INCLUDE" cat > conftest.$ac_ext < @@ -15046,7 +15558,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:15050: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:15562: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* xpm_link=" -lXpm" @@ -15073,7 +15585,7 @@ rm -f conftest* fi echo $ac_n "checking if we need -lXp and/or -lSM -lICE""... $ac_c" 1>&6 -echo "configure:15077: checking if we need -lXp and/or -lSM -lICE" >&5 +echo "configure:15589: checking if we need -lXp and/or -lSM -lICE" >&5 libp_link="" libsm_ice_link="" libs_found=0 @@ -15087,7 +15599,7 @@ echo "configure:15077: checking if we need -lXp and/or -lSM -lICE" >&5 CFLAGS="$CFLAGS $TOOLKIT_INCLUDE" cat > conftest.$ac_ext < @@ -15102,7 +15614,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:15106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* libp_link="$libp" @@ -15148,6 +15660,11 @@ rm -f conftest* if test "$wxUSE_PM" = 1; then TOOLKIT=PM GUIDIST=GTK_DIST + echo "configure: warning: OS/2 PM requires old resource format, re-enabled" 1>&2 + wxUSE_PROLOGIO="yes" + wxUSE_RESOURCES="yes" + echo "configure: warning: OS/2 threads are not yet supported... disabled" 1>&2 + wxUSE_THREADS="no" fi if test "$TOOLKIT" = "PM" ; then @@ -15245,17 +15762,17 @@ if test "$wxUSE_OPENGL" = "yes"; then else ac_safe=`echo "GL/gl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for GL/gl.h""... $ac_c" 1>&6 -echo "configure:15249: checking for GL/gl.h" >&5 +echo "configure:15766: checking for GL/gl.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:15259: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:15776: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -15273,10 +15790,10 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for -lGL""... $ac_c" 1>&6 -echo "configure:15277: checking for -lGL" >&5 +echo "configure:15794: checking for -lGL" >&5 ac_find_libraries= -for ac_dir in $SEARCH_LIB; +for ac_dir in $SEARCH_LIB /usr/lib; do for ac_extension in a so sl dylib; do if test -f "$ac_dir/libGL.$ac_extension"; then @@ -15306,10 +15823,10 @@ for ac_dir in $SEARCH_LIB; else echo "$ac_t""no" 1>&6 echo $ac_n "checking for -lMesaGL""... $ac_c" 1>&6 -echo "configure:15310: checking for -lMesaGL" >&5 +echo "configure:15827: checking for -lMesaGL" >&5 ac_find_libraries= -for ac_dir in $SEARCH_LIB; +for ac_dir in $SEARCH_LIB /usr/lib; do for ac_extension in a so sl dylib; do if test -f "$ac_dir/libMesaGL.$ac_extension"; then @@ -15378,8 +15895,10 @@ if test "$wxUSE_DEBUG_FLAG" = "yes"; then lib_debug_suffix=d fi -TOOLCHAIN_NAME="${TOOLKIT_DIR}${WIDGET_SET}${lib_unicode_suffix}${lib_debug_suffix}-${WX_RELEASE}" -TOOLCHAIN_NAME_GL="${TOOLKIT_DIR}${WIDGET_SET}${lib_unicode_suffix}${lib_debug_suffix}_gl-${WX_RELEASE}" +WX_VERSION_TAG=`echo WX${TOOLKIT_DIR}${TOOLKIT_VERSION}${WIDGET_SET}${lib_unicode_suffix}${lib_debug_suffix}_${WX_RELEASE} | tr "[a-z]" "[A-Z]"` + +TOOLCHAIN_NAME="${TOOLKIT_DIR}${TOOLKIT_VERSION}${WIDGET_SET}${lib_unicode_suffix}${lib_debug_suffix}-${WX_RELEASE}" +TOOLCHAIN_NAME_GL="${TOOLKIT_DIR}${TOOLKIT_VERSION}${WIDGET_SET}${lib_unicode_suffix}${lib_debug_suffix}_gl-${WX_RELEASE}" if test "$cross_compiling" = "yes"; then TOOLCHAIN_NAME="${TOOLCHAIN_NAME}-${host_alias}" @@ -15388,6 +15907,7 @@ fi WX_LIBRARY="wx_${TOOLCHAIN_NAME}" WX_LIBRARY_GL="wx_${TOOLCHAIN_NAME_GL}" +WX_LIBRARY_BASENAME="wx_${TOOLKIT_DIR}${TOOLKIT_VERSION}${WIDGET_SET}${lib_unicode_suffix}${lib_debug_suffix}" WX_LIBRARY_NAME_SHARED="lib${WX_LIBRARY}.${SO_SUFFIX}.${WX_CURRENT}.${WX_REVISION}.${WX_AGE}" WX_LIBRARY_NAME_SHARED_GL="lib${WX_LIBRARY_GL}.${SO_SUFFIX}.${WX_CURRENT}.${WX_REVISION}.${WX_AGE}" @@ -15414,9 +15934,18 @@ case "${host}" in ;; *-*-darwin* ) + + WX_LIBRARY_NAME_SHARED="lib${WX_LIBRARY}.${WX_CURRENT}.${WX_REVISION}.${WX_AGE}.${SO_SUFFIX}" + WX_LIBRARY_NAME_SHARED_GL="lib${WX_LIBRARY_GL}.${WX_CURRENT}.${WX_REVISION}.${WX_AGE}.${SO_SUFFIX}" + + WX_LIBRARY_LINK1="lib${WX_LIBRARY}.${WX_CURRENT}.${SO_SUFFIX}" + WX_LIBRARY_LINK2="lib${WX_LIBRARY}.${SO_SUFFIX}" + WX_LIBRARY_LINK1_GL="lib${WX_LIBRARY_GL}.${WX_CURRENT}.${SO_SUFFIX}" + WX_LIBRARY_LINK2_GL="lib${WX_LIBRARY_GL}.${SO_SUFFIX}" + if test "$wxUSE_MAC" = 1; then - WX_RESOURCES_MACOSX_ASCII="lib${WX_LIBRARY}.r" - WX_RESOURCES_MACOSX_DATA="lib${WX_LIBRARY}.rsrc" + WX_RESOURCES_MACOSX_ASCII="lib${WX_LIBRARY}.${WX_CURRENT}.r" + WX_RESOURCES_MACOSX_DATA="lib${WX_LIBRARY}.${WX_CURRENT}.rsrc" fi ;; esac @@ -15458,6 +15987,43 @@ if test "$wxUSE_SHARED" = "yes"; then PIC_FLAG="-fPIC" fi + + + found_versioning=no + + + if test $found_versioning = no ; then + echo $ac_n "checking if the linker accepts --version-script""... $ac_c" 1>&6 +echo "configure:15998: checking if the linker accepts --version-script" >&5 +if eval "test \"`echo '$''{'wx_cv_version_script'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + echo "VER_1 { *; };" >conftest.sym + echo "int main() { return 0; }" >conftest.cpp + + if { ac_try=' + $CXX -o conftest.output $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.cpp + -Wl,--version-script,conftest.sym >/dev/null 2>conftest.stderr'; { (eval echo configure:16008: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } ; then + if test -s conftest.stderr ; then + wx_cv_version_script=no + else + wx_cv_version_script=yes + fi + else + wx_cv_version_script=no + fi + rm -f conftest.output conftest.stderr conftest.sym conftest.cpp + +fi + +echo "$ac_t""$wx_cv_version_script" 1>&6 + if test $wx_cv_version_script = yes ; then + LDFLAGS_VERSIONING="-Wl,--version-script,\$(top_builddir)/version-script" + fi + fi + + SHARED_LD="${CXX} -shared -o" case "${host}" in @@ -15482,13 +16048,13 @@ if test "$wxUSE_SHARED" = "yes"; then *-*-linux* ) if test "$GCC" != "yes"; then echo $ac_n "checking for Intel compiler""... $ac_c" 1>&6 -echo "configure:15486: checking for Intel compiler" >&5 +echo "configure:16052: checking for Intel compiler" >&5 if eval "test \"`echo '$''{'wx_cv_prog_icc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:16069: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_prog_icc=yes else @@ -15543,15 +16109,16 @@ echo "$ac_t""$wx_cv_prog_icc" 1>&6 CXXFLAGS="$CXXFLAGS -fno-common" SHARED_LD="\${top_srcdir}/distrib/mac/shared-ld-sh -undefined suppress -flat_namespace -o" PIC_FLAG="-dynamic -fPIC" - SONAME_FLAGS="-compatibility_version ${WX_RELEASE} -current_version ${WX_VERSION}" - SONAME_FLAGS_GL=${SONAME_FLAGS} + SONAME_FLAGS="-compatibility_version ${WX_RELEASE} -current_version ${WX_VERSION} -install_name \$(libdir)/${WX_LIBRARY_LINK1}" + SONAME_FLAGS_GL="-compatibility_version ${WX_RELEASE} -current_version ${WX_VERSION} -install_name \$(libdir)/${WX_LIBRARY_LINK1_GL}" ;; *-*-aix* ) - # Extract the first word of "makeC++SharedLib", so it can be a program name with args. + if test "$GCC" != "yes"; then + # Extract the first word of "makeC++SharedLib", so it can be a program name with args. set dummy makeC++SharedLib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:15555: checking for $ac_word" >&5 +echo "configure:16122: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AIX_CXX_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -15579,11 +16146,11 @@ else fi - SHARED_LD="$(AIX_CXX_LD) -p 0 -o" + SHARED_LD="$(AIX_CXX_LD) -p 0 -o" + fi ;; *-*-cygwin* | *-*-mingw32* ) - WX_LIBRARY_IMPORTLIB="${WX_LIBRARY_NAME_SHARED}.a" SHARED_LD="${CXX} -shared -Wl,--out-implib,lib/${WX_LIBRARY_IMPORTLIB} -o" @@ -15591,11 +16158,11 @@ fi PIC_FLAG="-UWXUSINGDLL -DWXMAKINGDLL=1 -D_DLL=1 -D_WINDLL=1" - if test "$wxUSE_OPENGL" = "yes"; then - WX_ALL_INSTALLED="preinstall_gl" - WX_ALL="\$(build_libdir)/${WX_LIBRARY_NAME_SHARED} \$(build_libdir)/${WX_LIBRARY_NAME_SHARED_GL}" - else - WX_ALL="\$(build_libdir)/${WX_LIBRARY_NAME_SHARED}" + WX_ALL="\$(build_libdir)/${WX_LIBRARY_NAME_SHARED}" + WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS" + + if test "$wxUSE_OPENGL" = "yes"; then + LIBS="${LIBS} ${OPENGL_LIBS}" fi ;; @@ -15603,9 +16170,14 @@ fi SHARED_LD="${LD} -shared -o" ;; + *-*-irix* ) + if test "$GCC" != "yes"; then + PIC_FLAG="-KPIC" + fi + ;; + *-*-freebsd* | *-*-openbsd* | *-*-netbsd* | \ *-*-sunos4* | \ - *-*-irix5* | *-*-irix6* | \ *-*-osf* | \ *-*-dgux5* | \ *-*-sysv5* ) @@ -15659,7 +16231,7 @@ if test "$wxUSE_MAC" = 1; then # Extract the first word of "Rez", so it can be a program name with args. set dummy Rez; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:15663: checking for $ac_word" >&5 +echo "configure:16235: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RESCOMP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -15689,7 +16261,7 @@ fi # Extract the first word of "DeRez", so it can be a program name with args. set dummy DeRez; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:15693: checking for $ac_word" >&5 +echo "configure:16265: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_DEREZ'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -15717,13 +16289,8 @@ else fi MACOSX_BUNDLE="bundle" - if test "$wxUSE_SHARED" = "yes"; then - LIBWXMACRESCOMP="\$(RESCOMP) -t APPL Carbon.r -o \$(BIN_PROGRAM)" - LIBWXMACRESWXCONFIG="${RESCOMP} -t APPL Carbon.r -o" - else - LIBWXMACRESCOMP="\$(RESCOMP) -t APPL Carbon.r ${LIBWXMACRES} -o \$(BIN_PROGRAM)" - LIBWXMACRESWXCONFIG="${RESCOMP} -t APPL Carbon.r \${prefix}/lib/${WX_RESOURCES_MACOSX_ASCII} -o" - fi + LIBWXMACRESCOMP="\$(RESCOMP) -t APPL Carbon.r ${LIBWXMACRES} -o \$(BIN_PROGRAM)" + LIBWXMACRESWXCONFIG="${RESCOMP} -t APPL Carbon.r \${prefix}/lib/${WX_RESOURCES_MACOSX_ASCII} -o" else if test "$wxUSE_PM" = 1; then LIBWXMACRESCOMP="emxbind -ep \$(BIN_PROGRAM)" @@ -15732,12 +16299,12 @@ fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:15736: checking for ANSI C header files" >&5 +echo "configure:16303: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -15745,7 +16312,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:15749: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:16316: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -15762,7 +16329,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -15780,7 +16347,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -15801,7 +16368,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -15812,7 +16379,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:15816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:16383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -15836,12 +16403,12 @@ EOF fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:15840: checking for mode_t" >&5 +echo "configure:16407: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -15869,12 +16436,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:15873: checking for off_t" >&5 +echo "configure:16440: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -15902,12 +16469,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:15906: checking for pid_t" >&5 +echo "configure:16473: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -15935,12 +16502,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:15939: checking for size_t" >&5 +echo "configure:16506: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -15968,12 +16535,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:15972: checking for uid_t in sys/types.h" >&5 +echo "configure:16539: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -16011,12 +16578,13 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking if size_t is unsigned int""... $ac_c" 1>&6 -echo "configure:16015: checking if size_t is unsigned int" >&5 +echo "configure:16582: checking if size_t is unsigned int" >&5 if eval "test \"`echo '$''{'wx_cv_size_t_is_uint'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - cat > conftest.$ac_ext < conftest.$ac_ext < int main() { @@ -16029,7 +16597,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:16033: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:16601: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_size_t_is_uint=no else @@ -16040,6 +16608,7 @@ else fi rm -f conftest* + fi @@ -16052,12 +16621,12 @@ EOF else echo $ac_n "checking if size_t is unsigned long""... $ac_c" 1>&6 -echo "configure:16056: checking if size_t is unsigned long" >&5 +echo "configure:16625: checking if size_t is unsigned long" >&5 if eval "test \"`echo '$''{'wx_cv_size_t_is_ulong'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -16070,7 +16639,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:16074: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:16643: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_size_t_is_ulong=no else @@ -16104,13 +16673,13 @@ cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking for pw_gecos in struct passwd""... $ac_c" 1>&6 -echo "configure:16108: checking for pw_gecos in struct passwd" >&5 +echo "configure:16677: checking for pw_gecos in struct passwd" >&5 if eval "test \"`echo '$''{'wx_cv_struct_pw_gecos'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -16121,7 +16690,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:16125: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:16694: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_struct_pw_gecos=yes @@ -16161,12 +16730,12 @@ EOF for ac_func in wcslen do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:16165: checking for $ac_func" >&5 +echo "configure:16734: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -16217,7 +16786,7 @@ done if test "$WCSLEN_FOUND" = 0; then if test "$TOOLKIT" = "MSW"; then echo $ac_n "checking for wcslen in -lmsvcrt""... $ac_c" 1>&6 -echo "configure:16221: checking for wcslen in -lmsvcrt" >&5 +echo "configure:16790: checking for wcslen in -lmsvcrt" >&5 ac_lib_var=`echo msvcrt'_'wcslen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -16225,7 +16794,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lmsvcrt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -16258,7 +16827,7 @@ fi else echo $ac_n "checking for wcslen in -lw""... $ac_c" 1>&6 -echo "configure:16262: checking for wcslen in -lw" >&5 +echo "configure:16831: checking for wcslen in -lw" >&5 ac_lib_var=`echo w'_'wcslen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -16266,7 +16835,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lw $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -16313,12 +16882,12 @@ EOF for ac_func in wcsrtombs do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:16317: checking for $ac_func" >&5 +echo "configure:16886: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -16381,12 +16950,12 @@ cross_compiling=$ac_cv_prog_cxx_cross for ac_func in vsnprintf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:16385: checking for $ac_func" >&5 +echo "configure:16954: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -16441,12 +17010,12 @@ if test "$wxUSE_UNICODE" = yes; then for ac_func in fputwc wprintf vswprintf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:16445: checking for $ac_func" >&5 +echo "configure:17014: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -16497,16 +17066,16 @@ fi done echo $ac_n "checking for _vsnwprintf""... $ac_c" 1>&6 -echo "configure:16501: checking for _vsnwprintf" >&5 +echo "configure:17070: checking for _vsnwprintf" >&5 cat > conftest.$ac_ext < int main() { &_vsnwprintf; ; return 0; } EOF -if { (eval echo configure:16510: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:17079: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF @@ -16558,7 +17127,7 @@ fi echo $ac_n "checking for iconv""... $ac_c" 1>&6 -echo "configure:16562: checking for iconv" >&5 +echo "configure:17131: checking for iconv" >&5 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -16566,7 +17135,7 @@ else am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no cat > conftest.$ac_ext < #include @@ -16576,7 +17145,7 @@ iconv_t cd = iconv_open("",""); iconv_close(cd); ; return 0; } EOF -if { (eval echo configure:16580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_func_iconv=yes else @@ -16588,7 +17157,7 @@ rm -f conftest* am_save_LIBS="$LIBS" LIBS="$LIBS -liconv" cat > conftest.$ac_ext < #include @@ -16598,7 +17167,7 @@ iconv_t cd = iconv_open("",""); iconv_close(cd); ; return 0; } EOF -if { (eval echo configure:16602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_lib_iconv=yes am_cv_func_iconv=yes @@ -16619,12 +17188,12 @@ echo "$ac_t""$am_cv_func_iconv" 1>&6 EOF echo $ac_n "checking if iconv needs const""... $ac_c" 1>&6 -echo "configure:16623: checking if iconv needs const" >&5 +echo "configure:17192: checking if iconv needs const" >&5 if eval "test \"`echo '$''{'wx_cv_func_iconv_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -16643,7 +17212,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:16647: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:17216: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_func_iconv_const="no" else @@ -16688,12 +17257,12 @@ if test "$wxUSE_ON_FATAL_EXCEPTION" = "yes" -a "$wxUSE_UNIX" = "yes"; then for ac_func in sigaction do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:16692: checking for $ac_func" >&5 +echo "configure:17261: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -16757,13 +17326,13 @@ cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking for sa_handler type""... $ac_c" 1>&6 -echo "configure:16761: checking for sa_handler type" >&5 +echo "configure:17330: checking for sa_handler type" >&5 if eval "test \"`echo '$''{'wx_cv_type_sa_handler'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -16775,7 +17344,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:16779: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:17348: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_type_sa_handler=int @@ -16812,12 +17381,12 @@ fi for ac_func in mkstemp mktemp do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:16816: checking for $ac_func" >&5 +echo "configure:17385: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -16866,12 +17435,12 @@ done echo $ac_n "checking for statfs""... $ac_c" 1>&6 -echo "configure:16870: checking for statfs" >&5 +echo "configure:17439: checking for statfs" >&5 if eval "test \"`echo '$''{'wx_cv_func_statfs'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:17465: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_func_statfs=yes @@ -16913,34 +17482,31 @@ fi echo "$ac_t""$wx_cv_func_statfs" 1>&6 if test "$wx_cv_func_statfs" = "yes"; then + wx_cv_type_statvfs_t="struct statfs" cat >> confdefs.h <<\EOF #define HAVE_STATFS 1 EOF else echo $ac_n "checking for statvfs""... $ac_c" 1>&6 -echo "configure:16923: checking for statvfs" >&5 +echo "configure:17493: checking for statvfs" >&5 if eval "test \"`echo '$''{'wx_cv_func_statvfs'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < + #include + #include int main() { - long l; - struct statvfs fs; - statvfs("/", &fs); - l = fs.f_bsize; - l += fs.f_blocks; - l += fs.f_bavail; + statvfs("/", NULL); ; return 0; } EOF -if { (eval echo configure:16944: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:17510: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_func_statvfs=yes @@ -16961,25 +17527,126 @@ fi echo "$ac_t""$wx_cv_func_statvfs" 1>&6 if test "$wx_cv_func_statvfs" = "yes"; then - cat >> confdefs.h <<\EOF + + ac_ext=C +# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cxx_cross + + + echo $ac_n "checking for statvfs argument type""... $ac_c" 1>&6 +echo "configure:17541: checking for statvfs argument type" >&5 +if eval "test \"`echo '$''{'wx_cv_type_statvfs_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < + +int main() { + + long l; + statvfs_t fs; + statvfs("/", &fs); + l = fs.f_bsize; + l += fs.f_blocks; + l += fs.f_bavail; + +; return 0; } +EOF +if { (eval echo configure:17562: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + wx_cv_type_statvfs_t=statvfs_t + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + + cat > conftest.$ac_ext < + +int main() { + + long l; + struct statvfs fs; + statvfs("/", &fs); + l = fs.f_bsize; + l += fs.f_blocks; + l += fs.f_bavail; + +; return 0; } +EOF +if { (eval echo configure:17589: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + wx_cv_type_statvfs_t="struct statvfs" + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + + wx_cv_type_statvfs_t="unknown" + + +fi +rm -f conftest* + + +fi +rm -f conftest* + +fi + +echo "$ac_t""$wx_cv_type_statvfs_t" 1>&6 + + ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + + + if test "$wx_cv_type_statvfs_t" != "unknown"; then + cat >> confdefs.h <<\EOF #define HAVE_STATVFS 1 EOF + fi else - echo "configure: warning: wxGetDiskSpace() function won't work without statfs()" 1>&2 + wx_cv_type_statvfs_t="unknown" fi fi +if test "$wx_cv_type_statvfs_t" != "unknown"; then + cat >> confdefs.h <&2 +fi + if test "$wxUSE_SNGLINST_CHECKER" = "yes"; then for ac_func in fcntl flock do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:16978: checking for $ac_func" >&5 +echo "configure:17645: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -17036,12 +17703,12 @@ fi for ac_func in timegm do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:17040: checking for $ac_func" >&5 +echo "configure:17707: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -17092,12 +17759,12 @@ done for ac_func in putenv setenv do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:17096: checking for $ac_func" >&5 +echo "configure:17763: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -17167,12 +17834,12 @@ if test "$HAVE_SOME_SLEEP_FUNC" != 1; then for ac_func in nanosleep do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:17171: checking for $ac_func" >&5 +echo "configure:17838: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -17220,7 +17887,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for nanosleep in -lposix4""... $ac_c" 1>&6 -echo "configure:17224: checking for nanosleep in -lposix4" >&5 +echo "configure:17891: checking for nanosleep in -lposix4" >&5 ac_lib_var=`echo posix4'_'nanosleep | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -17228,7 +17895,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lposix4 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -17267,12 +17934,12 @@ else for ac_func in usleep do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:17271: checking for $ac_func" >&5 +echo "configure:17938: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -17338,12 +18005,12 @@ fi for ac_func in uname gethostname do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:17342: checking for $ac_func" >&5 +echo "configure:18009: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:18037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -17403,12 +18070,12 @@ cross_compiling=$ac_cv_prog_cxx_cross for ac_func in strtok_r do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:17407: checking for $ac_func" >&5 +echo "configure:18074: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:18105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -17471,12 +18138,12 @@ INET_LINK= for ac_func in inet_addr do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:17475: checking for $ac_func" >&5 +echo "configure:18142: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:18170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -17524,7 +18191,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for inet_addr in -lnsl""... $ac_c" 1>&6 -echo "configure:17528: checking for inet_addr in -lnsl" >&5 +echo "configure:18195: checking for inet_addr in -lnsl" >&5 ac_lib_var=`echo nsl'_'inet_addr | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -17532,7 +18199,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:18214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -17562,7 +18229,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for inet_addr in -lresolv""... $ac_c" 1>&6 -echo "configure:17566: checking for inet_addr in -lresolv" >&5 +echo "configure:18233: checking for inet_addr in -lresolv" >&5 ac_lib_var=`echo resolv'_'inet_addr | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -17570,7 +18237,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lresolv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:18252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -17600,7 +18267,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for inet_addr in -lsocket""... $ac_c" 1>&6 -echo "configure:17604: checking for inet_addr in -lsocket" >&5 +echo "configure:18271: checking for inet_addr in -lsocket" >&5 ac_lib_var=`echo socket'_'inet_addr | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -17608,7 +18275,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:18290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -17655,12 +18322,12 @@ done for ac_func in inet_aton do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:17659: checking for $ac_func" >&5 +echo "configure:18326: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:18354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -17708,7 +18375,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for inet_aton in -l$INET_LINK""... $ac_c" 1>&6 -echo "configure:17712: checking for inet_aton in -l$INET_LINK" >&5 +echo "configure:18379: checking for inet_aton in -l$INET_LINK" >&5 ac_lib_var=`echo $INET_LINK'_'inet_aton | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -17716,7 +18383,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l$INET_LINK $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:18398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -17862,18 +18529,18 @@ if test "$TOOLKIT" != "MSW"; then case $flag in none) echo $ac_n "checking whether pthreads work without any flags""... $ac_c" 1>&6 -echo "configure:17866: checking whether pthreads work without any flags" >&5 +echo "configure:18533: checking whether pthreads work without any flags" >&5 ;; -*) echo $ac_n "checking whether pthreads work with $flag""... $ac_c" 1>&6 -echo "configure:17871: checking whether pthreads work with $flag" >&5 +echo "configure:18538: checking whether pthreads work with $flag" >&5 THREADS_CFLAGS="$flag" ;; *) echo $ac_n "checking for the pthreads library -l$flag""... $ac_c" 1>&6 -echo "configure:17877: checking for the pthreads library -l$flag" >&5 +echo "configure:18544: checking for the pthreads library -l$flag" >&5 THREADS_LINK="-l$flag" ;; esac @@ -17884,14 +18551,14 @@ echo "configure:17877: checking for the pthreads library -l$flag" >&5 CFLAGS="$THREADS_CFLAGS $CFLAGS" cat > conftest.$ac_ext < int main() { pthread_create(0,0,0,0); ; return 0; } EOF -if { (eval echo configure:17895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:18562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* THREADS_OK=yes else @@ -17920,10 +18587,14 @@ rm -f conftest* LIBS="$THREADS_LINK $LIBS" echo $ac_n "checking if more special flags are required for pthreads""... $ac_c" 1>&6 -echo "configure:17924: checking if more special flags are required for pthreads" >&5 +echo "configure:18591: checking if more special flags are required for pthreads" >&5 flag=no case "${host}" in - *-aix* | *-freebsd*) + *-aix*) + LDFLAGS="-L/usr/lib/threads $LDFLAGS" + flag="-D_THREAD_SAFE" + ;; + *-freebsd*) flag="-D_THREAD_SAFE" ;; *-hp-hpux* ) @@ -17949,12 +18620,12 @@ echo "configure:17924: checking if more special flags are required for pthreads" for ac_func in thr_setconcurrency do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:17953: checking for $ac_func" >&5 +echo "configure:18624: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:18652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -18006,17 +18677,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:18010: checking for $ac_hdr" >&5 +echo "configure:18681: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:18020: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:18691: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -18044,12 +18715,12 @@ done if test "$ac_cv_header_sched_h" = "yes"; then echo $ac_n "checking for sched_yield""... $ac_c" 1>&6 -echo "configure:18048: checking for sched_yield" >&5 +echo "configure:18719: checking for sched_yield" >&5 if eval "test \"`echo '$''{'ac_cv_func_sched_yield'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:18747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_sched_yield=yes" else @@ -18094,7 +18765,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for sched_yield in -lposix4""... $ac_c" 1>&6 -echo "configure:18098: checking for sched_yield in -lposix4" >&5 +echo "configure:18769: checking for sched_yield in -lposix4" >&5 ac_lib_var=`echo posix4'_'sched_yield | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -18102,7 +18773,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lposix4 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:18788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -18146,12 +18817,12 @@ fi HAVE_PRIOR_FUNCS=0 echo $ac_n "checking for pthread_attr_getschedpolicy""... $ac_c" 1>&6 -echo "configure:18150: checking for pthread_attr_getschedpolicy" >&5 +echo "configure:18821: checking for pthread_attr_getschedpolicy" >&5 if eval "test \"`echo '$''{'ac_cv_func_pthread_attr_getschedpolicy'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:18849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_pthread_attr_getschedpolicy=yes" else @@ -18189,12 +18860,12 @@ fi if eval "test \"`echo '$ac_cv_func_'pthread_attr_getschedpolicy`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for pthread_attr_setschedparam""... $ac_c" 1>&6 -echo "configure:18193: checking for pthread_attr_setschedparam" >&5 +echo "configure:18864: checking for pthread_attr_setschedparam" >&5 if eval "test \"`echo '$''{'ac_cv_func_pthread_attr_setschedparam'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:18892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_pthread_attr_setschedparam=yes" else @@ -18232,17 +18903,15 @@ fi if eval "test \"`echo '$ac_cv_func_'pthread_attr_setschedparam`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for sched_get_priority_max""... $ac_c" 1>&6 -echo "configure:18236: checking for sched_get_priority_max" >&5 +echo "configure:18907: checking for sched_get_priority_max" >&5 if eval "test \"`echo '$''{'ac_cv_func_sched_get_priority_max'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 -which can conflict with char sched_get_priority_max(); below. */ +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char sched_get_priority_max(); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -18262,7 +18931,7 @@ sched_get_priority_max(); ; return 0; } EOF -if { (eval echo configure:18266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:18935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_sched_get_priority_max=yes" else @@ -18280,7 +18949,7 @@ if eval "test \"`echo '$ac_cv_func_'sched_get_priority_max`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for sched_get_priority_max in -lposix4""... $ac_c" 1>&6 -echo "configure:18284: checking for sched_get_priority_max in -lposix4" >&5 +echo "configure:18953: checking for sched_get_priority_max in -lposix4" >&5 ac_lib_var=`echo posix4'_'sched_get_priority_max | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -18288,7 +18957,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lposix4 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:18972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -18331,6 +19000,8 @@ else fi +else + echo "$ac_t""no" 1>&6 fi @@ -18344,12 +19015,12 @@ EOF fi echo $ac_n "checking for pthread_cancel""... $ac_c" 1>&6 -echo "configure:18348: checking for pthread_cancel" >&5 +echo "configure:19019: checking for pthread_cancel" >&5 if eval "test \"`echo '$''{'ac_cv_func_pthread_cancel'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:19047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_pthread_cancel=yes" else @@ -18397,13 +19068,13 @@ fi echo $ac_n "checking for pthread_cleanup_push/pop""... $ac_c" 1>&6 -echo "configure:18401: checking for pthread_cleanup_push/pop" >&5 +echo "configure:19072: checking for pthread_cleanup_push/pop" >&5 if eval "test \"`echo '$''{'wx_cv_func_pthread_cleanup_push'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -18413,7 +19084,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:18417: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:19088: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_func_pthread_cleanup_push=yes @@ -18441,13 +19112,13 @@ EOF echo $ac_n "checking for pthread_mutexattr_t""... $ac_c" 1>&6 -echo "configure:18445: checking for pthread_mutexattr_t" >&5 +echo "configure:19116: checking for pthread_mutexattr_t" >&5 if eval "test \"`echo '$''{'wx_cv_type_pthread_mutexattr_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -18457,7 +19128,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:18461: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:19132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_type_pthread_mutexattr_t=yes @@ -18484,13 +19155,13 @@ EOF else echo $ac_n "checking for PTHREAD_RECURSIVE_MUTEX_INITIALIZER""... $ac_c" 1>&6 -echo "configure:18488: checking for PTHREAD_RECURSIVE_MUTEX_INITIALIZER" >&5 +echo "configure:19159: checking for PTHREAD_RECURSIVE_MUTEX_INITIALIZER" >&5 if eval "test \"`echo '$''{'wx_cv_type_pthread_rec_mutex_init'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -18499,7 +19170,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:18503: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:19174: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_type_pthread_rec_mutex_init=yes @@ -18534,7 +19205,7 @@ else case "${host}" in *-*-mingw32* ) echo $ac_n "checking if compiler supports -mthreads""... $ac_c" 1>&6 -echo "configure:18538: checking if compiler supports -mthreads" >&5 +echo "configure:19209: checking if compiler supports -mthreads" >&5 if eval "test \"`echo '$''{'wx_cv_cflags_mthread'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -18542,14 +19213,14 @@ else CFLAGS_OLD="$CFLAGS" CFLAGS="$CFLAGS -mthreads" cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:19224: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_cflags_mthread=yes else @@ -18588,7 +19259,7 @@ EOF else if test "$ac_cv_func_strtok_r" = "yes"; then echo $ac_n "checking if -D_REENTRANT is needed""... $ac_c" 1>&6 -echo "configure:18592: checking if -D_REENTRANT is needed" >&5 +echo "configure:19263: checking if -D_REENTRANT is needed" >&5 if test "$NEEDS_D_REENTRANT_FOR_R_FUNCS" = 1; then TOOLCHAIN_DEFS="${TOOLCHAIN_DEFS} -D_REENTRANT" echo "$ac_t""yes" 1>&6 @@ -18688,10 +19359,13 @@ if test "$GCC" = "yes" ; then CODE_GEN_FLAGS="$CODE_GEN_FLAGS -fno-pcc-struct-return" fi - case "${host}" in + case "${host}" in powerpc*-*-aix* ) CODE_GEN_FLAGS="$CODE_GEN_FLAGS -mminimal-toc" ;; + *-hppa* ) + CODE_GEN_FLAGS="$CODE_GEN_FLAGS -ffunction-sections" + ;; esac fi @@ -18973,12 +19647,12 @@ if test "$wxUSE_DATETIME" = "yes"; then for ac_func in strptime do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:18977: checking for $ac_func" >&5 +echo "configure:19651: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:19679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -19027,13 +19701,13 @@ done echo $ac_n "checking for timezone variable in ""... $ac_c" 1>&6 -echo "configure:19031: checking for timezone variable in " >&5 +echo "configure:19705: checking for timezone variable in " >&5 if eval "test \"`echo '$''{'wx_cv_var_timezone'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -19045,7 +19719,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:19049: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:19723: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_var_timezone=timezone @@ -19056,7 +19730,7 @@ else rm -rf conftest* cat > conftest.$ac_ext < @@ -19068,7 +19742,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:19072: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:19746: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_var_timezone=_timezone @@ -19079,7 +19753,7 @@ else rm -rf conftest* cat > conftest.$ac_ext < @@ -19091,7 +19765,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:19095: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:19769: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_var_timezone=__timezone @@ -19132,12 +19806,12 @@ EOF for ac_func in localtime do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:19136: checking for $ac_func" >&5 +echo "configure:19810: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:19838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -19187,13 +19861,13 @@ done if test "$ac_cv_func_localtime" = "yes"; then echo $ac_n "checking for tm_gmtoff in struct tm""... $ac_c" 1>&6 -echo "configure:19191: checking for tm_gmtoff in struct tm" >&5 +echo "configure:19865: checking for tm_gmtoff in struct tm" >&5 if eval "test \"`echo '$''{'wx_cv_struct_tm_has_gmtoff'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -19205,7 +19879,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:19209: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:19883: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_struct_tm_has_gmtoff=yes @@ -19234,12 +19908,12 @@ EOF for ac_func in gettimeofday ftime do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:19238: checking for $ac_func" >&5 +echo "configure:19912: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:19940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -19289,7 +19963,7 @@ done if test "$ac_cv_func_gettimeofday" = "yes"; then echo $ac_n "checking whether gettimeofday takes two arguments""... $ac_c" 1>&6 -echo "configure:19293: checking whether gettimeofday takes two arguments" >&5 +echo "configure:19967: checking whether gettimeofday takes two arguments" >&5 if eval "test \"`echo '$''{'wx_cv_func_gettimeofday_has_2_args'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -19304,7 +19978,7 @@ cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext < @@ -19317,7 +19991,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:19321: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:19995: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_func_gettimeofday_has_2_args=yes else @@ -19325,7 +19999,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext < @@ -19338,7 +20012,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:19342: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:20016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_func_gettimeofday_has_2_args=no else @@ -19393,12 +20067,12 @@ fi if test "$wxUSE_SOCKETS" = "yes"; then if test "$TOOLKIT" != "MSW"; then echo $ac_n "checking for socket""... $ac_c" 1>&6 -echo "configure:19397: checking for socket" >&5 +echo "configure:20071: checking for socket" >&5 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:20099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_socket=yes" else @@ -19439,7 +20113,7 @@ if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 -echo "configure:19443: checking for socket in -lsocket" >&5 +echo "configure:20117: checking for socket in -lsocket" >&5 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -19447,7 +20121,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:20136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -19494,7 +20168,7 @@ fi if test "$wxUSE_SOCKETS" = "yes" ; then if test "$TOOLKIT" != "MSW"; then echo $ac_n "checking what is the type of the third argument of getsockname""... $ac_c" 1>&6 -echo "configure:19498: checking what is the type of the third argument of getsockname" >&5 +echo "configure:20172: checking what is the type of the third argument of getsockname" >&5 if eval "test \"`echo '$''{'wx_cv_type_getsockname3'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -19509,7 +20183,7 @@ cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext < @@ -19522,7 +20196,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:19526: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:20200: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_type_getsockname3=socklen_t else @@ -19530,7 +20204,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext < @@ -19543,7 +20217,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:19547: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:20221: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_type_getsockname3=size_t else @@ -19551,7 +20225,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext < @@ -19564,7 +20238,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:19568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:20242: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_type_getsockname3=int else @@ -19636,17 +20310,17 @@ if test "$wxUSE_GUI" = "yes"; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:19640: checking for $ac_hdr" >&5 +echo "configure:20314: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:19650: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:20324: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -19700,12 +20374,12 @@ if test "$TOOLKIT" != "MSW"; then for ac_func in dlopen do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:19704: checking for $ac_func" >&5 +echo "configure:20378: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:20406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -19756,7 +20430,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:19760: checking for dlopen in -ldl" >&5 +echo "configure:20434: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -19764,7 +20438,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:20453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -19804,12 +20478,12 @@ else for ac_func in shl_load do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:19808: checking for $ac_func" >&5 +echo "configure:20482: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:20510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -19860,7 +20534,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dld in -lshl_load""... $ac_c" 1>&6 -echo "configure:19864: checking for dld in -lshl_load" >&5 +echo "configure:20538: checking for dld in -lshl_load" >&5 ac_lib_var=`echo shl_load'_'dld | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -19868,7 +20542,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lshl_load $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:20557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -19918,12 +20592,12 @@ done for ac_func in dlerror do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:19922: checking for $ac_func" >&5 +echo "configure:20596: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:20624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -19971,7 +20645,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dlerror in -ldl""... $ac_c" 1>&6 -echo "configure:19975: checking for dlerror in -ldl" >&5 +echo "configure:20649: checking for dlerror in -ldl" >&5 ac_lib_var=`echo dl'_'dlerror | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -19979,7 +20653,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:20668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -20065,7 +20739,7 @@ EOF if test "$wxUSE_MSW" = 1 -a "$wxUSE_UNICODE_MSLU" = "yes"; then echo $ac_n "checking for main in -lunicows""... $ac_c" 1>&6 -echo "configure:20069: checking for main in -lunicows" >&5 +echo "configure:20743: checking for main in -lunicows" >&5 ac_lib_var=`echo unicows'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -20073,14 +20747,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lunicows $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:20758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -20228,17 +20902,21 @@ if test "$wxUSE_PROLOGIO" = "yes" ; then #define wxUSE_PROLOGIO 1 EOF + ALL_OBJECTS="$ALL_OBJECTS parser.o" fi if test "$wxUSE_RESOURCES" = "yes" ; then if test "$wxUSE_NANOX" = "yes"; then echo "configure: warning: Cannot use resource database functions in NanoX" 1>&2 - else - cat >> confdefs.h <<\EOF + else + cat >> confdefs.h <<\EOF #define wxUSE_RESOURCES 1 EOF - SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS resource" + SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS resource" + fi + if test "$wxUSE_PROLOGIO" != "yes" ; then + ALL_OBJECTS="$ALL_OBJECTS parser.o" fi fi @@ -20258,17 +20936,17 @@ if test "$wxUSE_MSW" = 1 -a \( "$wxUSE_DATAOBJ" = "yes" \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:20262: checking for $ac_hdr" >&5 +echo "configure:20940: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:20272: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:20950: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -20307,9 +20985,9 @@ cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking if g++ requires -fvtable-thunks""... $ac_c" 1>&6 -echo "configure:20311: checking if g++ requires -fvtable-thunks" >&5 +echo "configure:20989: checking if g++ requires -fvtable-thunks" >&5 cat > conftest.$ac_ext < #include @@ -20317,7 +20995,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:20321: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:20999: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""no" 1>&6 else @@ -20378,17 +21056,17 @@ if test "$wxUSE_WINE" = 1 -a \( "$wxUSE_DATAOBJ" = "yes" \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:20382: checking for $ac_hdr" >&5 +echo "configure:21060: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:20392: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:21070: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -20427,9 +21105,9 @@ cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking if g++ requires -fvtable-thunks""... $ac_c" 1>&6 -echo "configure:20431: checking if g++ requires -fvtable-thunks" >&5 +echo "configure:21109: checking if g++ requires -fvtable-thunks" >&5 cat > conftest.$ac_ext < #include @@ -20437,7 +21115,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:20441: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:21119: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""no" 1>&6 else @@ -21281,7 +21959,249 @@ if test "$wxUSE_MAC" = 1 ; then fi -LIBS="$ZLIB_LINK $POSIX4_LINK $INET_LINK $WCHAR_LINK $DL_LINK -lm $LIBS" +LIBS="$ZLIB_LINK $POSIX4_LINK $INET_LINK $WCHAR_LINK $DL_LINK $LIBS" + +have_cos=0 +have_floor=0 +for ac_func in cos +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:21970: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:21998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in floor +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:22025: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:22053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +echo $ac_n "checking if floating point functions link without -lm""... $ac_c" 1>&6 +echo "configure:22078: checking if floating point functions link without -lm" >&5 +if test "$have_cos" = 1 -a "$have_floor" = 1; then + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 + LIBS="$LIBS -lm" + # use different functions to avoid configure caching + have_sin=0 + have_ceil=0 + for ac_func in sin +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:22090: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:22118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + + for ac_func in ceil +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:22145: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:22173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + + echo $ac_n "checking if floating point functions link with -lm""... $ac_c" 1>&6 +echo "configure:22198: checking if floating point functions link with -lm" >&5 + if test "$have_sin" = 1 -a "$have_ceil" = 1; then + echo "$ac_t""yes" 1>&6 + else + echo "$ac_t""no" 1>&6 + # not sure we should warn the user, crash, etc. + fi +fi if test "$wxUSE_GUI" = "yes"; then @@ -21290,7 +22210,7 @@ if test "$wxUSE_GUI" = "yes"; then SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS artprov controls dialogs \ drawing dynamic erase event exec font image \ - minimal propsize rotate widgets" + minimal propsize rotate shaped widgets" CPPFLAGS="$CPPFLAGS \$(EXTRADEFS) \$(APPEXTRADEFS)" else @@ -21415,6 +22335,11 @@ SAMPLES_SUBDIRS="`echo $SAMPLES_SUBDIRS | tr -s ' ' | tr ' ' '\n' | sort | uniq + + + + + @@ -21422,7 +22347,7 @@ SAMPLES_SUBDIRS="`echo $SAMPLES_SUBDIRS | tr -s ' ' | tr ' ' '\n' | sort | uniq echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:21426: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:22351: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -21462,9 +22387,16 @@ wx_cv_program_ext=$PROGRAM_EXT wx_cv_target_library=$WX_TARGET_LIBRARY wx_cv_target_library_gl=$WX_TARGET_LIBRARY_GL wx_cv_target_libtype=$WX_TARGET_LIBRARY_TYPE +wx_cv_library_basename=${WX_LIBRARY_BASENAME} +wx_cv_release=${WX_RELEASE} +wx_cv_current=${WX_CURRENT} +wx_cv_revision=${WX_REVISION} +wx_cv_age=${WX_AGE} export wx_cv_path_samplesubdirs wx_cv_if_gnu_make \ wx_cv_path_ifs wx_cv_program_ext \ - wx_cv_target_library wx_cv_target_library_gl wx_cv_target_libtype + wx_cv_target_library wx_cv_target_library_gl wx_cv_target_libtype \ + wx_cv_library_basename wx_cv_release wx_cv_current wx_cv_revision wx_cv_age + subdirs="demos samples utils contrib" @@ -21572,6 +22504,7 @@ ac_given_INSTALL="$INSTALL" trap 'rm -fr `echo " wx-config + version-script src/make.env src/makeprog.env src/makelib.env @@ -21648,6 +22581,10 @@ s%@X_CFLAGS@%$X_CFLAGS%g s%@X_PRE_LIBS@%$X_PRE_LIBS%g s%@X_LIBS@%$X_LIBS%g s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g +s%@PANGOX_CFLAGS@%$PANGOX_CFLAGS%g +s%@PANGOX_LIBS@%$PANGOX_LIBS%g +s%@PANGOXFT_CFLAGS@%$PANGOXFT_CFLAGS%g +s%@PANGOXFT_LIBS@%$PANGOXFT_LIBS%g s%@AIX_CXX_LD@%$AIX_CXX_LD%g s%@RESCOMP@%$RESCOMP%g s%@DEREZ@%$DEREZ%g @@ -21659,6 +22596,7 @@ s%@WX_MINOR_VERSION_NUMBER@%$WX_MINOR_VERSION_NUMBER%g s%@WX_RELEASE_NUMBER@%$WX_RELEASE_NUMBER%g s%@WX_LIBRARY_NAME_STATIC@%$WX_LIBRARY_NAME_STATIC%g s%@WX_LIBRARY_NAME_SHARED@%$WX_LIBRARY_NAME_SHARED%g +s%@WX_LIBRARY_BASENAME@%$WX_LIBRARY_BASENAME%g s%@WX_LIBRARY_IMPORTLIB@%$WX_LIBRARY_IMPORTLIB%g s%@WX_TARGET_LIBRARY@%$WX_TARGET_LIBRARY%g s%@WX_LIBRARY_LINK1@%$WX_LIBRARY_LINK1%g @@ -21683,6 +22621,7 @@ s%@STATIC_FLAG@%$STATIC_FLAG%g s%@WXDEBUG_DEFINE@%$WXDEBUG_DEFINE%g s%@USE_GUI@%$USE_GUI%g s%@AFMINSTALL@%$AFMINSTALL%g +s%@WIN32INSTALL@%$WIN32INSTALL%g s%@TOOLKIT@%$TOOLKIT%g s%@TOOLKIT_DIR@%$TOOLKIT_DIR%g s%@TOOLKIT_VPATH@%$TOOLKIT_VPATH%g @@ -21705,10 +22644,12 @@ s%@PORT_FILES@%$PORT_FILES%g s%@DISTDIR@%$DISTDIR%g s%@SAMPLES_SUBDIRS@%$SAMPLES_SUBDIRS%g s%@LDFLAGS_GL@%$LDFLAGS_GL%g +s%@LDFLAGS_VERSIONING@%$LDFLAGS_VERSIONING%g s%@LDFLAGS_EXE@%$LDFLAGS_EXE%g s%@OPENGL_LIBS@%$OPENGL_LIBS%g s%@DMALLOC_LIBS@%$DMALLOC_LIBS%g s%@EXTRADEFS@%$EXTRADEFS%g +s%@WX_VERSION_TAG@%$WX_VERSION_TAG%g s%@RESFLAGS@%$RESFLAGS%g s%@RESPROGRAMOBJ@%$RESPROGRAMOBJ%g s%@WX_RESOURCES_MACOSX_ASCII@%$WX_RESOURCES_MACOSX_ASCII%g @@ -21717,6 +22658,7 @@ s%@MACOSX_BUNDLE@%$MACOSX_BUNDLE%g s%@LIBWXMACRES@%$LIBWXMACRES%g s%@LIBWXMACRESCOMP@%$LIBWXMACRESCOMP%g s%@LIBWXMACRESWXCONFIG@%$LIBWXMACRESWXCONFIG%g +s%@GCC@%$GCC%g s%@DLLTOOL@%$DLLTOOL%g s%@AS@%$AS%g s%@NM@%$NM%g @@ -21767,6 +22709,7 @@ EOF cat >> $CONFIG_STATUS < reports that the shared - dnl libraries under AIX have the same suffix as the normal ones + dnl quoting from http://www-1.ibm.com/servers/esdd/articles/gnu.html: + dnl + dnl Both archive libraries and shared libraries on AIX have an .a + dnl extension. This will explain why you can't link with an .so and + dnl why it works with the name changed to .a. SO_SUFFIX=a AC_DEFINE(__AIX__) AC_DEFINE(__SYSV__) @@ -552,8 +555,8 @@ else DEFAULT_wxUSE_DOC_VIEW_ARCHITECTURE=yes DEFAULT_wxUSE_PRINTING_ARCHITECTURE=yes - DEFAULT_wxUSE_PROLOGIO=yes - DEFAULT_wxUSE_RESOURCES=yes + DEFAULT_wxUSE_PROLOGIO=no + DEFAULT_wxUSE_RESOURCES=no DEFAULT_wxUSE_CONSTRAINTS=yes DEFAULT_wxUSE_IPC=yes DEFAULT_wxUSE_HELP=yes @@ -1127,27 +1130,6 @@ else AC_MSG_RESULT(base ($host_alias hosted) only) fi -dnl --------------------------------------------------------------------------- -dnl When we are using gcc on OS/2, we want to be either using resources (PM) -dnl or a more complete POSIX emulation for Motif/GTK+/X11 -dnl --------------------------------------------------------------------------- -dnl (OS/2-only piece) -case "${host}" in - *-pc-os2_emx | *-pc-os2-emx ) - dnl Explicitly link -lstdcpp, since we are using "gcc" not "g++"/"c++". - LIBS="$LIBS -lstdcpp" - if test "$wxUSE_MOTIF" = 1 -o "$wxUSE_GTK" = 1 -o "$wxUSE_X11" = 1; then - dnl More complete Unix emulation for unix-like ports - dnl by linking in POSIX/2's cExt (if available). - AC_CHECK_LIB(cExt, drand48, LIBS="$LIBS -lcExt") - else - dnl Include resources for the "native" port (wxPM). - RESPROGRAMOBJ="\${top_srcdir}/include/wx/os2/wx.res" - fi - ;; -esac -dnl (end of OS/2-only piece) - dnl --------------------------------------------------------------------------- dnl When we are using Cygwin with Motif/GTK+, we want it to appear like dnl 'just' a POSIX platform, so the Win32 API must not be available @@ -1223,7 +1205,7 @@ dnl defines GCC empty if not using gcc dnl defines CFLAGS dnl dnl this magic incantation is needed to prevent AC_PROG_CC from setting the -dnl default CFLAGS (something like "-g -O2") - we don't need this as add +dnl default CFLAGS (something like "-g -O2") -- we don't need this as we add dnl -g and -O flags ourselves below CFLAGS=${CFLAGS:=} AC_PROG_CC @@ -1259,10 +1241,13 @@ dnl install checks dnl defines INSTALL with the appropriate command AC_PROG_INSTALL -dnl make install path absolute (if not already); will fail with MSDOS paths +dnl make install path absolute (if not already); +dnl will fail with (some) MSDOS paths case ${INSTALL} in /* ) # Absolute ;; + ?:* ) # Drive letter, considered as absolute. + ;; *) INSTALL=`pwd`/${INSTALL} ;; esac @@ -1357,6 +1342,27 @@ AC_PROG_LEX dnl needed for making link to setup.h AC_PROG_LN_S +dnl --------------------------------------------------------------------------- +dnl When we are using gcc on OS/2, we want to be either using resources (PM) +dnl or a more complete POSIX emulation for Motif/GTK+/X11 +dnl --------------------------------------------------------------------------- +dnl (OS/2-only piece) +case "${host}" in + *-pc-os2_emx | *-pc-os2-emx ) + dnl Explicitly link -lstdcpp, since we are using "gcc" not "g++"/"c++". + LIBS="$LIBS -lstdcpp" + if test "$wxUSE_MOTIF" = 1 -o "$wxUSE_GTK" = 1 -o "$wxUSE_X11" = 1; then + dnl More complete Unix emulation for unix-like ports + dnl by linking in POSIX/2's cExt (if available). + AC_CHECK_LIB(cExt, drand48, LIBS="$LIBS -lcExt") + else + dnl Include resources for the "native" port (wxPM). + RESPROGRAMOBJ="\${top_srcdir}/include/wx/os2/wx.res" + fi + ;; +esac +dnl (end of OS/2-only piece) + dnl ------------------------------------------------------------------------ dnl Check for headers dnl ------------------------------------------------------------------------ @@ -1394,6 +1400,15 @@ fi dnl defines HAVE_LANGINFO_H (GNU libc locale parameters) AC_CHECK_HEADERS(langinfo.h) +case "${host}" in + *-pc-os2_emx | *-pc-os2-emx ) + dnl Explicitly link -lintl if langinfo.h is available. + if test $ac_cv_header_langinfo_h = "yes"; then + LIBS="$LIBS -lintl" + fi + ;; +esac + if test "$wxUSE_GUI" = "yes"; then if test "$wxUSE_UNIX" = "yes"; then dnl defines HAVE_X11_XKBLIB_H @@ -1441,6 +1456,10 @@ AC_CACHE_CHECK([size of wchar_t], wx_cv_sizeof_wchar_t, [ AC_TRY_RUN( [ + /* DJGPP only has fake wchar_t: */ + #ifdef __DJGPP__ + # error "fake wchar_t" + #endif #ifdef HAVE_WCHAR_H # ifdef __CYGWIN__ # include @@ -1461,7 +1480,16 @@ AC_CACHE_CHECK([size of wchar_t], wx_cv_sizeof_wchar_t, ], wx_cv_sizeof_wchar_t=`cat conftestval`, wx_cv_sizeof_wchar_t=0, - wx_cv_sizeof_wchar_t=4 + [ + case "${host}" in + *-pc-msdosdjgpp ) + wx_cv_sizeof_wchar_t=0 + ;; + * ) + wx_cv_sizeof_wchar_t=4 + ;; + esac + ] ) ]) @@ -1501,13 +1529,9 @@ dnl Define search path for includes and libraries: all headers and libs will be dnl looked for in all directories of this path dnl --------------------------------------------------------------------------- -dnl notice that /usr/include should not be in this list, otherwise it breaks -dnl compilation on Solaris/gcc because standard headers are included instead -dnl of the gcc ones. (recorrection.. sadly much depends on this since it was -dnl first created and then 'corrected'.. removing /usr/include means system -dnl GL and Xpm libs will dnl not be found on linux and probably other platforms -dnl now. We need to correct that first before removing /usr/include again. -dnl see the various (ab)uses of WX_PATH_FIND_LIBRARIES below ) +dnl Notice that /usr/include should *not* be in this list, otherwise it breaks +dnl compilation on Solaris/AIX/... with gcc because standard (non ANSI C) +dnl headers are included instead of the "fixed" (ANSI-fied) gcc ones. dnl dnl Also try to put all directories which may contain X11R6 before those which dnl may contain X11R5/4 - we want to use R6 on machines which have both! @@ -1574,8 +1598,7 @@ SEARCH_INCLUDE="\ /usr/local/x11r5/include \ /usr/lpp/Xamples/include \ \ - /usr/openwin/share/include \ - /usr/include" + /usr/openwin/share/include" SEARCH_LIB="`echo "$SEARCH_INCLUDE" | sed s/include/lib/g` " @@ -1656,7 +1679,7 @@ if test "$wxUSE_REGEX" != "no"; then if test "$wxUSE_REGEX" = "sys" -o "$wxUSE_REGEX" = "yes" ; then dnl according to Unix 98 specs, regcomp() is in libc but I believe that dnl on some old systems it may be in libregex - check for it too? - AC_CHECK_HEADER(regex.h, AC_CHECK_FUNCS(regcomp)) + AC_CHECK_HEADER(regex.h, [AC_CHECK_FUNCS(regcomp)]) if test "x$ac_cv_func_regcomp" != "xyes"; then if test "$wxUSE_REGEX" = "sys" ; then @@ -1686,13 +1709,58 @@ if test "$wxUSE_ZLIB" != "no" ; then AC_DEFINE(wxUSE_ZLIB) if test "$wxUSE_ZLIB" = "sys" -o "$wxUSE_ZLIB" = "yes" ; then - AC_CHECK_HEADER(zlib.h, AC_CHECK_LIB(z, deflate, ZLIB_LINK=" -lz")) + dnl don't test for zlib under Mac -- its verson there is 1.1.3 but we + dnl should still use it because hopefully (can someone confirm this?) + dnl Apple did fix the security problem in it and not using the system + dnl library results in a whole bunch of warnings when linking with + dnl Carbon framework + if test "$USE_DARWIN" = 1; then + system_zlib_h_ok="yes" + else + dnl we have troubles with ancient zlib versions (e.g. 1.0.4 is + dnl known to not work) and although I don't know which is + dnl the minimal required version it's safer to test for 1.1.4 as + dnl it fixes a security problem in 1.1.3 -- and hopefully nobody + dnl has anything more ancient (1.1.3 was released in July 1998) + dnl anyhow + AC_CACHE_CHECK([for zlib.h >= 1.1.4], ac_cv_header_zlib_h, + [AC_TRY_RUN( + dnl zlib.h defines ZLIB_VERSION="x.y.z" + [ + #include + #include + + int main() + { + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); + fprintf(f, "%s", + ZLIB_VERSION[0] == '1' && + (ZLIB_VERSION[2] > '1' || + (ZLIB_VERSION[2] == '1' && + ZLIB_VERSION[4] >= '4')) ? "yes" : "no"); + exit(0); + } + ], + ac_cv_header_zlib_h=`cat conftestval`, + ac_cv_header_zlib_h=no, + dnl cross-compiling: test if we have any zlib.h + [AC_CHECK_HEADER(zlib.h)] + )] + ) + + system_zlib_h_ok=$ac_cv_header_zlib_h + fi + + if test "$system_zlib_h_ok" = "yes"; then + AC_CHECK_LIB(z, deflate, ZLIB_LINK=" -lz") + fi if test "x$ZLIB_LINK" = "x" ; then if test "$wxUSE_ZLIB" = "sys" ; then - AC_MSG_ERROR([system zlib compression library not found! Use --with-zlib=builtin to use built-in version]) + AC_MSG_ERROR([zlib library not found or too old! Use --with-zlib=builtin to use built-in version]) else - AC_MSG_WARN([system zlib compression library not found, will use built-in instead]) + AC_MSG_WARN([zlib library not found or too old, will use built-in instead]) wxUSE_ZLIB=builtin fi else @@ -1731,23 +1799,45 @@ if test "$wxUSE_LIBPNG" != "no" ; then if test "$wxUSE_MGL" != 1 ; then dnl Don't check for libpng when building wxMGL, libmgl contains it if test "$wxUSE_LIBPNG" = "sys" -o "$wxUSE_LIBPNG" = "yes" ; then - AC_CHECK_HEADER(png.h, - AC_CHECK_LIB(png, png_check_sig, - PNG_LINK=" -lpng", - , - [-lz -lm]) - ) + dnl libpng version 0.9 is known to not work, if an even newer + dnl version is required, just bump it up in the test below + AC_CACHE_CHECK([for png.h > 0.90], ac_cv_header_png_h, + [AC_TRY_RUN( + dnl png.h defines PNG_LIBPNG_VER=number + [ + #include + #include + + int main() + { + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); + fprintf(f, "%s", + PNG_LIBPNG_VER > 90 ? "yes" : "no"); + exit(0); + } + ], + ac_cv_header_png_h=`cat conftestval`, + ac_cv_header_png_h=no, + dnl cross-compiling: test if we have any png.h + [AC_CHECK_HEADER(png.h)] + )] + ) + + if test "$ac_cv_header_png_h" = "yes"; then + AC_CHECK_LIB(png, png_check_sig, PNG_LINK=" -lpng", , [-lz -lm]) + fi if test "x$PNG_LINK" = "x" ; then if test "$wxUSE_LIBPNG" = "sys" ; then - AC_MSG_ERROR([system png library not found! Use --with-libpng=builtin to use built-in version]) + AC_MSG_ERROR([system png library not found or too old! Use --with-libpng=builtin to use built-in version]) else - AC_MSG_WARN([system png library not found, will use built-in instead]) + AC_MSG_WARN([system png library not found or too old, will use built-in instead]) wxUSE_LIBPNG=builtin fi else dnl we are using the system library - wxUSE_LIBPNG=yes + wxUSE_LIBPNG=sys fi fi fi @@ -1824,15 +1914,24 @@ dnl ------------------------------------------------------------------------ TIFF_INCLUDE= TIFF_LINK= +TIFF_PREREQ_LINKS=-lm if test "$wxUSE_LIBTIFF" != "no" ; then AC_DEFINE(wxUSE_LIBTIFF) if test "$wxUSE_LIBTIFF" = "sys" -o "$wxUSE_LIBTIFF" = "yes" ; then + dnl libtiff may depend on libjpeg and libz so use them in the test + dnl below or it would fail + if test "$wxUSE_LIBJPEG" = "sys"; then + TIFF_PREREQ_LINKS="$TIFF_PREREQ_LINKS $JPEG_LINK" + fi + if test "$wxUSE_ZLIB" = "sys"; then + TIFF_PREREQ_LINKS="$TIFF_PREREQ_LINKS $ZLIB_LINK" + fi AC_CHECK_HEADER(tiffio.h, AC_CHECK_LIB(tiff, TIFFError, TIFF_LINK=" -ltiff", , - -lm) + $TIFF_PREREQ_LINKS) ) if test "x$TIFF_LINK" = "x" ; then @@ -1858,6 +1957,7 @@ dnl search for toolkit (widget sets) dnl ---------------------------------------------------------------- AFMINSTALL= +WIN32INSTALL= TOOLKIT= TOOLKIT_INCLUDE= @@ -1913,6 +2013,9 @@ if test "$USE_WIN32" = 1 ; then RESFLAGS="--include-dir \$(top_srcdir)/include --include-dir \$(top_srcdir)/\$(program_dir) --define __WIN32__ --define __WIN95__ --define __GNUWIN32__" RESPROGRAMOBJ="\$(PROGRAM)_resources.o" + + dnl install Win32-specific files in "make install" + WIN32INSTALL=win32install fi if test "$USE_DARWIN" = 1; then @@ -1965,17 +2068,17 @@ if test "$wxUSE_GUI" = "yes"; then GTK_MODULES=gthread fi + dnl note that if we fail to find GTK2 we abort and don't fall + dnl back to GTK1.x wx_cv_lib_gtk= if test "x$wxUSE_GTK2" = "xyes"; then AM_PATH_GTK_2_0(2.0.0, wx_cv_lib_gtk=2.0, , $GTK_MODULES) - fi - - if test -z "$wx_cv_lib_gtk"; then + else AM_PATH_GTK(1.2.7, wx_cv_lib_gtk=1.2.7, , $GTK_MODULES) - fi - if test -z "$wx_cv_lib_gtk"; then - AM_PATH_GTK(1.2.3, wx_cv_lib_gtk=1.2.3, , $GTK_MODULES) + if test -z "$wx_cv_lib_gtk"; then + AM_PATH_GTK(1.2.3, wx_cv_lib_gtk=1.2.3, , $GTK_MODULES) + fi fi if test -z "$wx_cv_lib_gtk"; then @@ -1998,6 +2101,7 @@ if test "$wxUSE_GUI" = "yes"; then case "$wx_cv_lib_gtk" in 2.0) WXGTK20=1 + TOOLKIT_VERSION=2 ;; 1.2.7) WXGTK127=1 WXGTK12=1 @@ -2026,6 +2130,17 @@ equivalent variable and GTK+ is version 1.2.3 or above. ] ) fi + else + if test "$wxUSE_UNICODE" = "yes"; then + AC_MSG_WARN([Unicode configuration not supported with GTK+ 1.x]) + wxUSE_UNICODE=no + fi + fi + + dnl we need poll() in src/gtk/app.cpp (we know that Darwin doesn't + dnl have it but we do the check for the others) + if test "$USE_DARWIN" != 1; then + AC_CHECK_FUNCS(poll) fi TOOLKIT_INCLUDE="$wx_cv_cflags_gtk" @@ -2048,35 +2163,51 @@ equivalent variable and GTK+ is version 1.2.3 or above. AC_MSG_RESULT($MGL_ROOT) fi + AC_MSG_CHECKING(for libmgl location) dnl Find MGL library that we want dnl FIXME_MGL - test for MGL variants for freebsd etc. case "${host}" in *-*-linux* ) - mgl_os=linux/gcc/glibc + if test "x$wxUSE_SHARED" = xyes ; then + mgl_os_candidates="linux/gcc/glibc.so linux/gcc/glibc" + else + mgl_os_candidates="linux/gcc/glibc linux/gcc/glibc.so" + fi ;; *-pc-msdosdjgpp ) - mgl_os=dos32/dj2 + mgl_os_candidates="dos32/dj2" ;; *) AC_MSG_ERROR(This system type ${host} is not yet supported by wxMGL.) esac mgl_lib_type="" + mgl_os="" - if test "$wxUSE_DEBUG_FLAG" = yes ; then - if test -f $MGL_ROOT/lib/debug/$mgl_os/libmgl.a -o \ - -f $MGL_ROOT/lib/debug/$mgl_os/libmgl.so; then - mgl_lib_type=debug - fi - fi - if test "x$mgl_lib_type" = x ; then - if test -f $MGL_ROOT/lib/release/$mgl_os/libmgl.a -o \ - -f $MGL_ROOT/lib/release/$mgl_os/libmgl.so; then - mgl_lib_type=release - else - AC_MSG_ERROR([Cannot find MGL libraries, make sure they are compiled.]) + for mgl_os_i in $mgl_os_candidates ; do + if test "x$mgl_os" = x ; then + if test "$wxUSE_DEBUG_FLAG" = yes ; then + if test -f $MGL_ROOT/lib/debug/$mgl_os_i/libmgl.a -o \ + -f $MGL_ROOT/lib/debug/$mgl_os_i/libmgl.so; then + mgl_lib_type=debug + mgl_os=$mgl_os_i + fi + fi + if test "x$mgl_lib_type" = x ; then + if test -f $MGL_ROOT/lib/release/$mgl_os_i/libmgl.a -o \ + -f $MGL_ROOT/lib/release/$mgl_os_i/libmgl.so; then + mgl_lib_type=release + mgl_os=$mgl_os_i + fi + fi fi + done + + if test "x$mgl_os" = x ; then + AC_MSG_RESULT(not found) + AC_MSG_ERROR([Cannot find MGL libraries, make sure they are compiled.]) fi + AC_MSG_RESULT("$MGL_ROOT/lib/$mgl_lib_type/$mgl_os") wxUSE_UNIVERSAL="yes" @@ -2171,6 +2302,37 @@ equivalent variable and GTK+ is version 1.2.3 or above. ) fi + if test "$wxUSE_UNICODE" = "yes"; then + PKG_CHECK_MODULES(PANGOX, pangox, + [ + CXXFLAGS="$CXXFLAGS $PANGOX_CFLAGS" + LIBS="$LIBS $PANGOX_LIBS" + ], + [ + AC_MSG_ERROR([pangox library not found, library cannot be compiled in Unicode mode]) + ] + ) + PKG_CHECK_MODULES(PANGOFT2, pangoft2, + [ + CXXFLAGS="$CXXFLAGS $PANGOFT2_CFLAGS" + LIBS="$LIBS $PANGOFT2_LIBS" + ], + [ + AC_MSG_WARN([pangoft2 library not found, library will be compiled without printing support]) + wxUSE_PRINTING_ARCHITECTURE="no" + ] + ) + PKG_CHECK_MODULES(PANGOXFT, pangoxft, + [ + CXXFLAGS="$CXXFLAGS $PANGOXFT_CFLAGS" + LIBS="$LIBS $PANGOXFT_LIBS" + ], + [ + AC_MSG_WARN([pangoxft library not found, library will be compiled without anti-aliasing support]) + ] + ) + fi + wxUSE_UNIVERSAL="yes" if test "$wxUSE_NANOX" = "yes"; then @@ -2233,8 +2395,10 @@ equivalent variable and GTK+ is version 1.2.3 or above. AC_MSG_ERROR(X11 not found, please use --x-includes and/or --x-libraries options) fi - GUI_TK_LIBRARY="$X_LIBS" - TOOLKIT_INCLUDE="$X_CFLAGS" + dnl for some reason AC_PATH_XTRA seems to add -INONE and -LNONE to + dnl X_LIBS and X_CFLAGS respectively -- what for?? + GUI_TK_LIBRARY=`echo $X_LIBS | sed 's/ -LNONE//'` + TOOLKIT_INCLUDE=`echo $X_CFLAGS | sed 's/ -INONE//'` AFMINSTALL=afminstall COMPILED_X_PROGRAM=0 @@ -2401,6 +2565,11 @@ equivalent variable and GTK+ is version 1.2.3 or above. if test "$wxUSE_PM" = 1; then TOOLKIT=PM GUIDIST=GTK_DIST + AC_MSG_WARN([OS/2 PM requires old resource format, re-enabled]) + wxUSE_PROLOGIO="yes" + wxUSE_RESOURCES="yes" + AC_MSG_WARN([OS/2 threads are not yet supported... disabled]) + wxUSE_THREADS="no" fi dnl the name of the directory where the files for this toolkit live @@ -2577,8 +2746,10 @@ if test "$wxUSE_DEBUG_FLAG" = "yes"; then lib_debug_suffix=d fi -TOOLCHAIN_NAME="${TOOLKIT_DIR}${WIDGET_SET}${lib_unicode_suffix}${lib_debug_suffix}-${WX_RELEASE}" -TOOLCHAIN_NAME_GL="${TOOLKIT_DIR}${WIDGET_SET}${lib_unicode_suffix}${lib_debug_suffix}_gl-${WX_RELEASE}" +WX_VERSION_TAG=`echo WX${TOOLKIT_DIR}${TOOLKIT_VERSION}${WIDGET_SET}${lib_unicode_suffix}${lib_debug_suffix}_${WX_RELEASE} | tr "[[a-z]]" "[[A-Z]]"` + +TOOLCHAIN_NAME="${TOOLKIT_DIR}${TOOLKIT_VERSION}${WIDGET_SET}${lib_unicode_suffix}${lib_debug_suffix}-${WX_RELEASE}" +TOOLCHAIN_NAME_GL="${TOOLKIT_DIR}${TOOLKIT_VERSION}${WIDGET_SET}${lib_unicode_suffix}${lib_debug_suffix}_gl-${WX_RELEASE}" if test "$cross_compiling" = "yes"; then TOOLCHAIN_NAME="${TOOLCHAIN_NAME}-${host_alias}" @@ -2588,6 +2759,7 @@ fi dnl library link name WX_LIBRARY="wx_${TOOLCHAIN_NAME}" WX_LIBRARY_GL="wx_${TOOLCHAIN_NAME_GL}" +WX_LIBRARY_BASENAME="wx_${TOOLKIT_DIR}${TOOLKIT_VERSION}${WIDGET_SET}${lib_unicode_suffix}${lib_debug_suffix}" dnl the name of the shared library WX_LIBRARY_NAME_SHARED="lib${WX_LIBRARY}.${SO_SUFFIX}.${WX_CURRENT}.${WX_REVISION}.${WX_AGE}" @@ -2620,12 +2792,24 @@ case "${host}" in ;; *-*-darwin* ) + dnl Under Mac OS X, the naming conventions for shared libraries + dnl are different: the number precedes the suffix. + + WX_LIBRARY_NAME_SHARED="lib${WX_LIBRARY}.${WX_CURRENT}.${WX_REVISION}.${WX_AGE}.${SO_SUFFIX}" + WX_LIBRARY_NAME_SHARED_GL="lib${WX_LIBRARY_GL}.${WX_CURRENT}.${WX_REVISION}.${WX_AGE}.${SO_SUFFIX}" + + WX_LIBRARY_LINK1="lib${WX_LIBRARY}.${WX_CURRENT}.${SO_SUFFIX}" + WX_LIBRARY_LINK2="lib${WX_LIBRARY}.${SO_SUFFIX}" + WX_LIBRARY_LINK1_GL="lib${WX_LIBRARY_GL}.${WX_CURRENT}.${SO_SUFFIX}" + WX_LIBRARY_LINK2_GL="lib${WX_LIBRARY_GL}.${SO_SUFFIX}" + dnl Under Mac OS X, we should build real frameworks instead of simple dnl dynamic shared libraries (in order to embed the resources) if test "$wxUSE_MAC" = 1; then - dnl the name of the resources file for wxMac - WX_RESOURCES_MACOSX_ASCII="lib${WX_LIBRARY}.r" - WX_RESOURCES_MACOSX_DATA="lib${WX_LIBRARY}.rsrc" + dnl base name of the resource file for wxMac must be the same + dnl as library installation base name (-install_name) + WX_RESOURCES_MACOSX_ASCII="lib${WX_LIBRARY}.${WX_CURRENT}.r" + WX_RESOURCES_MACOSX_DATA="lib${WX_LIBRARY}.${WX_CURRENT}.rsrc" fi ;; esac @@ -2674,6 +2858,10 @@ if test "$wxUSE_SHARED" = "yes"; then PIC_FLAG="-fPIC" fi + + dnl use versioned symbols if available on the platform + WX_VERSIONED_SYMBOLS([\$(top_builddir)/version-script]) + dnl the command to use for creating the shared library SHARED_LD="${CXX} -shared -o" @@ -2752,21 +2940,26 @@ if test "$wxUSE_SHARED" = "yes"; then dnl "-init _wxWindowsDylibInit" not useful with lazy linking solved SHARED_LD="\${top_srcdir}/distrib/mac/shared-ld-sh -undefined suppress -flat_namespace -o" PIC_FLAG="-dynamic -fPIC" - SONAME_FLAGS="-compatibility_version ${WX_RELEASE} -current_version ${WX_VERSION}" - SONAME_FLAGS_GL=${SONAME_FLAGS} + dnl library installation base name and wxMac resources file base name + dnl must be identical in order for the resource file to be found at + dnl run time in src/mac/app.cpp + SONAME_FLAGS="-compatibility_version ${WX_RELEASE} -current_version ${WX_VERSION} -install_name \$(libdir)/${WX_LIBRARY_LINK1}" + SONAME_FLAGS_GL="-compatibility_version ${WX_RELEASE} -current_version ${WX_VERSION} -install_name \$(libdir)/${WX_LIBRARY_LINK1_GL}" ;; *-*-aix* ) - dnl the abs path below used to be hardcoded here so I guess it must - dnl be some sort of standard location under AIX? - AC_CHECK_PROG(AIX_CXX_LD, makeC++SharedLib, - makeC++SharedLib, /usr/lpp/xlC/bin/makeC++SharedLib) + dnl default settings are ok for gcc + if test "$GCC" != "yes"; then + dnl the abs path below used to be hardcoded here so I guess it must + dnl be some sort of standard location under AIX? + AC_CHECK_PROG(AIX_CXX_LD, makeC++SharedLib, + makeC++SharedLib, /usr/lpp/xlC/bin/makeC++SharedLib) - SHARED_LD="$(AIX_CXX_LD) -p 0 -o" + SHARED_LD="$(AIX_CXX_LD) -p 0 -o" + fi ;; *-*-cygwin* | *-*-mingw32* ) - WX_LIBRARY_IMPORTLIB="${WX_LIBRARY_NAME_SHARED}.a" SHARED_LD="${CXX} -shared -Wl,--out-implib,lib/${WX_LIBRARY_IMPORTLIB} -o" @@ -2774,12 +2967,12 @@ if test "$wxUSE_SHARED" = "yes"; then PIC_FLAG="-UWXUSINGDLL -DWXMAKINGDLL=1 -D_DLL=1 -D_WINDLL=1" - dnl install shared libs without symlinks + dnl Don't build seperate GL library + WX_ALL="\$(build_libdir)/${WX_LIBRARY_NAME_SHARED}" + WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS" + if test "$wxUSE_OPENGL" = "yes"; then - WX_ALL_INSTALLED="preinstall_gl" - WX_ALL="\$(build_libdir)/${WX_LIBRARY_NAME_SHARED} \$(build_libdir)/${WX_LIBRARY_NAME_SHARED_GL}" - else - WX_ALL="\$(build_libdir)/${WX_LIBRARY_NAME_SHARED}" + LIBS="${LIBS} ${OPENGL_LIBS}" fi ;; @@ -2789,9 +2982,15 @@ if test "$wxUSE_SHARED" = "yes"; then SHARED_LD="${LD} -shared -o" ;; + *-*-irix* ) + dnl default settings are ok for gcc + if test "$GCC" != "yes"; then + PIC_FLAG="-KPIC" + fi + ;; + *-*-freebsd* | *-*-openbsd* | *-*-netbsd* | \ *-*-sunos4* | \ - *-*-irix5* | *-*-irix6* | \ *-*-osf* | \ *-*-dgux5* | \ *-*-sysv5* ) @@ -2854,15 +3053,10 @@ if test "$wxUSE_MAC" = 1; then AC_CHECK_PROG(RESCOMP, Rez, Rez, /Developer/Tools/Rez) AC_CHECK_PROG(DEREZ, DeRez, DeRez, /Developer/Tools/DeRez) MACOSX_BUNDLE="bundle" - if test "$wxUSE_SHARED" = "yes"; then - dnl resources are bundled with shared library, not with applications - LIBWXMACRESCOMP="\$(RESCOMP) -t APPL Carbon.r -o \$(BIN_PROGRAM)" - LIBWXMACRESWXCONFIG="${RESCOMP} -t APPL Carbon.r -o" - else - dnl resources are bundled with applications, not with static library - LIBWXMACRESCOMP="\$(RESCOMP) -t APPL Carbon.r ${LIBWXMACRES} -o \$(BIN_PROGRAM)" - LIBWXMACRESWXCONFIG="${RESCOMP} -t APPL Carbon.r \${prefix}/lib/${WX_RESOURCES_MACOSX_ASCII} -o" - fi + dnl resources are bundled both with shared library and applications + dnl since the carb resource *must* be included in the application + LIBWXMACRESCOMP="\$(RESCOMP) -t APPL Carbon.r ${LIBWXMACRES} -o \$(BIN_PROGRAM)" + LIBWXMACRESWXCONFIG="${RESCOMP} -t APPL Carbon.r \${prefix}/lib/${WX_RESOURCES_MACOSX_ASCII} -o" else if test "$wxUSE_PM" = 1; then LIBWXMACRESCOMP="emxbind -ep \$(BIN_PROGRAM)" @@ -2885,11 +3079,12 @@ dnl defines uid_t and gid_t if not already defined AC_TYPE_UID_T dnl check what exactly size_t is on this machine - this is necessary to avoid -dnl ambiguos overloads in several places, notably wx/string.h and wx/array.h +dnl ambiguous overloads in several places, notably wx/string.h and wx/array.h AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_CACHE_CHECK([if size_t is unsigned int], wx_cv_size_t_is_uint, + [ dnl an obvious check like AC_TRY_COMPILE[struct Foo { ... };] doesn't work dnl with egcs (at least) up to 1.1.1 as it allows you to compile duplicate dnl methods in a local class (i.e. class inside a function) declaration @@ -2907,6 +3102,7 @@ AC_CACHE_CHECK([if size_t is unsigned int], wx_cv_size_t_is_uint=no, wx_cv_size_t_is_uint=yes ) + ] ) if test "$wx_cv_size_t_is_uint" = "yes"; then @@ -3101,20 +3297,17 @@ AC_CACHE_CHECK(for statfs, wx_cv_func_statfs, ) if test "$wx_cv_func_statfs" = "yes"; then + wx_cv_type_statvfs_t="struct statfs" AC_DEFINE(HAVE_STATFS) else AC_CACHE_CHECK(for statvfs, wx_cv_func_statvfs, AC_TRY_COMPILE( [ - #include + #include + #include ], [ - long l; - struct statvfs fs; - statvfs("/", &fs); - l = fs.f_bsize; - l += fs.f_blocks; - l += fs.f_bavail; + statvfs("/", NULL); ], [ wx_cv_func_statvfs=yes @@ -3126,12 +3319,73 @@ else ) if test "$wx_cv_func_statvfs" = "yes"; then - AC_DEFINE(HAVE_STATVFS) + dnl we also have to check whether we should use statvfs_t (works under + dnl Solaris 8, doesn't work under Solaris 7) or "struct statvfs" (vice + dnl versa) as the argument for statvfs in 64 bit off_t mode (in 32 bit + dnl mode both work fine) + dnl + dnl for this check C++ compiler has to be used as passing incompatible + dnl pointers is just a warning and not an error in C + AC_LANG_SAVE + AC_LANG_CPLUSPLUS + + AC_CACHE_CHECK(for statvfs argument type, wx_cv_type_statvfs_t, + AC_TRY_COMPILE( + [ + #include + ], + [ + long l; + statvfs_t fs; + statvfs("/", &fs); + l = fs.f_bsize; + l += fs.f_blocks; + l += fs.f_bavail; + ], + [ + wx_cv_type_statvfs_t=statvfs_t + ], + [ + AC_TRY_COMPILE( + [ + #include + ], + [ + long l; + struct statvfs fs; + statvfs("/", &fs); + l = fs.f_bsize; + l += fs.f_blocks; + l += fs.f_bavail; + ], + [ + wx_cv_type_statvfs_t="struct statvfs" + ], + [ + wx_cv_type_statvfs_t="unknown" + ] + ) + ] + ) + ) + + AC_LANG_RESTORE + + if test "$wx_cv_type_statvfs_t" != "unknown"; then + AC_DEFINE(HAVE_STATVFS) + fi else - AC_MSG_WARN([wxGetDiskSpace() function won't work without statfs()]) + dnl set it for the test below + wx_cv_type_statvfs_t="unknown" fi fi +if test "$wx_cv_type_statvfs_t" != "unknown"; then + AC_DEFINE_UNQUOTED(WX_STATFS_T, $wx_cv_type_statvfs_t) +else + AC_MSG_WARN([wxGetDiskSpace() function won't work without statfs()]) +fi + dnl check for fcntl() or at least flock() needed by Unix implementation of dnl wxSingleInstanceChecker if test "$wxUSE_SNGLINST_CHECKER" = "yes"; then @@ -3364,7 +3618,17 @@ if test "$TOOLKIT" != "MSW"; then AC_MSG_CHECKING([if more special flags are required for pthreads]) flag=no case "${host}" in - *-aix* | *-freebsd*) + *-aix*) + dnl again quoting from + dnl http://www-1.ibm.com/servers/esdd/articles/gnu.html: + dnl + dnl When compiling and linking with -pthread, the library + dnl search path should include -L/usr/lib/threads at the + dnl beginning of the path. + LDFLAGS="-L/usr/lib/threads $LDFLAGS" + flag="-D_THREAD_SAFE" + ;; + *-freebsd*) flag="-D_THREAD_SAFE" ;; *-hp-hpux* ) @@ -3413,17 +3677,17 @@ if test "$TOOLKIT" != "MSW"; then dnl 3. pthread_attr_getschedparam and pthread_attr_setschedparam HAVE_PRIOR_FUNCS=0 AC_CHECK_FUNC(pthread_attr_getschedpolicy, - AC_CHECK_FUNC(pthread_attr_setschedparam, - AC_CHECK_FUNC(sched_get_priority_max, + [AC_CHECK_FUNC(pthread_attr_setschedparam, + [AC_CHECK_FUNC(sched_get_priority_max, HAVE_PRIOR_FUNCS=1, - AC_CHECK_LIB([posix4], sched_get_priority_max, + [AC_CHECK_LIB([posix4], sched_get_priority_max, [ HAVE_PRIOR_FUNCS=1 POSIX4_LINK=" -lposix4" ], - ) - ) - ) + )] + )] + )] ) if test "$HAVE_PRIOR_FUNCS" = 1; then @@ -3626,11 +3890,19 @@ if test "$GCC" = "yes" ; then dnl for each subroutine by default -- using the switch below only creates dnl one entry per file instead at the price of minor performance penalty dnl + dnl As of wx2.4 a bug in the hppa gcc compiler causes a similar problem + dnl without -ffunction-sections. No idea how long we'll need to maintain + dnl this, or even the extent of gcc/wx version combinations affected, but + dnl also as above, this 'fix' does not come without side effects. + dnl dnl TODO: test for the gcc version here (how?) case "${host}" in powerpc*-*-aix* ) CODE_GEN_FLAGS="$CODE_GEN_FLAGS -mminimal-toc" ;; + *-hppa* ) + CODE_GEN_FLAGS="$CODE_GEN_FLAGS -ffunction-sections" + ;; esac fi @@ -4290,14 +4562,18 @@ fi if test "$wxUSE_PROLOGIO" = "yes" ; then AC_DEFINE(wxUSE_PROLOGIO) + ALL_OBJECTS="$ALL_OBJECTS parser.o" fi if test "$wxUSE_RESOURCES" = "yes" ; then if test "$wxUSE_NANOX" = "yes"; then AC_MSG_WARN([Cannot use resource database functions in NanoX]) - else - AC_DEFINE(wxUSE_RESOURCES) - SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS resource" + else + AC_DEFINE(wxUSE_RESOURCES) + SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS resource" + fi + if test "$wxUSE_PROLOGIO" != "yes" ; then + ALL_OBJECTS="$ALL_OBJECTS parser.o" fi fi @@ -4970,7 +5246,48 @@ dnl FIXME: should this be covered by the conditional above dnl given the -lm comment there? Or should that comment (and dnl this one) be removed.. [ 7 Nov 2001 ] -LIBS="$ZLIB_LINK $POSIX4_LINK $INET_LINK $WCHAR_LINK $DL_LINK -lm $LIBS" +LIBS="$ZLIB_LINK $POSIX4_LINK $INET_LINK $WCHAR_LINK $DL_LINK $LIBS" + +dnl Only add the -lm library if floating point functions cannot be used +dnl without it. This check is important on cygwin because of the bizarre +dnl way that they have organized functions into libraries. On cygwin, both +dnl libc.a and libm.a are symbolic links to a single lib libcygwin.a. This +dnl means that +dnl 1) linking with -lm is not necessary, and +dnl 2) linking with -lm is dangerous if the order of libraries is wrong +dnl In particular, if you compile any program with -mno-cygwin and link with +dnl -lm, it will crash instantly when it is run. This happens because the +dnl linker incorrectly links the Cygwin libm.a (==libcygwin.a), which replaces +dnl the ___main function instead of allowing it to be defined by +dnl /usr/lib/mingw/libmingw32.a as it should be. +dnl +dnl On MacOS X, this test will find that -lm is unnecessary and leave it out. +dnl +dnl Just check a few floating point functions. If they are all found without +dnl -lm, then we must not need -lm. +have_cos=0 +have_floor=0 +AC_CHECK_FUNCS(cos, have_cos=1) +AC_CHECK_FUNCS(floor, have_floor=1) +AC_MSG_CHECKING(if floating point functions link without -lm) +if test "$have_cos" = 1 -a "$have_floor" = 1; then + AC_MSG_RESULT(yes) +else + AC_MSG_RESULT(no) + LIBS="$LIBS -lm" + # use different functions to avoid configure caching + have_sin=0 + have_ceil=0 + AC_CHECK_FUNCS(sin, have_sin=1) + AC_CHECK_FUNCS(ceil, have_ceil=1) + AC_MSG_CHECKING(if floating point functions link with -lm) + if test "$have_sin" = 1 -a "$have_ceil" = 1; then + AC_MSG_RESULT(yes) + else + AC_MSG_RESULT(no) + # not sure we should warn the user, crash, etc. + fi +fi if test "$wxUSE_GUI" = "yes"; then @@ -4983,7 +5300,7 @@ if test "$wxUSE_GUI" = "yes"; then dnl ipc, mfc, nativdlg, oleauto, ownerdrw SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS artprov controls dialogs \ drawing dynamic erase event exec font image \ - minimal propsize rotate widgets" + minimal propsize rotate shaped widgets" dnl this is needed to be able to find AFM files CPPFLAGS="$CPPFLAGS \$(EXTRADEFS) \$(APPEXTRADEFS)" @@ -5056,6 +5373,7 @@ AC_SUBST(WX_MINOR_VERSION_NUMBER) AC_SUBST(WX_RELEASE_NUMBER) AC_SUBST(WX_LIBRARY_NAME_STATIC) AC_SUBST(WX_LIBRARY_NAME_SHARED) +AC_SUBST(WX_LIBRARY_BASENAME) AC_SUBST(WX_LIBRARY_IMPORTLIB) AC_SUBST(WX_TARGET_LIBRARY) AC_SUBST(WX_LIBRARY_LINK1) @@ -5091,6 +5409,7 @@ AC_SUBST(WXDEBUG_DEFINE) dnl toolkit options AC_SUBST(USE_GUI) AC_SUBST(AFMINSTALL) +AC_SUBST(WIN32INSTALL) AC_SUBST(TOOLKIT) AC_SUBST(TOOLKIT_DIR) AC_SUBST(TOOLKIT_VPATH) @@ -5125,10 +5444,12 @@ AC_SUBST(SAMPLES_SUBDIRS) dnl additional libraries and linker settings AC_SUBST(LDFLAGS) AC_SUBST(LDFLAGS_GL) +AC_SUBST(LDFLAGS_VERSIONING) AC_SUBST(LDFLAGS_EXE) AC_SUBST(OPENGL_LIBS) AC_SUBST(DMALLOC_LIBS) AC_SUBST(EXTRADEFS) +AC_SUBST(WX_VERSION_TAG) dnl additional resurces settings AC_SUBST(RESCOMP) @@ -5144,7 +5465,8 @@ AC_SUBST(LIBWXMACRES) AC_SUBST(LIBWXMACRESCOMP) AC_SUBST(LIBWXMACRESWXCONFIG) -dnl These seem to be missing +dnl other tools +AC_SUBST(GCC) AC_SUBST(DLLTOOL) AC_SUBST(AS) AC_SUBST(NM) @@ -5175,9 +5497,16 @@ wx_cv_program_ext=$PROGRAM_EXT wx_cv_target_library=$WX_TARGET_LIBRARY wx_cv_target_library_gl=$WX_TARGET_LIBRARY_GL wx_cv_target_libtype=$WX_TARGET_LIBRARY_TYPE +wx_cv_library_basename=${WX_LIBRARY_BASENAME} +wx_cv_release=${WX_RELEASE} +wx_cv_current=${WX_CURRENT} +wx_cv_revision=${WX_REVISION} +wx_cv_age=${WX_AGE} export wx_cv_path_samplesubdirs wx_cv_if_gnu_make \ wx_cv_path_ifs wx_cv_program_ext \ - wx_cv_target_library wx_cv_target_library_gl wx_cv_target_libtype + wx_cv_target_library wx_cv_target_library_gl wx_cv_target_libtype \ + wx_cv_library_basename wx_cv_release wx_cv_current wx_cv_revision wx_cv_age + AC_CONFIG_SUBDIRS(demos samples utils contrib) @@ -5186,6 +5515,7 @@ dnl (the original file name may be overriden by appending another name after a dnl colon) AC_OUTPUT([ wx-config + version-script src/make.env src/makeprog.env src/makelib.env @@ -5230,4 +5560,27 @@ AC_OUTPUT([ ] ) -dnl vi: set et sts=4 sw=4: +dnl report on what we decided to do +echo +echo "Configured wxWindows ${WX_VERSION} for \`${host}'" +echo "" +echo " Which GUI toolkit should wxWindows use? ${TOOLKIT:-base only}" + +echo " Should wxWindows be compiled in debug mode? ${wxUSE_DEBUG:-no}" +echo " Should wxWindows be linked as a shared library? ${wxUSE_SHARED:-no}" +echo " Should wxWindows be compiled in Unicode mode? ${wxUSE_UNICODE:-no}" + +echo " What level of wxWindows compatibility should be enabled?" +echo " wxWindows 2.0 ${WXWIN_COMPATIBILITY_2:-no}" +echo " wxWindows 2.2 ${WXWIN_COMPATIBILITY_2_2:-yes}" + +echo " Which libraries should wxWindows use?" +echo " jpeg ${wxUSE_LIBJPEG-none}" +echo " png ${wxUSE_LIBPNG-none}" +echo " regex ${wxUSE_REGEX}" +echo " tiff ${wxUSE_LIBTIFF-none}" +echo " zlib ${wxUSE_ZLIB}" + +echo "" + +dnl vi: set et sts=4 sw=4 com=\:dnl: diff --git a/contrib/configure b/contrib/configure index 32d878c135..cbf9a0ae02 100755 --- a/contrib/configure +++ b/contrib/configure @@ -691,6 +691,16 @@ fi PATH_IFS=$wx_cv_path_ifs WX_TARGET_LIBRARY=$wx_cv_target_library WX_TARGET_LIBRARY_TYPE=$wx_cv_target_libtype +WX_LIBRARY_BASENAME=$wx_cv_library_basename +WX_RELEASE=$wx_cv_release +WX_CURRENT=$wx_cv_current +WX_REVISION=$wx_cv_revision +WX_AGE=$wx_cv_age + + + + + @@ -830,16 +840,17 @@ trap 'rm -fr `echo " samples/ogl/ogledit/Makefile samples/ogl/studio/Makefile samples/stc/Makefile - samples/svg/Makefile + samples/svg/Makefile samples/canvas/Makefile samples/canvas/test/Makefile samples/canvas/simple/Makefile samples/gizmos/Makefile - samples/gizmos/multicell/Makefile - samples/gizmos/splittree/Makefile samples/gizmos/editlbox/Makefile samples/gizmos/dynsash/Makefile samples/gizmos/dynsash_switch/Makefile + samples/gizmos/multicell/Makefile + samples/gizmos/splittree/Makefile + samples/gizmos/led/Makefile samples/xrc/Makefile samples/plot/Makefile samples/applet/Makefile @@ -890,6 +901,11 @@ s%@PATH_IFS@%$PATH_IFS%g s%@ESD_LINK@%$ESD_LINK%g s%@WX_TARGET_LIBRARY@%$WX_TARGET_LIBRARY%g s%@WX_TARGET_LIBRARY_TYPE@%$WX_TARGET_LIBRARY_TYPE%g +s%@WX_LIBRARY_BASENAME@%$WX_LIBRARY_BASENAME%g +s%@WX_RELEASE@%$WX_RELEASE%g +s%@WX_CURRENT@%$WX_CURRENT%g +s%@WX_REVISION@%$WX_REVISION%g +s%@WX_AGE@%$WX_AGE%g CEOF EOF @@ -949,16 +965,17 @@ CONFIG_FILES=\${CONFIG_FILES-"src/Makefile samples/ogl/ogledit/Makefile samples/ogl/studio/Makefile samples/stc/Makefile - samples/svg/Makefile + samples/svg/Makefile samples/canvas/Makefile samples/canvas/test/Makefile samples/canvas/simple/Makefile samples/gizmos/Makefile - samples/gizmos/multicell/Makefile - samples/gizmos/splittree/Makefile samples/gizmos/editlbox/Makefile samples/gizmos/dynsash/Makefile samples/gizmos/dynsash_switch/Makefile + samples/gizmos/multicell/Makefile + samples/gizmos/splittree/Makefile + samples/gizmos/led/Makefile samples/xrc/Makefile samples/plot/Makefile samples/applet/Makefile diff --git a/contrib/configure.in b/contrib/configure.in index ef6db6c6ec..3047831472 100644 --- a/contrib/configure.in +++ b/contrib/configure.in @@ -26,11 +26,21 @@ dnl Final subst PATH_IFS=$wx_cv_path_ifs WX_TARGET_LIBRARY=$wx_cv_target_library WX_TARGET_LIBRARY_TYPE=$wx_cv_target_libtype +WX_LIBRARY_BASENAME=$wx_cv_library_basename +WX_RELEASE=$wx_cv_release +WX_CURRENT=$wx_cv_current +WX_REVISION=$wx_cv_revision +WX_AGE=$wx_cv_age AC_SUBST(PATH_IFS) AC_SUBST(ESD_LINK) AC_SUBST(WX_TARGET_LIBRARY) AC_SUBST(WX_TARGET_LIBRARY_TYPE) +AC_SUBST(WX_LIBRARY_BASENAME) +AC_SUBST(WX_RELEASE) +AC_SUBST(WX_CURRENT) +AC_SUBST(WX_REVISION) +AC_SUBST(WX_AGE) dnl ----------- dnl File output @@ -55,15 +65,17 @@ AC_OUTPUT([ samples/ogl/ogledit/Makefile samples/ogl/studio/Makefile samples/stc/Makefile + samples/svg/Makefile samples/canvas/Makefile samples/canvas/test/Makefile samples/canvas/simple/Makefile samples/gizmos/Makefile - samples/gizmos/multicell/Makefile - samples/gizmos/splittree/Makefile samples/gizmos/editlbox/Makefile samples/gizmos/dynsash/Makefile samples/gizmos/dynsash_switch/Makefile + samples/gizmos/multicell/Makefile + samples/gizmos/splittree/Makefile + samples/gizmos/led/Makefile samples/xrc/Makefile samples/plot/Makefile samples/applet/Makefile diff --git a/contrib/include/wx/animate/animate.h b/contrib/include/wx/animate/animate.h index 2768d13d30..0a6e933b49 100644 --- a/contrib/include/wx/animate/animate.h +++ b/contrib/include/wx/animate/animate.h @@ -138,7 +138,7 @@ public: //// Implementation // Play the frame - virtual bool PlayFrame(int frame, wxWindow& window, wxPoint& pos); + virtual bool PlayFrame(int frame, wxWindow& window, const wxPoint& pos); virtual bool PlayFrame(); virtual void DrawFrame(int frame, wxDC& dc, const wxPoint& pos); virtual void DrawBackground(wxDC& dc, const wxPoint& pos, const wxColour& colour); diff --git a/contrib/include/wx/canvas/bbox.h b/contrib/include/wx/canvas/bbox.h index 6effa6951f..49a2e555ac 100644 --- a/contrib/include/wx/canvas/bbox.h +++ b/contrib/include/wx/canvas/bbox.h @@ -21,7 +21,7 @@ class wxBoundingBox { public: wxBoundingBox(); - wxBoundingBox(wxBoundingBox&); + wxBoundingBox(const wxBoundingBox&); wxBoundingBox(const wxPoint2DDouble&); wxBoundingBox(double xmin, double ymin, double xmax, double ymax); diff --git a/contrib/include/wx/fl/antiflickpl.h b/contrib/include/wx/fl/antiflickpl.h index 32b0eb2988..e8569aa6df 100644 --- a/contrib/include/wx/fl/antiflickpl.h +++ b/contrib/include/wx/fl/antiflickpl.h @@ -26,7 +26,7 @@ antiflicker plugins within the application. Locking for multithreaded applications is not yet implemented. */ -class cbAntiflickerPlugin : public cbPluginBase +class WXFL_DECLSPEC cbAntiflickerPlugin : public cbPluginBase { DECLARE_DYNAMIC_CLASS( cbAntiflickerPlugin ) protected: diff --git a/contrib/include/wx/fl/bardragpl.h b/contrib/include/wx/fl/bardragpl.h index 953b8dff9c..6c225dd237 100644 --- a/contrib/include/wx/fl/bardragpl.h +++ b/contrib/include/wx/fl/bardragpl.h @@ -23,7 +23,7 @@ Plugin class implementing bar dragging. */ -class cbBarDragPlugin : public cbPluginBase +class WXFL_DECLSPEC cbBarDragPlugin : public cbPluginBase { DECLARE_DYNAMIC_CLASS( cbBarDragPlugin ) protected: diff --git a/contrib/include/wx/fl/barhintspl.h b/contrib/include/wx/fl/barhintspl.h index 51a503145c..5f8da11d6d 100644 --- a/contrib/include/wx/fl/barhintspl.h +++ b/contrib/include/wx/fl/barhintspl.h @@ -24,7 +24,7 @@ This class intercepts bar-decoration and sizing events, and draws 3D hints around fixed and flexible bars, similar to those in Microsoft DevStudio 6.x */ -class cbBarHintsPlugin : public cbPluginBase +class WXFL_DECLSPEC cbBarHintsPlugin : public cbPluginBase { DECLARE_DYNAMIC_CLASS( cbBarHintsPlugin ) diff --git a/contrib/include/wx/fl/cbcustom.h b/contrib/include/wx/fl/cbcustom.h index 93ec7f7f43..6eaf27cfd4 100644 --- a/contrib/include/wx/fl/cbcustom.h +++ b/contrib/include/wx/fl/cbcustom.h @@ -24,7 +24,7 @@ menu and handling basic customization such as floating and horizontal/vertical alignment of the bar. */ -class cbSimpleCustomizationPlugin : public cbPluginBase +class WXFL_DECLSPEC cbSimpleCustomizationPlugin : public cbPluginBase { public: DECLARE_DYNAMIC_CLASS( cbSimpleCustomizationPlugin ) diff --git a/contrib/include/wx/fl/controlbar.h b/contrib/include/wx/fl/controlbar.h index dbe944fc9d..21ca20eecc 100644 --- a/contrib/include/wx/fl/controlbar.h +++ b/contrib/include/wx/fl/controlbar.h @@ -21,30 +21,31 @@ #include "wx/string.h" #include "wx/window.h" #include "wx/dynarray.h" +#include "wx/fl/fldefs.h" #define WXCONTROLBAR_VERSION 1.3 // forward declarations -class wxFrameLayout; +class WXFL_DECLSPEC wxFrameLayout; -class cbDockPane; -class cbUpdatesManagerBase; -class cbBarDimHandlerBase; -class cbPluginBase; -class cbPluginEvent; -class cbPaneDrawPlugin; +class WXFL_DECLSPEC cbDockPane; +class WXFL_DECLSPEC cbUpdatesManagerBase; +class WXFL_DECLSPEC cbBarDimHandlerBase; +class WXFL_DECLSPEC cbPluginBase; +class WXFL_DECLSPEC cbPluginEvent; +class WXFL_DECLSPEC cbPaneDrawPlugin; -class cbBarInfo; -class cbRowInfo; -class cbDimInfo; -class cbCommonPaneProperties; +class WXFL_DECLSPEC cbBarInfo; +class WXFL_DECLSPEC cbRowInfo; +class WXFL_DECLSPEC cbDimInfo; +class WXFL_DECLSPEC cbCommonPaneProperties; typedef cbBarInfo* BarInfoPtrT; typedef cbRowInfo* RowInfoPtrT; -WX_DEFINE_ARRAY( BarInfoPtrT, BarArrayT ); -WX_DEFINE_ARRAY( RowInfoPtrT, RowArrayT ); +WXFL_DEFINE_ARRAY( BarInfoPtrT, BarArrayT ); +WXFL_DEFINE_ARRAY( RowInfoPtrT, RowArrayT ); // control bar states @@ -97,7 +98,7 @@ Helper class, used for spying for unhandled mouse events on control bars and forwarding them to the frame layout. */ -class cbBarSpy : public wxEvtHandler +class WXFL_DECLSPEC cbBarSpy : public wxEvtHandler { public: DECLARE_DYNAMIC_CLASS( cbBarSpy ) @@ -129,7 +130,7 @@ which can be docked along the top, bottom, right, or left side of the parent frame. */ -class wxFrameLayout : public wxEvtHandler +class WXFL_DECLSPEC wxFrameLayout : public wxEvtHandler { public: // Default constructor, used only for serialization. @@ -238,7 +239,7 @@ public: int alignment = FL_ALIGN_TOP, int rowNo = 0, int columnPos = 0, - const wxString& name="bar", + const wxString& name = wxT("bar"), bool spyEvents = FALSE, int state = wxCBAR_DOCKED_HORIZONTALLY ); @@ -647,7 +648,7 @@ used by any particular updates-manager to store auxiliary information to be used by its updating algorithm. */ -class cbUpdateMgrData : public wxObject +class WXFL_DECLSPEC cbUpdateMgrData : public wxObject { DECLARE_DYNAMIC_CLASS( cbUpdateMgrData ) public: @@ -687,7 +688,7 @@ to adjust the values in cbDimInfo::mSizes accordingly. Specific handlers can be hooked up to specific types of bar. */ -class cbBarDimHandlerBase : public wxObject +class WXFL_DECLSPEC cbBarDimHandlerBase : public wxObject { DECLARE_ABSTRACT_CLASS( cbBarDimHandlerBase ) @@ -725,7 +726,7 @@ Helper class used internally by the wxFrameLayout class. Holds and manages information about bar dimensions. */ -class cbDimInfo : public wxObject +class WXFL_DECLSPEC cbDimInfo : public wxObject { DECLARE_DYNAMIC_CLASS( cbDimInfo ) public: @@ -824,7 +825,7 @@ public: }; // FIXME: this array definition compiles but probably doesn't do what was intended (GD) -WX_DEFINE_ARRAY_LONG(float, cbArrayFloat); +WXFL_DEFINE_ARRAY_LONG(float, cbArrayFloat); /* Helper class used internally by the wxFrameLayout class. diff --git a/contrib/include/wx/fl/dyntbar.h b/contrib/include/wx/fl/dyntbar.h index 52945f93ab..bd49fb2618 100644 --- a/contrib/include/wx/fl/dyntbar.h +++ b/contrib/include/wx/fl/dyntbar.h @@ -18,12 +18,13 @@ #include "wx/tbarbase.h" #include "wx/dynarray.h" +#include "wx/fl/fldefs.h" /* Tool layout item. */ -class wxToolLayoutItem : public wxObject +class WXFL_DECLSPEC wxToolLayoutItem : public wxObject { DECLARE_DYNAMIC_CLASS(wxToolLayoutItem) @@ -32,19 +33,19 @@ public: bool mIsSeparator; }; -class wxDynToolInfo; +class WXFL_DECLSPEC wxDynToolInfo; typedef wxToolLayoutItem* wxToolLayoutItemPtrT; typedef wxDynToolInfo* wxDynToolInfoPtrT; -WX_DEFINE_ARRAY( wxToolLayoutItemPtrT, wxLayoutItemArrayT ); -WX_DEFINE_ARRAY( wxDynToolInfoPtrT, wxDynToolInfoArrayT ); +WXFL_DEFINE_ARRAY( wxToolLayoutItemPtrT, wxLayoutItemArrayT ); +WXFL_DEFINE_ARRAY( wxDynToolInfoPtrT, wxDynToolInfoArrayT ); /* This is a base class for layout algorithm implementations. */ -class LayoutManagerBase +class WXFL_DECLSPEC LayoutManagerBase { public: // Constructor. @@ -63,7 +64,7 @@ BagLayout lays out items in left-to-right order from top to bottom. */ -class BagLayout : public LayoutManagerBase +class WXFL_DECLSPEC BagLayout : public LayoutManagerBase { public: // Constructor. @@ -78,7 +79,7 @@ public: This class holds dynamic toolbar item information. */ -class wxDynToolInfo : public wxToolLayoutItem +class WXFL_DECLSPEC wxDynToolInfo : public wxToolLayoutItem { DECLARE_DYNAMIC_CLASS(wxDynToolInfo) @@ -98,7 +99,7 @@ public: wxDynamicToolBar manages containment and layout of tool windows. */ -class wxDynamicToolBar : public wxToolBarBase +class WXFL_DECLSPEC wxDynamicToolBar : public wxToolBarBase { protected: friend class wxDynamicToolBarSerializer; @@ -147,12 +148,12 @@ public: virtual void AddTool( int toolIndex, const wxString& imageFileName, wxBitmapType imageFileType = wxBITMAP_TYPE_BMP, - const wxString& labelText = "", bool alignTextRight = FALSE, + const wxString& labelText = wxT(""), bool alignTextRight = FALSE, bool isFlat = TRUE ); // Adds a tool. See the documentation for wxToolBar for details. virtual void AddTool( int toolIndex, wxBitmap labelBmp, - const wxString& labelText = "", bool alignTextRight = FALSE, + const wxString& labelText = wxT(""), bool alignTextRight = FALSE, bool isFlat = TRUE ); // Method from wxToolBarBase (for compatibility), only @@ -161,7 +162,7 @@ public: virtual wxToolBarToolBase *AddTool(const int toolIndex, const wxBitmap& bitmap, const wxBitmap& pushedBitmap = wxNullBitmap, const bool toggle = FALSE, const long xPos = -1, const long yPos = -1, wxObject *clientData = NULL, - const wxString& helpString1 = "", const wxString& helpString2 = ""); + const wxString& helpString1 = wxT(""), const wxString& helpString2 = wxT("")); // Adds a separator. See the documentation for wxToolBar for details. diff --git a/contrib/include/wx/fl/dyntbarhnd.h b/contrib/include/wx/fl/dyntbarhnd.h index 95441c92b8..29446bdeb1 100644 --- a/contrib/include/wx/fl/dyntbarhnd.h +++ b/contrib/include/wx/fl/dyntbarhnd.h @@ -23,7 +23,7 @@ Dynamic toolbar dimension handler. */ -class cbDynToolBarDimHandler : public cbBarDimHandlerBase +class WXFL_DECLSPEC cbDynToolBarDimHandler : public cbBarDimHandlerBase { DECLARE_DYNAMIC_CLASS( cbDynToolBarDimHandler ) public: diff --git a/contrib/include/wx/fl/fldefs.h b/contrib/include/wx/fl/fldefs.h new file mode 100644 index 0000000000..d8346b6229 --- /dev/null +++ b/contrib/include/wx/fl/fldefs.h @@ -0,0 +1,50 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: fldefs.h +// Purpose: Declaration of global types and defines. +// Author: David M. Falkinder (david_falkinder@hp.com) +// Modified by: +// Created: 18/09/2002 +// RCS-ID: $Id$ +// Copyright: (c) David M. Falkinder +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef __fldefs_H_INCLUDED__ +#define __fldefs_H_INCLUDED__ + +#include "wx/defs.h" + +/* + * If we're using wx in Dynamic Library format do we + * want FL to be in DLL form as well? + */ +#if defined(WXUSINGDLL) && \ + (defined(WXMAKING_FL_DLL) || defined(WXUSING_FL_DLL)) + +#if defined(WXMAKING_FL_DLL) + // When building the DLL WXFLDECLSPEC exports classes +# define WXFL_DECLSPEC WXEXPORT +#elif defined(WXUSING_FL_DLL) + // When building the DLL WXFLDECLSPEC imports classes +# define WXFL_DECLSPEC WXIMPORT +#endif // defined(WXBUILD_FL_DLL) + +#else +// When building the static library nullify the effect of WXFL_DECLSPEC +#define WXFL_DECLSPEC +#endif // WXUSINGDLL && (WXMAKING_FL_DLL || WXUSING_FL_DLL) + +/////////////////////////////////////////////////////////////////////////////// +// Override some of the wxArray functions to +// include our definitions +/////////////////////////////////////////////////////////////////////////////// +#define WXFL_DEFINE_ARRAY(c,l) \ + class WXFL_DECLSPEC l; \ + WX_DEFINE_ARRAY(c,l) + +#define WXFL_DEFINE_ARRAY_LONG(t,l) \ + class WXFL_DECLSPEC l; \ + WX_DEFINE_ARRAY_LONG(t,l) + + +#endif // __fldefs_H_INCLUDED__ diff --git a/contrib/include/wx/fl/frmview.h b/contrib/include/wx/fl/frmview.h index 8830ab8e0a..8abc9efa36 100644 --- a/contrib/include/wx/fl/frmview.h +++ b/contrib/include/wx/fl/frmview.h @@ -32,7 +32,7 @@ class wxFrameManager; It is not clear what this class does. It is not used elsewhere in FL. */ -class wxFrameView : public wxEvtHandler +class WXFL_DECLSPEC wxFrameView : public wxEvtHandler { protected: wxStringList mTopMenus; @@ -87,7 +87,7 @@ class wxFrame; It is not clear what this class does. It is not used elsewhere in FL. */ -class wxFrameManager : wxObject +class WXFL_DECLSPEC wxFrameManager : wxObject { protected: wxList mViews; diff --git a/contrib/include/wx/fl/garbagec.h b/contrib/include/wx/fl/garbagec.h index b5f991abfa..652854fc01 100644 --- a/contrib/include/wx/fl/garbagec.h +++ b/contrib/include/wx/fl/garbagec.h @@ -17,6 +17,7 @@ #endif #include "wx/list.h" +#include "wx/fl/fldefs.h" struct GCItem { @@ -33,7 +34,7 @@ inline void* gc_node_to_obj( wxNode* pGCNode ) This class implements an extremely slow but simple garbage collection algorithm. */ -class GarbageCollector +class WXFL_DECLSPEC GarbageCollector { protected: wxList mAllNodes; diff --git a/contrib/include/wx/fl/gcupdatesmgr.h b/contrib/include/wx/fl/gcupdatesmgr.h index 2bfc959f89..4a0310432f 100644 --- a/contrib/include/wx/fl/gcupdatesmgr.h +++ b/contrib/include/wx/fl/gcupdatesmgr.h @@ -93,7 +93,7 @@ to avoid dirty non-client areas of moved windows in some special cases of 'overlapping anomalies'. */ -class cbGCUpdatesMgr : public cbSimpleUpdatesMgr +class WXFL_DECLSPEC cbGCUpdatesMgr : public cbSimpleUpdatesMgr { DECLARE_DYNAMIC_CLASS( cbGCUpdatesMgr ) protected: diff --git a/contrib/include/wx/fl/hintanimpl.h b/contrib/include/wx/fl/hintanimpl.h index e35083386e..1a07c59d6d 100644 --- a/contrib/include/wx/fl/hintanimpl.h +++ b/contrib/include/wx/fl/hintanimpl.h @@ -20,13 +20,13 @@ #include "wx/timer.h" -class cbHintAnimTimer; +class WXFL_DECLSPEC cbHintAnimTimer; /* A plugin to draw animated hints when the user drags a pane. */ -class cbHintAnimationPlugin : public cbPluginBase +class WXFL_DECLSPEC cbHintAnimationPlugin : public cbPluginBase { DECLARE_DYNAMIC_CLASS( cbHintAnimationPlugin ) protected: @@ -101,7 +101,7 @@ public: A private helper class. */ -struct MorphInfoT +struct WXFL_DECLSPEC MorphInfoT { wxPoint mFrom; wxPoint mTill; @@ -111,7 +111,7 @@ struct MorphInfoT A private helper class. */ -class cbHintAnimTimer : public wxTimer +class WXFL_DECLSPEC cbHintAnimTimer : public wxTimer { protected: diff --git a/contrib/include/wx/fl/newbmpbtn.h b/contrib/include/wx/fl/newbmpbtn.h index 73fcc32b59..882b29f745 100644 --- a/contrib/include/wx/fl/newbmpbtn.h +++ b/contrib/include/wx/fl/newbmpbtn.h @@ -18,6 +18,7 @@ #include "wx/button.h" #include "wx/string.h" +#include "wx/fl/fldefs.h" // defaults #define NB_DEFAULT_MARGIN 2 @@ -31,8 +32,8 @@ // classes declared in this header file -class wxNewBitmapButton; -class wxBorderLessBitmapButton; +class WXFL_DECLSPEC wxNewBitmapButton; +class WXFL_DECLSPEC wxBorderLessBitmapButton; /* This is an alternative class to wxBitmapButton. It is used @@ -109,7 +110,7 @@ public: // Constructor. wxNewBitmapButton( const wxBitmap& labelBitmap = wxNullBitmap, - const wxString& labelText = "", + const wxString& labelText = wxT(""), int alignText = NB_ALIGN_TEXT_BOTTOM, bool isFlat = TRUE, // this is the default type of fired events @@ -123,7 +124,7 @@ public: // Use this constructor if buttons have to be persistant wxNewBitmapButton( const wxString& bitmapFileName, const wxBitmapType bitmapFileType = wxBITMAP_TYPE_BMP, - const wxString& labelText = "", + const wxString& labelText = wxT(""), int alignText = NB_ALIGN_TEXT_BOTTOM, bool isFlat = TRUE, // this is the default type of fired events @@ -142,7 +143,7 @@ public: virtual void Reshape(); // Sets the label and optionally label text. - virtual void SetLabel(const wxBitmap& labelBitmap, const wxString& labelText = "" ); + virtual void SetLabel(const wxBitmap& labelBitmap, const wxString& labelText = wxT("") ); // Sets the text alignment and margins. virtual void SetAlignments( int alignText = NB_ALIGN_TEXT_BOTTOM, @@ -194,11 +195,6 @@ public: // Responds to a kill focus event. void OnKillFocus( wxFocusEvent& event ); - // Maps bitmap to current system colours on Windows -#ifdef __WXMSW__ - WXHBITMAP MapBitmap(WXHBITMAP bitmap, int width, int height); -#endif - DECLARE_EVENT_TABLE() }; diff --git a/contrib/include/wx/fl/panedrawpl.h b/contrib/include/wx/fl/panedrawpl.h index 781a9f39bc..e84f318fc6 100644 --- a/contrib/include/wx/fl/panedrawpl.h +++ b/contrib/include/wx/fl/panedrawpl.h @@ -27,7 +27,7 @@ would be enough for the frame layout to function properly (they are plugged in automatically by the wxFrameLayout class). */ -class cbPaneDrawPlugin : public cbPluginBase +class WXFL_DECLSPEC cbPaneDrawPlugin : public cbPluginBase { public: DECLARE_DYNAMIC_CLASS( cbPaneDrawPlugin ) diff --git a/contrib/include/wx/fl/rowdragpl.h b/contrib/include/wx/fl/rowdragpl.h index e9b94aea5b..831a7b7f94 100644 --- a/contrib/include/wx/fl/rowdragpl.h +++ b/contrib/include/wx/fl/rowdragpl.h @@ -25,7 +25,7 @@ The behaviour and appearance resembles drag and drop positioning of the toolbar rows in Netscape Communicator 4.xx. */ -class cbRowDragPlugin : public cbPluginBase +class WXFL_DECLSPEC cbRowDragPlugin : public cbPluginBase { DECLARE_DYNAMIC_CLASS( cbRowDragPlugin ) public: @@ -217,7 +217,7 @@ public: Internal helper class. */ -class cbHiddenBarInfo : public wxObject +class WXFL_DECLSPEC cbHiddenBarInfo : public wxObject { DECLARE_DYNAMIC_CLASS( cbHiddenBarInfo ) public: diff --git a/contrib/include/wx/fl/rowlayoutpl.h b/contrib/include/wx/fl/rowlayoutpl.h index fa1bc52ebf..969140a8a5 100644 --- a/contrib/include/wx/fl/rowlayoutpl.h +++ b/contrib/include/wx/fl/rowlayoutpl.h @@ -23,7 +23,7 @@ Simple implementation of a plugin which handles row layout requests sent from a frame layout. */ -class cbRowLayoutPlugin : public cbPluginBase +class WXFL_DECLSPEC cbRowLayoutPlugin : public cbPluginBase { DECLARE_DYNAMIC_CLASS( cbRowLayoutPlugin ) protected: diff --git a/contrib/include/wx/fl/toolwnd.h b/contrib/include/wx/fl/toolwnd.h index c6509280e6..2024c0c3d0 100644 --- a/contrib/include/wx/fl/toolwnd.h +++ b/contrib/include/wx/fl/toolwnd.h @@ -19,6 +19,7 @@ #include "wx/frame.h" #include "wx/dynarray.h" +#include "wx/fl/fldefs.h" // fixed settings @@ -26,18 +27,18 @@ #define BTN_BOX_WIDTH 12 #define BTN_X_WIEGHT 2 -class cbMiniButton; +class WXFL_DECLSPEC cbMiniButton; typedef cbMiniButton* cbMinitButtonPtrT; -WX_DEFINE_ARRAY( cbMinitButtonPtrT, cbMiniButtonArrayT ); +WXFL_DEFINE_ARRAY( cbMinitButtonPtrT, cbMiniButtonArrayT ); /* A tool window is a special kind of frame that paints its own title, and can be used to implement small floating windows. */ -class wxToolWindow : public wxFrame +class WXFL_DECLSPEC wxToolWindow : public wxFrame { DECLARE_DYNAMIC_CLASS( wxToolWindow ) @@ -221,7 +222,7 @@ public: cbCloseBox is a window close button, used in a wxToolWindow titlebar. */ -class cbCloseBox : public cbMiniButton +class WXFL_DECLSPEC cbCloseBox : public cbMiniButton { public: // Draws the close button appearance. @@ -232,7 +233,7 @@ public: cbCollapseBox is a window collapse button, used in a wxToolWindow titlebar. */ -class cbCollapseBox : public cbMiniButton +class WXFL_DECLSPEC cbCollapseBox : public cbMiniButton { public: bool mIsAtLeft; @@ -245,7 +246,7 @@ public: cbDockBox is a window dock button, used in a wxToolWindow titlebar. */ -class cbDockBox : public cbMiniButton +class WXFL_DECLSPEC cbDockBox : public cbMiniButton { public: // Draws the dock button appearance. @@ -257,7 +258,7 @@ cbFloatedBarWindow is a kind of wxToolWindow, implementing floating toolbars. */ -class cbFloatedBarWindow : public wxToolWindow +class WXFL_DECLSPEC cbFloatedBarWindow : public wxToolWindow { DECLARE_DYNAMIC_CLASS( cbFloatedBarWindow ) protected: diff --git a/contrib/include/wx/fl/updatesmgr.h b/contrib/include/wx/fl/updatesmgr.h index 027d51315b..52a3222b9f 100644 --- a/contrib/include/wx/fl/updatesmgr.h +++ b/contrib/include/wx/fl/updatesmgr.h @@ -23,7 +23,7 @@ This class implements slightly optimized logic for refreshing the areas of frame layout that actually need to be updated. */ -class cbSimpleUpdatesMgr : public cbUpdatesManagerBase +class WXFL_DECLSPEC cbSimpleUpdatesMgr : public cbUpdatesManagerBase { DECLARE_DYNAMIC_CLASS( cbSimpleUpdatesMgr ) protected: diff --git a/contrib/include/wx/gizmos/dynamicsash.h b/contrib/include/wx/gizmos/dynamicsash.h index a3b2f22363..6ad05841c3 100644 --- a/contrib/include/wx/gizmos/dynamicsash.h +++ b/contrib/include/wx/gizmos/dynamicsash.h @@ -142,19 +142,21 @@ typedef void (wxEvtHandler::*wxDynamicSashUnifyEventFunction)(wxDynamicSashSplit /* wxDynamicSashWindow. See above. */ +extern const wxChar* GIZMODLLEXPORT wxDynamicSashWindowNameStr; + class GIZMODLLEXPORT wxDynamicSashWindow : public wxWindow { public: wxDynamicSashWindow(); wxDynamicSashWindow(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCLIP_CHILDREN | wxDS_MANAGE_SCROLLBARS | wxDS_DRAG_CORNER, - const wxString& name = "dynamicSashWindow"); + const wxString& name = wxDynamicSashWindowNameStr); virtual ~wxDynamicSashWindow(); virtual bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCLIP_CHILDREN | wxDS_MANAGE_SCROLLBARS | wxDS_DRAG_CORNER, - const wxString& name = "dynamicSashWindow"); + const wxString& name = wxDynamicSashWindowNameStr); virtual wxScrollBar *GetHScrollBar(const wxWindow *child) const; virtual wxScrollBar *GetVScrollBar(const wxWindow *child) const; diff --git a/contrib/include/wx/gizmos/multicell.h b/contrib/include/wx/gizmos/multicell.h index 895c98dd08..aea204f41c 100644 --- a/contrib/include/wx/gizmos/multicell.h +++ b/contrib/include/wx/gizmos/multicell.h @@ -40,7 +40,7 @@ enum wxResizable { wxNOT_RESIZABLE = 0x00, - wxHORIZENTAL_RESIZABLE = 0x01, + wxHORIZONTAL_RESIZABLE = 0x01, wxVERTICAL_RESIZABLE = 0x10, wxRESIZABLE = 0x11 }; diff --git a/contrib/include/wx/ogl/basic.h b/contrib/include/wx/ogl/basic.h index 30c23cea36..eeaead4b10 100644 --- a/contrib/include/wx/ogl/basic.h +++ b/contrib/include/wx/ogl/basic.h @@ -22,11 +22,6 @@ #define DEFAULT_MOUSE_TOLERANCE 3 #endif -// Edit these lines if you positively don't want PROLOGIO support -#ifndef PROLOGIO -#define PROLOGIO -#endif - // Key identifiers #define KEY_SHIFT 1 #define KEY_CTRL 2 @@ -110,7 +105,7 @@ class wxControlPoint; class wxShapeRegion; class wxShape; -#ifdef PROLOGIO +#if wxUSE_PROLOGIO class WXDLLEXPORT wxExpr; class WXDLLEXPORT wxExprDatabase; #endif @@ -358,7 +353,7 @@ class wxShape: public wxShapeEvtHandler virtual int GetRegionId(const wxString& name); // Construct names for regions, unique even for children of a composite. - virtual void NameRegions(const wxString& parentName = ""); + virtual void NameRegions(const wxString& parentName = wxEmptyString); // Get list of regions inline wxList& GetRegions() const { return (wxList&) m_regions; } @@ -381,7 +376,7 @@ class wxShape: public wxShapeEvtHandler virtual void ClearText(int regionId = 0); void RemoveLine(wxLineShape *line); -#ifdef PROLOGIO +#if wxUSE_PROLOGIO // I/O virtual void WriteAttributes(wxExpr *clause); virtual void ReadAttributes(wxExpr *clause); @@ -613,7 +608,7 @@ class wxPolygonShape: public wxShape // Recalculates the centre of the polygon virtual void CalculatePolygonCentre(); -#ifdef PROLOGIO +#if wxUSE_PROLOGIO void WriteAttributes(wxExpr *clause); void ReadAttributes(wxExpr *clause); #endif @@ -652,7 +647,7 @@ class wxRectangleShape: public wxShape void SetSize(double x, double y, bool recursive = TRUE); void SetCornerRadius(double rad); // If > 0, rounded corners -#ifdef PROLOGIO +#if wxUSE_PROLOGIO void WriteAttributes(wxExpr *clause); void ReadAttributes(wxExpr *clause); #endif @@ -682,8 +677,8 @@ class wxTextShape: public wxRectangleShape void OnDraw(wxDC& dc); -#ifdef PROLOGIO - void WriteAttributes(wxExpr *clause); +#if wxUSE_PROLOGIO + void WriteAttributes(wxExpr *clause); #endif // Does the copying for this object @@ -704,7 +699,7 @@ class wxEllipseShape: public wxShape void OnDraw(wxDC& dc); void SetSize(double x, double y, bool recursive = TRUE); -#ifdef PROLOGIO +#if wxUSE_PROLOGIO void WriteAttributes(wxExpr *clause); void ReadAttributes(wxExpr *clause); #endif diff --git a/contrib/include/wx/ogl/basicp.h b/contrib/include/wx/ogl/basicp.h index fddc8732ac..c0927c0c17 100644 --- a/contrib/include/wx/ogl/basicp.h +++ b/contrib/include/wx/ogl/basicp.h @@ -22,7 +22,7 @@ class wxShapeTextLine: public wxObject { DECLARE_DYNAMIC_CLASS(wxShapeTextLine) public: - wxShapeTextLine(double the_x = 0.0, double the_y = 0.0, const wxString& the_line = ""); + wxShapeTextLine(double the_x = 0.0, double the_y = 0.0, const wxString& the_line = wxEmptyString); ~wxShapeTextLine(); inline double GetX() const { return m_x; } @@ -136,7 +136,8 @@ class wxShapeRegion: public wxObject ~wxShapeRegion(); // Accessors - inline void SetText(const wxString& s) { m_regionText = s; } + inline void SetText(const wxString& s) + { m_regionText = s; m_formattedText.Append(new wxShapeTextLine(0,0,s));} void SetFont(wxFont *f); void SetMinSize(double w, double h); void SetSize(double w, double h); diff --git a/contrib/include/wx/ogl/bmpshape.h b/contrib/include/wx/ogl/bmpshape.h index 1b56477550..5389351fe4 100644 --- a/contrib/include/wx/ogl/bmpshape.h +++ b/contrib/include/wx/ogl/bmpshape.h @@ -27,7 +27,7 @@ class wxBitmapShape: public wxRectangleShape void OnDraw(wxDC& dc); -#ifdef PROLOGIO +#if wxUSE_PROLOGIO // I/O void WriteAttributes(wxExpr *clause); void ReadAttributes(wxExpr *clause); diff --git a/contrib/include/wx/ogl/composit.h b/contrib/include/wx/ogl/composit.h index fc373fe505..618629d4ff 100644 --- a/contrib/include/wx/ogl/composit.h +++ b/contrib/include/wx/ogl/composit.h @@ -77,7 +77,7 @@ public: // Calculates size and position of composite object based on children void CalculateSize(); -#ifdef PROLOGIO +#if wxUSE_PROLOGIO void WriteAttributes(wxExpr *clause); void ReadAttributes(wxExpr *clause); // In case the object has constraints it needs to read in in a different pass @@ -152,7 +152,7 @@ class wxDivisionShape: public wxCompositeShape void MakeMandatoryControlPoints(); void ResetMandatoryControlPoints(); -#ifdef PROLOGIO +#if wxUSE_PROLOGIO void WriteAttributes(wxExpr *clause); void ReadAttributes(wxExpr *clause); #endif diff --git a/contrib/include/wx/ogl/constrnt.h b/contrib/include/wx/ogl/constrnt.h index b70bd2f32f..bd0616e491 100644 --- a/contrib/include/wx/ogl/constrnt.h +++ b/contrib/include/wx/ogl/constrnt.h @@ -25,7 +25,8 @@ class wxOGLConstraintType: public wxObject { DECLARE_DYNAMIC_CLASS(wxOGLConstraintType) public: - wxOGLConstraintType(int type = 0, const wxString& name = "", const wxString& phrase = ""); + wxOGLConstraintType(int type = 0, const wxString& name = wxEmptyString, + const wxString& phrase = wxEmptyString); ~wxOGLConstraintType(); public: @@ -60,8 +61,10 @@ class wxOGLConstraint: public wxObject { DECLARE_DYNAMIC_CLASS(wxOGLConstraint) public: - wxOGLConstraint() { m_xSpacing = 0.0; m_ySpacing = 0.0; m_constraintType = 0; m_constraintName = ""; m_constraintId = 0; - m_constrainingObject = NULL; } + wxOGLConstraint() { + m_xSpacing = 0.0; m_ySpacing = 0.0; m_constraintType = 0; + m_constraintName = wxEmptyString; m_constraintId = 0; + m_constrainingObject = NULL; } wxOGLConstraint(int type, wxShape *constraining, wxList& constrained); ~wxOGLConstraint(); diff --git a/contrib/include/wx/ogl/divided.h b/contrib/include/wx/ogl/divided.h index a427a63062..6fc733eee3 100644 --- a/contrib/include/wx/ogl/divided.h +++ b/contrib/include/wx/ogl/divided.h @@ -46,7 +46,7 @@ class wxDividedShape: public wxRectangleShape void MakeMandatoryControlPoints(); void ResetMandatoryControlPoints(); -#ifdef PROLOGIO +#if wxUSE_PROLOGIO void WriteAttributes(wxExpr *clause); void ReadAttributes(wxExpr *clause); #endif diff --git a/contrib/include/wx/ogl/drawn.h b/contrib/include/wx/ogl/drawn.h index 4bc00f91d3..dd7ba01ffd 100644 --- a/contrib/include/wx/ogl/drawn.h +++ b/contrib/include/wx/ogl/drawn.h @@ -32,7 +32,7 @@ class wxPseudoMetaFile: public wxObject void Draw(wxDC& dc, double xoffset, double yoffset); -#ifdef PROLOGIO +#if wxUSE_PROLOGIO void WriteAttributes(wxExpr *clause, int whichAngle); void ReadAttributes(wxExpr *clause, int whichAngle); #endif @@ -48,7 +48,7 @@ class wxPseudoMetaFile: public wxObject // Rotate about the given axis by theta radians from the x axis. void Rotate(double x, double y, double theta); - bool LoadFromMetaFile(char *filename, double *width, double *height); + bool LoadFromMetaFile(const wxString& filename, double *width, double *height); void GetBounds(double *minX, double *minY, double *maxX, double *maxY); @@ -139,7 +139,7 @@ class wxDrawnShape: public wxRectangleShape void OnDraw(wxDC& dc); -#ifdef PROLOGIO +#if wxUSE_PROLOGIO // I/O void WriteAttributes(wxExpr *clause); void ReadAttributes(wxExpr *clause); @@ -157,7 +157,7 @@ class wxDrawnShape: public wxRectangleShape inline double GetRotation() const { return m_rotation; } void SetSize(double w, double h, bool recursive = TRUE); - bool LoadFromMetaFile(char *filename); + bool LoadFromMetaFile(const wxString& filename); inline void SetSaveToFile(bool save) { m_saveToFile = save; } inline wxPseudoMetaFile& GetMetaFile(int which = 0) const { return (wxPseudoMetaFile&) m_metafiles[which]; } diff --git a/contrib/include/wx/ogl/drawnp.h b/contrib/include/wx/ogl/drawnp.h index 98ca0a8b65..dd083219b8 100644 --- a/contrib/include/wx/ogl/drawnp.h +++ b/contrib/include/wx/ogl/drawnp.h @@ -65,9 +65,10 @@ public: inline virtual void Rotate(double x, double y, double theta, double sinTheta, double cosTheta) {}; virtual void Do(wxDC& dc, double xoffset, double yoffset) = 0; virtual wxDrawOp *Copy(wxPseudoMetaFile *newImage) = 0; +#if wxUSE_PROLOGIO virtual wxExpr *WriteExpr(wxPseudoMetaFile *image) = 0; virtual void ReadExpr(wxPseudoMetaFile *image, wxExpr *expr) = 0; - +#endif inline int GetOp() const { return m_op; } // Draw an outline using the current operation. By default, return FALSE (not drawn) @@ -98,8 +99,10 @@ class wxOpSetGDI: public wxDrawOp wxOpSetGDI(int theOp, wxPseudoMetaFile *theImage, int theGdiIndex, int theMode = 0); void Do(wxDC& dc, double xoffset, double yoffset); wxDrawOp *Copy(wxPseudoMetaFile *newImage); +#if wxUSE_PROLOGIO wxExpr *WriteExpr(wxPseudoMetaFile *image); void ReadExpr(wxPseudoMetaFile *image, wxExpr *expr); +#endif public: int m_mode; @@ -123,8 +126,10 @@ public: void Scale(double xScale, double yScale); void Translate(double x, double y); wxDrawOp *Copy(wxPseudoMetaFile *newImage); +#if wxUSE_PROLOGIO wxExpr *WriteExpr(wxPseudoMetaFile *image); void ReadExpr(wxPseudoMetaFile *image, wxExpr *expr); +#endif public: double m_x1; @@ -149,8 +154,10 @@ class wxOpDraw: public wxDrawOp void Translate(double x, double y); void Rotate(double x, double y, double theta, double sinTheta, double cosTheta); wxDrawOp *Copy(wxPseudoMetaFile *newImage); +#if wxUSE_PROLOGIO wxExpr *WriteExpr(wxPseudoMetaFile *image); void ReadExpr(wxPseudoMetaFile *image, wxExpr *expr); +#endif public: double m_x1; @@ -179,8 +186,10 @@ public: void Translate(double x, double y); void Rotate(double x, double y, double theta, double sinTheta, double cosTheta); wxDrawOp *Copy(wxPseudoMetaFile *newImage); +#if wxUSE_PROLOGIO wxExpr *WriteExpr(wxPseudoMetaFile *image); void ReadExpr(wxPseudoMetaFile *image, wxExpr *expr); +#endif // Draw an outline using the current operation. virtual bool OnDrawOutline(wxDC& dc, double x, double y, double w, double h, diff --git a/contrib/include/wx/ogl/lines.h b/contrib/include/wx/ogl/lines.h index 0fb141ea98..d274c88f0b 100644 --- a/contrib/include/wx/ogl/lines.h +++ b/contrib/include/wx/ogl/lines.h @@ -51,7 +51,7 @@ class wxArrowHead: public wxObject DECLARE_DYNAMIC_CLASS(wxArrowHead) public: - wxArrowHead(WXTYPE type = 0, int end = 0, double size = 0.0, double dist = 0.0, const wxString& name = "", wxPseudoMetaFile *mf = NULL, + wxArrowHead(WXTYPE type = 0, int end = 0, double size = 0.0, double dist = 0.0, const wxString& name = wxEmptyString, wxPseudoMetaFile *mf = NULL, long arrowId = -1); ~wxArrowHead(); wxArrowHead(wxArrowHead& toCopy); @@ -188,7 +188,7 @@ class wxLineShape: public wxShape bool HitTest(double x, double y, int *attachment, double *distance); -#ifdef PROLOGIO +#if wxUSE_PROLOGIO // I/O virtual void WriteAttributes(wxExpr *clause); virtual void ReadAttributes(wxExpr *clause); @@ -210,8 +210,9 @@ class wxLineShape: public wxShape // Add an arrowhead. wxArrowHead *AddArrow(WXTYPE type, int end = ARROW_POSITION_END, - double arrowSize = 10.0, double xOffset = 0.0, const wxString& name = "", - wxPseudoMetaFile *mf = NULL, long arrowId = -1); + double arrowSize = 10.0, double xOffset = 0.0, + const wxString& name = wxEmptyString, + wxPseudoMetaFile *mf = NULL, long arrowId = -1); // Add an arrowhead in the position indicated by the reference // list of arrowheads, which contains all legal arrowheads for this diff --git a/contrib/include/wx/ogl/mfutils.h b/contrib/include/wx/ogl/mfutils.h index 27ceb4b618..7e8a6e6a8a 100644 --- a/contrib/include/wx/ogl/mfutils.h +++ b/contrib/include/wx/ogl/mfutils.h @@ -195,7 +195,7 @@ class wxXMetaFile: public wxObject wxList metaRecords; wxList gdiObjects; // List of wxMetaRecord objects created with Create..., // referenced by position in list by SelectObject - wxXMetaFile(char *file = NULL); + wxXMetaFile(const wxChar* file = NULL); ~wxXMetaFile(void); // After this is called, the metafile cannot be used for anything @@ -204,7 +204,7 @@ class wxXMetaFile: public wxObject bool Play(wxDC *dc); inline bool Ok(void) const { return ok; } - bool ReadFile(char *file); + bool ReadFile(const wxChar *file); }; #endif diff --git a/contrib/include/wx/ogl/ogldiag.h b/contrib/include/wx/ogl/ogldiag.h index afe7db18c4..7a593f2466 100644 --- a/contrib/include/wx/ogl/ogldiag.h +++ b/contrib/include/wx/ogl/ogldiag.h @@ -67,7 +67,7 @@ public: // Make sure all text that should be centred, is centred. void RecentreAll(wxDC& dc); -#ifdef PROLOGIO +#if wxUSE_PROLOGIO virtual bool SaveFile(const wxString& filename); virtual bool LoadFile(const wxString& filename); diff --git a/contrib/include/wx/stc/stc.h b/contrib/include/wx/stc/stc.h index 640eac8baf..193376418f 100644 --- a/contrib/include/wx/stc/stc.h +++ b/contrib/include/wx/stc/stc.h @@ -24,6 +24,30 @@ #include #include +#ifndef SWIG +/* + * If we're using wx in Dynamic Library format do we + * want wxStyledTextCtrl to be in DLL form as well? + */ +#if defined(WXUSINGDLL) && \ + (defined(WXMAKING_STC_DLL) || defined(WXUSING_STC_DLL)) + +#if defined(WXMAKING_STC_DLL) + // When building the DLL WXSTC_DECLSPEC exports classes +# define WXSTC_DECLSPEC WXEXPORT +#elif defined(WXUSING_STC_DLL) + // When using the DLL WXSTC_DECLSPEC imports classes +# define WXSTC_DECLSPEC WXIMPORT +#endif // defined(WXBUILD_STC_DLL) + +#else +// When building the static library nullify the effect of WXSTC_DECLSPEC +#define WXSTC_DECLSPEC +#endif // WXUSINGDLL && (WXMAKING_STC_DLL || WXUSING_STC_DLL) + +#endif // SWIG + + //---------------------------------------------------------------------- // Should a wxPopupWindow be used for the call tips and autocomplete windows? @@ -43,12 +67,6 @@ #define wxSTC_START 2000 #define wxSTC_OPTIONAL_START 3000 #define wxSTC_LEXER_START 4000 - -// Redoes the next action on the undo history. -#define wxSTC_CMD_REDO 2011 - -// Select all the text in the document. -#define wxSTC_CMD_SELECTALL 2013 #define wxSTC_WS_INVISIBLE 0 #define wxSTC_WS_VISIBLEALWAYS 1 #define wxSTC_WS_VISIBLEAFTERINDENT 2 @@ -59,6 +77,9 @@ // The SC_CP_UTF8 value can be used to enter Unicode mode. // This is the same value as CP_UTF8 in Windows #define wxSTC_CP_UTF8 65001 + +// The SC_CP_DBCS value can be used to indicate a DBCS mode for GTK+. +#define wxSTC_CP_DBCS 1 #define wxSTC_MARKER_MAX 31 #define wxSTC_MARK_CIRCLE 0 #define wxSTC_MARK_ROUNDRECT 1 @@ -89,6 +110,7 @@ #define wxSTC_MARK_BACKGROUND 22 #define wxSTC_MARK_DOTDOTDOT 23 #define wxSTC_MARK_ARROWS 24 +#define wxSTC_MARK_PIXMAP 25 #define wxSTC_MARK_CHARACTER 10000 // Markers used for outlining column. @@ -167,22 +189,21 @@ #define wxSTC_FIND_MATCHCASE 4 #define wxSTC_FIND_WORDSTART 0x00100000 #define wxSTC_FIND_REGEXP 0x00200000 - -// Undo one action in the undo history. -#define wxSTC_CMD_UNDO 2176 - -// Cut the selection to the clipboard. -#define wxSTC_CMD_CUT 2177 - -// Copy the selection to the clipboard. -#define wxSTC_CMD_COPY 2178 - -// Paste the contents of the clipboard into the document replacing the selection. -#define wxSTC_CMD_PASTE 2179 +#define wxSTC_FIND_POSIX 0x00400000 #define wxSTC_FOLDLEVELBASE 0x400 #define wxSTC_FOLDLEVELWHITEFLAG 0x1000 #define wxSTC_FOLDLEVELHEADERFLAG 0x2000 +#define wxSTC_FOLDLEVELBOXHEADERFLAG 0x4000 +#define wxSTC_FOLDLEVELBOXFOOTERFLAG 0x8000 +#define wxSTC_FOLDLEVELCONTRACTED 0x10000 +#define wxSTC_FOLDLEVELUNINDENT 0x20000 #define wxSTC_FOLDLEVELNUMBERMASK 0x0FFF +#define wxSTC_FOLDFLAG_LINEBEFORE_EXPANDED 0x0002 +#define wxSTC_FOLDFLAG_LINEBEFORE_CONTRACTED 0x0004 +#define wxSTC_FOLDFLAG_LINEAFTER_EXPANDED 0x0008 +#define wxSTC_FOLDFLAG_LINEAFTER_CONTRACTED 0x0010 +#define wxSTC_FOLDFLAG_LEVELNUMBERS 0x0040 +#define wxSTC_FOLDFLAG_BOX 0x0001 #define wxSTC_TIME_FOREVER 10000000 #define wxSTC_WRAP_NONE 0 #define wxSTC_WRAP_WORD 1 @@ -190,163 +211,11 @@ #define wxSTC_CACHE_CARET 1 #define wxSTC_CACHE_PAGE 2 #define wxSTC_CACHE_DOCUMENT 3 - -// Move caret down one line. -#define wxSTC_CMD_LINEDOWN 2300 - -// Move caret down one line extending selection to new caret position. -#define wxSTC_CMD_LINEDOWNEXTEND 2301 - -// Move caret up one line. -#define wxSTC_CMD_LINEUP 2302 - -// Move caret up one line extending selection to new caret position. -#define wxSTC_CMD_LINEUPEXTEND 2303 - -// Move caret left one character. -#define wxSTC_CMD_CHARLEFT 2304 - -// Move caret left one character extending selection to new caret position. -#define wxSTC_CMD_CHARLEFTEXTEND 2305 - -// Move caret right one character. -#define wxSTC_CMD_CHARRIGHT 2306 - -// Move caret right one character extending selection to new caret position. -#define wxSTC_CMD_CHARRIGHTEXTEND 2307 - -// Move caret left one word. -#define wxSTC_CMD_WORDLEFT 2308 - -// Move caret left one word extending selection to new caret position. -#define wxSTC_CMD_WORDLEFTEXTEND 2309 - -// Move caret right one word. -#define wxSTC_CMD_WORDRIGHT 2310 - -// Move caret right one word extending selection to new caret position. -#define wxSTC_CMD_WORDRIGHTEXTEND 2311 - -// Move caret to first position on line. -#define wxSTC_CMD_HOME 2312 - -// Move caret to first position on line extending selection to new caret position. -#define wxSTC_CMD_HOMEEXTEND 2313 - -// Move caret to last position on line. -#define wxSTC_CMD_LINEEND 2314 - -// Move caret to last position on line extending selection to new caret position. -#define wxSTC_CMD_LINEENDEXTEND 2315 - -// Move caret to first position in document. -#define wxSTC_CMD_DOCUMENTSTART 2316 - -// Move caret to first position in document extending selection to new caret position. -#define wxSTC_CMD_DOCUMENTSTARTEXTEND 2317 - -// Move caret to last position in document. -#define wxSTC_CMD_DOCUMENTEND 2318 - -// Move caret to last position in document extending selection to new caret position. -#define wxSTC_CMD_DOCUMENTENDEXTEND 2319 - -// Move caret one page up. -#define wxSTC_CMD_PAGEUP 2320 - -// Move caret one page up extending selection to new caret position. -#define wxSTC_CMD_PAGEUPEXTEND 2321 - -// Move caret one page down. -#define wxSTC_CMD_PAGEDOWN 2322 - -// Move caret one page down extending selection to new caret position. -#define wxSTC_CMD_PAGEDOWNEXTEND 2323 - -// Switch from insert to overtype mode or the reverse. -#define wxSTC_CMD_EDITTOGGLEOVERTYPE 2324 - -// Cancel any modes such as call tip or auto-completion list display. -#define wxSTC_CMD_CANCEL 2325 - -// Delete the selection or if no selection, the character before the caret. -#define wxSTC_CMD_DELETEBACK 2326 - -// If selection is empty or all on one line replace the selection with a tab character. -// If more than one line selected, indent the lines. -#define wxSTC_CMD_TAB 2327 - -// Dedent the selected lines. -#define wxSTC_CMD_BACKTAB 2328 - -// Insert a new line, may use a CRLF, CR or LF depending on EOL mode. -#define wxSTC_CMD_NEWLINE 2329 - -// Insert a Form Feed character. -#define wxSTC_CMD_FORMFEED 2330 - -// Move caret to before first visible character on line. -// If already there move to first character on line. -#define wxSTC_CMD_VCHOME 2331 - -// Like VCHome but extending selection to new caret position. -#define wxSTC_CMD_VCHOMEEXTEND 2332 - -// Magnify the displayed text by increasing the sizes by 1 point. -#define wxSTC_CMD_ZOOMIN 2333 - -// Make the displayed text smaller by decreasing the sizes by 1 point. -#define wxSTC_CMD_ZOOMOUT 2334 - -// Delete the word to the left of the caret. -#define wxSTC_CMD_DELWORDLEFT 2335 - -// Delete the word to the right of the caret. -#define wxSTC_CMD_DELWORDRIGHT 2336 - -// Cut the line containing the caret. -#define wxSTC_CMD_LINECUT 2337 - -// Delete the line containing the caret. -#define wxSTC_CMD_LINEDELETE 2338 - -// Switch the current line with the previous. -#define wxSTC_CMD_LINETRANSPOSE 2339 - -// Transform the selection to lower case. -#define wxSTC_CMD_LOWERCASE 2340 - -// Transform the selection to upper case. -#define wxSTC_CMD_UPPERCASE 2341 - -// Scroll the document down, keeping the caret visible. -#define wxSTC_CMD_LINESCROLLDOWN 2342 - -// Scroll the document up, keeping the caret visible. -#define wxSTC_CMD_LINESCROLLUP 2343 - -// Delete the selection or if no selection, the character before the caret. -// Will not delete the character before at the start of a line. -#define wxSTC_CMD_DELETEBACKNOTLINE 2344 - -// Move caret to first position on display line. -#define wxSTC_CMD_HOMEDISPLAY 2345 - -// Move caret to first position on display line extending selection to -// new caret position. -#define wxSTC_CMD_HOMEDISPLAYEXTEND 2346 - -// Move caret to last position on display line. -#define wxSTC_CMD_LINEENDDISPLAY 2347 - -// Move caret to last position on display line extending selection to new -// caret position. -#define wxSTC_CMD_LINEENDDISPLAYEXTEND 2348 #define wxSTC_EDGE_NONE 0 #define wxSTC_EDGE_LINE 1 #define wxSTC_EDGE_BACKGROUND 2 #define wxSTC_CURSORNORMAL -1 -#define wxSTC_CURSORWAIT 3 +#define wxSTC_CURSORWAIT 4 // Constants for use with SetVisiblePolicy, similar to SetCaretPolicy. #define wxSTC_VISIBLE_SLOP 0x01 @@ -454,6 +323,12 @@ #define wxSTC_LEX_BAAN 31 #define wxSTC_LEX_MATLAB 32 #define wxSTC_LEX_SCRIPTOL 33 +#define wxSTC_LEX_ASM 34 +#define wxSTC_LEX_CPPNOCASE 35 +#define wxSTC_LEX_FORTRAN 36 +#define wxSTC_LEX_F77 37 +#define wxSTC_LEX_CSS 38 +#define wxSTC_LEX_POV 39 // When a lexer specifies its language as SCLEX_AUTOMATIC it receives a // value assigned in sequence from SCLEX_AUTOMATIC+1. @@ -722,6 +597,9 @@ #define wxSTC_ERR_DIFF_ADDITION 11 #define wxSTC_ERR_DIFF_DELETION 12 #define wxSTC_ERR_DIFF_MESSAGE 13 +#define wxSTC_ERR_PHP 14 +#define wxSTC_ERR_ELF 15 +#define wxSTC_ERR_IFC 16 // Lexical states for SCLEX_BATCH #define wxSTC_BAT_DEFAULT 0 @@ -768,24 +646,31 @@ #define wxSTC_AVE_COMMENT 1 #define wxSTC_AVE_NUMBER 2 #define wxSTC_AVE_WORD 3 -#define wxSTC_AVE_KEYWORD 4 -#define wxSTC_AVE_STATEMENT 5 #define wxSTC_AVE_STRING 6 #define wxSTC_AVE_ENUM 7 #define wxSTC_AVE_STRINGEOL 8 #define wxSTC_AVE_IDENTIFIER 9 #define wxSTC_AVE_OPERATOR 10 +#define wxSTC_AVE_WORD1 11 +#define wxSTC_AVE_WORD2 12 +#define wxSTC_AVE_WORD3 13 +#define wxSTC_AVE_WORD4 14 +#define wxSTC_AVE_WORD5 15 +#define wxSTC_AVE_WORD6 16 // Lexical states for SCLEX_ADA #define wxSTC_ADA_DEFAULT 0 -#define wxSTC_ADA_COMMENT 1 -#define wxSTC_ADA_NUMBER 2 -#define wxSTC_ADA_WORD 3 -#define wxSTC_ADA_STRING 4 +#define wxSTC_ADA_WORD 1 +#define wxSTC_ADA_IDENTIFIER 2 +#define wxSTC_ADA_NUMBER 3 +#define wxSTC_ADA_DELIMITER 4 #define wxSTC_ADA_CHARACTER 5 -#define wxSTC_ADA_OPERATOR 6 -#define wxSTC_ADA_IDENTIFIER 7 +#define wxSTC_ADA_CHARACTEREOL 6 +#define wxSTC_ADA_STRING 7 #define wxSTC_ADA_STRINGEOL 8 +#define wxSTC_ADA_LABEL 9 +#define wxSTC_ADA_COMMENTLINE 10 +#define wxSTC_ADA_ILLEGAL 11 // Lexical states for SCLEX_BAAN #define wxSTC_BAAN_DEFAULT 0 @@ -866,6 +751,285 @@ #define wxSTC_SCRIPTOL_COMMENTDOCKEYWORDERROR 18 #define wxSTC_SCRIPTOL_COMMENTBASIC 19 +// Lexical states for SCLEX_ASM +#define wxSTC_ASM_DEFAULT 0 +#define wxSTC_ASM_COMMENT 1 +#define wxSTC_ASM_NUMBER 2 +#define wxSTC_ASM_STRING 3 +#define wxSTC_ASM_OPERATOR 4 +#define wxSTC_ASM_IDENTIFIER 5 +#define wxSTC_ASM_CPUINSTRUCTION 6 +#define wxSTC_ASM_MATHINSTRUCTION 7 +#define wxSTC_ASM_REGISTER 8 +#define wxSTC_ASM_DIRECTIVE 9 +#define wxSTC_ASM_DIRECTIVEOPERAND 10 + +// Lexical states for SCLEX_FORTRAN +#define wxSTC_F_DEFAULT 0 +#define wxSTC_F_COMMENT 1 +#define wxSTC_F_NUMBER 2 +#define wxSTC_F_STRING1 3 +#define wxSTC_F_STRING2 4 +#define wxSTC_F_STRINGEOL 5 +#define wxSTC_F_OPERATOR 6 +#define wxSTC_F_IDENTIFIER 7 +#define wxSTC_F_WORD 8 +#define wxSTC_F_WORD2 9 +#define wxSTC_F_WORD3 10 +#define wxSTC_F_PREPROCESSOR 11 +#define wxSTC_F_OPERATOR2 12 +#define wxSTC_F_LABEL 13 +#define wxSTC_F_CONTINUATION 14 + +// Lexical states for SCLEX_CSS +#define wxSTC_CSS_DEFAULT 0 +#define wxSTC_CSS_TAG 1 +#define wxSTC_CSS_CLASS 2 +#define wxSTC_CSS_PSEUDOCLASS 3 +#define wxSTC_CSS_UNKNOWN_PSEUDOCLASS 4 +#define wxSTC_CSS_OPERATOR 5 +#define wxSTC_CSS_IDENTIFIER 6 +#define wxSTC_CSS_UNKNOWN_IDENTIFIER 7 +#define wxSTC_CSS_VALUE 8 +#define wxSTC_CSS_COMMENT 9 +#define wxSTC_CSS_ID 10 +#define wxSTC_CSS_IMPORTANT 11 +#define wxSTC_CSS_DIRECTIVE 12 +#define wxSTC_CSS_DOUBLESTRING 13 +#define wxSTC_CSS_SINGLESTRING 14 + +// Lexical states for SCLEX_POV +#define wxSTC_POV_DEFAULT 0 +#define wxSTC_POV_COMMENT 1 +#define wxSTC_POV_COMMENTLINE 2 +#define wxSTC_POV_COMMENTDOC 3 +#define wxSTC_POV_NUMBER 4 +#define wxSTC_POV_WORD 5 +#define wxSTC_POV_STRING 6 +#define wxSTC_POV_OPERATOR 7 +#define wxSTC_POV_IDENTIFIER 8 +#define wxSTC_POV_BRACE 9 +#define wxSTC_POV_WORD2 10 + + +//----------------------------------------- +// Commands that can be bound to keystrokes + +// Redoes the next action on the undo history. +#define wxSTC_CMD_REDO 2011 + +// Select all the text in the document. +#define wxSTC_CMD_SELECTALL 2013 + +// Undo one action in the undo history. +#define wxSTC_CMD_UNDO 2176 + +// Cut the selection to the clipboard. +#define wxSTC_CMD_CUT 2177 + +// Copy the selection to the clipboard. +#define wxSTC_CMD_COPY 2178 + +// Paste the contents of the clipboard into the document replacing the selection. +#define wxSTC_CMD_PASTE 2179 + +// Clear the selection. +#define wxSTC_CMD_CLEAR 2180 + +// Move caret down one line. +#define wxSTC_CMD_LINEDOWN 2300 + +// Move caret down one line extending selection to new caret position. +#define wxSTC_CMD_LINEDOWNEXTEND 2301 + +// Move caret up one line. +#define wxSTC_CMD_LINEUP 2302 + +// Move caret up one line extending selection to new caret position. +#define wxSTC_CMD_LINEUPEXTEND 2303 + +// Move caret left one character. +#define wxSTC_CMD_CHARLEFT 2304 + +// Move caret left one character extending selection to new caret position. +#define wxSTC_CMD_CHARLEFTEXTEND 2305 + +// Move caret right one character. +#define wxSTC_CMD_CHARRIGHT 2306 + +// Move caret right one character extending selection to new caret position. +#define wxSTC_CMD_CHARRIGHTEXTEND 2307 + +// Move caret left one word. +#define wxSTC_CMD_WORDLEFT 2308 + +// Move caret left one word extending selection to new caret position. +#define wxSTC_CMD_WORDLEFTEXTEND 2309 + +// Move caret right one word. +#define wxSTC_CMD_WORDRIGHT 2310 + +// Move caret right one word extending selection to new caret position. +#define wxSTC_CMD_WORDRIGHTEXTEND 2311 + +// Move caret to first position on line. +#define wxSTC_CMD_HOME 2312 + +// Move caret to first position on line extending selection to new caret position. +#define wxSTC_CMD_HOMEEXTEND 2313 + +// Move caret to last position on line. +#define wxSTC_CMD_LINEEND 2314 + +// Move caret to last position on line extending selection to new caret position. +#define wxSTC_CMD_LINEENDEXTEND 2315 + +// Move caret to first position in document. +#define wxSTC_CMD_DOCUMENTSTART 2316 + +// Move caret to first position in document extending selection to new caret position. +#define wxSTC_CMD_DOCUMENTSTARTEXTEND 2317 + +// Move caret to last position in document. +#define wxSTC_CMD_DOCUMENTEND 2318 + +// Move caret to last position in document extending selection to new caret position. +#define wxSTC_CMD_DOCUMENTENDEXTEND 2319 + +// Move caret one page up. +#define wxSTC_CMD_PAGEUP 2320 + +// Move caret one page up extending selection to new caret position. +#define wxSTC_CMD_PAGEUPEXTEND 2321 + +// Move caret one page down. +#define wxSTC_CMD_PAGEDOWN 2322 + +// Move caret one page down extending selection to new caret position. +#define wxSTC_CMD_PAGEDOWNEXTEND 2323 + +// Switch from insert to overtype mode or the reverse. +#define wxSTC_CMD_EDITTOGGLEOVERTYPE 2324 + +// Cancel any modes such as call tip or auto-completion list display. +#define wxSTC_CMD_CANCEL 2325 + +// Delete the selection or if no selection, the character before the caret. +#define wxSTC_CMD_DELETEBACK 2326 + +// If selection is empty or all on one line replace the selection with a tab character. +// If more than one line selected, indent the lines. +#define wxSTC_CMD_TAB 2327 + +// Dedent the selected lines. +#define wxSTC_CMD_BACKTAB 2328 + +// Insert a new line, may use a CRLF, CR or LF depending on EOL mode. +#define wxSTC_CMD_NEWLINE 2329 + +// Insert a Form Feed character. +#define wxSTC_CMD_FORMFEED 2330 + +// Move caret to before first visible character on line. +// If already there move to first character on line. +#define wxSTC_CMD_VCHOME 2331 + +// Like VCHome but extending selection to new caret position. +#define wxSTC_CMD_VCHOMEEXTEND 2332 + +// Magnify the displayed text by increasing the sizes by 1 point. +#define wxSTC_CMD_ZOOMIN 2333 + +// Make the displayed text smaller by decreasing the sizes by 1 point. +#define wxSTC_CMD_ZOOMOUT 2334 + +// Delete the word to the left of the caret. +#define wxSTC_CMD_DELWORDLEFT 2335 + +// Delete the word to the right of the caret. +#define wxSTC_CMD_DELWORDRIGHT 2336 + +// Cut the line containing the caret. +#define wxSTC_CMD_LINECUT 2337 + +// Delete the line containing the caret. +#define wxSTC_CMD_LINEDELETE 2338 + +// Switch the current line with the previous. +#define wxSTC_CMD_LINETRANSPOSE 2339 + +// Duplicate the current line. +#define wxSTC_CMD_LINEDUPLICATE 2404 + +// Transform the selection to lower case. +#define wxSTC_CMD_LOWERCASE 2340 + +// Transform the selection to upper case. +#define wxSTC_CMD_UPPERCASE 2341 + +// Scroll the document down, keeping the caret visible. +#define wxSTC_CMD_LINESCROLLDOWN 2342 + +// Scroll the document up, keeping the caret visible. +#define wxSTC_CMD_LINESCROLLUP 2343 + +// Delete the selection or if no selection, the character before the caret. +// Will not delete the character before at the start of a line. +#define wxSTC_CMD_DELETEBACKNOTLINE 2344 + +// Move caret to first position on display line. +#define wxSTC_CMD_HOMEDISPLAY 2345 + +// Move caret to first position on display line extending selection to +// new caret position. +#define wxSTC_CMD_HOMEDISPLAYEXTEND 2346 + +// Move caret to last position on display line. +#define wxSTC_CMD_LINEENDDISPLAY 2347 + +// Move caret to last position on display line extending selection to new +// caret position. +#define wxSTC_CMD_LINEENDDISPLAYEXTEND 2348 + +// These are like their namesakes Home(Extend)?, LineEnd(Extend)?, VCHome(Extend)? +// except they behave differently when word-wrap is enabled: +// They go first to the start / end of the display line, like (Home|LineEnd)Display +// The difference is that, the cursor is already at the point, it goes on to the start +// or end of the document line, as appropriate for (Home|LineEnd|VCHome)Extend. +#define wxSTC_CMD_HOMEWRAP 2349 +#define wxSTC_CMD_HOMEWRAPEXTEND 2450 +#define wxSTC_CMD_LINEENDWRAP 2451 +#define wxSTC_CMD_LINEENDWRAPEXTEND 2452 +#define wxSTC_CMD_VCHOMEWRAP 2453 +#define wxSTC_CMD_VCHOMEWRAPEXTEND 2454 + +// Move to the previous change in capitalisation. +#define wxSTC_CMD_WORDPARTLEFT 2390 + +// Move to the previous change in capitalisation extending selection +// to new caret position. +#define wxSTC_CMD_WORDPARTLEFTEXTEND 2391 + +// Move to the change next in capitalisation. +#define wxSTC_CMD_WORDPARTRIGHT 2392 + +// Move to the next change in capitalisation extending selection +// to new caret position. +#define wxSTC_CMD_WORDPARTRIGHTEXTEND 2393 + +// Delete back from the current position to the start of the line. +#define wxSTC_CMD_DELLINELEFT 2395 + +// Delete forwards from the current position to the end of the line. +#define wxSTC_CMD_DELLINERIGHT 2396 + +// Move caret between paragraphs (delimited by empty lines) +#define wxSTC_CMD_PARADOWN 2413 +#define wxSTC_CMD_PARADOWNEXTEND 2414 +#define wxSTC_CMD_PARAUP 2415 +#define wxSTC_CMD_PARAUPEXTEND 2416 + + // END of generated section //---------------------------------------------------------------------- @@ -873,8 +1037,11 @@ class ScintillaWX; // forward declare class WordList; struct SCNotification; - -extern const wxChar* wxSTCNameStr; +#ifndef SWIG +extern WXSTC_DECLSPEC const wxChar* wxSTCNameStr; +class WXSTC_DECLSPEC wxStyledTextCtrl; +class WXSTC_DECLSPEC wxStyledTextEvent; +#endif //---------------------------------------------------------------------- @@ -1036,8 +1203,8 @@ public: // Set the symbol used for a particular marker number, // and optionally the fore and background colours. void MarkerDefine(int markerNumber, int markerSymbol, - const wxColour& foreground = wxNullColour, - const wxColour& background = wxNullColour); + const wxColour& foreground = wxNullColour, + const wxColour& background = wxNullColour); // Set the foreground colour used for a particular marker number. void MarkerSetForeground(int markerNumber, const wxColour& fore); @@ -1063,6 +1230,9 @@ public: // Find the previous line before lineStart that includes a marker in mask. int MarkerPrevious(int lineStart, int markerMask); + // Define a marker from a bitmap + void MarkerDefineBitmap(int markerNumber, const wxBitmap& bmp); + // Set a margin to be either numeric or symbolic. void SetMarginType(int margin, int marginType); @@ -1123,6 +1293,9 @@ public: // Set the character set of the font in a style. void StyleSetCharacterSet(int style, int characterSet); + // Set a style to be a hotspot or not. + void StyleSetHotSpot(int style, bool hotspot); + // Set the foreground colour of the selection and whether to use this setting. void SetSelForeground(bool useSetting, const wxColour& fore); @@ -1284,6 +1457,19 @@ public: // after the inserted text upon completion. bool AutoCompGetDropRestOfWord(); + // Register an image for use in autocompletion lists. + void RegisterImage(int type, const wxBitmap& bmp); + + // Clear all the registered images. + void ClearRegisteredImages(); + + // Retrieve the auto-completion list type-separator character. + int AutoCompGetTypeSeparator(); + + // Change the type-separator character in the string setting up an auto-completion list. + // Default is '?' but can be changed if items contain '?'. + void AutoCompSetTypeSeparator(int separatorCharacter); + // Set the number of spaces used for one level of indentation. void SetIndent(int indentSize); @@ -1372,14 +1558,14 @@ public: // On Windows, will draw the document into a display context such as a printer. int FormatRange(bool doDraw, - int startPos, - int endPos, - wxDC* draw, - wxDC* target, // Why does it use two? Can they be the same? - wxRect renderRect, - wxRect pageRect); + int startPos, + int endPos, + wxDC* draw, + wxDC* target, // Why does it use two? Can they be the same? + wxRect renderRect, + wxRect pageRect); - // Retrieve the line at the top of the display. + // Retrieve the display line at the top of the display. int GetFirstVisibleLine(); // Retrieve the contents of a line. @@ -1534,6 +1720,12 @@ public: // Set the background colour for the call tip. void CallTipSetBackground(const wxColour& back); + // Set the foreground colour for the call tip. + void CallTipSetForeground(const wxColour& fore); + + // Set the foreground colour for the highlighted part of the call tip. + void CallTipSetForegroundHighlight(const wxColour& fore); + // Find the display line of a document line taking hidden lines into account. int VisibleFromDocLine(int line); @@ -1575,7 +1767,7 @@ public: // Ensure a particular line is visible by expanding any header line hiding it. void EnsureVisible(int line); - // Set some debugging options for folding. + // Set some style options for folding. void SetFoldFlags(int flags); // Ensure a particular line is visible by expanding any header line hiding it. @@ -1641,17 +1833,50 @@ public: // Retrieve the height of a particular line of text in pixels. int TextHeight(int line); + // Show or hide the vertical scroll bar. + void SetUseVerticalScrollBar(bool show); + + // Is the vertical scroll bar visible? + bool GetUseVerticalScrollBar(); + + // Append a string to the end of the document without changing the selection. + void AppendText(int length, const wxString& text); + + // Is drawing done in two phases with backgrounds drawn before foregrounds? + bool GetTwoPhaseDraw(); + + // In twoPhaseDraw mode, drawing is performed in two phases, first the background + // and then the foreground. This avoids chopping off characters that overlap the next run. + void SetTwoPhaseDraw(bool twoPhase); + + // Make the target range start and end be the same as the selection range start and end. + void TargetFromSelection(); + + // Join the lines in the target. + void LinesJoin(); + + // Split the lines in the target into lines that are less wide than pixelWidth + // where possible. + void LinesSplit(int pixelWidth); + + // Set the colours used as a chequerboard pattern in the fold margin + void SetFoldMarginColour(bool useSetting, const wxColour& back); + void SetFoldMarginHiColour(bool useSetting, const wxColour& fore); + + // Duplicate the current line. + void LineDuplicate(); + // Move caret to first position on display line. void HomeDisplay(); - // Move caret to first position on display line extending selection to + // Move caret to first position on display line extending selection to // new caret position. void HomeDisplayExtend(); // Move caret to last position on display line. void LineEndDisplay(); - // Move caret to last position on display line extending selection to new + // Move caret to last position on display line extending selection to new // caret position. void LineEndDisplayExtend(); @@ -1805,6 +2030,9 @@ public: void SetXOffset(int newOffset); int GetXOffset(); + // Set the last x chosen value to be the caret x position + void ChooseCaretX(); + // Set the way the caret is kept visible when going sideway. // The exclusion zone is given in pixels. void SetXCaretPolicy(int caretPolicy, int caretSlop); @@ -1813,6 +2041,21 @@ public: // The exclusion zone is given in lines. void SetYCaretPolicy(int caretPolicy, int caretSlop); + // Set printing to line wrapped (SC_WRAP_WORD) or not line wrapped (SC_WRAP_NONE). + void SetPrintWrapMode(int mode); + + // Is printing line wrapped. + int GetPrintWrapMode(); + + // Set a fore colour for active hotspots. + void SetHotspotActiveForeground(bool useSetting, const wxColour& fore); + + // Set a back colour for active hotspots. + void SetHotspotActiveBackground(bool useSetting, const wxColour& back); + + // Enable / Disable underlining active hotspots. + void SetHotspotActiveUnderline(bool underline); + // Start notifying the container of all key presses and commands. void StartRecord(); @@ -1918,6 +2161,12 @@ public: bool GetLastKeydownProcessed() { return m_lastKeyDownConsumed; } void SetLastKeydownProcessed(bool val) { m_lastKeyDownConsumed = val; } + // Write the contents of the editor to filename + bool SaveFile(const wxString& filename); + + // Load the contents of filename into the editor + bool LoadFile(const wxString& filename); + //---------------------------------------------------------------------- @@ -1933,6 +2182,7 @@ private: void OnMouseMove(wxMouseEvent& evt); void OnMouseLeftUp(wxMouseEvent& evt); void OnMouseRightUp(wxMouseEvent& evt); + void OnMouseMiddleUp(wxMouseEvent& evt); void OnContextMenu(wxContextMenuEvent& evt); void OnMouseWheel(wxMouseEvent& evt); void OnChar(wxKeyEvent& evt); @@ -1949,11 +2199,11 @@ private: void NotifyChange(); void NotifyParent(SCNotification* scn); - -private: DECLARE_EVENT_TABLE() DECLARE_CLASS(wxStyledTextCtrl) +protected: + ScintillaWX* m_swx; wxStopWatch m_stopWatch; wxScrollBar* m_vScrollBar; @@ -1968,7 +2218,7 @@ private: //---------------------------------------------------------------------- -// SWIG can't handle "#if" type of conditionals, onlu "#ifdef" +// SWIG can't handle "#if" type of conditionals, only "#ifdef" #ifdef SWIG #define STC_USE_DND 1 #else @@ -2072,6 +2322,8 @@ private: #endif }; + + #ifndef SWIG BEGIN_DECLARE_EVENT_TYPES() DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_CHANGE, 1650) @@ -2097,6 +2349,9 @@ BEGIN_DECLARE_EVENT_TYPES() DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_DRAG_OVER, 1670) DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_DO_DROP, 1671) DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_ZOOM, 1672) + DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_HOTSPOT_CLICK, 1673) + DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_HOTSPOT_DCLICK, 1674) + DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_CALLTIP_CLICK, 1675) END_DECLARE_EVENT_TYPES() #else enum { @@ -2123,6 +2378,9 @@ END_DECLARE_EVENT_TYPES() wxEVT_STC_DRAG_OVER, wxEVT_STC_DO_DROP, wxEVT_STC_ZOOM, + wxEVT_STC_HOTSPOT_CLICK, + wxEVT_STC_HOTSPOT_DCLICK, + wxEVT_STC_CALLTIP_CLICK }; #endif @@ -2154,6 +2412,10 @@ typedef void (wxEvtHandler::*wxStyledTextEventFunction)(wxStyledTextEvent&); #define EVT_STC_DRAG_OVER(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DRAG_OVER, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ), #define EVT_STC_DO_DROP(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DO_DROP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ), #define EVT_STC_ZOOM(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_ZOOM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ), +#define EVT_STC_HOTSPOT_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_HOTSPOT_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ), +#define EVT_STC_HOTSPOT_DCLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_HOTSPOT_DCLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ), +#define EVT_STC_CALLTIP_CLICK(id, fn)) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CALLTIP_CLICK id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ), + #endif //---------------------------------------------------------------------- diff --git a/contrib/include/wx/xrc/xh_all.h b/contrib/include/wx/xrc/xh_all.h index 5382b6ffb0..51ccbf3533 100644 --- a/contrib/include/wx/xrc/xh_all.h +++ b/contrib/include/wx/xrc/xh_all.h @@ -46,5 +46,8 @@ #include "wx/xrc/xh_unkwn.h" #include "wx/xrc/xh_gdctl.h" #include "wx/xrc/xh_frame.h" +#include "wx/xrc/xh_scwin.h" +#include "wx/xrc/xh_split.h" +#include "wx/xrc/xh_wizrd.h" #endif // _WX_XMLRES_H_ diff --git a/contrib/include/wx/xrc/xh_scwin.h b/contrib/include/wx/xrc/xh_scwin.h new file mode 100644 index 0000000000..1befc41215 --- /dev/null +++ b/contrib/include/wx/xrc/xh_scwin.h @@ -0,0 +1,32 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: xh_scwin.h +// Purpose: XML resource handler for wxScrolledWindow +// Author: Vaclav Slavik +// Created: 2002/10/18 +// RCS-ID: $Id$ +// Copyright: (c) 2002 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_SCWIN_H_ +#define _WX_XH_SCWIN_H_ + +#if defined(__GNUG__) && !defined(__APPLE__) +#pragma interface "xh_scwin.h" +#endif + +#include "wx/xrc/xmlres.h" +#include "wx/defs.h" + + + +class WXXMLDLLEXPORT wxScrolledWindowXmlHandler : public wxXmlResourceHandler +{ +public: + wxScrolledWindowXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +}; + + +#endif // _WX_XH_SCWIN_H_ diff --git a/contrib/include/wx/xrc/xh_split.h b/contrib/include/wx/xrc/xh_split.h new file mode 100644 index 0000000000..010bede9f0 --- /dev/null +++ b/contrib/include/wx/xrc/xh_split.h @@ -0,0 +1,28 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: xh_split.h +// Purpose: XRC resource for wxSplitterWindow +// Author: panga@freemail.hu, Vaclav Slavik +// Created: 2003/01/26 +// RCS-ID: $Id$ +// Copyright: (c) 2003 panga@freemail.hu, Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_SPLIT_H_ +#define _WX_XH_SPLIT_H_ + +#if defined(__GNUG__) && !defined(__APPLE__) +#pragma interface "xh_split.h" +#endif + +#include "wx/xrc/xmlres.h" + +class WXXMLDLLEXPORT wxSplitterWindowXmlHandler : public wxXmlResourceHandler +{ +public: + wxSplitterWindowXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +}; + +#endif // _WX_XH_SPLIT_H_ diff --git a/contrib/include/wx/xrc/xh_wizrd.h b/contrib/include/wx/xrc/xh_wizrd.h new file mode 100644 index 0000000000..aa5dfbf972 --- /dev/null +++ b/contrib/include/wx/xrc/xh_wizrd.h @@ -0,0 +1,38 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: xh_wizrd.h +// Purpose: XML resource handler for wxWizard +// Author: Vaclav Slavik +// Created: 2003/03/02 +// RCS-ID: $Id$ +// Copyright: (c) 2000 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_WIZRD_H_ +#define _WX_XH_WIZRDL_H_ + +#if defined(__GNUG__) && !defined(__APPLE__) +#pragma interface "xh_wizrd.h" +#endif + +#include "wx/xrc/xmlres.h" + +#if wxUSE_WIZARDDLG + +#include "wx/wizard.h" + +class WXXMLDLLEXPORT wxWizardXmlHandler : public wxXmlResourceHandler +{ +public: + wxWizardXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); + +private: + wxWizard *m_wizard; + wxWizardPageSimple *m_lastSimplePage; +}; + +#endif + +#endif // _WX_XH_PANEL_H_ diff --git a/contrib/include/wx/xrc/xml.h b/contrib/include/wx/xrc/xml.h index d7b636c0df..c3122942e4 100644 --- a/contrib/include/wx/xrc/xml.h +++ b/contrib/include/wx/xrc/xml.h @@ -164,7 +164,7 @@ private: class WXXMLDLLEXPORT wxXmlDocument : public wxObject { public: - wxXmlDocument() : wxObject(), m_version(wxT("1.0")), m_root(NULL) {} + wxXmlDocument(); wxXmlDocument(const wxString& filename, const wxString& encoding = wxT("UTF-8")); wxXmlDocument(wxInputStream& stream, @@ -180,7 +180,7 @@ public: const wxString& encoding = wxT("UTF-8")); bool Load(wxInputStream& stream, const wxString& encoding = wxT("UTF-8")); - + // Saves document as .xml file. bool Save(const wxString& filename) const; bool Save(wxOutputStream& stream) const; @@ -193,7 +193,7 @@ public: // Returns version of document (may be empty). wxString GetVersion() const { return m_version; } // Returns encoding of document (may be empty). - // Note: this is the encoding original fail was saved in, *not* the + // Note: this is the encoding original file was saved in, *not* the // encoding of in-memory representation! wxString GetFileEncoding() const { return m_fileEncoding; } @@ -207,6 +207,7 @@ public: // (same as passed to Load or ctor, defaults to UTF-8). // NB: this is meaningless in Unicode build where data are stored as wchar_t* wxString GetEncoding() const { return m_encoding; } + void SetEncoding(const wxString& enc) { m_encoding = enc; } #endif private: diff --git a/contrib/include/wx/xrc/xmlres.h b/contrib/include/wx/xrc/xmlres.h index ca37a9cfa7..ccf92157cf 100644 --- a/contrib/include/wx/xrc/xmlres.h +++ b/contrib/include/wx/xrc/xmlres.h @@ -37,6 +37,9 @@ class WXDLLEXPORT wxFrame; class WXDLLEXPORT wxToolBar; class WXXMLDLLEXPORT wxXmlResourceHandler; +class WXXMLDLLEXPORT wxXmlSubclassFactory; +class WXXMLDLLEXPORT wxXmlSubclassFactoriesList; +class wxXmlResourceModule; // These macros indicate current version of XML resources (this information is @@ -55,7 +58,7 @@ class WXXMLDLLEXPORT wxXmlResourceHandler; #define WX_XMLRES_CURRENT_VERSION_MINOR 3 #define WX_XMLRES_CURRENT_VERSION_RELEASE 0 #define WX_XMLRES_CURRENT_VERSION_REVISION 1 -#define WX_XMLRES_CURRENT_VERSION_STRING "2.3.0.1" +#define WX_XMLRES_CURRENT_VERSION_STRING wxT("2.3.0.1") #define WX_XMLRES_CURRENT_VERSION \ (WX_XMLRES_CURRENT_VERSION_MAJOR * 256*256*256 + \ @@ -133,6 +136,11 @@ public: // Removes all handlers void ClearHandlers(); + + // Registers subclasses factory for use in XRC. This function is not meant + // for public use, please see the comment above wxXmlSubclassFactory + // definition. + static void AddSubclassFactory(wxXmlSubclassFactory *factory); // Loads menu from resource. Returns NULL on failure. wxMenu *LoadMenu(const wxString& name); @@ -216,7 +224,9 @@ public: static wxXmlResource *Set(wxXmlResource *res); // Returns flags, which may be a bitlist of wxXRC_USE_LOCALE and wxXRC_NO_SUBCLASSING. - int GetFlags() { return m_flags; } + int GetFlags() const { return m_flags; } + // Set flags after construction. + void SetFlags(int flags) { m_flags = flags; } protected: // Scans the resources list for unloaded files and loads them. Also reloads @@ -230,8 +240,18 @@ protected: wxXmlNode *DoFindResource(wxXmlNode *parent, const wxString& name, const wxString& classname, bool recursive); // Creates a resource from information in the given node. - wxObject *CreateResFromNode(wxXmlNode *node, wxObject *parent, wxObject *instance = NULL); + wxObject *CreateResFromNode(wxXmlNode *node, wxObject *parent, + wxObject *instance = NULL); + // Creates a resource from information in the given node + // (Uses only 'handlerToUse' if != NULL) + // + // ATTENTION: Do *NOT* use this function, it will disappear in + // wxWindows 2.5.0! It exists *only* as a hack to preserve + // binary compatibility in 2.4.x branch. + wxObject *CreateResFromNode2(wxXmlNode *node, wxObject *parent, + wxObject *instance = NULL, + wxXmlResourceHandler *handlerToUse = NULL); private: long m_version; @@ -244,6 +264,9 @@ private: #endif friend class wxXmlResourceHandler; + friend class wxXmlResourceModule; + + static wxXmlSubclassFactoriesList *ms_subclassFactories; // singleton instance: static wxXmlResource *ms_instance; @@ -438,6 +461,20 @@ protected: void wxXmlInitResourceModule(); +// This class is used to create instances of XRC "object" nodes with "subclass" +// property. It is _not_ supposed to be used by XRC users, you should instead +// register your subclasses via wxWindows' RTTI mechanism. This class is useful +// only for language bindings developer who need a way to implement subclassing +// in wxWindows ports that don't support wxRTTI (e.g. wxPython). +class WXXMLDLLEXPORT wxXmlSubclassFactory +{ +public: + // Try to create instance of given class and return it, return NULL on failure: + virtual wxObject *Create(const wxString& className) = 0; + virtual ~wxXmlSubclassFactory() {} +}; + + /* ------------------------------------------------------------------------- Backward compatibility macros. Do *NOT* use, they may disappear in future versions of the XRC library! diff --git a/contrib/samples/animate/AniTestVC.dsp b/contrib/samples/animate/AniTestVC.dsp index 73f3d56884..ff6bf716cd 100644 --- a/contrib/samples/animate/AniTestVC.dsp +++ b/contrib/samples/animate/AniTestVC.dsp @@ -111,7 +111,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw233d.lib animd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/anitest.exe" /pdbtype:sept /libpath:"../../../lib" +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw24d.lib animd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/anitest.exe" /pdbtype:sept /libpath:"../../../lib" !ELSEIF "$(CFG)" == "AniTestVC - Win32 Release DLL" @@ -138,7 +138,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw233.lib anim.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/anitest.exe" /libpath:"../../../lib" +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw24.lib anim.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/anitest.exe" /libpath:"../../../lib" !ELSEIF "$(CFG)" == "AniTestVC - Win32 UnivRelease" diff --git a/contrib/samples/animate/Makefile.in b/contrib/samples/animate/Makefile.in index d645e9ad99..29bf8fb02f 100644 --- a/contrib/samples/animate/Makefile.in +++ b/contrib/samples/animate/Makefile.in @@ -17,7 +17,7 @@ PROGRAM=anitest OBJECTS=$(PROGRAM).o -APPEXTRALIBS=$(top_builddir)/lib/libwx_anim.@WX_TARGET_LIBRARY_TYPE@ +APPEXTRALIBS=$(top_builddir)/lib/lib@WX_LIBRARY_BASENAME@_anim-@WX_RELEASE@.@WX_TARGET_LIBRARY_TYPE@ APPEXTRADEFS=-I$(top_srcdir)/contrib/include include $(top_builddir)/src/makeprog.env diff --git a/contrib/samples/animate/makefile.wat b/contrib/samples/animate/makefile.wat index de9f03d959..bbf34b15d6 100644 --- a/contrib/samples/animate/makefile.wat +++ b/contrib/samples/animate/makefile.wat @@ -6,9 +6,11 @@ # WXDIR = $(%WXWIN) +EXTRACPPFLAGS = -I$(WXDIR)\contrib\include PROGRAM = anitest -OBJECTS = $(PROGRAM).obj animate.obj +EXTRALIBS = $(WXDIR)\lib\anim_w.lib +OBJECTS = $(OUTPUTDIR)\$(PROGRAM).obj !include $(WXDIR)\src\makeprog.wat diff --git a/contrib/samples/applet/Makefile.in b/contrib/samples/applet/Makefile.in index 08d399dcb9..4300fb618c 100644 --- a/contrib/samples/applet/Makefile.in +++ b/contrib/samples/applet/Makefile.in @@ -19,7 +19,7 @@ DATAFILES=about.html index.html OBJECTS=applet.o dialogs_wdr.o monitorapplet.o combobox.o -APPEXTRALIBS=$(top_builddir)/lib/libapplet.@WX_TARGET_LIBRARY_TYPE@ +APPEXTRALIBS=$(top_builddir)/lib/lib@WX_LIBRARY_BASENAME@_applet-@WX_RELEASE@.@WX_TARGET_LIBRARY_TYPE@ APPEXTRADEFS=-I$(top_srcdir)/contrib/include include $(top_builddir)/src/makeprog.env diff --git a/contrib/samples/canvas/simple/Makefile.in b/contrib/samples/canvas/simple/Makefile.in index 1618e568a5..b92c3904af 100644 --- a/contrib/samples/canvas/simple/Makefile.in +++ b/contrib/samples/canvas/simple/Makefile.in @@ -17,7 +17,7 @@ PROGRAM=simple OBJECTS=simple.o -APPEXTRALIBS=$(top_builddir)/lib/libcanvas.@WX_TARGET_LIBRARY_TYPE@ +APPEXTRALIBS=$(top_builddir)/lib/lib@WX_LIBRARY_BASENAME@_canvas-@WX_RELEASE@.@WX_TARGET_LIBRARY_TYPE@ APPEXTRADEFS=-I$(top_srcdir)/contrib/include include $(top_builddir)/src/makeprog.env diff --git a/contrib/samples/canvas/simple/SimpleVC.dsp b/contrib/samples/canvas/simple/SimpleVC.dsp index 4410a5d28b..96c1d11a72 100644 --- a/contrib/samples/canvas/simple/SimpleVC.dsp +++ b/contrib/samples/canvas/simple/SimpleVC.dsp @@ -109,7 +109,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw233d.lib canvasd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/simple.exe" /pdbtype:sept /libpath:"../../../../lib" +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw24d.lib canvasd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/simple.exe" /pdbtype:sept /libpath:"../../../../lib" !ELSEIF "$(CFG)" == "SimpleVC - Win32 Release DLL" @@ -136,7 +136,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw233.lib canvas.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/simple.exe" /libpath:"../../../../lib" +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw24.lib canvas.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/simple.exe" /libpath:"../../../../lib" !ENDIF diff --git a/contrib/samples/canvas/test/Makefile.in b/contrib/samples/canvas/test/Makefile.in index 500d2bdd8a..081537852d 100644 --- a/contrib/samples/canvas/test/Makefile.in +++ b/contrib/samples/canvas/test/Makefile.in @@ -19,7 +19,7 @@ OBJECTS=test.o DATAFILES = pat4.bmp pat36.bmp -APPEXTRALIBS=$(top_builddir)/lib/libcanvas.@WX_TARGET_LIBRARY_TYPE@ +APPEXTRALIBS=$(top_builddir)/lib/lib@WX_LIBRARY_BASENAME@_canvas-@WX_RELEASE@.@WX_TARGET_LIBRARY_TYPE@ APPEXTRADEFS=-I$(top_srcdir)/contrib/include include $(top_builddir)/src/makeprog.env diff --git a/contrib/samples/canvas/test/TestVC.dsp b/contrib/samples/canvas/test/TestVC.dsp index e5aeae3652..ce8a38ee9c 100644 --- a/contrib/samples/canvas/test/TestVC.dsp +++ b/contrib/samples/canvas/test/TestVC.dsp @@ -109,7 +109,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw233d.lib canvasd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/test.exe" /pdbtype:sept /libpath:"../../../../lib" +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw24d.lib canvasd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/test.exe" /pdbtype:sept /libpath:"../../../../lib" !ELSEIF "$(CFG)" == "TestVC - Win32 Release DLL" @@ -136,7 +136,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw233.lib canvas.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/test.exe" /libpath:"../../../../lib" +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw24.lib canvas.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/test.exe" /libpath:"../../../../lib" !ENDIF diff --git a/contrib/samples/fl/fl_demo1/Makefile.in b/contrib/samples/fl/fl_demo1/Makefile.in index 88f55027f9..83f4fe3496 100644 --- a/contrib/samples/fl/fl_demo1/Makefile.in +++ b/contrib/samples/fl/fl_demo1/Makefile.in @@ -17,7 +17,7 @@ TARGET = fl_demo1 program_dir = contrib/samples/fl/$(TARGET) APPEXTRADEFS = -I$(top_srcdir)/contrib/include -DBMP_DIR=\"../bitmaps/\" -APPEXTRALIBS = $(top_builddir)/lib/libfl.@WX_TARGET_LIBRARY_TYPE@ +APPEXTRALIBS = $(top_builddir)/lib/lib@WX_LIBRARY_BASENAME@_fl-@WX_RELEASE@.@WX_TARGET_LIBRARY_TYPE@ PROGRAM = $(TARGET) OBJECTS = $(TARGET).o diff --git a/contrib/samples/fl/fl_demo1/fl_demo.dsp b/contrib/samples/fl/fl_demo1/fl_demo.dsp index 5b443a2c1b..446f34f02b 100644 --- a/contrib/samples/fl/fl_demo1/fl_demo.dsp +++ b/contrib/samples/fl/fl_demo1/fl_demo.dsp @@ -4,7 +4,7 @@ # TARGTYPE "Win32 (x86) Application" 0x0101 -CFG=fl_demo1 - Win32 Debug +CFG=fl_demo1 - Win32 Debug DLL !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE @@ -13,12 +13,14 @@ CFG=fl_demo1 - Win32 Debug !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE -!MESSAGE NMAKE /f "fl_demo.mak" CFG="fl_demo1 - Win32 Debug" +!MESSAGE NMAKE /f "fl_demo.mak" CFG="fl_demo1 - Win32 Debug DLL" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "fl_demo1 - Win32 Release" (based on "Win32 (x86) Application") !MESSAGE "fl_demo1 - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "fl_demo1 - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "fl_demo1 - Win32 Release DLL" (based on "Win32 (x86) Application") !MESSAGE # Begin Project @@ -81,12 +83,68 @@ LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmswd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib regexd.lib fld.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /pdbtype:sept /libpath:"../../../../lib" +!ELSEIF "$(CFG)" == "fl_demo1 - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug_DLL" +# PROP BASE Intermediate_Dir "Debug_DLL" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDll" +# PROP Intermediate_Dir "DebugDll" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../../include" /I "../../../../contrib/include" /I "../../../../lib/mswd" /D "_DEBUG" /D DEBUG=1 /D "__WXDEBUG__" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /D BMP_DIR=\"../bitmaps/\" /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../../include" /I "../../../../contrib/include" /I "../../../../lib/mswdlld" /D "_DEBUG" /D DEBUG=1 /D "__WXDEBUG__" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D "WXUSINGDLL" /D "WXUSING_FL_DLL" /Yu"wx/wxprec.h" /FD /D BMP_DIR=\"../bitmaps/\" /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmswd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib regexd.lib fld.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /pdbtype:sept /libpath:"../../../../lib" +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw24d.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib regexd.lib fldlld.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /pdbtype:sept /libpath:"../../../../lib" + +!ELSEIF "$(CFG)" == "fl_demo1 - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release_DLL" +# PROP BASE Intermediate_Dir "Release_DLL" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDll" +# PROP Intermediate_Dir "ReleaseDll" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../../include" /I "../../../../contrib/include" /I "../../../../lib/msw" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /D BMP_DIR=\"../bitmaps/\" /c +# ADD CPP /nologo /MD /W3 /GX /O2 /Ob2 /I "../../../../include" /I "../../../../contrib/include" /I "../../../../lib/mswdll" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D "WXUSINGDLL" /D "WXUSING_FL_DLL" /YX /FD /D BMP_DIR=\"../bitmaps/\" /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw.lib png.lib zlib.lib jpeg.lib tiff.lib regex.lib fl.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /libpath:"../../../../lib" +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw24.lib png.lib zlib.lib jpeg.lib tiff.lib regex.lib fldll.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /libpath:"../../../../lib" + !ENDIF # Begin Target # Name "fl_demo1 - Win32 Release" # Name "fl_demo1 - Win32 Debug" +# Name "fl_demo1 - Win32 Debug DLL" +# Name "fl_demo1 - Win32 Release DLL" # Begin Source File SOURCE=.\fl_demo1.cpp @@ -97,6 +155,13 @@ SOURCE=.\fl_demo1.cpp # ADD CPP /Yc"wx/wxprec.h" +!ELSEIF "$(CFG)" == "fl_demo1 - Win32 Debug DLL" + +# ADD BASE CPP /Yc"wx/wxprec.h" +# ADD CPP /Yc"wx/wxprec.h" + +!ELSEIF "$(CFG)" == "fl_demo1 - Win32 Release DLL" + !ENDIF # End Source File diff --git a/contrib/samples/fl/fl_demo1/makefile.vc b/contrib/samples/fl/fl_demo1/makefile.vc index 51eaae55ca..e997c2c79d 100644 --- a/contrib/samples/fl/fl_demo1/makefile.vc +++ b/contrib/samples/fl/fl_demo1/makefile.vc @@ -12,11 +12,25 @@ WXDIR = ..\..\..\.. TARGET = fl_demo1 EXTRAINC = -DBMP_DIR=\"../bitmaps/\" + +!if "$(WXUSING_FL_DLL)" == "1" +# Define WXUSING_FL_DLL so the compiler knows it is set. +EXTRAINC = $(EXTRAINC) -DWXUSING_FL_DLL +# Set to use wxWin in DLL format... +WXUSINGDLL = 1 + +!if "$(FINAL)" == "1" +EXTRALIBS = $(WXDIR)\lib\fldll.lib +!else +EXTRALIBS = $(WXDIR)\lib\fldlld.lib +!endif +!else !if "$(FINAL)" == "1" EXTRALIBS = $(WXDIR)\lib\fl.lib !else EXTRALIBS = $(WXDIR)\lib\fld.lib !endif +!endif PROGRAM = $(TARGET) OBJECTS = $(TARGET).obj diff --git a/contrib/samples/fl/fl_demo2/Makefile.in b/contrib/samples/fl/fl_demo2/Makefile.in index 911f9b5b42..da24607db2 100644 --- a/contrib/samples/fl/fl_demo2/Makefile.in +++ b/contrib/samples/fl/fl_demo2/Makefile.in @@ -17,7 +17,7 @@ TARGET = fl_demo2 program_dir = contrib/samples/fl/$(TARGET) APPEXTRADEFS = -I$(top_srcdir)/contrib/include -DBMP_DIR=\"../bitmaps/\" -APPEXTRALIBS = $(top_builddir)/lib/libfl.@WX_TARGET_LIBRARY_TYPE@ +APPEXTRALIBS = $(top_builddir)/lib/lib@WX_LIBRARY_BASENAME@_fl-@WX_RELEASE@.@WX_TARGET_LIBRARY_TYPE@ PROGRAM = $(TARGET) OBJECTS = $(TARGET).o diff --git a/contrib/samples/fl/fl_demo2/fl_demo.dsp b/contrib/samples/fl/fl_demo2/fl_demo.dsp index a54daca6c2..42716a7bdc 100644 --- a/contrib/samples/fl/fl_demo2/fl_demo.dsp +++ b/contrib/samples/fl/fl_demo2/fl_demo.dsp @@ -4,7 +4,7 @@ # TARGTYPE "Win32 (x86) Application" 0x0101 -CFG=fl_demo2 - Win32 Debug +CFG=fl_demo2 - Win32 Debug DLL !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE @@ -13,12 +13,14 @@ CFG=fl_demo2 - Win32 Debug !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE -!MESSAGE NMAKE /f "fl_demo.mak" CFG="fl_demo2 - Win32 Debug" +!MESSAGE NMAKE /f "fl_demo.mak" CFG="fl_demo2 - Win32 Debug DLL" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "fl_demo2 - Win32 Release" (based on "Win32 (x86) Application") !MESSAGE "fl_demo2 - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "fl_demo2 - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "fl_demo2 - Win32 Release DLL" (based on "Win32 (x86) Application") !MESSAGE # Begin Project @@ -81,12 +83,68 @@ LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmswd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib regexd.lib fld.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /pdbtype:sept /libpath:"../../../../lib" +!ELSEIF "$(CFG)" == "fl_demo2 - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug_DLL" +# PROP BASE Intermediate_Dir "Debug_DLL" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDll" +# PROP Intermediate_Dir "DebugDll" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../../include" /I "../../../../contrib/include" /I "../../../../lib/mswd" /D "_DEBUG" /D DEBUG=1 /D "__WXDEBUG__" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /D BMP_DIR=\"../bitmaps/\" /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../../include" /I "../../../../contrib/include" /I "../../../../lib/mswdlld" /D "_DEBUG" /D DEBUG=1 /D "__WXDEBUG__" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D "WXUSINGDLL" /D "WXUSING_FL_DLL" /Yu"wx/wxprec.h" /FD /D BMP_DIR=\"../bitmaps/\" /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmswd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib regexd.lib fld.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /pdbtype:sept /libpath:"../../../../lib" +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw24d.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib regexd.lib fldlld.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /pdbtype:sept /libpath:"../../../../lib" + +!ELSEIF "$(CFG)" == "fl_demo2 - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release_DLL" +# PROP BASE Intermediate_Dir "Release_DLL" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDll" +# PROP Intermediate_Dir "ReleaseDll" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../../include" /I "../../../../contrib/include" /I "../../../../lib/msw" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /D BMP_DIR=\"../bitmaps/\" /c +# ADD CPP /nologo /MD /W3 /GX /O2 /Ob2 /I "../../../../include" /I "../../../../contrib/include" /I "../../../../lib/mswdll" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D "WXUSINGDLL" /D "WXUSING_FL_DLL" /YX /FD /D BMP_DIR=\"../bitmaps/\" /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw.lib png.lib zlib.lib jpeg.lib tiff.lib regex.lib fl.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /libpath:"../../../../lib" +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw24.lib png.lib zlib.lib jpeg.lib tiff.lib regex.lib fldll.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /libpath:"../../../../lib" + !ENDIF # Begin Target # Name "fl_demo2 - Win32 Release" # Name "fl_demo2 - Win32 Debug" +# Name "fl_demo2 - Win32 Debug DLL" +# Name "fl_demo2 - Win32 Release DLL" # Begin Source File SOURCE=.\fl_demo2.cpp @@ -97,6 +155,13 @@ SOURCE=.\fl_demo2.cpp # ADD CPP /Yc"wx/wxprec.h" +!ELSEIF "$(CFG)" == "fl_demo2 - Win32 Debug DLL" + +# ADD BASE CPP /Yc"wx/wxprec.h" +# ADD CPP /Yc"wx/wxprec.h" + +!ELSEIF "$(CFG)" == "fl_demo2 - Win32 Release DLL" + !ENDIF # End Source File diff --git a/contrib/samples/fl/fl_demo2/fl_demo2.h b/contrib/samples/fl/fl_demo2/fl_demo2.h index c9cf31d06a..24b2317c05 100644 --- a/contrib/samples/fl/fl_demo2/fl_demo2.h +++ b/contrib/samples/fl/fl_demo2/fl_demo2.h @@ -153,7 +153,7 @@ public: void OnMouseUp( wxMouseEvent& event ); void OnPaint( wxPaintEvent& event ); - DECLARE_EVENT_TABLE(); + DECLARE_EVENT_TABLE() }; #endif diff --git a/contrib/samples/fl/fl_demo2/makefile.vc b/contrib/samples/fl/fl_demo2/makefile.vc index e05c0d699c..f3414ac254 100644 --- a/contrib/samples/fl/fl_demo2/makefile.vc +++ b/contrib/samples/fl/fl_demo2/makefile.vc @@ -12,11 +12,25 @@ WXDIR = ..\..\..\.. TARGET = fl_demo2 EXTRAINC = -DBMP_DIR=\"../bitmaps/\" + +!if "$(WXUSING_FL_DLL)" == "1" +# Define WXUSING_FL_DLL so the compiler knows it is set. +EXTRAINC = $(EXTRAINC) -DWXUSING_FL_DLL +# Set to use wxWin in DLL format... +WXUSINGDLL = 1 + +!if "$(FINAL)" == "1" +EXTRALIBS = $(WXDIR)\lib\fldll.lib +!else +EXTRALIBS = $(WXDIR)\lib\fldlld.lib +!endif +!else !if "$(FINAL)" == "1" EXTRALIBS = $(WXDIR)\lib\fl.lib !else EXTRALIBS = $(WXDIR)\lib\fld.lib !endif +!endif PROGRAM = $(TARGET) OBJECTS = $(TARGET).obj diff --git a/contrib/samples/fl/fl_sample1/Makefile.in b/contrib/samples/fl/fl_sample1/Makefile.in index 11d671a280..ad507429e4 100644 --- a/contrib/samples/fl/fl_sample1/Makefile.in +++ b/contrib/samples/fl/fl_sample1/Makefile.in @@ -17,7 +17,7 @@ TARGET = fl_sample1 program_dir = contrib/samples/fl/$(TARGET) APPEXTRADEFS = -I$(top_srcdir)/contrib/include -DBMP_DIR=\"../bitmaps/\" -APPEXTRALIBS = $(top_builddir)/lib/libfl.@WX_TARGET_LIBRARY_TYPE@ +APPEXTRALIBS = $(top_builddir)/lib/lib@WX_LIBRARY_BASENAME@_fl-@WX_RELEASE@.@WX_TARGET_LIBRARY_TYPE@ PROGRAM = $(TARGET) OBJECTS = $(TARGET).o diff --git a/contrib/samples/fl/fl_sample1/fl_demo.dsp b/contrib/samples/fl/fl_sample1/fl_demo.dsp index 7f32ffaab0..93043a48f6 100644 --- a/contrib/samples/fl/fl_sample1/fl_demo.dsp +++ b/contrib/samples/fl/fl_sample1/fl_demo.dsp @@ -4,7 +4,7 @@ # TARGTYPE "Win32 (x86) Application" 0x0101 -CFG=fl_sample1 - Win32 Debug +CFG=fl_sample1 - Win32 Debug DLL !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE @@ -13,12 +13,14 @@ CFG=fl_sample1 - Win32 Debug !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE -!MESSAGE NMAKE /f "fl_demo.mak" CFG="fl_sample1 - Win32 Debug" +!MESSAGE NMAKE /f "fl_demo.mak" CFG="fl_sample1 - Win32 Debug DLL" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "fl_sample1 - Win32 Release" (based on "Win32 (x86) Application") !MESSAGE "fl_sample1 - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "fl_sample1 - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "fl_sample1 - Win32 Release DLL" (based on "Win32 (x86) Application") !MESSAGE # Begin Project @@ -81,12 +83,68 @@ LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmswd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib regexd.lib fld.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /pdbtype:sept /libpath:"../../../../lib" +!ELSEIF "$(CFG)" == "fl_sample1 - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug_DLL" +# PROP BASE Intermediate_Dir "Debug_DLL" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDll" +# PROP Intermediate_Dir "DebugDll" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../../include" /I "../../../../contrib/include" /I "../../../../lib/mswd" /D "_DEBUG" /D DEBUG=1 /D "__WXDEBUG__" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /D BMP_DIR=\"../bitmaps/\" /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../../include" /I "../../../../contrib/include" /I "../../../../lib/mswdlld" /D "_DEBUG" /D DEBUG=1 /D "__WXDEBUG__" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D "WXUSINGDLL" /D "WXUSING_FL_DLL" /Yu"wx/wxprec.h" /FD /D BMP_DIR=\"../bitmaps/\" /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmswd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib regexd.lib fld.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /pdbtype:sept /libpath:"../../../../lib" +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw24d.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib regexd.lib fldlld.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /pdbtype:sept /libpath:"../../../../lib" + +!ELSEIF "$(CFG)" == "fl_sample1 - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release_DLL" +# PROP BASE Intermediate_Dir "Release_DLL" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDll" +# PROP Intermediate_Dir "ReleaseDll" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../../include" /I "../../../../contrib/include" /I "../../../../lib/msw" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /D BMP_DIR=\"../bitmaps/\" /c +# ADD CPP /nologo /MD /W3 /GX /O2 /Ob2 /I "../../../../include" /I "../../../../contrib/include" /I "../../../../lib/mswdll" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D "WXUSINGDLL" /D "WXUSING_FL_DLL" /YX /FD /D BMP_DIR=\"../bitmaps/\" /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw.lib png.lib zlib.lib jpeg.lib tiff.lib regex.lib fl.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /libpath:"../../../../lib" +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw24.lib png.lib zlib.lib jpeg.lib tiff.lib regex.lib fldll.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /libpath:"../../../../lib" + !ENDIF # Begin Target # Name "fl_sample1 - Win32 Release" # Name "fl_sample1 - Win32 Debug" +# Name "fl_sample1 - Win32 Debug DLL" +# Name "fl_sample1 - Win32 Release DLL" # Begin Source File SOURCE=.\fl_sample1.cpp @@ -97,6 +155,13 @@ SOURCE=.\fl_sample1.cpp # ADD CPP /Yc"wx/wxprec.h" +!ELSEIF "$(CFG)" == "fl_sample1 - Win32 Debug DLL" + +# ADD BASE CPP /Yc"wx/wxprec.h" +# ADD CPP /Yc"wx/wxprec.h" + +!ELSEIF "$(CFG)" == "fl_sample1 - Win32 Release DLL" + !ENDIF # End Source File diff --git a/contrib/samples/fl/fl_sample1/makefile.vc b/contrib/samples/fl/fl_sample1/makefile.vc index 50f4d6e26b..fed37595d7 100644 --- a/contrib/samples/fl/fl_sample1/makefile.vc +++ b/contrib/samples/fl/fl_sample1/makefile.vc @@ -12,11 +12,25 @@ WXDIR = ..\..\..\.. TARGET = fl_sample1 EXTRAINC = -DBMP_DIR=\"../bitmaps/\" + +!if "$(WXUSING_FL_DLL)" == "1" +# Define WXUSING_FL_DLL so the compiler knows it is set. +EXTRAINC = $(EXTRAINC) -DWXUSING_FL_DLL +# Set to use wxWin in DLL format... +WXUSINGDLL = 1 + +!if "$(FINAL)" == "1" +EXTRALIBS = $(WXDIR)\lib\fldll.lib +!else +EXTRALIBS = $(WXDIR)\lib\fldlld.lib +!endif +!else !if "$(FINAL)" == "1" EXTRALIBS = $(WXDIR)\lib\fl.lib !else EXTRALIBS = $(WXDIR)\lib\fld.lib !endif +!endif PROGRAM = $(TARGET) OBJECTS = $(TARGET).obj diff --git a/contrib/samples/fl/fl_sample2/Makefile.in b/contrib/samples/fl/fl_sample2/Makefile.in index 85b50b407c..6a863be5a1 100644 --- a/contrib/samples/fl/fl_sample2/Makefile.in +++ b/contrib/samples/fl/fl_sample2/Makefile.in @@ -17,7 +17,7 @@ TARGET = fl_sample2 program_dir = contrib/samples/fl/$(TARGET) APPEXTRADEFS = -I$(top_srcdir)/contrib/include -DBMP_DIR=\"../bitmaps/\" -APPEXTRALIBS = $(top_builddir)/lib/libfl.@WX_TARGET_LIBRARY_TYPE@ +APPEXTRALIBS = $(top_builddir)/lib/lib@WX_LIBRARY_BASENAME@_fl-@WX_RELEASE@.@WX_TARGET_LIBRARY_TYPE@ PROGRAM = $(TARGET) OBJECTS = $(TARGET).o diff --git a/contrib/samples/fl/fl_sample2/fl_demo.dsp b/contrib/samples/fl/fl_sample2/fl_demo.dsp index b1c478514e..bbde75eba3 100644 --- a/contrib/samples/fl/fl_sample2/fl_demo.dsp +++ b/contrib/samples/fl/fl_sample2/fl_demo.dsp @@ -4,7 +4,7 @@ # TARGTYPE "Win32 (x86) Application" 0x0101 -CFG=fl_sample2 - Win32 Debug +CFG=fl_sample2 - Win32 Debug DLL !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE @@ -13,12 +13,14 @@ CFG=fl_sample2 - Win32 Debug !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE -!MESSAGE NMAKE /f "fl_demo.mak" CFG="fl_sample2 - Win32 Debug" +!MESSAGE NMAKE /f "fl_demo.mak" CFG="fl_sample2 - Win32 Debug DLL" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "fl_sample2 - Win32 Release" (based on "Win32 (x86) Application") !MESSAGE "fl_sample2 - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "fl_sample2 - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "fl_sample2 - Win32 Release DLL" (based on "Win32 (x86) Application") !MESSAGE # Begin Project @@ -81,12 +83,68 @@ LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmswd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib regexd.lib fld.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /pdbtype:sept /libpath:"../../../../lib" +!ELSEIF "$(CFG)" == "fl_sample2 - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug_DLL" +# PROP BASE Intermediate_Dir "Debug_DLL" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDll" +# PROP Intermediate_Dir "DebugDll" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../../include" /I "../../../../contrib/include" /I "../../../../lib/mswd" /D "_DEBUG" /D DEBUG=1 /D "__WXDEBUG__" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /D BMP_DIR=\"../bitmaps/\" /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../../include" /I "../../../../contrib/include" /I "../../../../lib/mswdlld" /D "_DEBUG" /D DEBUG=1 /D "__WXDEBUG__" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D "WXUSINGDLL" /D "WXUSING_FL_DLL" /Yu"wx/wxprec.h" /FD /D BMP_DIR=\"../bitmaps/\" /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmswd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib regexd.lib fld.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /pdbtype:sept /libpath:"../../../../lib" +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw24d.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib regexd.lib fldlld.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /pdbtype:sept /libpath:"../../../../lib" + +!ELSEIF "$(CFG)" == "fl_sample2 - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release_DLL" +# PROP BASE Intermediate_Dir "Release_DLL" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDll" +# PROP Intermediate_Dir "ReleaseDll" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../../include" /I "../../../../contrib/include" /I "../../../../lib/msw" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /D BMP_DIR=\"../bitmaps/\" /c +# ADD CPP /nologo /MD /W3 /GX /O2 /Ob2 /I "../../../../include" /I "../../../../contrib/include" /I "../../../../lib/mswdll" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D "WXUSINGDLL" /D "WXUSING_FL_DLL" /YX /FD /D BMP_DIR=\"../bitmaps/\" /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw.lib png.lib zlib.lib jpeg.lib tiff.lib regex.lib fl.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /libpath:"../../../../lib" +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw24.lib png.lib zlib.lib jpeg.lib tiff.lib regex.lib fldll.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /libpath:"../../../../lib" + !ENDIF # Begin Target # Name "fl_sample2 - Win32 Release" # Name "fl_sample2 - Win32 Debug" +# Name "fl_sample2 - Win32 Debug DLL" +# Name "fl_sample2 - Win32 Release DLL" # Begin Source File SOURCE=.\fl_sample2.cpp @@ -97,6 +155,13 @@ SOURCE=.\fl_sample2.cpp # ADD CPP /Yc"wx/wxprec.h" +!ELSEIF "$(CFG)" == "fl_sample2 - Win32 Debug DLL" + +# ADD BASE CPP /Yc"wx/wxprec.h" +# ADD CPP /Yc"wx/wxprec.h" + +!ELSEIF "$(CFG)" == "fl_sample2 - Win32 Release DLL" + !ENDIF # End Source File diff --git a/contrib/samples/fl/fl_sample2/makefile.vc b/contrib/samples/fl/fl_sample2/makefile.vc index dabd5660e5..22340ab393 100644 --- a/contrib/samples/fl/fl_sample2/makefile.vc +++ b/contrib/samples/fl/fl_sample2/makefile.vc @@ -12,11 +12,25 @@ WXDIR = ..\..\..\.. TARGET = fl_sample2 EXTRAINC = -DBMP_DIR=\"../bitmaps/\" + +!if "$(WXUSING_FL_DLL)" == "1" +# Define WXUSING_FL_DLL so the compiler knows it is set. +EXTRAINC = $(EXTRAINC) -DWXUSING_FL_DLL +# Set to use wxWin in DLL format... +WXUSINGDLL = 1 + +!if "$(FINAL)" == "1" +EXTRALIBS = $(WXDIR)\lib\fldll.lib +!else +EXTRALIBS = $(WXDIR)\lib\fldlld.lib +!endif +!else !if "$(FINAL)" == "1" EXTRALIBS = $(WXDIR)\lib\fl.lib !else EXTRALIBS = $(WXDIR)\lib\fld.lib !endif +!endif PROGRAM = $(TARGET) OBJECTS = $(TARGET).obj diff --git a/contrib/samples/fl/fl_sample3/Makefile.in b/contrib/samples/fl/fl_sample3/Makefile.in index b19998869b..fab8e27cce 100644 --- a/contrib/samples/fl/fl_sample3/Makefile.in +++ b/contrib/samples/fl/fl_sample3/Makefile.in @@ -17,7 +17,7 @@ TARGET = fl_sample3 program_dir = contrib/samples/fl/$(TARGET) APPEXTRADEFS = -I$(top_srcdir)/contrib/include -DBMP_DIR=\"../bitmaps/\" -APPEXTRALIBS = $(top_builddir)/lib/libfl.@WX_TARGET_LIBRARY_TYPE@ +APPEXTRALIBS = $(top_builddir)/lib/lib@WX_LIBRARY_BASENAME@_fl-@WX_RELEASE@.@WX_TARGET_LIBRARY_TYPE@ PROGRAM = $(TARGET) OBJECTS = $(TARGET).o diff --git a/contrib/samples/fl/fl_sample3/fl_demo.dsp b/contrib/samples/fl/fl_sample3/fl_demo.dsp index 83830eb9db..810c0d3d10 100644 --- a/contrib/samples/fl/fl_sample3/fl_demo.dsp +++ b/contrib/samples/fl/fl_sample3/fl_demo.dsp @@ -4,7 +4,7 @@ # TARGTYPE "Win32 (x86) Application" 0x0101 -CFG=fl_sample3 - Win32 Debug +CFG=fl_sample3 - Win32 Debug DLL !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE @@ -13,12 +13,14 @@ CFG=fl_sample3 - Win32 Debug !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE -!MESSAGE NMAKE /f "fl_demo.mak" CFG="fl_sample3 - Win32 Debug" +!MESSAGE NMAKE /f "fl_demo.mak" CFG="fl_sample3 - Win32 Debug DLL" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "fl_sample3 - Win32 Release" (based on "Win32 (x86) Application") !MESSAGE "fl_sample3 - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "fl_sample3 - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "fl_sample3 - Win32 Release DLL" (based on "Win32 (x86) Application") !MESSAGE # Begin Project @@ -81,12 +83,68 @@ LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmswd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib regexd.lib fld.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /pdbtype:sept /libpath:"../../../../lib" +!ELSEIF "$(CFG)" == "fl_sample3 - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug_DLL" +# PROP BASE Intermediate_Dir "Debug_DLL" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDll" +# PROP Intermediate_Dir "DebugDll" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../../include" /I "../../../../contrib/include" /I "../../../../lib/mswd" /D "_DEBUG" /D DEBUG=1 /D "__WXDEBUG__" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /D BMP_DIR=\"../bitmaps/\" /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../../include" /I "../../../../contrib/include" /I "../../../../lib/mswdlld" /D "_DEBUG" /D DEBUG=1 /D "__WXDEBUG__" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D "WXUSINGDLL" /D "WXUSING_FL_DLL" /Yu"wx/wxprec.h" /FD /D BMP_DIR=\"../bitmaps/\" /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmswd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib regexd.lib fld.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /pdbtype:sept /libpath:"../../../../lib" +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw24d.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib regexd.lib fldlld.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /pdbtype:sept /libpath:"../../../../lib" + +!ELSEIF "$(CFG)" == "fl_sample3 - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release_DLL" +# PROP BASE Intermediate_Dir "Release_DLL" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDll" +# PROP Intermediate_Dir "ReleaseDll" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../../include" /I "../../../../contrib/include" /I "../../../../lib/msw" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /D BMP_DIR=\"../bitmaps/\" /c +# ADD CPP /nologo /MD /W3 /GX /O2 /Ob2 /I "../../../../include" /I "../../../../contrib/include" /I "../../../../lib/mswdll" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D "WXUSINGDLL" /D "WXUSING_FL_DLL" /YX /FD /D BMP_DIR=\"../bitmaps/\" /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw.lib png.lib zlib.lib jpeg.lib tiff.lib regex.lib fl.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /libpath:"../../../../lib" +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw24.lib png.lib zlib.lib jpeg.lib tiff.lib regex.lib fldll.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /libpath:"../../../../lib" + !ENDIF # Begin Target # Name "fl_sample3 - Win32 Release" # Name "fl_sample3 - Win32 Debug" +# Name "fl_sample3 - Win32 Debug DLL" +# Name "fl_sample3 - Win32 Release DLL" # Begin Source File SOURCE=.\fl_sample3.cpp @@ -97,6 +155,13 @@ SOURCE=.\fl_sample3.cpp # ADD CPP /Yc"wx/wxprec.h" +!ELSEIF "$(CFG)" == "fl_sample3 - Win32 Debug DLL" + +# ADD BASE CPP /Yc"wx/wxprec.h" +# ADD CPP /Yc"wx/wxprec.h" + +!ELSEIF "$(CFG)" == "fl_sample3 - Win32 Release DLL" + !ENDIF # End Source File diff --git a/contrib/samples/fl/fl_sample3/makefile.vc b/contrib/samples/fl/fl_sample3/makefile.vc index 699a66babc..d63277a77a 100644 --- a/contrib/samples/fl/fl_sample3/makefile.vc +++ b/contrib/samples/fl/fl_sample3/makefile.vc @@ -12,11 +12,25 @@ WXDIR = ..\..\..\.. TARGET = fl_sample3 EXTRAINC = -DBMP_DIR=\"../bitmaps/\" + +!if "$(WXUSING_FL_DLL)" == "1" +# Define WXUSING_FL_DLL so the compiler knows it is set. +EXTRAINC = $(EXTRAINC) -DWXUSING_FL_DLL +# Set to use wxWin in DLL format... +WXUSINGDLL = 1 + +!if "$(FINAL)" == "1" +EXTRALIBS = $(WXDIR)\lib\fldll.lib +!else +EXTRALIBS = $(WXDIR)\lib\fldlld.lib +!endif +!else !if "$(FINAL)" == "1" EXTRALIBS = $(WXDIR)\lib\fl.lib !else EXTRALIBS = $(WXDIR)\lib\fld.lib !endif +!endif PROGRAM = $(TARGET) OBJECTS = $(TARGET).obj diff --git a/contrib/samples/gizmos/Makefile.in b/contrib/samples/gizmos/Makefile.in index 223d5330fe..25e545a2a9 100644 --- a/contrib/samples/gizmos/Makefile.in +++ b/contrib/samples/gizmos/Makefile.in @@ -1,6 +1,6 @@ # $Id$ -CONTRIB_SAMPLES=multicell splittree editlbox dynsash dynsash_switch +CONTRIB_SAMPLES=editlbox dynsash dynsash_switch multicell splittree led all: @for d in $(CONTRIB_SAMPLES); do (cd $$d && $(MAKE)); done diff --git a/contrib/samples/gizmos/dynsash/Makefile.in b/contrib/samples/gizmos/dynsash/Makefile.in index 5e5fd58b72..5ec22a79b8 100644 --- a/contrib/samples/gizmos/dynsash/Makefile.in +++ b/contrib/samples/gizmos/dynsash/Makefile.in @@ -16,7 +16,7 @@ program_dir = contrib/samples/gizmos/dynsash PROGRAM=dynsash OBJECTS=dynsash.o -APPEXTRALIBS=$(top_builddir)/lib/libgizmos.@WX_TARGET_LIBRARY_TYPE@ +APPEXTRALIBS=$(top_builddir)/lib/lib@WX_LIBRARY_BASENAME@_gizmos-@WX_RELEASE@.@WX_TARGET_LIBRARY_TYPE@ APPEXTRADEFS=-I$(top_srcdir)/contrib/include include $(top_builddir)/src/makeprog.env diff --git a/contrib/samples/gizmos/dynsash/dynsash.dsp b/contrib/samples/gizmos/dynsash/dynsash.dsp index 27f6530455..7ed2654856 100644 --- a/contrib/samples/gizmos/dynsash/dynsash.dsp +++ b/contrib/samples/gizmos/dynsash/dynsash.dsp @@ -108,7 +108,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept -# ADD LINK32 wxmsw233d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/dynsash.exe" /pdbtype:sept /libpath:"../../../../lib" +# ADD LINK32 wxmsw24d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/dynsash.exe" /pdbtype:sept /libpath:"../../../../lib" !ELSEIF "$(CFG)" == "dynsash - Win32 Release DLL" @@ -135,7 +135,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 -# ADD LINK32 wxmsw233.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/dynsash.exe" /libpath:"../../../../lib" +# ADD LINK32 wxmsw24.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/dynsash.exe" /libpath:"../../../../lib" !ENDIF diff --git a/contrib/samples/gizmos/dynsash_switch/Makefile.in b/contrib/samples/gizmos/dynsash_switch/Makefile.in index b9796bb40e..1c104bba81 100644 --- a/contrib/samples/gizmos/dynsash_switch/Makefile.in +++ b/contrib/samples/gizmos/dynsash_switch/Makefile.in @@ -16,7 +16,7 @@ program_dir = contrib/samples/gizmos/dynsash_switch PROGRAM=dynsash_switch OBJECTS=dynsash_switch.o -APPEXTRALIBS=$(top_builddir)/lib/libgizmos.@WX_TARGET_LIBRARY_TYPE@ +APPEXTRALIBS=$(top_builddir)/lib/lib@WX_LIBRARY_BASENAME@_gizmos-@WX_RELEASE@.@WX_TARGET_LIBRARY_TYPE@ APPEXTRADEFS=-I$(top_srcdir)/contrib/include include $(top_builddir)/src/makeprog.env diff --git a/contrib/samples/gizmos/dynsash_switch/dynsash_switch.dsp b/contrib/samples/gizmos/dynsash_switch/dynsash_switch.dsp index 91c16772ad..245cf3a6f0 100644 --- a/contrib/samples/gizmos/dynsash_switch/dynsash_switch.dsp +++ b/contrib/samples/gizmos/dynsash_switch/dynsash_switch.dsp @@ -108,7 +108,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept -# ADD LINK32 wxmsw233d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/dynsash_switch.exe" /pdbtype:sept /libpath:"../../../../lib" +# ADD LINK32 wxmsw24d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/dynsash_switch.exe" /pdbtype:sept /libpath:"../../../../lib" !ELSEIF "$(CFG)" == "dynsash_switch - Win32 Release DLL" @@ -135,7 +135,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 -# ADD LINK32 wxmsw233.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/dynsash_switch.exe" /libpath:"../../../../lib" +# ADD LINK32 wxmsw24.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/dynsash_switch.exe" /libpath:"../../../../lib" !ENDIF diff --git a/contrib/samples/gizmos/editlbox/Makefile.in b/contrib/samples/gizmos/editlbox/Makefile.in index 465981c704..1ffec80c2a 100644 --- a/contrib/samples/gizmos/editlbox/Makefile.in +++ b/contrib/samples/gizmos/editlbox/Makefile.in @@ -16,7 +16,7 @@ program_dir = contrib/samples/gizmos/editlbox PROGRAM=test OBJECTS=test.o -APPEXTRALIBS=$(top_builddir)/lib/libgizmos.@WX_TARGET_LIBRARY_TYPE@ +APPEXTRALIBS=$(top_builddir)/lib/lib@WX_LIBRARY_BASENAME@_gizmos-@WX_RELEASE@.@WX_TARGET_LIBRARY_TYPE@ APPEXTRADEFS=-I$(top_srcdir)/contrib/include include $(top_builddir)/src/makeprog.env diff --git a/contrib/samples/gizmos/editlbox/editlbox.dsp b/contrib/samples/gizmos/editlbox/editlbox.dsp index 7de8a5b377..83a7b35256 100644 --- a/contrib/samples/gizmos/editlbox/editlbox.dsp +++ b/contrib/samples/gizmos/editlbox/editlbox.dsp @@ -108,7 +108,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept -# ADD LINK32 wxmsw233d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/editlbox.exe" /pdbtype:sept /libpath:"../../../../lib" +# ADD LINK32 wxmsw24d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/editlbox.exe" /pdbtype:sept /libpath:"../../../../lib" !ELSEIF "$(CFG)" == "editlbox - Win32 Release DLL" @@ -135,7 +135,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 -# ADD LINK32 wxmsw233.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/editlbox.exe" /libpath:"../../../../lib" +# ADD LINK32 wxmsw24.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/editlbox.exe" /libpath:"../../../../lib" !ENDIF diff --git a/contrib/samples/gizmos/led/Makefile.in b/contrib/samples/gizmos/led/Makefile.in new file mode 100644 index 0000000000..8ccc5e8741 --- /dev/null +++ b/contrib/samples/gizmos/led/Makefile.in @@ -0,0 +1,23 @@ +# +# File: Makefile.in +# Author: Julian Smart +# Created: 2002 +# Updated: +# Copyright: (c) 2002 Julian Smart +# +# "%W% %G%" +# +# Makefile for the led example (UNIX). + +top_srcdir = @top_srcdir@/.. +top_builddir = ../../../.. +program_dir = contrib/samples/gizmos/led + +PROGRAM=led +OBJECTS=led.o + +APPEXTRALIBS=$(top_builddir)/lib/lib@WX_LIBRARY_BASENAME@_gizmos-@WX_RELEASE@.@WX_TARGET_LIBRARY_TYPE@ +APPEXTRADEFS=-I$(top_srcdir)/contrib/include + +include $(top_builddir)/src/makeprog.env + diff --git a/contrib/samples/gizmos/led/led.cpp b/contrib/samples/gizmos/led/led.cpp new file mode 100644 index 0000000000..4818281f8b --- /dev/null +++ b/contrib/samples/gizmos/led/led.cpp @@ -0,0 +1,341 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: led.cpp +// Purpose: LED sample +// Author: Julian Smart +// Modified by: +// Created: 04/01/98 +// RCS-ID: $Id$ +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx/wx.h". +#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 "wx/wx.h" +#endif + +#include "../../../include/wx/gizmos/ledctrl.h" +#include "wx/sizer.h" +#include "wx/panel.h" + +// ---------------------------------------------------------------------------- +// private classes +// ---------------------------------------------------------------------------- + +class MyPanel : public wxPanel +{ +public: + MyPanel(wxFrame *frame); + + void OnIncrement(); + void OnDecrement(); + void OnSetValue(); + void OnAlignLeft(); + void OnAlignCenter(); + void OnAlignRight(); + void OnDrawFaded(); + +private: + wxLEDNumberCtrl *m_led; +}; + +// Define a new application type, each program should derive a class from wxApp +class MyApp : public wxApp +{ +public: + // override base class virtuals + // ---------------------------- + + // this one is called on application startup and is a good place for the app + // initialization (doing it here and not in the ctor allows to have an error + // return: if OnInit() returns false, the application terminates) + virtual bool OnInit(); +}; + +// Define a new frame type: this is going to be our main frame +class MyFrame : public wxFrame +{ +public: + // ctor(s) + MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size, + long style = wxDEFAULT_FRAME_STYLE); + + // event handlers (these functions should _not_ be virtual) + void OnQuit(wxCommandEvent& event); + void OnIncrement(wxCommandEvent& event); + void OnDecrement(wxCommandEvent& event); + void OnSetValue(wxCommandEvent& event); + void OnAlignLeft(wxCommandEvent& event); + void OnAlignCenter(wxCommandEvent& event); + void OnAlignRight(wxCommandEvent& event); + void OnDrawFaded(wxCommandEvent& event); + void OnAbout(wxCommandEvent& event); + +private: + MyPanel *m_panel; + + // any class wishing to process wxWindows events must use this macro + DECLARE_EVENT_TABLE() +}; + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +// IDs for the controls and the menu commands +enum +{ + // menu items + LED_Quit = 1, + + LED_Edit_Increment, + LED_Edit_Decrement, + LED_Edit_SetValue, + LED_Edit_AlignLeft, + LED_Edit_AlignCenter, + LED_Edit_AlignRight, + LED_Edit_DrawFaded, + + // it is important for the id corresponding to the "About" command to have + // this standard value as otherwise it won't be handled properly under Mac + // (where it is special and put into the "Apple" menu) + LED_About = wxID_ABOUT, + + MY_PANEL, + MY_LED +}; + +// ---------------------------------------------------------------------------- +// event tables and other macros for wxWindows +// ---------------------------------------------------------------------------- + +// the event tables connect the wxWindows events with the functions (event +// handlers) which process them. It can be also done at run-time, but for the +// simple menu events like this the static method is much simpler. +BEGIN_EVENT_TABLE(MyFrame, wxFrame) + EVT_MENU(LED_Quit, MyFrame::OnQuit) + EVT_MENU(LED_Edit_Increment, MyFrame::OnIncrement) + EVT_MENU(LED_Edit_Decrement, MyFrame::OnDecrement) + EVT_MENU(LED_Edit_SetValue, MyFrame::OnSetValue) + EVT_MENU(LED_Edit_AlignLeft, MyFrame::OnAlignLeft) + EVT_MENU(LED_Edit_AlignCenter, MyFrame::OnAlignCenter) + EVT_MENU(LED_Edit_AlignRight, MyFrame::OnAlignRight) + EVT_MENU(LED_Edit_DrawFaded, MyFrame::OnDrawFaded) + EVT_MENU(LED_About, MyFrame::OnAbout) +END_EVENT_TABLE() + +// Create a new application object: this macro will allow wxWindows to create +// the application object during program execution (it's better than using a +// static object for many reasons) and also declares the accessor function +// wxGetApp() which will return the reference of the right type (i.e. MyApp and +// not wxApp) +IMPLEMENT_APP(MyApp) + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// the application class +// ---------------------------------------------------------------------------- + +// 'Main program' equivalent: the program execution "starts" here +bool MyApp::OnInit() +{ + // create the main application window + MyFrame *frame = new MyFrame(_T("LED App"), + wxPoint(50, 50), wxSize(450, 340)); + + // and show it (the frames, unlike simple controls, are not shown when + // created initially) + frame->Show(TRUE); + + // success: wxApp::OnRun() will be called which will enter the main message + // loop and the application will run. If we returned FALSE here, the + // application would exit immediately. + return TRUE; +} + +// ---------------------------------------------------------------------------- +// main frame +// ---------------------------------------------------------------------------- + +// frame constructor +MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size, long style) + : wxFrame(NULL, -1, title, pos, size, style) +{ +#if wxUSE_MENUS + // create a menu bar + wxMenu *menuFile = new wxMenu; + + // the "About" item should be in the help menu + wxMenu *helpMenu = new wxMenu; + helpMenu->Append(LED_About, _T("&About...\tF1"), _T("Show about dialog")); + + menuFile->Append(LED_Quit, _T("E&xit\tAlt-X"), _T("Quit this program")); + + wxMenu *editMenu = new wxMenu; + editMenu->Append(LED_Edit_Increment, _T("&Increment LED\tCtrl-I")); + editMenu->Append(LED_Edit_Decrement, _T("&Decrement LED\tCtrl-D")); + editMenu->Append(LED_Edit_SetValue, _T("&Set LED Value...\tCtrl-S")); + editMenu->AppendSeparator(); + editMenu->AppendRadioItem(LED_Edit_AlignLeft, _T("Align &Left")); + editMenu->AppendRadioItem(LED_Edit_AlignCenter, _T("Align &Center")); + editMenu->AppendRadioItem(LED_Edit_AlignRight, _T("Align &Right")); + editMenu->AppendSeparator(); + editMenu->AppendCheckItem(LED_Edit_DrawFaded, _T("Draw &Faded\tCtrl-F")); + + editMenu->Check(LED_Edit_DrawFaded, TRUE); + + // now append the freshly created menu to the menu bar... + wxMenuBar *menuBar = new wxMenuBar(); + menuBar->Append(menuFile, _T("&File")); + menuBar->Append(editMenu, _T("&Edit")); + menuBar->Append(helpMenu, _T("&Help")); + + // ... and attach this menu bar to the frame + SetMenuBar(menuBar); +#endif // wxUSE_MENUS + + m_panel = new MyPanel(this); +} + + +// event handlers + +void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event)) +{ + // TRUE is to force the frame to close + Close(TRUE); +} + +void MyFrame::OnIncrement(wxCommandEvent& event) +{ + m_panel->OnIncrement(); +} + +void MyFrame::OnDecrement(wxCommandEvent& event) +{ + m_panel->OnDecrement(); +} + +void MyFrame::OnSetValue(wxCommandEvent& event) +{ + m_panel->OnSetValue(); +} + +void MyFrame::OnAlignLeft(wxCommandEvent& event) +{ + m_panel->OnAlignLeft(); +} + +void MyFrame::OnAlignCenter(wxCommandEvent& event) +{ + m_panel->OnAlignCenter(); +} + +void MyFrame::OnAlignRight(wxCommandEvent& event) +{ + m_panel->OnAlignRight(); +} + +void MyFrame::OnDrawFaded(wxCommandEvent& event) +{ + m_panel->OnDrawFaded(); +} + +void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) +{ + wxString msg; + msg.Printf( _T("This is the About dialog of the LED sample.\n") + _T("Welcome to %s"), wxVERSION_STRING); + + wxMessageBox(msg, _T("About LED"), wxOK | wxICON_INFORMATION, this); +} + +// -------------------------------------------------------------------------- +// MyPanel +// -------------------------------------------------------------------------- + +MyPanel::MyPanel(wxFrame *frame) + : wxPanel(frame, MY_PANEL) +{ + m_led = new wxLEDNumberCtrl(this, MY_LED, + wxPoint(20, 20), wxSize(300, 200), + wxLED_ALIGN_LEFT | wxLED_DRAW_FADED); + + m_led->SetValue(_T("50")); +} + +void MyPanel::OnIncrement() +{ + wxString strValue = m_led->GetValue(); + if ( strValue == _T("99") ) + return; + + long lValue; + strValue.ToLong(&lValue); + ++lValue; + m_led->SetValue(wxString::Format(_T("%ld"), lValue)); +} + +void MyPanel::OnDecrement() +{ + wxString strValue = m_led->GetValue(); + + long lValue; + strValue.ToLong(&lValue); + if (lValue == 0) + return; + + --lValue; + m_led->SetValue(wxString::Format(_T("%ld"), lValue)); +} + +void MyPanel::OnSetValue() +{ + wxString strValue = m_led->GetValue(); + + long lValue; + strValue.ToLong(&lValue); + lValue = ::wxGetNumberFromUser(_T("Please enter a number between 0 and 99"), _T(""), _T("Please enter a number"), lValue, 0, 99, this); + + if (lValue != -1) + m_led->SetValue(wxString::Format(_T("%ld"), lValue)); +} + +void MyPanel::OnAlignLeft() +{ + m_led->SetAlignment(wxLED_ALIGN_LEFT); +} + +void MyPanel::OnAlignCenter() +{ + m_led->SetAlignment(wxLED_ALIGN_CENTER); +} + +void MyPanel::OnAlignRight() +{ + m_led->SetAlignment(wxLED_ALIGN_RIGHT); +} + +void MyPanel::OnDrawFaded() +{ + m_led->SetDrawFaded(!(m_led->GetDrawFaded())); +} diff --git a/contrib/samples/gizmos/led/led.dsp b/contrib/samples/gizmos/led/led.dsp new file mode 100644 index 0000000000..c5111efefe --- /dev/null +++ b/contrib/samples/gizmos/led/led.dsp @@ -0,0 +1,177 @@ +# Microsoft Developer Studio Project File - Name="led" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=led - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "led.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "led.mak" CFG="led - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "led - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "led - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "led - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "led - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "led - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "..\..\..\..\include" /I "..\..\include" /I "../../../../lib/msw" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 wxmsw.lib png.lib zlib.lib jpeg.lib tiff.lib regex.lib gizmos.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/led.exe" /libpath:"../../../../lib" + +!ELSEIF "$(CFG)" == "led - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\..\..\include" /I "..\..\include" /I "../../../../lib/mswd" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 wxmswd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib regexd.lib gizmosd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/led.exe" /pdbtype:sept /libpath:"../../../../lib" + +!ELSEIF "$(CFG)" == "led - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\..\..\include" /I "..\..\include" /I "../../../../lib/mswdlld" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 wxmsw233d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/led.exe" /pdbtype:sept /libpath:"../../../../lib" + +!ELSEIF "$(CFG)" == "led - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "..\..\..\..\include" /I "..\..\include" /I "../../../../lib/mswdll" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 wxmsw.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/led.exe" /libpath:"../../../../lib" + +!ENDIF + +# Begin Target + +# Name "led - Win32 Release" +# Name "led - Win32 Debug" +# Name "led - Win32 Debug DLL" +# Name "led - Win32 Release DLL" +# Begin Source File + +SOURCE=.\led.cpp + +!IF "$(CFG)" == "led - Win32 Release" + +# ADD CPP /I "..\..\..\include" +# SUBTRACT CPP /I "..\..\include" + +!ELSEIF "$(CFG)" == "led - Win32 Debug" + +# ADD CPP /I "..\..\..\include" +# SUBTRACT CPP /I "..\..\include" /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "led - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# ADD CPP /I "..\..\..\include" +# SUBTRACT CPP /I "..\..\include" /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "led - Win32 Release DLL" + +# ADD CPP /I "..\..\..\include" +# SUBTRACT CPP /I "..\..\include" + +!ENDIF + +# End Source File +# End Target +# End Project diff --git a/contrib/samples/gizmos/multicell/Makefile.in b/contrib/samples/gizmos/multicell/Makefile.in index f703be5269..10f2c56048 100644 --- a/contrib/samples/gizmos/multicell/Makefile.in +++ b/contrib/samples/gizmos/multicell/Makefile.in @@ -17,7 +17,7 @@ PROGRAM=multicell OBJECTS=mtest.o -APPEXTRALIBS=$(top_builddir)/lib/libgizmos.@WX_TARGET_LIBRARY_TYPE@ +APPEXTRALIBS=$(top_builddir)/lib/lib@WX_LIBRARY_BASENAME@_gizmos-@WX_RELEASE@.@WX_TARGET_LIBRARY_TYPE@ APPEXTRADEFS=-I$(top_srcdir)/contrib/include include $(top_builddir)/src/makeprog.env diff --git a/contrib/samples/gizmos/multicell/makefile.bcc b/contrib/samples/gizmos/multicell/makefile.bcc deleted file mode 100644 index 472396d8eb..0000000000 --- a/contrib/samples/gizmos/multicell/makefile.bcc +++ /dev/null @@ -1,15 +0,0 @@ -# Purpose: makefile for multicell example (BC++ 16bit) -# Created 2000-07-28 - -!if "$(WXWIN)" == "" -!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx -!endif - -WXDIR = $(WXWIN) - -TARGET=mtest -OBJECTS=$(TARGET).obj ..\src\multicell.obj -EXTRAINC=-I..\include - -!include $(WXDIR)\src\makeprog.bcc - diff --git a/contrib/samples/gizmos/multicell/makefile.wat b/contrib/samples/gizmos/multicell/makefile.wat index 64778d2b8f..e41249ecd5 100644 --- a/contrib/samples/gizmos/multicell/makefile.wat +++ b/contrib/samples/gizmos/multicell/makefile.wat @@ -3,9 +3,10 @@ WXDIR = $(%WXWIN) +EXTRACPPFLAGS = -I$(WXDIR)\contrib\include PROGRAM = mtest -OBJECTS = $(PROGRAM).obj ..\src\multicell.obj -EXTRAINC=-I..\include +EXTRALIBS = $(WXDIR)\lib\gizmos_w.lib +OBJECTS = $(OUTPUTDIR)\$(PROGRAM).obj !include $(WXDIR)\src\makeprog.wat diff --git a/contrib/samples/gizmos/multicell/mtest.cpp b/contrib/samples/gizmos/multicell/mtest.cpp index 05a1ec6122..ae8280c814 100644 --- a/contrib/samples/gizmos/multicell/mtest.cpp +++ b/contrib/samples/gizmos/multicell/mtest.cpp @@ -79,7 +79,7 @@ wxFrame(frame, -1, title, pos, size, wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCRO // add first row sizer->Add( new wxButton( this, -1, "B1 - 0,0, horizontal resizable" ), - 0, 0, 0, new wxMultiCellItemHandle(0,0,1,1, wxDefaultSize, wxHORIZENTAL_RESIZABLE, wxSize(2,2))); + 0, 0, 0, new wxMultiCellItemHandle(0,0,1,1, wxDefaultSize, wxHORIZONTAL_RESIZABLE, wxSize(2,2))); sizer->Add( new wxButton( this, -1, "B2 - 0,1, vertical resizable" ), 0, 0, 0, new wxMultiCellItemHandle(0,1,1,1, wxDefaultSize, wxVERTICAL_RESIZABLE, wxSize(2, 2))); diff --git a/contrib/samples/gizmos/multicell/multicell.dsp b/contrib/samples/gizmos/multicell/multicell.dsp index ea37c5a3b4..39bf43a4cd 100644 --- a/contrib/samples/gizmos/multicell/multicell.dsp +++ b/contrib/samples/gizmos/multicell/multicell.dsp @@ -108,7 +108,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept -# ADD LINK32 wxmsw233d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/mtest.exe" /pdbtype:sept /libpath:"../../../../lib" +# ADD LINK32 wxmsw24d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/mtest.exe" /pdbtype:sept /libpath:"../../../../lib" !ELSEIF "$(CFG)" == "multicell - Win32 Release DLL" @@ -135,7 +135,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 -# ADD LINK32 wxmsw233.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/mtest.exe" /libpath:"../../../../lib" +# ADD LINK32 wxmsw24.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/mtest.exe" /libpath:"../../../../lib" !ENDIF diff --git a/contrib/samples/gizmos/splittree/Makefile.in b/contrib/samples/gizmos/splittree/Makefile.in index 7935a90651..8fc452aa91 100644 --- a/contrib/samples/gizmos/splittree/Makefile.in +++ b/contrib/samples/gizmos/splittree/Makefile.in @@ -16,7 +16,7 @@ program_dir = contrib/samples/gizmos/splittree PROGRAM=splittree OBJECTS=tree.o -APPEXTRALIBS=$(top_builddir)/lib/libgizmos.@WX_TARGET_LIBRARY_TYPE@ +APPEXTRALIBS=$(top_builddir)/lib/lib@WX_LIBRARY_BASENAME@_gizmos-@WX_RELEASE@.@WX_TARGET_LIBRARY_TYPE@ APPEXTRADEFS=-I$(top_srcdir)/contrib/include include $(top_builddir)/src/makeprog.env diff --git a/contrib/samples/gizmos/splittree/TreeVC.dsp b/contrib/samples/gizmos/splittree/TreeVC.dsp index 800cc0da84..3fa25a9576 100644 --- a/contrib/samples/gizmos/splittree/TreeVC.dsp +++ b/contrib/samples/gizmos/splittree/TreeVC.dsp @@ -108,7 +108,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept -# ADD LINK32 wxmsw233d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/tree.exe" /pdbtype:sept /libpath:"../../../../lib" +# ADD LINK32 wxmsw24d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/tree.exe" /pdbtype:sept /libpath:"../../../../lib" !ELSEIF "$(CFG)" == "TreeVC - Win32 Release DLL" @@ -135,7 +135,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 -# ADD LINK32 wxmsw233.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/tree.exe" /libpath:"../../../../lib" +# ADD LINK32 wxmsw24.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/tree.exe" /libpath:"../../../../lib" !ENDIF diff --git a/contrib/samples/gizmos/splittree/makefile.bcc b/contrib/samples/gizmos/splittree/makefile.bcc deleted file mode 100644 index 705fc065bc..0000000000 --- a/contrib/samples/gizmos/splittree/makefile.bcc +++ /dev/null @@ -1,19 +0,0 @@ -# -# File: makefile.bcc -# Author: Julian Smart -# Created: 1998 -# Updated: -# -# Builds a BC++ 16-bit sample - -!if "$(WXWIN)" == "" -!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx -!endif - -WXDIR = $(WXWIN) - -TARGET=minimal -OBJECTS=$(TARGET).obj - -!include $(WXDIR)\src\makeprog.bcc - diff --git a/contrib/samples/gizmos/splittree/makefile.wat b/contrib/samples/gizmos/splittree/makefile.wat index 2b200ba7ec..afb5e6611b 100644 --- a/contrib/samples/gizmos/splittree/makefile.wat +++ b/contrib/samples/gizmos/splittree/makefile.wat @@ -1,14 +1,13 @@ -# -# Makefile for WATCOM -# -# Created by Julian Smart, January 1999 -# -# +# Purpose: makefile for multicell example (Watcom) +# Created 2000-07-28 WXDIR = $(%WXWIN) -PROGRAM = minimal -OBJECTS = $(PROGRAM).obj +EXTRACPPFLAGS = -I$(WXDIR)\contrib\include + +PROGRAM = tree +EXTRALIBS = $(WXDIR)\lib\gizmos_w.lib +OBJECTS = $(OUTPUTDIR)\$(PROGRAM).obj !include $(WXDIR)\src\makeprog.wat diff --git a/contrib/samples/mmedia/MMboardVC.dsp b/contrib/samples/mmedia/MMboardVC.dsp index f041494a25..0310a23649 100644 --- a/contrib/samples/mmedia/MMboardVC.dsp +++ b/contrib/samples/mmedia/MMboardVC.dsp @@ -108,7 +108,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw233d.lib mmediad.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/mmboard.exe" /pdbtype:sept /libpath:"../../../lib" /libpath:"../../../contrib/lib" +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw24d.lib mmediad.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/mmboard.exe" /pdbtype:sept /libpath:"../../../lib" /libpath:"../../../contrib/lib" !ELSEIF "$(CFG)" == "MMboardVC - Win32 Release DLL" @@ -135,7 +135,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw233.lib mmedia.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/mmboard.exe" /libpath:"../../../lib" /libpath:"../../../contrib/lib" +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw24.lib mmedia.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/mmboard.exe" /libpath:"../../../lib" /libpath:"../../../contrib/lib" !ENDIF diff --git a/contrib/samples/mmedia/Makefile.in b/contrib/samples/mmedia/Makefile.in index 7c4c5cbbba..9a06dcb206 100644 --- a/contrib/samples/mmedia/Makefile.in +++ b/contrib/samples/mmedia/Makefile.in @@ -9,7 +9,7 @@ PROGRAM=mmboard OBJECTS=mmboard.o mmbman.o -APPEXTRALIBS=$(top_builddir)/lib/libmmedia.@WX_TARGET_LIBRARY_TYPE@ @ESD_LINK@ +APPEXTRALIBS=$(top_builddir)/lib/lib@WX_LIBRARY_BASENAME@_mmedia-@WX_RELEASE@.@WX_TARGET_LIBRARY_TYPE@ @ESD_LINK@ APPEXTRADEFS=-I$(top_srcdir)/contrib/include include $(top_builddir)/src/makeprog.env diff --git a/contrib/samples/mmedia/makefile.b32 b/contrib/samples/mmedia/makefile.b32 index cf24cac6da..c04865f7b3 100644 --- a/contrib/samples/mmedia/makefile.b32 +++ b/contrib/samples/mmedia/makefile.b32 @@ -10,7 +10,7 @@ WXDIR = $(WXWIN) TARGET=mmboard -EXTRALIBS=$(WXDIR)\contrib\lib\mmedia.lib +EXTRALIBS=$(WXDIR)\lib\mmedia.lib OBJECTS = $(TARGET).obj mmbman.obj !include $(WXDIR)\src\makeprog.b32 diff --git a/contrib/samples/mmedia/makefile.bcc b/contrib/samples/mmedia/makefile.bcc deleted file mode 100644 index cda93c90c5..0000000000 --- a/contrib/samples/mmedia/makefile.bcc +++ /dev/null @@ -1,20 +0,0 @@ -# -# File: makefile.bcc -# Author: Julian Smart -# Created: 1998 -# Updated: -# -# Builds a BC++ 16-bit sample - -!if "$(WXWIN)" == "" -!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx -!endif - -WXDIR = $(WXWIN) - -TARGET=mmboard -EXTRALIBS=$(WXDIR)\contrib\lib\mmedia.lib -OBJECTS=$(TARGET).obj mmbman.obj - -!include $(WXDIR)\src\makeprog.bcc - diff --git a/contrib/samples/mmedia/makefile.wat b/contrib/samples/mmedia/makefile.wat index 39b2eb6cba..11fd2bb642 100644 --- a/contrib/samples/mmedia/makefile.wat +++ b/contrib/samples/mmedia/makefile.wat @@ -8,7 +8,7 @@ WXDIR = $(%WXWIN) PROGRAM = mmboard -OBJECTS = $(PROGRAM).obj mmbman.obj +OBJECTS = $(OUTPUTDIR)\$(PROGRAM).obj mmbman.obj !include $(WXDIR)\src\makeprog.wat diff --git a/contrib/samples/ogl/ogledit/Makefile.in b/contrib/samples/ogl/ogledit/Makefile.in index 055739c441..cd83570f71 100644 --- a/contrib/samples/ogl/ogledit/Makefile.in +++ b/contrib/samples/ogl/ogledit/Makefile.in @@ -9,7 +9,7 @@ PROGRAM=ogledit OBJECTS=$(PROGRAM).o doc.o view.o palette.o -APPEXTRALIBS=$(top_builddir)/lib/libogl.@WX_TARGET_LIBRARY_TYPE@ +APPEXTRALIBS=$(top_builddir)/lib/lib@WX_LIBRARY_BASENAME@_ogl-@WX_RELEASE@.@WX_TARGET_LIBRARY_TYPE@ APPEXTRADEFS=-I$(top_srcdir)/contrib/include include $(top_builddir)/src/makeprog.env diff --git a/contrib/samples/ogl/ogledit/OGLEditVC.dsp b/contrib/samples/ogl/ogledit/OGLEditVC.dsp index 30d7da70f7..784f633ee4 100644 --- a/contrib/samples/ogl/ogledit/OGLEditVC.dsp +++ b/contrib/samples/ogl/ogledit/OGLEditVC.dsp @@ -108,7 +108,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw233d.lib ogld.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/ogledit.exe" /pdbtype:sept /libpath:"../../../../lib" /libpath:"../../../../contrib/lib" +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw24d.lib ogld.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/ogledit.exe" /pdbtype:sept /libpath:"../../../../lib" /libpath:"../../../../contrib/lib" !ELSEIF "$(CFG)" == "OGLEditVC - Win32 Release DLL" @@ -135,7 +135,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw233.lib ogl.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/ogledit.exe" /libpath:"../../../../lib" /libpath:"../../../../contrib/lib" +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw24.lib ogl.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/ogledit.exe" /libpath:"../../../../lib" /libpath:"../../../../contrib/lib" !ENDIF diff --git a/contrib/samples/ogl/ogledit/doc.cpp b/contrib/samples/ogl/ogledit/doc.cpp index 017f34f868..3d0a7f5732 100644 --- a/contrib/samples/ogl/ogledit/doc.cpp +++ b/contrib/samples/ogl/ogledit/doc.cpp @@ -92,7 +92,9 @@ wxOutputStream& DiagramDocument::SaveObject(wxOutputStream& stream) char buf[400]; (void) wxGetTempFileName("diag", buf); +#if wxUSE_PROLOGIO diagram.SaveFile(buf); +#endif wxTransferFileToStream(buf, stream); @@ -113,7 +115,11 @@ wxInputStream& DiagramDocument::LoadObject(wxInputStream& stream) wxTransferStreamToFile(stream, buf); diagram.DeleteAllShapes(); + +#if wxUSE_PROLOGIO diagram.LoadFile(buf); +#endif + wxRemoveFile(buf); return stream; @@ -548,6 +554,7 @@ void MyEvtHandler::OnEndSize(double x, double y) * Diagram */ +#if wxUSE_PROLOGIO bool MyDiagram::OnShapeSave(wxExprDatabase& db, wxShape& shape, wxExpr& expr) { wxDiagram::OnShapeSave(db, shape, expr); @@ -568,6 +575,7 @@ bool MyDiagram::OnShapeLoad(wxExprDatabase& db, wxShape& shape, wxExpr& expr) delete[] label; return TRUE; } +#endif /* * New shapes diff --git a/contrib/samples/ogl/ogledit/doc.h b/contrib/samples/ogl/ogledit/doc.h index 6817c6d3d4..d7fad379fd 100644 --- a/contrib/samples/ogl/ogledit/doc.h +++ b/contrib/samples/ogl/ogledit/doc.h @@ -35,8 +35,10 @@ class MyDiagram: public wxDiagram { public: MyDiagram(void) {} +#if wxUSE_PROLOGIO bool OnShapeSave(wxExprDatabase& db, wxShape& shape, wxExpr& expr); bool OnShapeLoad(wxExprDatabase& db, wxShape& shape, wxExpr& expr); +#endif }; /* diff --git a/contrib/samples/ogl/ogledit/makefile.bcc b/contrib/samples/ogl/ogledit/makefile.bcc deleted file mode 100644 index 3963263456..0000000000 --- a/contrib/samples/ogl/ogledit/makefile.bcc +++ /dev/null @@ -1,20 +0,0 @@ -# -# File: makefile.bcc -# Author: Julian Smart -# Created: 1998 -# Updated: -# -# Builds a BC++ 16-bit sample - -!if "$(WXWIN)" == "" -!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx -!endif - -WXDIR = $(WXWIN) - -TARGET=ogledit -EXTRALIBS=$(WXDIR)\lib\ogl.lib -OBJECTS = $(TARGET).obj doc.obj view.obj palette.obj - -!include $(WXDIR)\src\makeprog.b32 - diff --git a/contrib/samples/ogl/ogledit/makefile.wat b/contrib/samples/ogl/ogledit/makefile.wat index 4d6b13097f..503e85ca36 100644 --- a/contrib/samples/ogl/ogledit/makefile.wat +++ b/contrib/samples/ogl/ogledit/makefile.wat @@ -7,9 +7,11 @@ WXDIR = $(%WXWIN) +EXTRACPPFLAGS = -I$(WXDIR)\contrib\include + PROGRAM = ogledit -EXTRALIBS = $(WXDIR)\lib\ogl.lib -OBJECTS = $(PROGRAM).obj doc.obj view.obj palette.obj +EXTRALIBS = $(WXDIR)\lib\ogl_w.lib +OBJECTS = $(OUTPUTDIR)\$(PROGRAM).obj $(OUTPUTDIR)\doc.obj $(OUTPUTDIR)\view.obj $(OUTPUTDIR)\palette.obj !include $(WXDIR)\src\makeprog.wat diff --git a/contrib/samples/ogl/studio/Makefile.in b/contrib/samples/ogl/studio/Makefile.in index 1f6d9c4673..1e0b48dd54 100644 --- a/contrib/samples/ogl/studio/Makefile.in +++ b/contrib/samples/ogl/studio/Makefile.in @@ -12,7 +12,7 @@ DATAFILES=studio_resources.wxr OBJECTS=$(PROGRAM).o doc.o shapes.o symbols.o view.o cspalette.o\ mainfrm.o project.o dialogs.o csprint.o -APPEXTRALIBS=$(top_builddir)/lib/libogl.@WX_TARGET_LIBRARY_TYPE@ +APPEXTRALIBS=$(top_builddir)/lib/lib@WX_LIBRARY_BASENAME@_ogl-@WX_RELEASE@.@WX_TARGET_LIBRARY_TYPE@ APPEXTRADEFS=-I$(top_srcdir)/contrib/include -I$(top_srcdir)/$(program_dir)/bitmaps include $(top_builddir)/src/makeprog.env diff --git a/contrib/samples/ogl/studio/StudioVC.dsp b/contrib/samples/ogl/studio/StudioVC.dsp index e72fa51356..a1de0a6bc6 100644 --- a/contrib/samples/ogl/studio/StudioVC.dsp +++ b/contrib/samples/ogl/studio/StudioVC.dsp @@ -108,7 +108,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw233d.lib ogld.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/studio.exe" /pdbtype:sept /libpath:"../../../../lib" /libpath:"../../../../contrib/lib" +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw24d.lib ogld.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/studio.exe" /pdbtype:sept /libpath:"../../../../lib" /libpath:"../../../../contrib/lib" !ELSEIF "$(CFG)" == "StudioVC - Win32 Release DLL" diff --git a/contrib/samples/ogl/studio/dialogs.cpp b/contrib/samples/ogl/studio/dialogs.cpp index 62b0ca2edd..a3d38727b5 100644 --- a/contrib/samples/ogl/studio/dialogs.cpp +++ b/contrib/samples/ogl/studio/dialogs.cpp @@ -25,6 +25,11 @@ #endif #include + +#if !wxUSE_WX_RESOURCES +#error "OGL studio sample requires wxUSE_WX_RESOURCES" +#endif // wxUSE_WX_RESOURCES + #include "dialogs.h" #include "doc.h" #include "view.h" diff --git a/contrib/samples/ogl/studio/doc.cpp b/contrib/samples/ogl/studio/doc.cpp index bfedc4071e..bf2efb8e70 100644 --- a/contrib/samples/ogl/studio/doc.cpp +++ b/contrib/samples/ogl/studio/doc.cpp @@ -60,6 +60,7 @@ bool csDiagramDocument::OnSaveDocument(const wxString& file) if (file == "") return FALSE; +#if wxUSE_PROLOGIO if (!m_diagram.SaveFile(file)) { wxString msgTitle; @@ -72,6 +73,7 @@ bool csDiagramDocument::OnSaveDocument(const wxString& file) GetDocumentWindow()); return FALSE; } +#endif Modify(FALSE); SetFilename(file); @@ -90,12 +92,14 @@ bool csDiagramDocument::OnOpenDocument(const wxString& file) msgTitle = wxString("File error"); m_diagram.DeleteAllShapes(); +#if wxUSE_PROLOGIO if (!m_diagram.LoadFile(file)) { (void)wxMessageBox("Sorry, could not open this file.", msgTitle, wxOK|wxICON_EXCLAMATION, GetDocumentWindow()); return FALSE; } +#endif SetFilename(file, TRUE); Modify(FALSE); UpdateAllViews(); diff --git a/contrib/samples/ogl/studio/makefile.bcc b/contrib/samples/ogl/studio/makefile.bcc deleted file mode 100644 index e43914139d..0000000000 --- a/contrib/samples/ogl/studio/makefile.bcc +++ /dev/null @@ -1,21 +0,0 @@ -# -# File: makefile.bcc -# Author: Julian Smart -# Created: 1998 -# Updated: -# -# Builds a BC++ 16-bit sample - -!if "$(WXWIN)" == "" -!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx -!endif - -WXDIR = $(WXWIN) - -TARGET=studio -EXTRALIBS=$(WXDIR)\lib\ogl.lib -OBJECTS = $(TARGET).obj doc.obj shapes.obj symbols.obj view.obj cspalette.obj\ - mainfrm.obj project.obj dialogs.obj csprint.obj - -!include $(WXDIR)\src\makeprog.bcc - diff --git a/contrib/samples/ogl/studio/makefile.wat b/contrib/samples/ogl/studio/makefile.wat index 70896d9437..62223f8927 100644 --- a/contrib/samples/ogl/studio/makefile.wat +++ b/contrib/samples/ogl/studio/makefile.wat @@ -7,10 +7,20 @@ WXDIR = $(%WXWIN) +EXTRACPPFLAGS = -I$(WXDIR)\contrib\include + PROGRAM = studio -EXTRALIBS = $(WXDIR)\lib\ogl.lib -OBJECTS = $(PROGRAM).obj doc.obj shapes.obj symbols.obj view.obj cspalette.obj & - mainfrm.obj project.obj dialogs.obj csprint.obj +EXTRALIBS = $(WXDIR)\lib\ogl_w.lib +OBJECTS = $(OUTPUTDIR)\$(PROGRAM).obj & + $(OUTPUTDIR)\doc.obj & + $(OUTPUTDIR)\shapes.obj & + $(OUTPUTDIR)\symbols.obj & + $(OUTPUTDIR)\view.obj & + $(OUTPUTDIR)\cspalette.obj & + $(OUTPUTDIR)\mainfrm.obj & + $(OUTPUTDIR)\project.obj & + $(OUTPUTDIR)\dialogs.obj & + $(OUTPUTDIR)\csprint.obj !include $(WXDIR)\src\makeprog.wat diff --git a/contrib/samples/ogl/studio/shapes.cpp b/contrib/samples/ogl/studio/shapes.cpp index ded2eb7ba1..e331385885 100644 --- a/contrib/samples/ogl/studio/shapes.cpp +++ b/contrib/samples/ogl/studio/shapes.cpp @@ -705,6 +705,7 @@ bool csEvtHandler::EditProperties() * Diagram */ +#if wxUSE_PROLOGIO bool csDiagram::OnShapeSave(wxExprDatabase& db, wxShape& shape, wxExpr& expr) { wxDiagram::OnShapeSave(db, shape, expr); @@ -723,6 +724,7 @@ bool csDiagram::OnShapeLoad(wxExprDatabase& db, wxShape& shape, wxExpr& expr) return TRUE; } +#endif IMPLEMENT_DYNAMIC_CLASS(csThinRectangleShape, wxDrawnShape) diff --git a/contrib/samples/ogl/studio/shapes.h b/contrib/samples/ogl/studio/shapes.h index 6a440cf590..8162c6ad96 100644 --- a/contrib/samples/ogl/studio/shapes.h +++ b/contrib/samples/ogl/studio/shapes.h @@ -37,8 +37,10 @@ DECLARE_CLASS(csDiagram) public: csDiagram(csDiagramDocument* doc) { m_doc = doc; } ~csDiagram(); +#if wxUSE_PROLOGIO bool OnShapeSave(wxExprDatabase& db, wxShape& shape, wxExpr& expr); bool OnShapeLoad(wxExprDatabase& db, wxShape& shape, wxExpr& expr); +#endif inline csDiagramDocument* GetDocument() const { return m_doc; } virtual void Redraw(wxDC& dc); diff --git a/contrib/samples/ogl/studio/studio.cpp b/contrib/samples/ogl/studio/studio.cpp index 674b3af141..c77d46ed0d 100644 --- a/contrib/samples/ogl/studio/studio.cpp +++ b/contrib/samples/ogl/studio/studio.cpp @@ -25,6 +25,10 @@ #include "wx/config.h" #include "wx/laywin.h" +#if !wxUSE_WX_RESOURCES +#error "OGL studio sample requires wxUSE_WX_RESOURCES" +#endif // wxUSE_WX_RESOURCES + #include "studio.h" #include "view.h" #include "doc.h" diff --git a/contrib/samples/plot/Makefile.in b/contrib/samples/plot/Makefile.in index 8ba9e2abff..32b1812b66 100644 --- a/contrib/samples/plot/Makefile.in +++ b/contrib/samples/plot/Makefile.in @@ -9,7 +9,7 @@ PROGRAM=plot OBJECTS=plot.o -APPEXTRALIBS=$(top_builddir)/lib/libwx_plot.@WX_TARGET_LIBRARY_TYPE@ +APPEXTRALIBS=$(top_builddir)/lib/lib@WX_LIBRARY_BASENAME@_plot-@WX_RELEASE@.@WX_TARGET_LIBRARY_TYPE@ APPEXTRADEFS=-I$(top_srcdir)/contrib/include include $(top_builddir)/src/makeprog.env diff --git a/contrib/samples/plot/PlotVC.dsp b/contrib/samples/plot/PlotVC.dsp index 39f842bcfd..4b45129fe7 100644 --- a/contrib/samples/plot/PlotVC.dsp +++ b/contrib/samples/plot/PlotVC.dsp @@ -109,7 +109,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw233d.lib plotd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/plot.exe" /pdbtype:sept /libpath:"../../../lib" /libpath:"../../../contrib/lib" +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw24d.lib plotd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/plot.exe" /pdbtype:sept /libpath:"../../../lib" /libpath:"../../../contrib/lib" !ELSEIF "$(CFG)" == "PlotVC - Win32 Release DLL" @@ -136,7 +136,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw233.lib plot.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/plot.exe" /libpath:"../../../lib" /libpath:"../../../contrib/lib" +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw24.lib plot.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/plot.exe" /libpath:"../../../lib" /libpath:"../../../contrib/lib" !ENDIF diff --git a/contrib/samples/stc/Makefile.in b/contrib/samples/stc/Makefile.in index cffdcc78d7..0de249989a 100644 --- a/contrib/samples/stc/Makefile.in +++ b/contrib/samples/stc/Makefile.in @@ -13,7 +13,7 @@ PROGRAM=stctest OBJECTS=$(PROGRAM).o -APPEXTRALIBS=$(top_builddir)/lib/libstc.@WX_TARGET_LIBRARY_TYPE@ +APPEXTRALIBS=$(top_builddir)/lib/lib@WX_LIBRARY_BASENAME@_stc-@WX_RELEASE@.@WX_TARGET_LIBRARY_TYPE@ APPEXTRADEFS=-I$(top_srcdir)/contrib/include DATAFILES=stctest.cpp diff --git a/contrib/samples/stc/StcTestVC.dsp b/contrib/samples/stc/StcTestVC.dsp index f7e9b6e7e4..b1600f1145 100644 --- a/contrib/samples/stc/StcTestVC.dsp +++ b/contrib/samples/stc/StcTestVC.dsp @@ -108,7 +108,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw233d.lib stcd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/stctest.exe" /pdbtype:sept /libpath:"../../../lib" /libpath:"../../../contrib/lib" +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw24d.lib stcd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/stctest.exe" /pdbtype:sept /libpath:"../../../lib" /libpath:"../../../contrib/lib" !ELSEIF "$(CFG)" == "StcTestVC - Win32 Release DLL" @@ -135,7 +135,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw233.lib stc.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/stctest.exe" /libpath:"../../../lib" /libpath:"../../../contrib/lib" +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw24.lib stc.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/stctest.exe" /libpath:"../../../lib" /libpath:"../../../contrib/lib" !ENDIF diff --git a/contrib/samples/stc/makefile.b32 b/contrib/samples/stc/makefile.b32 index ae489f3a7d..46a0651cef 100644 --- a/contrib/samples/stc/makefile.b32 +++ b/contrib/samples/stc/makefile.b32 @@ -11,7 +11,7 @@ WXDIR = $(WXWIN) TARGET=stctest -EXTRALIBS=$(WXDIR)\contrib\lib\stc.lib +EXTRALIBS=$(WXDIR)\lib\stc.lib OBJECTS = $(TARGET).obj !include $(WXDIR)\src\makeprog.b32 diff --git a/contrib/samples/stc/makefile.wat b/contrib/samples/stc/makefile.wat new file mode 100644 index 0000000000..6f4c80c81a --- /dev/null +++ b/contrib/samples/stc/makefile.wat @@ -0,0 +1,13 @@ +# Purpose: makefile for SVG example (Watcom) +# Created 2000-07-28 + +WXDIR = $(%WXWIN) + +EXTRACPPFLAGS = -I$(WXDIR)\contrib\include +PROGRAM = stctest +EXTRALIBS = $(WXDIR)\lib\stc_w.lib +OBJECTS = $(OUTPUTDIR)\$(PROGRAM).obj + +!include $(WXDIR)\src\makeprog.wat + + diff --git a/contrib/samples/stc/stctest.cpp b/contrib/samples/stc/stctest.cpp index b33052c86c..538d00ef98 100644 --- a/contrib/samples/stc/stctest.cpp +++ b/contrib/samples/stc/stctest.cpp @@ -40,7 +40,26 @@ public: }; //---------------------------------------------------------------------- +// Make an editor class +class MySTC : public wxStyledTextCtrl +{ +public: + MySTC(wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0); + + void OnKeyPressed(wxKeyEvent& evt); + +private: + DECLARE_EVENT_TABLE() +}; + +BEGIN_EVENT_TABLE(MySTC, wxStyledTextCtrl) + EVT_KEY_DOWN(MySTC::OnKeyPressed) +END_EVENT_TABLE() + +//---------------------------------------------------------------------- // Define a new frame type: this is going to be our main frame class MyFrame : public wxFrame { @@ -51,7 +70,7 @@ public: void OnAbout(wxCommandEvent& event); private: - wxStyledTextCtrl* ed; + MySTC* ed; DECLARE_EVENT_TABLE() }; @@ -78,8 +97,8 @@ IMPLEMENT_APP(MyApp) bool MyApp::OnInit() { - MyFrame *frame = new MyFrame("Testing wxStyledTextCtrl", - wxPoint(5, 5), wxSize(400, 600)); + MyFrame *frame = new MyFrame(_T("Testing wxStyledTextCtrl"), + wxPoint(5, 5), wxSize(600, 600)); frame->Show(TRUE); return TRUE; @@ -99,81 +118,31 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size) // create a menu bar - wxMenu *menuFile = new wxMenu("", wxMENU_TEAROFF); + wxMenu *menuFile = new wxMenu(wxEmptyString, wxMENU_TEAROFF); // the "About" item should be in the help menu wxMenu *helpMenu = new wxMenu; - helpMenu->Append(ID_About, "&About...\tCtrl-A", "Show about dialog"); + helpMenu->Append(ID_About, _T("&About...\tCtrl-A"), _T("Show about dialog")); - menuFile->Append(ID_Quit, "E&xit\tAlt-X", "Quit this program"); + menuFile->Append(ID_Quit, _T("E&xit\tAlt-X"), _T("Quit this program")); // now append the freshly created menu to the menu bar... wxMenuBar *menuBar = new wxMenuBar(); - menuBar->Append(menuFile, "&File"); - menuBar->Append(helpMenu, "&Help"); + menuBar->Append(menuFile, _T("&File")); + menuBar->Append(helpMenu, _T("&Help")); // ... and attach this menu bar to the frame SetMenuBar(menuBar); #if wxUSE_STATUSBAR CreateStatusBar(2); - SetStatusText("Testing wxStyledTextCtrl"); + SetStatusText(_T("Testing wxStyledTextCtrl")); #endif // wxUSE_STATUSBAR //---------------------------------------- // Setup the editor - ed = new wxStyledTextCtrl(this, ID_ED); - - // Default font - wxFont font(10, wxMODERN, wxNORMAL, wxNORMAL); - ed->StyleSetFont(wxSTC_STYLE_DEFAULT, font); - ed->StyleClearAll(); - - ed->StyleSetForeground(0, wxColour(0x80, 0x80, 0x80)); - ed->StyleSetForeground(1, wxColour(0x00, 0x7f, 0x00)); - //ed->StyleSetForeground(2, wxColour(0x00, 0x7f, 0x00)); - ed->StyleSetForeground(3, wxColour(0x7f, 0x7f, 0x7f)); - ed->StyleSetForeground(4, wxColour(0x00, 0x7f, 0x7f)); - ed->StyleSetForeground(5, wxColour(0x00, 0x00, 0x7f)); - ed->StyleSetForeground(6, wxColour(0x7f, 0x00, 0x7f)); - ed->StyleSetForeground(7, wxColour(0x7f, 0x00, 0x7f)); - ed->StyleSetForeground(8, wxColour(0x00, 0x7f, 0x7f)); - ed->StyleSetForeground(9, wxColour(0x7f, 0x7f, 0x7f)); - ed->StyleSetForeground(10, wxColour(0x00, 0x00, 0x00)); - ed->StyleSetForeground(11, wxColour(0x00, 0x00, 0x00)); - ed->StyleSetBold(5, TRUE); - ed->StyleSetBold(10, TRUE); - -#ifdef __WXMSW__ - ed->StyleSetSpec(2, "fore:#007f00,bold,face:Arial,size:9"); -#else - ed->StyleSetSpec(2, "fore:#007f00,bold,face:Helvetica,size:9"); -#endif - - // give it some text to play with - wxFile file("stctest.cpp"); - wxString st; - - char* buff = st.GetWriteBuf(file.Length()); - file.Read(buff, file.Length()); - st.UngetWriteBuf(); - - ed->InsertText(0, st); - ed->EmptyUndoBuffer(); - - ed->SetLexer(wxSTC_LEX_CPP); - ed->SetKeyWords(0, - "asm auto bool break case catch char class const " - "const_cast continue default delete do double " - "dynamic_cast else enum explicit export extern " - "false float for friend goto if inline int long " - "mutable namespace new operator private protected " - "public register reinterpret_cast return short signed " - "sizeof static static_cast struct switch template this " - "throw true try typedef typeid typename union unsigned " - "using virtual void volatile wchar_t while"); - + ed = new MySTC(this, ID_ED); } @@ -190,5 +159,96 @@ void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) wxString msg; msg.Printf( _T("Testing wxStyledTextCtrl...\n")); - wxMessageBox(msg, "About This Test", wxOK | wxICON_INFORMATION, this); + wxMessageBox(msg, _T("About This Test"), wxOK | wxICON_INFORMATION, this); +} + + +//---------------------------------------------------------------------- + +wxChar* keywords = +_T("asm auto bool break case catch char class const \ +const_cast continue default delete do double \ +dynamic_cast else enum explicit export extern \ +false float for friend goto if inline int long \ +mutable namespace new operator private protected \ +public register reinterpret_cast return short signed \ +sizeof static static_cast struct switch template this \ +throw true try typedef typeid typename union unsigned \ +using virtual void volatile wchar_t while"); + + + +MySTC::MySTC(wxWindow *parent, wxWindowID id, + const wxPoint& pos, const wxSize& size, + long style) + : wxStyledTextCtrl(parent, id, pos, size, style) +{ + // Default font + wxFont font(10, wxMODERN, wxNORMAL, wxNORMAL); + StyleSetFont(wxSTC_STYLE_DEFAULT, font); + StyleClearAll(); + + StyleSetForeground(0, wxColour(0x80, 0x80, 0x80)); + StyleSetForeground(1, wxColour(0x00, 0x7f, 0x00)); + //StyleSetForeground(2, wxColour(0x00, 0x7f, 0x00)); + StyleSetForeground(3, wxColour(0x7f, 0x7f, 0x7f)); + StyleSetForeground(4, wxColour(0x00, 0x7f, 0x7f)); + StyleSetForeground(5, wxColour(0x00, 0x00, 0x7f)); + StyleSetForeground(6, wxColour(0x7f, 0x00, 0x7f)); + StyleSetForeground(7, wxColour(0x7f, 0x00, 0x7f)); + StyleSetForeground(8, wxColour(0x00, 0x7f, 0x7f)); + StyleSetForeground(9, wxColour(0x7f, 0x7f, 0x7f)); + StyleSetForeground(10, wxColour(0x00, 0x00, 0x00)); + StyleSetForeground(11, wxColour(0x00, 0x00, 0x00)); + StyleSetBold(5, TRUE); + StyleSetBold(10, TRUE); + +#ifdef __WXMSW__ + StyleSetSpec(2, _T("fore:#007f00,bold,face:Arial,size:9")); +#else + StyleSetSpec(2, _T("fore:#007f00,bold,face:Helvetica,size:9")); +#endif + + // give it some text to play with + wxString st; + wxFileInputStream stream(wxT("stctest.cpp")); + size_t sz = stream.GetSize(); + char* buf = new char[sz + 1]; + stream.Read((void*) buf, stream.GetSize()); + buf[sz] = 0; + st = wxString::FromAscii(buf); + delete[] buf; + + InsertText(0, st); + EmptyUndoBuffer(); + + SetLexer(wxSTC_LEX_CPP); + SetKeyWords(0, keywords); +} + +void MySTC::OnKeyPressed(wxKeyEvent& evt) +{ + if (CallTipActive()) + CallTipCancel(); + + int key = evt.GetKeyCode(); + if ( key == WXK_SPACE && evt.ControlDown()) { + int pos = GetCurrentPos(); + + if (evt.ShiftDown()) { + // show how to do CallTips + CallTipSetBackground(wxColour(_T("YELLOW"))); + CallTipShow(pos, _T("lots of of text: blah, blah, blah\n\n" + "show some suff, maybe parameters..\n\n" + "fubar(param1, param2)")); + } + else { + // show how to do AutoComplete + AutoCompSetIgnoreCase(false); + AutoCompShow(0, keywords); // reuse the keyword list here + // normally you would build a string of completion texts... + } + } + else + evt.Skip(); } diff --git a/contrib/samples/svg/Makefile.in b/contrib/samples/svg/Makefile.in index 8c63b68960..5f1ba42210 100644 --- a/contrib/samples/svg/Makefile.in +++ b/contrib/samples/svg/Makefile.in @@ -9,7 +9,7 @@ PROGRAM=svgtest OBJECTS=svgtest.o -APPEXTRALIBS=$(top_builddir)/lib/libwx_dcsvg.@WX_TARGET_LIBRARY_TYPE@ +APPEXTRALIBS=$(top_builddir)/lib/lib@WX_LIBRARY_BASENAME@_dcsvg-@WX_RELEASE@.@WX_TARGET_LIBRARY_TYPE@ APPEXTRADEFS=-I$(top_srcdir)/contrib/include include $(top_builddir)/src/makeprog.env diff --git a/contrib/samples/svg/makefile.wat b/contrib/samples/svg/makefile.wat new file mode 100644 index 0000000000..ee8d0c0d6b --- /dev/null +++ b/contrib/samples/svg/makefile.wat @@ -0,0 +1,13 @@ +# Purpose: makefile for SVG example (Watcom) +# Created 2000-07-28 + +WXDIR = $(%WXWIN) + +EXTRACPPFLAGS = -I$(WXDIR)\contrib\include +PROGRAM = svgtest +EXTRALIBS = $(WXDIR)\lib\svg_w.lib +OBJECTS = $(OUTPUTDIR)\$(PROGRAM).obj + +!include $(WXDIR)\src\makeprog.wat + + diff --git a/contrib/samples/svg/svgtest.rc b/contrib/samples/svg/svgtest.rc new file mode 100644 index 0000000000..6df320751a --- /dev/null +++ b/contrib/samples/svg/svgtest.rc @@ -0,0 +1,11 @@ +aaaa ICON "mondrian.ico" + +/* Useful if PROVIDE_DEFAULT_ICONS is set in wx_setup.h */ +#define IHaveMDIParentIcon +#define IHaveMDIChildIcon + +mondrian ICON "mondrian.ico" + +#include "wx/msw/wx.rc" + +svgbitmap BITMAP "SVGlogo24.bmp" diff --git a/contrib/samples/xrc/Makefile.in b/contrib/samples/xrc/Makefile.in index 74b1001946..512deacc5e 100644 --- a/contrib/samples/xrc/Makefile.in +++ b/contrib/samples/xrc/Makefile.in @@ -16,7 +16,7 @@ OBJECTS=$(PROGRAM).o \ derivdlg.o \ custclas.o -APPEXTRALIBS=$(top_builddir)/lib/libwxxrc.@WX_TARGET_LIBRARY_TYPE@ +APPEXTRALIBS=$(top_builddir)/lib/lib@WX_LIBRARY_BASENAME@_xrc-@WX_RELEASE@.@WX_TARGET_LIBRARY_TYPE@ APPEXTRADEFS=-I$(top_srcdir)/contrib/include DATADIRS = rc @@ -31,6 +31,7 @@ DATAFILES = rc/artprov.xrc \ rc/toolbar.xrc \ rc/uncenter.xrc \ rc/variable.xrc \ + rc/appicon.xpm \ rc/artprov.xpm \ rc/basicdlg.xpm \ rc/controls.xpm \ diff --git a/contrib/samples/xrc/XrcDemoVC.dsp b/contrib/samples/xrc/XrcDemoVC.dsp index 5bef50036a..2894217703 100644 --- a/contrib/samples/xrc/XrcDemoVC.dsp +++ b/contrib/samples/xrc/XrcDemoVC.dsp @@ -99,7 +99,8 @@ LINK32=link.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../include" /I "../../../contrib/include" /I "../../../lib/mswdlld" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX- /Zi /Od /I "../../../include" /I "../../../contrib/include" /I "../../../lib/mswdlld" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX /Yc /Yu # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 # ADD BASE RSC /l 0x809 /d "_DEBUG" @@ -109,7 +110,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw233d.lib wxxrcd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/xmldemo.exe" /pdbtype:sept /libpath:"../../../lib" /libpath:"../../../contrib/lib" +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw24d.lib wxxrcd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/xmldemo.exe" /pdbtype:sept /libpath:"../../../lib" /libpath:"../../../contrib/lib" !ELSEIF "$(CFG)" == "XrcDemoVC - Win32 Release DLL" @@ -125,7 +126,7 @@ LINK32=link.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../include" /I "../../../contrib/include" /I "../../../lib/mswdll" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# ADD CPP /nologo /MD /W3 /GX- /O2 /Ob1 /I "../../../include" /I "../../../contrib/include" /I "../../../lib/mswdll" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c # SUBTRACT CPP /YX # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 @@ -136,7 +137,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw233.lib wxxrc.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/xmldemo.exe" /libpath:"../../../lib" /libpath:"../../../contrib/lib" +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw24.lib wxxrc.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/xmldemo.exe" /libpath:"../../../lib" /libpath:"../../../contrib/lib" !ENDIF diff --git a/contrib/samples/xrc/custclas.cpp b/contrib/samples/xrc/custclas.cpp index 020a14e4b5..ba30c5f7f7 100644 --- a/contrib/samples/xrc/custclas.cpp +++ b/contrib/samples/xrc/custclas.cpp @@ -156,7 +156,7 @@ void MyResizableListCtrl::SetColumnWidths() // This is just a debug message in case you want to watch the // events scroll by as you resize. - wxLogDebug( "Successfully set column widths" ); + wxLogDebug( wxT("Successfully set column widths") ); } diff --git a/contrib/samples/xrc/derivdlg.cpp b/contrib/samples/xrc/derivdlg.cpp index a9a719c49d..437615d60b 100644 --- a/contrib/samples/xrc/derivdlg.cpp +++ b/contrib/samples/xrc/derivdlg.cpp @@ -61,7 +61,7 @@ END_EVENT_TABLE() // Constructor (Notice how small and easy it is) PreferencesDialog::PreferencesDialog(wxWindow* parent) { - wxXmlResource::Get()->LoadDialog(this, parent, "derived_dialog"); + wxXmlResource::Get()->LoadDialog(this, parent, wxT("derived_dialog")); } // Destructor. (Empty, as I don't need anything special done when destructing). diff --git a/contrib/samples/xrc/myframe.cpp b/contrib/samples/xrc/myframe.cpp index 2d03b22e44..594d8769e1 100644 --- a/contrib/samples/xrc/myframe.cpp +++ b/contrib/samples/xrc/myframe.cpp @@ -109,18 +109,18 @@ MyFrame::MyFrame(wxWindow* parent) // since this frame will always be the top window, and thus parentless. // However, the current approach has source code that can be recycled // for other frames that aren't the top level window.] - wxXmlResource::Get()->LoadFrame(this, parent, "main_frame"); + wxXmlResource::Get()->LoadFrame(this, parent, wxT("main_frame")); // Set the icon for the frame. SetIcon(wxICON(appicon)); // Load the menubar from XRC and set this frame's menubar to it. - SetMenuBar(wxXmlResource::Get()->LoadMenuBar("main_menu")); + SetMenuBar(wxXmlResource::Get()->LoadMenuBar(wxT("main_menu"))); // Load the toolbar from XRC and set this frame's toolbar to it. // NOTE: For toolbars you currently should do it exactly like this. // With toolbars, you currently can't create one, and set it later. It // needs to be all in one step. - SetToolBar(wxXmlResource::Get()->LoadToolBar(this, "main_toolbar")); + SetToolBar(wxXmlResource::Get()->LoadToolBar(this, wxT("main_toolbar"))); // Give the frame a optional statusbar. The '1' just means one field. // A gripsizer will automatically get put on into the corner, if that @@ -146,7 +146,7 @@ void MyFrame::OnNonDerivedDialogToolOrMenuCommand(wxCommandEvent& WXUNUSED(event wxDialog dlg; // "non_derived_dialog" is the name of the wxDialog XRC node that should // be loaded. - wxXmlResource::Get()->LoadDialog(&dlg, this, "non_derived_dialog"); + wxXmlResource::Get()->LoadDialog(&dlg, this, wxT("non_derived_dialog")); dlg.ShowModal(); } @@ -166,7 +166,7 @@ void MyFrame::OnDerivedDialogToolOrMenuCommand(wxCommandEvent& WXUNUSED(event)) void MyFrame::OnControlsToolOrMenuCommand(wxCommandEvent& WXUNUSED(event)) { wxDialog dlg; - wxXmlResource::Get()->LoadDialog(&dlg, this, "controls_dialog"); + wxXmlResource::Get()->LoadDialog(&dlg, this, wxT("controls_dialog")); #if wxUSE_LISTCTRL // There is no data in the listctrl. This will add some columns @@ -211,7 +211,7 @@ void MyFrame::OnControlsToolOrMenuCommand(wxCommandEvent& WXUNUSED(event)) void MyFrame::OnUncenteredToolOrMenuCommand(wxCommandEvent& WXUNUSED(event)) { wxDialog dlg; - wxXmlResource::Get()->LoadDialog(&dlg, this, "uncentered_dialog"); + wxXmlResource::Get()->LoadDialog(&dlg, this, wxT("uncentered_dialog")); dlg.ShowModal(); } @@ -219,7 +219,7 @@ void MyFrame::OnUncenteredToolOrMenuCommand(wxCommandEvent& WXUNUSED(event)) void MyFrame::OnCustomClassToolOrMenuCommand(wxCommandEvent& WXUNUSED(event)) { wxDialog dlg; - wxXmlResource::Get()->LoadDialog(&dlg, this, "custom_class_dialog"); + wxXmlResource::Get()->LoadDialog(&dlg, this, wxT("custom_class_dialog")); // Make an instance of our new custom class. MyResizableListCtrl* a_myResizableListCtrl = new MyResizableListCtrl(&dlg, @@ -231,7 +231,7 @@ void MyFrame::OnCustomClassToolOrMenuCommand(wxCommandEvent& WXUNUSED(event)) // "custom_control_placeholder" is the name of the "unknown" tag in the // custctrl.xrc XRC file. - wxXmlResource::Get()->AttachUnknownControl("custom_control_placeholder", + wxXmlResource::Get()->AttachUnknownControl(wxT("custom_control_placeholder"), a_myResizableListCtrl); dlg.ShowModal(); } @@ -240,7 +240,7 @@ void MyFrame::OnCustomClassToolOrMenuCommand(wxCommandEvent& WXUNUSED(event)) void MyFrame::OnPlatformPropertyToolOrMenuCommand(wxCommandEvent& WXUNUSED(event)) { wxDialog dlg; - wxXmlResource::Get()->LoadDialog(&dlg, this, "platform_property_dialog"); + wxXmlResource::Get()->LoadDialog(&dlg, this, wxT("platform_property_dialog")); dlg.ShowModal(); } @@ -248,7 +248,7 @@ void MyFrame::OnPlatformPropertyToolOrMenuCommand(wxCommandEvent& WXUNUSED(event void MyFrame::OnArtProviderToolOrMenuCommand(wxCommandEvent& WXUNUSED(event)) { wxDialog dlg; - wxXmlResource::Get()->LoadDialog(&dlg, this, "art_provider_dialog"); + wxXmlResource::Get()->LoadDialog(&dlg, this, wxT("art_provider_dialog")); dlg.ShowModal(); } @@ -256,7 +256,7 @@ void MyFrame::OnArtProviderToolOrMenuCommand(wxCommandEvent& WXUNUSED(event)) void MyFrame::OnVariableExpansionToolOrMenuCommand(wxCommandEvent& WXUNUSED(event)) { wxDialog dlg; - wxXmlResource::Get()->LoadDialog(&dlg, this, "variable_expansion_dialog"); + wxXmlResource::Get()->LoadDialog(&dlg, this, wxT("variable_expansion_dialog")); dlg.ShowModal(); } @@ -267,5 +267,5 @@ void MyFrame::OnAboutToolOrMenuCommand(wxCommandEvent& WXUNUSED(event)) msg.Printf( _T("This is the about dialog of XML resources demo.\n") _T("Welcome to %s"), wxVERSION_STRING); - wxMessageBox(msg, "About XML resources demo", wxOK | wxICON_INFORMATION, this); + wxMessageBox(msg, _("About XML resources demo"), wxOK | wxICON_INFORMATION, this); } diff --git a/contrib/samples/xrc/xrcdemo.cpp b/contrib/samples/xrc/xrcdemo.cpp index f7d755352c..c904f52e28 100644 --- a/contrib/samples/xrc/xrcdemo.cpp +++ b/contrib/samples/xrc/xrcdemo.cpp @@ -88,27 +88,27 @@ bool MyApp::OnInit() // into one giant XRC file if you wanted, but then they become more // diffcult to manage, and harder to reuse in later projects. // The menubar - wxXmlResource::Get()->Load("rc/menu.xrc"); + wxXmlResource::Get()->Load(wxT("rc/menu.xrc")); // The toolbar - wxXmlResource::Get()->Load("rc/toolbar.xrc"); + wxXmlResource::Get()->Load(wxT("rc/toolbar.xrc")); // Non-derived dialog example - wxXmlResource::Get()->Load("rc/basicdlg.xrc"); + wxXmlResource::Get()->Load(wxT("rc/basicdlg.xrc")); // Derived dialog example - wxXmlResource::Get()->Load("rc/derivdlg.xrc"); + wxXmlResource::Get()->Load(wxT("rc/derivdlg.xrc")); // Controls property example - wxXmlResource::Get()->Load("rc/controls.xrc"); + wxXmlResource::Get()->Load(wxT("rc/controls.xrc")); // Frame example - wxXmlResource::Get()->Load("rc/frame.xrc"); + wxXmlResource::Get()->Load(wxT("rc/frame.xrc")); // Uncentered example - wxXmlResource::Get()->Load("rc/uncenter.xrc"); + wxXmlResource::Get()->Load(wxT("rc/uncenter.xrc")); // Custom class example - wxXmlResource::Get()->Load("rc/custclas.xrc"); + wxXmlResource::Get()->Load(wxT("rc/custclas.xrc")); // wxArtProvider example - wxXmlResource::Get()->Load("rc/artprov.xrc"); + wxXmlResource::Get()->Load(wxT("rc/artprov.xrc")); // Platform property example - wxXmlResource::Get()->Load("rc/platform.xrc"); + wxXmlResource::Get()->Load(wxT("rc/platform.xrc")); // Variable expansion example - wxXmlResource::Get()->Load("rc/variable.xrc"); + wxXmlResource::Get()->Load(wxT("rc/variable.xrc")); // Make an instance of your derived frame. Passing NULL (the default value // of MyFrame's constructor is NULL) as the frame doesn't have a frame diff --git a/contrib/src/animate/Makefile.in b/contrib/src/animate/Makefile.in index a902f90775..a749a523d8 100644 --- a/contrib/src/animate/Makefile.in +++ b/contrib/src/animate/Makefile.in @@ -4,11 +4,12 @@ top_srcdir = @top_srcdir@/.. top_builddir = ../../.. libsrc_dir = contrib/src/animate -TARGET_LIBNAME=libwx_anim +TARGET_LIBNAME=lib@WX_LIBRARY_BASENAME@_animate-@WX_RELEASE@ + +LIBVERSION_CURRENT=@WX_CURRENT@ +LIBVERSION_REVISION=@WX_REVISION@ +LIBVERSION_AGE=@WX_AGE@ -LIBVERSION_CURRENT=1 -LIBVERSION_REVISION=0 -LIBVERSION_AGE=0 HEADER_PATH=$(top_srcdir)/contrib/include/wx HEADER_SUBDIR=plot diff --git a/contrib/src/animate/animate.cpp b/contrib/src/animate/animate.cpp index a0bad64e6e..1b88fce47e 100644 --- a/contrib/src/animate/animate.cpp +++ b/contrib/src/animate/animate.cpp @@ -212,7 +212,7 @@ bool wxAnimationPlayer::GetTransparentColour(wxColour& col) const } // Play the frame -bool wxAnimationPlayer::PlayFrame(int frame, wxWindow& window, wxPoint& pos) +bool wxAnimationPlayer::PlayFrame(int frame, wxWindow& window, const wxPoint& pos) { wxMemoryDC dc; dc.SelectObject(m_backingStore); diff --git a/contrib/src/animate/makefile.wat b/contrib/src/animate/makefile.wat new file mode 100644 index 0000000000..5a28418bdb --- /dev/null +++ b/contrib/src/animate/makefile.wat @@ -0,0 +1,13 @@ +# ANIM src makefile for Watcom C++ + +WXDIR = ..\..\.. +EXTRACPPFLAGS = -I$(WXDIR)\contrib\include + +LIBTARGET = $(WXDIR)\lib\anim_w.lib + +OBJECTS = & + $(OUTPUTDIR)\animate.obj & + +!include $(WXDIR)\src\makelib.wat + + diff --git a/contrib/src/applet/Makefile.in b/contrib/src/applet/Makefile.in index 1cfa1d7264..e1e99f6a30 100644 --- a/contrib/src/applet/Makefile.in +++ b/contrib/src/applet/Makefile.in @@ -4,11 +4,12 @@ top_srcdir = @top_srcdir@/.. top_builddir = ../../.. libsrc_dir = contrib/src/applet -TARGET_LIBNAME=libapplet +TARGET_LIBNAME=lib@WX_LIBRARY_BASENAME@_applet-@WX_RELEASE@ + +LIBVERSION_CURRENT=@WX_CURRENT@ +LIBVERSION_REVISION=@WX_REVISION@ +LIBVERSION_AGE=@WX_AGE@ -LIBVERSION_CURRENT=1 -LIBVERSION_REVISION=0 -LIBVERSION_AGE=0 HEADER_PATH=$(top_srcdir)/contrib/include/wx HEADER_SUBDIR=applet diff --git a/contrib/src/canvas/Makefile.in b/contrib/src/canvas/Makefile.in index 277ad0c0f4..555666e305 100644 --- a/contrib/src/canvas/Makefile.in +++ b/contrib/src/canvas/Makefile.in @@ -4,11 +4,12 @@ top_srcdir = @top_srcdir@/.. top_builddir = ../../.. libsrc_dir = contrib/src/canvas -TARGET_LIBNAME=libcanvas +TARGET_LIBNAME=lib@WX_LIBRARY_BASENAME@_canvas-@WX_RELEASE@ + +LIBVERSION_CURRENT=@WX_CURRENT@ +LIBVERSION_REVISION=@WX_REVISION@ +LIBVERSION_AGE=@WX_AGE@ -LIBVERSION_CURRENT=1 -LIBVERSION_REVISION=0 -LIBVERSION_AGE=0 HEADER_PATH=$(top_srcdir)/contrib/include/wx HEADER_SUBDIR=canvas diff --git a/contrib/src/canvas/bbox.cpp b/contrib/src/canvas/bbox.cpp index 227b0d1c33..b284a86c76 100644 --- a/contrib/src/canvas/bbox.cpp +++ b/contrib/src/canvas/bbox.cpp @@ -26,7 +26,7 @@ wxBoundingBox::wxBoundingBox() } -wxBoundingBox::wxBoundingBox(wxBoundingBox &other) +wxBoundingBox::wxBoundingBox(const wxBoundingBox &other) { m_minx = other.m_minx; m_miny = other.m_miny; diff --git a/contrib/src/fl/Makefile.in b/contrib/src/fl/Makefile.in index e902c419f7..53d717a272 100644 --- a/contrib/src/fl/Makefile.in +++ b/contrib/src/fl/Makefile.in @@ -4,11 +4,12 @@ top_srcdir = @top_srcdir@/.. top_builddir = ../../.. libsrc_dir = contrib/src/fl -TARGET_LIBNAME = libfl +TARGET_LIBNAME=lib@WX_LIBRARY_BASENAME@_fl-@WX_RELEASE@ + +LIBVERSION_CURRENT=@WX_CURRENT@ +LIBVERSION_REVISION=@WX_REVISION@ +LIBVERSION_AGE=@WX_AGE@ -LIBVERSION_CURRENT=1 -LIBVERSION_REVISION=0 -LIBVERSION_AGE=0 HEADER_PATH=$(top_srcdir)/contrib/include/wx HEADER_SUBDIR=fl @@ -18,6 +19,7 @@ HEADERS = \ cbcustom.h \ dynbarhnd.h \ dyntbarhnd.h \ + fldefs.h \ garbagec.h \ hintanimpl.h \ panedrawpl.h \ diff --git a/contrib/src/fl/bardragpl.cpp b/contrib/src/fl/bardragpl.cpp index 4e35ae422e..a1ef597f87 100644 --- a/contrib/src/fl/bardragpl.cpp +++ b/contrib/src/fl/bardragpl.cpp @@ -669,7 +669,7 @@ void cbBarDragPlugin::OnLButtonDown( cbLeftDownEvent& event ) { if ( mBarDragStarted ) { - wxMessageBox("DblClick!"); + wxMessageBox(wxT("DblClick!")); } event.Skip(); diff --git a/contrib/src/fl/cbcustom.cpp b/contrib/src/fl/cbcustom.cpp index ecbbf258cf..1fca0c0b23 100644 --- a/contrib/src/fl/cbcustom.cpp +++ b/contrib/src/fl/cbcustom.cpp @@ -97,8 +97,8 @@ void cbSimpleCustomizationPlugin::OnCustomizeBar( cbCustomizeBarEvent& event ) void cbSimpleCustomizationPlugin::OnCustomizeLayout( cbCustomizeLayoutEvent& event ) { - wxString helpStr1 = "Select this item to show the corresponding control bar"; - wxString helpStr2 = "Select this itme to hide the corresponding control bar"; + wxString helpStr1 = wxT("Select this item to show the corresponding control bar"); + wxString helpStr2 = wxT("Select this itme to hide the corresponding control bar"); int id = CB_CUSTOMIZE_MENU_FIRST_ITEM_ID; @@ -153,7 +153,7 @@ void cbSimpleCustomizationPlugin::OnMenuItemSelected( wxCommandEvent& event ) { if ( event.GetId() == mCustMenuItemId ) { - wxMessageBox("Customization dialog box is not supported by this plugin yet"); + wxMessageBox(wxT("Customization dialog box is not supported by this plugin yet")); return; } diff --git a/contrib/src/fl/controlbar.cpp b/contrib/src/fl/controlbar.cpp index afe63e5af0..7eab4620c6 100644 --- a/contrib/src/fl/controlbar.cpp +++ b/contrib/src/fl/controlbar.cpp @@ -976,7 +976,7 @@ void wxFrameLayout::RemoveBar( cbBarInfo* pBarInfo ) return; } } - wxFAIL_MSG("bar info should be present in the list of all bars of all panes"); + wxFAIL_MSG(wxT("bar info should be present in the list of all bars of all panes")); } bool wxFrameLayout::LocateBar( cbBarInfo* pBarInfo, @@ -1155,6 +1155,9 @@ void wxFrameLayout::PositionPanes() void wxFrameLayout::OnSize( wxSizeEvent& event ) { + mpFrame->ProcessEvent( event ); + event.Skip( FALSE ); // stop its progpagation + if ( event.GetEventObject() == (wxObject*) mpFrame ) { GetUpdatesManager().OnStartChanges(); @@ -1480,7 +1483,7 @@ void wxFrameLayout::OnIdle( wxIdleEvent& event ) if ( !focus && mCheckFocusWhenIdle ) { - wxMessageBox( "Hi, no more focus in this app!" ); + wxMessageBox(wxT("Hi, no more focus in this app!")); mCheckFocusWhenIdle = FALSE; //ShowFloatedWindows( FALSE ); @@ -3012,7 +3015,7 @@ int cbDockPane::GetRowIndex( cbRowInfo* pRow ) return i; } - wxFAIL_MSG("Row must be present to call cbDockPane::GetRowIndex()"); + wxFAIL_MSG(wxT("Row must be present to call cbDockPane::GetRowIndex()")); return 0; } @@ -3060,7 +3063,7 @@ bool cbDockPane::MatchesMask( int paneMask ) case FL_ALIGN_RIGHT : thisMask = FL_ALIGN_RIGHT_PANE; break; default: - wxFAIL_MSG("Bad FL alignment type detected in cbDockPane::MatchesMask()"); + wxFAIL_MSG(wxT("Bad FL alignment type detected in cbDockPane::MatchesMask()")); } return ( thisMask & paneMask ) != 0; diff --git a/contrib/src/fl/flVC.dsp b/contrib/src/fl/flVC.dsp index 0d1adf1f93..dcf38ad96e 100644 --- a/contrib/src/fl/flVC.dsp +++ b/contrib/src/fl/flVC.dsp @@ -2,9 +2,10 @@ # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 # TARGTYPE "Win32 (x86) Static Library" 0x0104 -CFG=flVC - Win32 Debug +CFG=flVC - Win32 Debug Unicode DLL !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE @@ -13,20 +14,24 @@ CFG=flVC - Win32 Debug !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE -!MESSAGE NMAKE /f "flVC.mak" CFG="flVC - Win32 Debug" +!MESSAGE NMAKE /f "flVC.mak" CFG="flVC - Win32 Debug Unicode DLL" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "flVC - Win32 Release" (based on "Win32 (x86) Static Library") !MESSAGE "flVC - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "flVC - Win32 Debug DLL" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "flVC - Win32 Release DLL" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "flVC - Win32 Release Unicode" (based on "Win32 (x86) Static Library") +!MESSAGE "flVC - Win32 Release Unicode DLL" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "flVC - Win32 Debug Unicode" (based on "Win32 (x86) Static Library") +!MESSAGE "flVC - Win32 Debug Unicode DLL" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe !IF "$(CFG)" == "flVC - Win32 Release" @@ -40,9 +45,11 @@ RSC=rc.exe # PROP Output_Dir "Release" # PROP Intermediate_Dir "Release" # PROP Target_Dir "" +LINK32=link.exe +CPP=cl.exe # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../include" /I "../../include" /I "../../../lib/msw" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__HACK_MY_MSDEV40__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c -# SUBTRACT CPP /YX +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../include" /I "../../include" /I "../../../lib/msw" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__HACK_MY_MSDEV40__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /YX /FD /c +RSC=rc.exe # ADD BASE RSC /l 0x809 # ADD RSC /l 0x809 BSC32=bscmake.exe @@ -64,9 +71,11 @@ LIB32=link.exe -lib # PROP Output_Dir "Debug" # PROP Intermediate_Dir "Debug" # PROP Target_Dir "" +LINK32=link.exe +CPP=cl.exe # ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c -# ADD CPP /nologo /MDd /W3 /GX /Zi /Od /I "../../../include" /I "../../include" /I "../../../lib/mswd" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c -# SUBTRACT CPP /YX +# ADD CPP /nologo /MDd /W3 /GX /Zi /Od /I "../../../include" /I "../../include" /I "../../../lib/mswd" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /YX /FD /c +RSC=rc.exe # ADD BASE RSC /l 0x809 # ADD RSC /l 0x809 BSC32=bscmake.exe @@ -76,12 +85,208 @@ LIB32=link.exe -lib # ADD BASE LIB32 /nologo # ADD LIB32 /nologo /out:"..\..\..\lib\fld.lib" +!ELSEIF "$(CFG)" == "flVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug_DLL" +# PROP BASE Intermediate_Dir "Debug_DLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\lib" +# PROP Intermediate_Dir "Debug_DLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\lib\fld.lib" +# ADD LIB32 /nologo /out:"..\..\..\lib\fld.lib" +CPP=cl.exe +# ADD BASE CPP /nologo /MDd /W3 /GX /Zi /Od /I "../../../include" /I "../../include" /I "../../../lib/mswd" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT BASE CPP /YX +# ADD CPP /nologo /MDd /W3 /GX /Zi /Od /I "../../../include" /I "../../include" /I "../../../lib/mswdlld" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D "WXUSINGDLL" /D "WXMAKING_FL_DLL" /YX /FD /c +# SUBTRACT CPP /u +MTL=midl.exe +RSC=rc.exe +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /machine:IX86 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib comdlg32.lib shell32.lib ole32.lib oleaut32.lib odbc32.lib uuid.lib rpcrt4.lib comctl32.lib wsock32.lib winmm.lib wxmsw24d.lib /nologo /version:1.0 /dll /debug /machine:IX86 /out:"../../../lib/fldlld.dll" /libpath:"../../../lib" +# SUBTRACT LINK32 /pdb:none + +!ELSEIF "$(CFG)" == "flVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "flVC___Win32_Release_DLL" +# PROP BASE Intermediate_Dir "flVC___Win32_Release_DLL" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\lib" +# PROP Intermediate_Dir "Release_DLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\lib\fld.lib" +# ADD LIB32 /nologo /out:"..\..\..\lib\fld.lib" +CPP=cl.exe +# ADD BASE CPP /nologo /MDd /W3 /GX /Zi /Od /I "../../../include" /I "../../include" /I "../../../lib/mswdlld" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /D "WXBUILD_FL_DLL" /YX /FD /c +# SUBTRACT BASE CPP /u +# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /Ob2 /I "../../../include" /I "../../include" /I "../../../lib/mswdll" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D "WXUSINGDLL" /D "WXMAKING_FL_DLL" /YX /FD /c +# SUBTRACT CPP /u +MTL=midl.exe +RSC=rc.exe +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib comdlg32.lib shell32.lib ole32.lib oleaut32.lib odbc32.lib uuid.lib rpcrt4.lib comctl32.lib wsock32.lib winmm.lib wxmsw24d.lib /nologo /version:1.0 /dll /debug /machine:IX86 /out:"../../../lib/fldlld.dll" /libpath:"../../../lib" +# SUBTRACT BASE LINK32 /pdb:none +# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib comdlg32.lib shell32.lib ole32.lib oleaut32.lib odbc32.lib uuid.lib rpcrt4.lib comctl32.lib wsock32.lib winmm.lib wxmsw24.lib /nologo /version:1.0 /dll /machine:IX86 /out:"../../../lib/fldll.dll" /libpath:"../../../lib" +# SUBTRACT LINK32 /pdb:none /incremental:no /debug + +!ELSEIF "$(CFG)" == "flVC - Win32 Release Unicode" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "flVC___Win32_Release_Unicode" +# PROP BASE Intermediate_Dir "flVC___Win32_Release_Unicode" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Unicode" +# PROP Intermediate_Dir "Release_Unicode" +# PROP Target_Dir "" +LINK32=link.exe +CPP=cl.exe +# ADD BASE CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../include" /I "../../include" /I "../../../lib/msw" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__HACK_MY_MSDEV40__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../include" /I "../../include" /I "../../../lib/mswu" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__HACK_MY_MSDEV40__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D "UNICODE" /D "_UNICODE" /YX /FD /c +RSC=rc.exe +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\lib\fl.lib" +# ADD LIB32 /nologo /out:"..\..\..\lib\flu.lib" + +!ELSEIF "$(CFG)" == "flVC - Win32 Release Unicode DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "flVC___Win32_Release_Unicode_DLL" +# PROP BASE Intermediate_Dir "flVC___Win32_Release_Unicode_DLL" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Release_Unicode_DLL" +# PROP Intermediate_Dir "Release_Unicode_DLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\lib\fld.lib" +# ADD LIB32 /nologo /out:"..\..\..\lib\fld.lib" +CPP=cl.exe +# ADD BASE CPP /nologo /MD /W3 /GX /Zi /O2 /Ob2 /I "../../../include" /I "../../include" /I "../../../lib/mswdlld" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D "WXUSINGDLL" /D "WXMAKING_FL_DLL" /YX /FD /c +# SUBTRACT BASE CPP /u +# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /Ob2 /I "../../../include" /I "../../include" /I "../../../lib/mswdllu" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D "WXUSINGDLL" /D "WXMAKING_FL_DLL" /D "_UNICODE" /D "UNICODE" /YX /FD /c +# SUBTRACT CPP /u +MTL=midl.exe +RSC=rc.exe +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib comdlg32.lib shell32.lib ole32.lib oleaut32.lib odbc32.lib uuid.lib rpcrt4.lib comctl32.lib wsock32.lib winmm.lib wxmsw24.lib /nologo /version:1.0 /dll /machine:IX86 /out:"../../../lib/fldll.dll" /libpath:"../../../lib" +# SUBTRACT BASE LINK32 /pdb:none /incremental:no /debug +# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib comdlg32.lib shell32.lib ole32.lib oleaut32.lib odbc32.lib uuid.lib rpcrt4.lib comctl32.lib wsock32.lib winmm.lib wxmsw24u.lib /nologo /version:1.0 /dll /machine:IX86 /out:"../../../lib/fldllu.dll" /libpath:"../../../lib" +# SUBTRACT LINK32 /pdb:none /incremental:no /debug + +!ELSEIF "$(CFG)" == "flVC - Win32 Debug Unicode" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "flVC___Win32_Debug_Unicode" +# PROP BASE Intermediate_Dir "flVC___Win32_Debug_Unicode" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug_Unicode" +# PROP Intermediate_Dir "Debug_Unicode" +# PROP Target_Dir "" +LINK32=link.exe +CPP=cl.exe +# ADD BASE CPP /nologo /MDd /W3 /GX /Zi /Od /I "../../../include" /I "../../include" /I "../../../lib/mswd" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /GX /Zi /Od /I "../../../include" /I "../../include" /I "../../../lib/mswud" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D "UNICODE" /D "_UNICODE" /YX /FD /c +RSC=rc.exe +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\lib\fld.lib" +# ADD LIB32 /nologo /out:"..\..\..\lib\flud.lib" + +!ELSEIF "$(CFG)" == "flVC - Win32 Debug Unicode DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "flVC___Win32_Debug_Unicode_DLL" +# PROP BASE Intermediate_Dir "flVC___Win32_Debug_Unicode_DLL" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug_Unicode_DLL" +# PROP Intermediate_Dir "Debug_Unicode_DLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\lib\fld.lib" +# ADD LIB32 /nologo /out:"..\..\..\lib\fld.lib" +CPP=cl.exe +# ADD BASE CPP /nologo /MDd /W3 /GX /Zi /Od /I "../../../include" /I "../../include" /I "../../../lib/mswdlld" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D "WXUSINGDLL" /D "WXMAKING_FL_DLL" /YX /FD /c +# SUBTRACT BASE CPP /u +# ADD CPP /nologo /MDd /W3 /GX /Zi /Od /I "../../../include" /I "../../include" /I "../../../lib/mswdllud" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D "WXUSINGDLL" /D "WXMAKING_FL_DLL" /D "UNICODE" /D "_UNICODE" /YX /FD /c +# SUBTRACT CPP /u +MTL=midl.exe +RSC=rc.exe +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib comdlg32.lib shell32.lib ole32.lib oleaut32.lib odbc32.lib uuid.lib rpcrt4.lib comctl32.lib wsock32.lib winmm.lib wxmsw24d.lib /nologo /version:1.0 /dll /debug /machine:IX86 /out:"../../../lib/fldlld.dll" /libpath:"../../../lib" +# SUBTRACT BASE LINK32 /pdb:none +# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib comdlg32.lib shell32.lib ole32.lib oleaut32.lib odbc32.lib uuid.lib rpcrt4.lib comctl32.lib wsock32.lib winmm.lib wxmsw24ud.lib /nologo /version:1.0 /dll /debug /machine:IX86 /out:"../../../lib/fldllud.dll" /libpath:"../../../lib" +# SUBTRACT LINK32 /pdb:none + !ENDIF # Begin Target # Name "flVC - Win32 Release" # Name "flVC - Win32 Debug" +# Name "flVC - Win32 Debug DLL" +# Name "flVC - Win32 Release DLL" +# Name "flVC - Win32 Release Unicode" +# Name "flVC - Win32 Release Unicode DLL" +# Name "flVC - Win32 Debug Unicode" +# Name "flVC - Win32 Debug Unicode DLL" # Begin Group "Headers" # PROP Default_Filter "" @@ -119,6 +324,10 @@ SOURCE=..\..\include\wx\fl\dyntbarhnd.h # End Source File # Begin Source File +SOURCE=..\..\include\wx\fl\fldefs.h +# End Source File +# Begin Source File + SOURCE=..\..\include\wx\fl\frmview.h # End Source File # Begin Source File diff --git a/contrib/src/fl/newbmpbtn.cpp b/contrib/src/fl/newbmpbtn.cpp index 740bf206d8..e9262b913f 100644 --- a/contrib/src/fl/newbmpbtn.cpp +++ b/contrib/src/fl/newbmpbtn.cpp @@ -433,7 +433,7 @@ void wxNewBitmapButton::RenderLabelImage( wxBitmap*& destBmp, wxBitmap* srcBmp, } else { - wxFAIL_MSG("Unsupported FL alignment type detected in wxNewBitmapButton::RenderLabelImage()"); + wxFAIL_MSG(wxT("Unsupported FL alignment type detected in wxNewBitmapButton::RenderLabelImage()")); } } else @@ -523,9 +523,9 @@ void wxNewBitmapButton::RenderLabelImage( wxBitmap*& destBmp, wxBitmap* srcBmp, } destDc.SelectObject( wxNullBitmap ); -#ifdef __WXMSW__ +#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__) // Map to system colours - (void) MapBitmap(destBmp->GetHBITMAP(), destBmp->GetWidth(), destBmp->GetHeight()); + (void) wxToolBar::MapBitmap(destBmp->GetHBITMAP(), destBmp->GetWidth(), destBmp->GetHeight()); #endif } @@ -731,7 +731,7 @@ void wxNewBitmapButton::Reshape( ) // in the case of loading button from stream, check if we // have non-empty image-file name, load if possible - if ( mImageFileName != "" ) + if ( mImageFileName != wxT("") ) { mDepressedBmp.LoadFile( mImageFileName, mImageFileType ); @@ -796,52 +796,6 @@ void wxNewBitmapButton::OnKillFocus( wxFocusEvent& event ) { // useless - wxMessageBox("kill-focus for button!"); + wxMessageBox(wxT("kill-focus for button!")); } -#ifdef __WXMSW__ -WXHBITMAP wxNewBitmapButton::MapBitmap(WXHBITMAP bitmap, int width, int height) -{ - MemoryHDC hdcMem; - - if ( !hdcMem ) - { - wxLogLastError(_T("CreateCompatibleDC")); - - return bitmap; - } - - SelectInHDC bmpInHDC(hdcMem, (HBITMAP)bitmap); - - if ( !bmpInHDC ) - { - wxLogLastError(_T("SelectObject")); - - return bitmap; - } - - wxCOLORMAP *cmap = wxGetStdColourMap(); - - for ( int i = 0; i < width; i++ ) - { - for ( int j = 0; j < height; j++ ) - { - COLORREF pixel = ::GetPixel(hdcMem, i, j); - - for ( size_t k = 0; k < wxSTD_COL_MAX; k++ ) - { - COLORREF col = cmap[k].from; - if ( abs(GetRValue(pixel) - GetRValue(col)) < 10 && - abs(GetGValue(pixel) - GetGValue(col)) < 10 && - abs(GetBValue(pixel) - GetBValue(col)) < 10 ) - { - ::SetPixel(hdcMem, i, j, cmap[k].to); - break; - } - } - } - } - - return bitmap; -} -#endif diff --git a/contrib/src/fl/panedrawpl.cpp b/contrib/src/fl/panedrawpl.cpp index cc3625ffc1..214ffa148f 100644 --- a/contrib/src/fl/panedrawpl.cpp +++ b/contrib/src/fl/panedrawpl.cpp @@ -591,10 +591,14 @@ void cbPaneDrawPlugin::OnSizeBarWindow( cbSizeBarWndEvent& event ) // FIXME:: +/- 1s + int nNewHeight = bounds.height - 2 - bar.mDimInfo.mVertGap *2; + if(nNewHeight < 0) + nNewHeight = 0; + bar.mpBarWnd->wxWindow::SetSize( bounds.x + 1 + bar.mDimInfo.mHorizGap, bounds.y + 1 + bar.mDimInfo.mVertGap, bounds.width - 2 - bar.mDimInfo.mHorizGap*2, - bounds.height - 2 - bar.mDimInfo.mVertGap *2 , + nNewHeight, 0 ); diff --git a/contrib/src/fl/rowlayoutpl.cpp b/contrib/src/fl/rowlayoutpl.cpp index a1dd955c8c..a96119f34a 100644 --- a/contrib/src/fl/rowlayoutpl.cpp +++ b/contrib/src/fl/rowlayoutpl.cpp @@ -456,6 +456,9 @@ void cbRowLayoutPlugin::ApplyLengthRatios( cbRowInfo* pRow ) } } // for + if (pcntSum == 0.0) + pcntSum = 1.0; + if ( haveSquished ) unit = freeSpc / pcntSum; diff --git a/contrib/src/fl/toolwnd.cpp b/contrib/src/fl/toolwnd.cpp index 5c846c27ef..4c998ab600 100644 --- a/contrib/src/fl/toolwnd.cpp +++ b/contrib/src/fl/toolwnd.cpp @@ -81,7 +81,7 @@ wxToolWindow::wxToolWindow() mTitleFont( 8, wxSWISS, wxNORMAL, wxNORMAL ), #else // just to simulate MS-Dev style - mTitleFont( 8, wxSWISS, wxNORMAL, wxNORMAL, FALSE, "MS Sans Serif" ), + mTitleFont( 8, wxSWISS, wxNORMAL, wxNORMAL, FALSE, wxT("MS Sans Serif") ), #endif mTitleHeight ( 16 ), @@ -572,7 +572,7 @@ void wxToolWindow::OnMotion( wxMouseEvent& event ) DrawHintRect( mPrevHintRect ); DrawHintRect( finalRect ); - ::wxLogTrace("%d,%d / %d,%d\n", finalRect.x, finalRect.y, finalRect.width, finalRect.height); + ::wxLogTrace(wxT("%d,%d / %d,%d\n"), finalRect.x, finalRect.y, finalRect.width, finalRect.height); } mPrevHintRect = finalRect; diff --git a/contrib/src/gizmos/Makefile.in b/contrib/src/gizmos/Makefile.in index 2e8619349b..436da14ab3 100644 --- a/contrib/src/gizmos/Makefile.in +++ b/contrib/src/gizmos/Makefile.in @@ -4,11 +4,12 @@ top_srcdir = @top_srcdir@/.. top_builddir = ../../.. libsrc_dir = contrib/src/gizmos -TARGET_LIBNAME=libgizmos +TARGET_LIBNAME=lib@WX_LIBRARY_BASENAME@_gizmos-@WX_RELEASE@ + +LIBVERSION_CURRENT=@WX_CURRENT@ +LIBVERSION_REVISION=@WX_REVISION@ +LIBVERSION_AGE=@WX_AGE@ -LIBVERSION_CURRENT=1 -LIBVERSION_REVISION=0 -LIBVERSION_AGE=0 HEADER_PATH=$(top_srcdir)/contrib/include/wx HEADER_SUBDIR=gizmos diff --git a/contrib/src/gizmos/dynamicsash.cpp b/contrib/src/gizmos/dynamicsash.cpp index 53b1123f7c..6e80bbacb4 100644 --- a/contrib/src/gizmos/dynamicsash.cpp +++ b/contrib/src/gizmos/dynamicsash.cpp @@ -29,6 +29,10 @@ #include "wx/gizmos/dynamicsash.h" + +const wxChar* wxDynamicSashWindowNameStr = wxT("dynamicSashWindow"); + + /* wxDynamicSashWindow works by internally storing a tree of Implementation objects (wxDynamicSsahWindowImpl) and Leaf objects diff --git a/contrib/src/gizmos/editlbox.cpp b/contrib/src/gizmos/editlbox.cpp index e7c065127d..e7d6160a03 100644 --- a/contrib/src/gizmos/editlbox.cpp +++ b/contrib/src/gizmos/editlbox.cpp @@ -41,7 +41,7 @@ public: const wxSize &size = wxDefaultSize, long style = wxLC_ICON, const wxValidator& validator = wxDefaultValidator, - const wxString &name = "listctrl") + const wxString &name = _T("listctrl")) : wxListCtrl(parent, id, pos, size, style, validator, name) { CreateColumns(); diff --git a/contrib/src/gizmos/makefile.bcc b/contrib/src/gizmos/makefile.bcc deleted file mode 100644 index b3300f7276..0000000000 --- a/contrib/src/gizmos/makefile.bcc +++ /dev/null @@ -1,20 +0,0 @@ -# -# File: makefile.bcc -# Author: Julian Smart -# Created: 1998 -# Updated: -# -# Builds Gizmos library for BC++, 16-bit - -!if "$(WXWIN)" == "" -!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx -!endif - -WXDIR = $(WXWIN) - -LIBTARGET=$(WXDIR)\lib\gizmos.lib - -OBJECTS = multicell.obj splittree.obj editlbox.obj dynamicsash.obj ledctrl.obj - -!include $(WXDIR)\src\makelib.bcc - diff --git a/contrib/src/gizmos/makefile.wat b/contrib/src/gizmos/makefile.wat index a84c801924..ab37621153 100644 --- a/contrib/src/gizmos/makefile.wat +++ b/contrib/src/gizmos/makefile.wat @@ -1,22 +1,17 @@ # Gizmos makefile for Watcom C++ WXDIR = ..\..\.. +EXTRACPPFLAGS = -I$(WXDIR)\contrib\include -!include $(WXDIR)\src\makewat.env +LIBTARGET = $(WXDIR)\lib\gizmos_w.lib -GIZMOSLIB = $(WXDIR)\lib\gizmos.lib -THISDIR = $(WXDIR)\contrib\src\gizmos +OBJECTS = & + $(OUTPUTDIR)\multicell.obj & + $(OUTPUTDIR)\splittree.obj & + $(OUTPUTDIR)\editlbox.obj & + $(OUTPUTDIR)\dynamicsash.obj & + $(OUTPUTDIR)\ledctrl.obj -NAME = gizmos -LNK = $(name).lnk +!include $(WXDIR)\src\makelib.wat -OBJECTS = multicell.obj splittree.obj editlbox.obj dynamicsash.obj ledctrl.obj - -all: $(GIZMOSLIB) - -$(GIZMOSLIB): $(OBJECTS) - *wlib /b /c /n /P=256 $(GIZMOSLIB) $(OBJECTS) - -clean: .SYMBOLIC - -erase *.obj *.bak *.err *.pch $(GIZMOSLIB) *.lbc diff --git a/contrib/src/gizmos/multicell.cpp b/contrib/src/gizmos/multicell.cpp index 3483d896d2..632c054674 100644 --- a/contrib/src/gizmos/multicell.cpp +++ b/contrib/src/gizmos/multicell.cpp @@ -321,7 +321,7 @@ void wxMultiCellSizer::RecalcSizes() minSize.SetHeight(wxMax(minSize.GetHeight(), c_size.GetHeight())); minSize.SetWidth(wxMax(minSize.GetWidth(), c_size.GetWidth())); } - if (rect->GetStyle() & wxHORIZENTAL_RESIZABLE || + if (rect->GetStyle() & wxHORIZONTAL_RESIZABLE || rect->GetWidth() > 1 || m_minSizes[rect->GetColumn()]->GetWidth() < 0) { @@ -489,7 +489,7 @@ void wxMultiCellSizer :: GetMinimums() // For each column, calculate the max width for those fields which are not // resizable in the horizontal pane - if (!(rect->GetStyle() & wxHORIZENTAL_RESIZABLE || m_minSizes[col]->GetWidth() < 0)) + if (!(rect->GetStyle() & wxHORIZONTAL_RESIZABLE || m_minSizes[col]->GetWidth() < 0)) { if (m_minSizes[col]->GetWidth()) { diff --git a/contrib/src/gizmos/splittree.cpp b/contrib/src/gizmos/splittree.cpp index 346659cf30..71cf0e6268 100644 --- a/contrib/src/gizmos/splittree.cpp +++ b/contrib/src/gizmos/splittree.cpp @@ -113,7 +113,10 @@ void wxRemotelyScrolledTreeCtrl::SetScrollbars(int pixelsPerUnitX, int pixelsPer if (IsKindOf(CLASSINFO(wxGenericTreeCtrl))) { wxGenericTreeCtrl* win = (wxGenericTreeCtrl*) this; - win->wxGenericTreeCtrl::SetScrollbars(pixelsPerUnitX, 0, noUnitsX, 0, xPos, 0, noRefresh); +// win->wxGenericTreeCtrl::SetScrollbars(pixelsPerUnitX, 0, noUnitsX, 0, xPos, 0, noRefresh); + // Don't refresh, or on wxGTK a portion of the window will be redrawn as if + // Y scrolling is at zero + win->wxGenericTreeCtrl::SetScrollbars(pixelsPerUnitX, pixelsPerUnitY, noUnitsX, 0, xPos, 0, /* noRefresh */ TRUE); wxScrolledWindow* scrolledWindow = GetScrolledWindow(); if (scrolledWindow) diff --git a/contrib/src/mmedia/Makefile.in b/contrib/src/mmedia/Makefile.in index ace479e123..aed8a229d5 100644 --- a/contrib/src/mmedia/Makefile.in +++ b/contrib/src/mmedia/Makefile.in @@ -4,11 +4,12 @@ top_srcdir = @top_srcdir@/.. top_builddir = ../../.. libsrc_dir = contrib/src/mmedia -TARGET_LIBNAME=libmmedia +TARGET_LIBNAME=lib@WX_LIBRARY_BASENAME@_mmedia-@WX_RELEASE@ + +LIBVERSION_CURRENT=@WX_CURRENT@ +LIBVERSION_REVISION=@WX_REVISION@ +LIBVERSION_AGE=@WX_AGE@ -LIBVERSION_CURRENT=1 -LIBVERSION_REVISION=0 -LIBVERSION_AGE=0 HEADER_PATH=$(top_srcdir)/contrib/include/wx HEADER_SUBDIR=mmedia diff --git a/contrib/src/mmedia/makefile.b32 b/contrib/src/mmedia/makefile.b32 index 219a6e3080..f00a8a9cdc 100644 --- a/contrib/src/mmedia/makefile.b32 +++ b/contrib/src/mmedia/makefile.b32 @@ -9,11 +9,11 @@ WXDIR = $(WXWIN) -LIBTARGET=$(WXDIR)\contrib\lib\mmedia.lib +LIBTARGET=$(WXDIR)\lib\mmedia.lib OBJECTS = cdbase.obj cdwin.obj g711.obj g721.obj g723_24.obj \ g723_40.obj g72x.obj sndaiff.obj sndbase.obj sndcodec.obj \ - sndcpcm.obj sndfile.obj sndg72x.obj sndpcm.obj sndulaw.obj \ + sndcpcm.obj sndfile.obj sndg72x.obj sndmsad.obj sndpcm.obj sndulaw.obj \ sndwav.obj sndwin.obj vidbase.obj vidwin.obj !include $(WXDIR)\src\makelib.b32 diff --git a/contrib/src/mmedia/makefile.g95 b/contrib/src/mmedia/makefile.g95 index 4311548bf0..b6d00bf4ad 100644 --- a/contrib/src/mmedia/makefile.g95 +++ b/contrib/src/mmedia/makefile.g95 @@ -12,7 +12,7 @@ WXDIR = ../../.. LIBTARGET=$(WXDIR)/contrib/lib/libmmedia.a OBJECTS = cdbase.o cdwin.o g711.o g721.o g723_24.o \ g723_40.o g72x.o sndaiff.o sndbase.o sndcodec.o \ - sndcpcm.o sndfile.o sndg72x.o sndpcm.o sndulaw.o \ + sndcpcm.o sndfile.o sndg72x.o sndmsad.o sndpcm.o sndulaw.o \ sndwav.o sndwin.o vidbase.o vidwin.o include $(WXDIR)/src/makelib.g95 diff --git a/contrib/src/mmedia/makefile.wat b/contrib/src/mmedia/makefile.wat index e5181dde55..a050126803 100644 --- a/contrib/src/mmedia/makefile.wat +++ b/contrib/src/mmedia/makefile.wat @@ -6,15 +6,33 @@ # # Makefile : Builds MMedia library for Watcom C++, WIN32 -WXDIR = $(%WXWIN) +!error This will not work - there is no digitalv.h in Open Watcom as of 26 Feb 03 -LIBTARGET=$(WXDIR)\contrib\lib\mmedia.lib +WXDIR = ..\..\.. +EXTRACPPFLAGS = -I$(WXDIR)\contrib\include -OBJECTS = cdbase.obj cdwin.obj g711.obj g721.obj g723_24.obj & - g723_40.obj g72x.obj sndaiff.obj sndbase.obj sndcodec.obj & - sndcpcm.obj sndfile.obj sndg72x.obj sndpcm.obj sndulaw.obj & - sndwav.obj sndwin.obj vidbase.obj vidwin.obj +LIBTARGET=$(WXDIR)\lib\mmedia_w.lib + +OBJECTS = & + $(OUTPUTDIR)\cdbase.obj & + $(OUTPUTDIR)\cdwin.obj & + $(OUTPUTDIR)\g711.obj & + $(OUTPUTDIR)\g721.obj & + $(OUTPUTDIR)\g723_24.obj & + $(OUTPUTDIR)\g723_40.obj & + $(OUTPUTDIR)\g72x.obj & + $(OUTPUTDIR)\sndaiff.obj & + $(OUTPUTDIR)\sndbase.obj & + $(OUTPUTDIR)\sndcodec.obj & + $(OUTPUTDIR)\sndcpcm.obj & + $(OUTPUTDIR)\sndfile.obj & + $(OUTPUTDIR)\sndg72x.obj & + $(OUTPUTDIR)\sndpcm.obj & + $(OUTPUTDIR)\sndulaw.obj & + $(OUTPUTDIR)\sndwav.obj & + $(OUTPUTDIR)\sndwin.obj & + $(OUTPUTDIR)\vidbase.obj & + $(OUTPUTDIR)\vidwin.obj !include $(WXDIR)\src\makelib.wat - diff --git a/contrib/src/net/Makefile.in b/contrib/src/net/Makefile.in index 9809ddec64..5d9bce041c 100644 --- a/contrib/src/net/Makefile.in +++ b/contrib/src/net/Makefile.in @@ -4,14 +4,15 @@ top_srcdir = @top_srcdir@/.. top_builddir = ../../.. libsrc_dir = contrib/src/net -TARGET_LIBNAME=libwx_net +TARGET_LIBNAME=lib@WX_LIBRARY_BASENAME@_net-@WX_RELEASE@ + +LIBVERSION_CURRENT=@WX_CURRENT@ +LIBVERSION_REVISION=@WX_REVISION@ +LIBVERSION_AGE=@WX_AGE@ -LIBVERSION_CURRENT=1 -LIBVERSION_REVISION=0 -LIBVERSION_AGE=0 HEADER_PATH=$(top_srcdir)/contrib/include/wx -HEADER_SUBDIR=plot +HEADER_SUBDIR=net HEADERS=msg.h email.h web.h diff --git a/contrib/src/net/smapi.cpp b/contrib/src/net/smapi.cpp index 81617a39b8..43421b8ebd 100644 --- a/contrib/src/net/smapi.cpp +++ b/contrib/src/net/smapi.cpp @@ -145,12 +145,20 @@ bool wxMapiSession::Logon(const wxString& sProfileName, const wxString& sPasswor LPSTR pszProfileName = NULL; LPSTR pszPassword = NULL; + wxCharBuffer cbProfile(1),cbPassword(1); if (nProfileLength) { // pszProfileName = T2A((LPTSTR) (LPCTSTR) sProfileName); // pszPassword = T2A((LPTSTR) (LPCTSTR) sPassword); +#ifndef UNICODE pszProfileName = (LPSTR) sProfileName.c_str(); pszPassword = (LPSTR) sPassword.c_str(); +#else + cbProfile = sProfileName.mb_str(); + cbPassword = sPassword.mb_str(); + pszProfileName = cbProfile.data(); + pszPassword = cbPassword.data(); +#endif } //Setup the flags & UIParam parameters used in the MapiLogon call @@ -252,7 +260,13 @@ bool wxMapiSession::Resolve(const wxString& sName, void* lppRecip1) //Call the MAPIResolveName function // LPSTR lpszAsciiName = T2A((LPTSTR) (LPCTSTR) sName); +#ifndef UNICODE LPSTR lpszAsciiName = (LPSTR) sName.c_str(); +#else + wxCharBuffer cbName(1); + cbName = sName.mb_str(); + LPSTR lpszAsciiName = cbName.data(); +#endif ULONG nError = m_data->m_lpfnMAPIResolveName(m_data->m_hSession, 0, lpszAsciiName, 0, 0, lppRecip); if (nError != SUCCESS_SUCCESS) { @@ -277,8 +291,16 @@ bool wxMapiSession::Send(wxMailMessage& message) //Create the MapiMessage structure to match the message parameter send into us MapiMessage mapiMessage; ZeroMemory(&mapiMessage, sizeof(mapiMessage)); +#ifndef UNICODE mapiMessage.lpszSubject = (LPSTR) message.m_subject.c_str(); mapiMessage.lpszNoteText = (LPSTR) message.m_body.c_str(); +#else + wxCharBuffer cbSubject(1),cbBody(1),cbOriginator(1); + cbSubject = message.m_subject.mb_str(); + cbBody = message.m_body.mb_str(); + mapiMessage.lpszSubject = cbSubject.data(); + mapiMessage.lpszNoteText = cbBody.data(); +#endif // mapiMessage.lpszSubject = T2A((LPTSTR) (LPCTSTR) message.m_subject); // mapiMessage.lpszNoteText = T2A((LPTSTR) (LPCTSTR) message.m_body); mapiMessage.nRecipCount = message.m_to.GetCount() + message.m_cc.GetCount() + message.m_bcc.GetCount(); @@ -295,13 +317,19 @@ bool wxMapiSession::Send(wxMailMessage& message) mapiMessage.lpOriginator->ulRecipClass = MAPI_ORIG; // TODO Do we have to call Resolve? +#ifndef UNICODE mapiMessage.lpOriginator->lpszName = (LPSTR) message.m_from.c_str(); +#else + cbOriginator = message.m_from.mb_str(); + mapiMessage.lpOriginator->lpszName = cbOriginator.data(); +#endif } //Setup the "To" recipients int nRecipIndex = 0; int nToSize = message.m_to.GetCount(); - for (int i=0; ilpszName; + sName = wxString(lpTempRecip->lpszName,wxConvCurrent); //Don't forget to free up the memory MAPI allocated for us m_data->m_lpfnMAPIFreeBuffer(lpTempRecip); } //recip.lpszName = T2A((LPTSTR) (LPCTSTR) sName); +#ifndef UNICODE recip.lpszName = (LPSTR) sName.c_str(); +#else + recip.lpszName = sName.mb_str().release(); +#endif ++nRecipIndex; } @@ -338,13 +370,17 @@ bool wxMapiSession::Send(wxMailMessage& message) if (Resolve(sName, (void*) &lpTempRecip)) { //Resolve worked, put the resolved name back into the sName - sName = lpTempRecip->lpszName; + sName = wxString(lpTempRecip->lpszName,wxConvCurrent); //Don't forget to free up the memory MAPI allocated for us m_data->m_lpfnMAPIFreeBuffer(lpTempRecip); } //recip.lpszName = T2A((LPTSTR) (LPCTSTR) sName); +#ifndef UNICODE recip.lpszName = (LPSTR) sName.c_str(); +#else + recip.lpszName = sName.mb_str().release(); +#endif ++nRecipIndex; } @@ -363,13 +399,17 @@ bool wxMapiSession::Send(wxMailMessage& message) if (Resolve(sName, (void*) &lpTempRecip)) { //Resolve worked, put the resolved name back into the sName - sName = lpTempRecip->lpszName; + sName = wxString(lpTempRecip->lpszName,wxConvCurrent); //Don't forget to free up the memory MAPI allocated for us m_data->m_lpfnMAPIFreeBuffer(lpTempRecip); } //recip.lpszName = T2A((LPTSTR) (LPCTSTR) sName); +#ifndef UNICODE recip.lpszName = (LPSTR) sName.c_str(); +#else + recip.lpszName = sName.mb_str().release(); +#endif ++nRecipIndex; } @@ -394,7 +434,11 @@ bool wxMapiSession::Send(wxMailMessage& message) wxString& sFilename = message.m_attachments[i]; //file.lpszPathName = T2A((LPTSTR) (LPCTSTR) sFilename); +#ifndef UNICODE file.lpszPathName = (LPSTR) sFilename.c_str(); +#else + file.lpszPathName = sFilename.mb_str().release(); +#endif //file.lpszFileName = file.lpszPathName; file.lpszFileName = NULL; @@ -402,7 +446,11 @@ bool wxMapiSession::Send(wxMailMessage& message) { wxString& sTitle = message.m_attachmentTitles[i]; //file.lpszFileName = T2A((LPTSTR) (LPCTSTR) sTitle); +#ifndef UNICODE file.lpszFileName = (LPSTR) sTitle.c_str(); +#else + file.lpszFileName = sTitle.mb_str().release(); +#endif } } } @@ -422,10 +470,24 @@ bool wxMapiSession::Send(wxMailMessage& message) //Tidy up the Attachements if (nAttachmentSize) + { +#ifdef UNICODE + for (int i = 0;i < nAttachmentSize;i++) + { + free(mapiMessage.lpFiles[i].lpszPathName); + free(mapiMessage.lpFiles[i].lpszFileName); + } +#endif delete [] mapiMessage.lpFiles; + } //Free up the Recipients and Originator memory +#ifdef UNICODE + for (int i = 0;i < nRecipIndex;i++) + free(mapiMessage.lpRecips[i].lpszName); +#endif delete [] mapiMessage.lpRecips; + delete mapiMessage.lpOriginator; return bSuccess; @@ -435,4 +497,3 @@ long wxMapiSession::GetLastError() const { return m_data->m_nLastError; } - diff --git a/contrib/src/ogl/Makefile.in b/contrib/src/ogl/Makefile.in index 2b86eff47a..f3094fe3cf 100644 --- a/contrib/src/ogl/Makefile.in +++ b/contrib/src/ogl/Makefile.in @@ -4,11 +4,12 @@ top_srcdir = @top_srcdir@/.. top_builddir = ../../.. libsrc_dir = contrib/src/ogl -TARGET_LIBNAME=libogl +TARGET_LIBNAME=lib@WX_LIBRARY_BASENAME@_ogl-@WX_RELEASE@ + +LIBVERSION_CURRENT=@WX_CURRENT@ +LIBVERSION_REVISION=@WX_REVISION@ +LIBVERSION_AGE=@WX_AGE@ -LIBVERSION_CURRENT=1 -LIBVERSION_REVISION=0 -LIBVERSION_AGE=0 HEADER_PATH=$(top_srcdir)/contrib/include/wx HEADER_SUBDIR=ogl diff --git a/contrib/src/ogl/basic.cpp b/contrib/src/ogl/basic.cpp index a78d178bf5..63bbc4dfee 100644 --- a/contrib/src/ogl/basic.cpp +++ b/contrib/src/ogl/basic.cpp @@ -30,12 +30,6 @@ #undef new #endif -#if wxUSE_IOSTREAMH -#include -#else -#include -#endif - #include #include #include @@ -286,7 +280,7 @@ wxShape::wxShape(wxShapeCanvas *can) m_brush = wxWHITE_BRUSH; m_font = g_oglNormalFont; m_textColour = wxBLACK; - m_textColourName = "BLACK"; + m_textColourName = wxT("BLACK"); m_visible = FALSE; m_selected = FALSE; m_attachmentMode = ATTACHMENT_MODE_NONE; @@ -305,7 +299,7 @@ wxShape::wxShape(wxShapeCanvas *can) m_shadowBrush = wxBLACK_BRUSH; m_textMarginX = 5; m_textMarginY = 5; - m_regionName = "0"; + m_regionName = wxT("0"); m_centreResize = TRUE; m_maintainAspectRatio = FALSE; m_highlighted = FALSE; @@ -319,10 +313,10 @@ wxShape::wxShape(wxShapeCanvas *can) // the region eventually (the duplication is for compatibility) wxShapeRegion *region = new wxShapeRegion; m_regions.Append(region); - region->SetName("0"); + region->SetName(wxT("0")); region->SetFont(g_oglNormalFont); region->SetFormatMode(FORMAT_CENTRE_HORIZ | FORMAT_CENTRE_VERT); - region->SetColour("BLACK"); + region->SetColour(wxT("BLACK")); } wxShape::~wxShape() @@ -607,7 +601,8 @@ void wxShape::FormatText(wxDC& dc, const wxString& s, int i) return; wxShapeRegion *region = (wxShapeRegion *)node->Data(); - region->SetText(s); + // region->SetText(s); // don't set the formatted text yet, it will be done below + region->m_regionText = s; dc.SetFont(* region->GetFont()); region->GetSize(&w, &h); @@ -616,7 +611,7 @@ void wxShape::FormatText(wxDC& dc, const wxString& s, int i) node = stringList->First(); while (node) { - char *s = (char *)node->Data(); + wxChar *s = (wxChar *)node->Data(); wxShapeTextLine *line = new wxShapeTextLine(0.0, 0.0, s); region->GetFormattedText().Append((wxObject *)line); node = node->Next(); @@ -776,7 +771,7 @@ wxString wxShape::GetTextColour(int regionId) const { wxNode *node = m_regions.Nth(regionId); if (!node) - return wxString(""); + return wxEmptyString; wxShapeRegion *region = (wxShapeRegion *)node->Data(); return region->GetColour(); } @@ -794,7 +789,7 @@ wxString wxShape::GetRegionName(int regionId) { wxNode *node = m_regions.Nth(regionId); if (!node) - return wxString(""); + return wxEmptyString; wxShapeRegion *region = (wxShapeRegion *)node->Data(); return region->GetName(); } @@ -822,7 +817,7 @@ void wxShape::NameRegions(const wxString& parentName) for (int i = 0; i < n; i++) { if (parentName.Length() > 0) - buff << parentName << "." << i; + buff << parentName << wxT(".") << i; else buff << i; SetRegionName(buff, i); @@ -834,7 +829,7 @@ void wxShape::NameRegions(const wxString& parentName) buff.Empty(); wxShape *child = (wxShape *)node->Data(); if (parentName.Length() > 0) - buff << parentName << "." << j; + buff << parentName << wxT(".") << j; else buff << j; child->NameRegions(buff); @@ -1697,7 +1692,7 @@ void wxShape::RemoveLine(wxLineShape *line) m_lines.DeleteObject(line); } -#ifdef PROLOGIO +#if wxUSE_PROLOGIO void wxShape::WriteAttributes(wxExpr *clause) { clause->AddAttributeValueString("type", GetClassInfo()->GetClassName()); diff --git a/contrib/src/ogl/basic2.cpp b/contrib/src/ogl/basic2.cpp index 5dd361faa4..d8a59bc725 100644 --- a/contrib/src/ogl/basic2.cpp +++ b/contrib/src/ogl/basic2.cpp @@ -30,12 +30,6 @@ #undef new #endif -#if wxUSE_IOSTREAMH -#include -#else -#include -#endif - #include #include #include @@ -581,7 +575,7 @@ void wxPolygonShape::ResetControlPoints() } -#ifdef PROLOGIO +#if wxUSE_PROLOGIO void wxPolygonShape::WriteAttributes(wxExpr *clause) { wxShape::WriteAttributes(clause); @@ -940,7 +934,7 @@ bool wxRectangleShape::GetPerimeterPoint(double x1, double y1, return TRUE; } -#ifdef PROLOGIO +#if wxUSE_PROLOGIO void wxRectangleShape::WriteAttributes(wxExpr *clause) { wxShape::WriteAttributes(clause); @@ -1013,7 +1007,7 @@ void wxTextShape::Copy(wxShape& copy) wxRectangleShape::Copy(copy); } -#ifdef PROLOGIO +#if wxUSE_PROLOGIO void wxTextShape::WriteAttributes(wxExpr *clause) { wxRectangleShape::WriteAttributes(clause); @@ -1080,7 +1074,7 @@ void wxEllipseShape::SetSize(double x, double y, bool recursive) SetDefaultRegionSize(); } -#ifdef PROLOGIO +#if wxUSE_PROLOGIO void wxEllipseShape::WriteAttributes(wxExpr *clause) { wxShape::WriteAttributes(clause); @@ -1761,7 +1755,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxShapeRegion, wxObject) wxShapeRegion::wxShapeRegion() { - m_regionText = ""; + m_regionText = wxEmptyString; m_font = g_oglNormalFont; m_minHeight = 5.0; m_minWidth = 5.0; @@ -1773,9 +1767,9 @@ wxShapeRegion::wxShapeRegion() m_regionProportionX = -1.0; m_regionProportionY = -1.0; m_formatMode = FORMAT_CENTRE_HORIZ | FORMAT_CENTRE_VERT; - m_regionName = ""; - m_textColour = "BLACK"; - m_penColour = "BLACK"; + m_regionName = wxEmptyString; + m_textColour = wxT("BLACK"); + m_penColour = wxT("BLACK"); m_penStyle = wxSOLID; m_actualColourObject = NULL; m_actualPenObject = NULL; @@ -1897,7 +1891,7 @@ wxPen *wxShapeRegion::GetActualPen() return m_actualPenObject; if (!m_penColour) return NULL; - if (m_penColour == "Invisible") + if (m_penColour == wxT("Invisible")) return NULL; m_actualPenObject = wxThePenList->FindOrCreatePen(m_penColour, 1, m_penStyle); return m_actualPenObject; diff --git a/contrib/src/ogl/bmpshape.cpp b/contrib/src/ogl/bmpshape.cpp index 10b1748517..7b2dfac377 100644 --- a/contrib/src/ogl/bmpshape.cpp +++ b/contrib/src/ogl/bmpshape.cpp @@ -41,7 +41,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxBitmapShape, wxShape) wxBitmapShape::wxBitmapShape():wxRectangleShape(100.0, 50.0) { - m_filename = ""; + m_filename = wxEmptyString; } wxBitmapShape::~wxBitmapShape() @@ -52,7 +52,7 @@ void wxBitmapShape::OnDraw(wxDC& dc) { if (!m_bitmap.Ok()) return; - + wxMemoryDC tempDC; tempDC.SelectObject(m_bitmap); double x, y; @@ -76,7 +76,7 @@ void wxBitmapShape::SetSize(double w, double h, bool recursive) SetDefaultRegionSize(); } -#ifdef PROLOGIO +#if wxUSE_PROLOGIO void wxBitmapShape::WriteAttributes(wxExpr *clause) { // Can't really save the bitmap; so instantiate the bitmap diff --git a/contrib/src/ogl/canvas.cpp b/contrib/src/ogl/canvas.cpp index 755510eb83..55e87da514 100644 --- a/contrib/src/ogl/canvas.cpp +++ b/contrib/src/ogl/canvas.cpp @@ -30,12 +30,6 @@ #undef new #endif -#if wxUSE_IOSTREAMH -#include -#else -#include -#endif - #include #include #include diff --git a/contrib/src/ogl/composit.cpp b/contrib/src/ogl/composit.cpp index ded8e3be12..7834012aaf 100644 --- a/contrib/src/ogl/composit.cpp +++ b/contrib/src/ogl/composit.cpp @@ -33,10 +33,11 @@ #include #include +#if wxUSE_PROLOGIO // Sometimes, objects need to access the whole database to // construct themselves. wxExprDatabase *GlobalwxExprDatabase = NULL; - +#endif /* * Division control point @@ -598,7 +599,7 @@ bool wxCompositeShape::Constrain() return changed; } -#ifdef PROLOGIO +#if wxUSE_PROLOGIO void wxCompositeShape::WriteAttributes(wxExpr *clause) { wxRectangleShape::WriteAttributes(clause); @@ -826,10 +827,10 @@ wxDivisionShape::wxDivisionShape() m_handleSide = DIVISION_SIDE_NONE; m_leftSidePen = wxBLACK_PEN; m_topSidePen = wxBLACK_PEN; - m_leftSideColour = "BLACK"; - m_topSideColour = "BLACK"; - m_leftSideStyle = "Solid"; - m_topSideStyle = "Solid"; + m_leftSideColour = wxT("BLACK"); + m_topSideColour = wxT("BLACK"); + m_leftSideStyle = wxT("Solid"); + m_topSideStyle = wxT("Solid"); ClearRegions(); } @@ -984,7 +985,7 @@ void wxDivisionShape::Copy(wxShape& copy) // Division geometry copying is handled at the wxCompositeShape level. } -#ifdef PROLOGIO +#if wxUSE_PROLOGIO void wxDivisionShape::WriteAttributes(wxExpr *clause) { wxCompositeShape::WriteAttributes(clause); @@ -1573,11 +1574,11 @@ bool wxDivisionShape::ResizeAdjoining(int side, double newPos, bool test) class OGLPopupDivisionMenu : public wxMenu { public: OGLPopupDivisionMenu() : wxMenu() { - Append(DIVISION_MENU_SPLIT_HORIZONTALLY, "Split horizontally"); - Append(DIVISION_MENU_SPLIT_VERTICALLY, "Split vertically"); + Append(DIVISION_MENU_SPLIT_HORIZONTALLY, wxT("Split horizontally")); + Append(DIVISION_MENU_SPLIT_VERTICALLY, wxT("Split vertically")); AppendSeparator(); - Append(DIVISION_MENU_EDIT_LEFT_EDGE, "Edit left edge"); - Append(DIVISION_MENU_EDIT_TOP_EDGE, "Edit top edge"); + Append(DIVISION_MENU_EDIT_LEFT_EDGE, wxT("Edit left edge")); + Append(DIVISION_MENU_EDIT_TOP_EDGE, wxT("Edit top edge")); } void OnMenu(wxCommandEvent& event); @@ -1625,7 +1626,7 @@ void OGLPopupDivisionMenu::OnMenu(wxCommandEvent& event) void wxDivisionShape::EditEdge(int side) { - wxMessageBox("EditEdge() not implemented", "OGL", wxOK); + wxMessageBox(wxT("EditEdge() not implemented"), wxT("OGL"), wxOK); #if 0 wxBeginBusyCursor(); diff --git a/contrib/src/ogl/constrnt.cpp b/contrib/src/ogl/constrnt.cpp index c2addad443..e79d3ed4d0 100644 --- a/contrib/src/ogl/constrnt.cpp +++ b/contrib/src/ogl/constrnt.cpp @@ -58,51 +58,51 @@ void OGLInitializeConstraintTypes() wxOGLConstraintTypes = new wxList(wxKEY_INTEGER); wxOGLConstraintTypes->Append(gyCONSTRAINT_CENTRED_VERTICALLY, - new wxOGLConstraintType(gyCONSTRAINT_CENTRED_VERTICALLY, "Centre vertically", "centred vertically w.r.t.")); + new wxOGLConstraintType(gyCONSTRAINT_CENTRED_VERTICALLY, wxT("Centre vertically"), wxT("centred vertically w.r.t."))); wxOGLConstraintTypes->Append(gyCONSTRAINT_CENTRED_HORIZONTALLY, - new wxOGLConstraintType(gyCONSTRAINT_CENTRED_HORIZONTALLY, "Centre horizontally", "centred horizontally w.r.t.")); + new wxOGLConstraintType(gyCONSTRAINT_CENTRED_HORIZONTALLY, wxT("Centre horizontally"), wxT("centred horizontally w.r.t."))); wxOGLConstraintTypes->Append(gyCONSTRAINT_CENTRED_BOTH, - new wxOGLConstraintType(gyCONSTRAINT_CENTRED_BOTH, "Centre", "centred w.r.t.")); + new wxOGLConstraintType(gyCONSTRAINT_CENTRED_BOTH, wxT("Centre"), wxT("centred w.r.t."))); wxOGLConstraintTypes->Append(gyCONSTRAINT_LEFT_OF, - new wxOGLConstraintType(gyCONSTRAINT_LEFT_OF, "Left of", "left of")); + new wxOGLConstraintType(gyCONSTRAINT_LEFT_OF, wxT("Left of"), wxT("left of"))); wxOGLConstraintTypes->Append(gyCONSTRAINT_RIGHT_OF, - new wxOGLConstraintType(gyCONSTRAINT_RIGHT_OF, "Right of", "right of")); + new wxOGLConstraintType(gyCONSTRAINT_RIGHT_OF, wxT("Right of"), wxT("right of"))); wxOGLConstraintTypes->Append(gyCONSTRAINT_ABOVE, - new wxOGLConstraintType(gyCONSTRAINT_ABOVE, "Above", "above")); + new wxOGLConstraintType(gyCONSTRAINT_ABOVE, wxT("Above"), wxT("above"))); wxOGLConstraintTypes->Append(gyCONSTRAINT_BELOW, - new wxOGLConstraintType(gyCONSTRAINT_BELOW, "Below", "below")); + new wxOGLConstraintType(gyCONSTRAINT_BELOW, wxT("Below"), wxT("below"))); // Alignment wxOGLConstraintTypes->Append(gyCONSTRAINT_ALIGNED_TOP, - new wxOGLConstraintType(gyCONSTRAINT_ALIGNED_TOP, "Top-aligned", "aligned to the top of")); + new wxOGLConstraintType(gyCONSTRAINT_ALIGNED_TOP, wxT("Top-aligned"), wxT("aligned to the top of"))); wxOGLConstraintTypes->Append(gyCONSTRAINT_ALIGNED_BOTTOM, - new wxOGLConstraintType(gyCONSTRAINT_ALIGNED_BOTTOM, "Bottom-aligned", "aligned to the bottom of")); + new wxOGLConstraintType(gyCONSTRAINT_ALIGNED_BOTTOM, wxT("Bottom-aligned"), wxT("aligned to the bottom of"))); wxOGLConstraintTypes->Append(gyCONSTRAINT_ALIGNED_LEFT, - new wxOGLConstraintType(gyCONSTRAINT_ALIGNED_LEFT, "Left-aligned", "aligned to the left of")); + new wxOGLConstraintType(gyCONSTRAINT_ALIGNED_LEFT, wxT("Left-aligned"), wxT("aligned to the left of"))); wxOGLConstraintTypes->Append(gyCONSTRAINT_ALIGNED_RIGHT, - new wxOGLConstraintType(gyCONSTRAINT_ALIGNED_RIGHT, "Right-aligned", "aligned to the right of")); + new wxOGLConstraintType(gyCONSTRAINT_ALIGNED_RIGHT, wxT("Right-aligned"), wxT("aligned to the right of"))); // Mid-alignment wxOGLConstraintTypes->Append(gyCONSTRAINT_MIDALIGNED_TOP, - new wxOGLConstraintType(gyCONSTRAINT_MIDALIGNED_TOP, "Top-midaligned", "centred on the top of")); + new wxOGLConstraintType(gyCONSTRAINT_MIDALIGNED_TOP, wxT("Top-midaligned"), wxT("centred on the top of"))); wxOGLConstraintTypes->Append(gyCONSTRAINT_MIDALIGNED_BOTTOM, - new wxOGLConstraintType(gyCONSTRAINT_MIDALIGNED_BOTTOM, "Bottom-midaligned", "centred on the bottom of")); + new wxOGLConstraintType(gyCONSTRAINT_MIDALIGNED_BOTTOM, wxT("Bottom-midaligned"), wxT("centred on the bottom of"))); wxOGLConstraintTypes->Append(gyCONSTRAINT_MIDALIGNED_LEFT, - new wxOGLConstraintType(gyCONSTRAINT_MIDALIGNED_LEFT, "Left-midaligned", "centred on the left of")); + new wxOGLConstraintType(gyCONSTRAINT_MIDALIGNED_LEFT, wxT("Left-midaligned"), wxT("centred on the left of"))); wxOGLConstraintTypes->Append(gyCONSTRAINT_MIDALIGNED_RIGHT, - new wxOGLConstraintType(gyCONSTRAINT_MIDALIGNED_RIGHT, "Right-midaligned", "centred on the right of")); + new wxOGLConstraintType(gyCONSTRAINT_MIDALIGNED_RIGHT, wxT("Right-midaligned"), wxT("centred on the right of"))); } void OGLCleanUpConstraintTypes() @@ -137,7 +137,7 @@ wxOGLConstraint::wxOGLConstraint(int type, wxShape *constraining, wxList& constr m_constrainingObject = constraining; m_constraintId = 0; - m_constraintName = "noname"; + m_constraintName = wxT("noname"); wxNode *node = constrained.First(); while (node) diff --git a/contrib/src/ogl/divided.cpp b/contrib/src/ogl/divided.cpp index 8bac0783fc..aa929c8b55 100644 --- a/contrib/src/ogl/divided.cpp +++ b/contrib/src/ogl/divided.cpp @@ -415,7 +415,7 @@ void wxDividedShape::ResetMandatoryControlPoints() } } -#ifdef PROLOGIO +#if wxUSE_PROLOGIO void wxDividedShape::WriteAttributes(wxExpr *clause) { wxRectangleShape::WriteAttributes(clause); @@ -434,7 +434,7 @@ void wxDividedShape::ReadAttributes(wxExpr *clause) void wxDividedShape::EditRegions() { - wxMessageBox("EditRegions() is unimplemented.", "OGL", wxOK); + wxMessageBox(wxT("EditRegions() is unimplemented."), wxT("OGL"), wxOK); // TODO #if 0 diff --git a/contrib/src/ogl/drawn.cpp b/contrib/src/ogl/drawn.cpp index 24db4482d9..800d78db17 100644 --- a/contrib/src/ogl/drawn.cpp +++ b/contrib/src/ogl/drawn.cpp @@ -35,6 +35,8 @@ #include #include +#include + static void IntToHex(unsigned int dec, char *buf); static unsigned long HexToInt(char *buf); extern char *oglBuffer; @@ -234,7 +236,7 @@ bool wxDrawnShape::GetPerimeterPoint(double x1, double y1, return wxRectangleShape::GetPerimeterPoint(x1, y1, x2, y2, x3, y3); } -#ifdef PROLOGIO +#if wxUSE_PROLOGIO void wxDrawnShape::WriteAttributes(wxExpr *clause) { wxRectangleShape::WriteAttributes(clause); @@ -290,7 +292,7 @@ void wxDrawnShape::Copy(wxShape& copy) drawnCopy.m_currentAngle = m_currentAngle; } -bool wxDrawnShape::LoadFromMetaFile(char *filename) +bool wxDrawnShape::LoadFromMetaFile(const wxString& filename) { return m_metafiles[0].LoadFromMetaFile(filename, &m_width, &m_height); } @@ -520,6 +522,7 @@ wxDrawOp *wxOpSetGDI::Copy(wxPseudoMetaFile *newImage) return newOp; } +#if wxUSE_PROLOGIO wxExpr *wxOpSetGDI::WriteExpr(wxPseudoMetaFile *image) { wxExpr *expr = new wxExpr(wxExprList); @@ -580,6 +583,7 @@ void wxOpSetGDI::ReadExpr(wxPseudoMetaFile *image, wxExpr *expr) break; } } +#endif /* * Set/destroy clipping @@ -634,6 +638,7 @@ void wxOpSetClipping::Translate(double x, double y) m_y1 += y; } +#if wxUSE_PROLOGIO wxExpr *wxOpSetClipping::WriteExpr(wxPseudoMetaFile *image) { wxExpr *expr = new wxExpr(wxExprList); @@ -670,6 +675,7 @@ void wxOpSetClipping::ReadExpr(wxPseudoMetaFile *image, wxExpr *expr) break; } } +#endif /* * Draw line, rectangle, rounded rectangle, ellipse, point, arc, text @@ -878,6 +884,7 @@ void wxOpDraw::Rotate(double x, double y, double theta, double sinTheta, double } } +#if wxUSE_PROLOGIO wxExpr *wxOpDraw::WriteExpr(wxPseudoMetaFile *image) { wxExpr *expr = new wxExpr(wxExprList); @@ -989,6 +996,7 @@ void wxOpDraw::ReadExpr(wxPseudoMetaFile *image, wxExpr *expr) } } } +#endif /* * Draw polygon, polyline, spline @@ -1102,6 +1110,7 @@ void wxOpPolyDraw::Rotate(double x, double y, double theta, double sinTheta, dou } } +#if wxUSE_PROLOGIO wxExpr *wxOpPolyDraw::WriteExpr(wxPseudoMetaFile *image) { wxExpr *expr = new wxExpr(wxExprList); @@ -1190,6 +1199,7 @@ void wxOpPolyDraw::ReadExpr(wxPseudoMetaFile *image, wxExpr *expr) i ++; } } +#endif // Draw an outline using the current operation. bool wxOpPolyDraw::OnDrawOutline(wxDC& dc, double x, double y, double w, double h, double oldW, double oldH) @@ -1446,7 +1456,7 @@ void wxPseudoMetaFile::Rotate(double x, double y, double theta) m_currentRotation = theta; } -#ifdef PROLOGIO +#if wxUSE_PROLOGIO void wxPseudoMetaFile::WriteAttributes(wxExpr *clause, int whichAngle) { wxString widthStr; @@ -1815,9 +1825,9 @@ void wxPseudoMetaFile::Copy(wxPseudoMetaFile& copy) * */ -bool wxPseudoMetaFile::LoadFromMetaFile(char *filename, double *rwidth, double *rheight) +bool wxPseudoMetaFile::LoadFromMetaFile(const wxString& filename, double *rwidth, double *rheight) { - if (!FileExists(filename)) + if (!wxFileExists(filename)) return NULL; wxXMetaFile *metaFile = new wxXMetaFile; diff --git a/contrib/src/ogl/lines.cpp b/contrib/src/ogl/lines.cpp index 2b94575298..1e3238f735 100644 --- a/contrib/src/ogl/lines.cpp +++ b/contrib/src/ogl/lines.cpp @@ -31,12 +31,6 @@ #undef new #endif -#if wxUSE_IOSTREAMH -#include -#else -#include -#endif - #include #include @@ -77,17 +71,17 @@ wxLineShape::wxLineShape() // and make the three line regions. ClearRegions(); wxShapeRegion *newRegion = new wxShapeRegion; - newRegion->SetName("Middle"); + newRegion->SetName(wxT("Middle")); newRegion->SetSize(150, 50); m_regions.Append((wxObject *)newRegion); newRegion = new wxShapeRegion; - newRegion->SetName("Start"); + newRegion->SetName(wxT("Start")); newRegion->SetSize(150, 50); m_regions.Append((wxObject *)newRegion); newRegion = new wxShapeRegion; - newRegion->SetName("End"); + newRegion->SetName(wxT("End")); newRegion->SetSize(150, 50); m_regions.Append((wxObject *)newRegion); @@ -234,7 +228,7 @@ void wxLineShape::FormatText(wxDC& dc, const wxString& s, int i) node = string_list->First(); while (node) { - char *s = (char *)node->Data(); + wxChar *s = (wxChar *)node->Data(); wxShapeTextLine *line = new wxShapeTextLine(0.0, 0.0, s); region->GetFormattedText().Append((wxObject *)line); node = node->Next(); @@ -1373,7 +1367,7 @@ void wxLineShape::ResetControlPoints() } } -#ifdef PROLOGIO +#if wxUSE_PROLOGIO void wxLineShape::WriteAttributes(wxExpr *clause) { wxShape::WriteAttributes(clause); @@ -2340,7 +2334,7 @@ wxRealPoint *wxLineShape::GetNextControlPoint(wxShape *nodeObject) return (wxRealPoint *)node->Data(); } else - return FALSE; + return NULL; } /* diff --git a/contrib/src/ogl/makefile.bcc b/contrib/src/ogl/makefile.bcc deleted file mode 100644 index 94177e6b17..0000000000 --- a/contrib/src/ogl/makefile.bcc +++ /dev/null @@ -1,21 +0,0 @@ -# -# File: makefile.bcc -# Author: Julian Smart -# Created: 1998 -# Updated: -# -# Builds OGL library for BC++, 16-bit - -!if "$(WXWIN)" == "" -!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx -!endif - -WXDIR = $(WXWIN) - -LIBTARGET=$(WXDIR)\lib\ogl.lib - -OBJECTS = basic.obj basic2.obj canvas.obj ogldiag.obj lines.obj misc.obj divided.obj constrnt.obj\ - composit.obj drawn.obj bmpshape.obj mfutils.obj - -!include $(WXDIR)\src\makelib.bcc - diff --git a/contrib/src/ogl/makefile.wat b/contrib/src/ogl/makefile.wat index 7c2cf13701..6b361090e1 100644 --- a/contrib/src/ogl/makefile.wat +++ b/contrib/src/ogl/makefile.wat @@ -1,25 +1,24 @@ -# Objects makefile +# OGL makefile WXDIR = ..\..\.. +EXTRACPPFLAGS=-I$(WXDIR)\contrib\include;/DPROLOGIO -!include $(WXDIR)\src\makewat.env +LIBTARGET= $(WXDIR)\lib\ogl_w.lib -EXTRACPPFLAGS=/DPROLOGIO +OBJECTS = & + $(OUTPUTDIR)\basic.obj & + $(OUTPUTDIR)\basic2.obj & + $(OUTPUTDIR)\canvas.obj & + $(OUTPUTDIR)\lines.obj & + $(OUTPUTDIR)\divided.obj & + $(OUTPUTDIR)\constrnt.obj & + $(OUTPUTDIR)\composit.obj & + $(OUTPUTDIR)\drawn.obj & + $(OUTPUTDIR)\bmpshape.obj & + $(OUTPUTDIR)\mfutils.obj & + $(OUTPUTDIR)\ogldiag.obj & + $(OUTPUTDIR)\oglmisc.obj -OGLLIB = $(WXDIR)\lib\ogl.lib -THISDIR = $(WXDIR)\src\ogl -NAME = ogl -LNK = $(name).lnk - -OBJECTS = basic.obj basic2.obj canvas.obj lines.obj divided.obj constrnt.obj & - composit.obj drawn.obj bmpshape.obj mfutils.obj ogldiag.obj oglmisc.obj - -all: $(OGLLIB) - -$(OGLLIB): $(OBJECTS) - *wlib /b /c /n /P=256 $(OGLLIB) $(OBJECTS) - -clean: .SYMBOLIC - -erase *.obj *.bak *.err *.pch $(OGLLIB) *.lbc +!include $(WXDIR)\src\makelib.wat diff --git a/contrib/src/ogl/mfutils.cpp b/contrib/src/ogl/mfutils.cpp index a565739380..2d752cb1b5 100644 --- a/contrib/src/ogl/mfutils.cpp +++ b/contrib/src/ogl/mfutils.cpp @@ -98,7 +98,7 @@ wxMetaRecord::~wxMetaRecord(void) if (stringParam) delete[] stringParam; } -wxXMetaFile::wxXMetaFile(char *file) +wxXMetaFile::wxXMetaFile(const wxChar *file) { ok = FALSE; top = 0.0; @@ -162,11 +162,11 @@ int AddMetaRecordHandle(wxMetaRecord *record) return (HandleTableSize - 1); } -bool wxXMetaFile::ReadFile(char *file) +bool wxXMetaFile::ReadFile(const wxChar *file) { HandleTableSize = 0; - FILE *handle = fopen(file, "rb"); + FILE *handle = wxFopen(file, wxT("rb")); if (!handle) return FALSE; // Read placeable metafile header, if any diff --git a/contrib/src/ogl/misc.cpp b/contrib/src/ogl/misc.cpp index 76bf00cc4f..d40bd8a896 100644 --- a/contrib/src/ogl/misc.cpp +++ b/contrib/src/ogl/misc.cpp @@ -32,11 +32,6 @@ #undef new #endif -#if wxUSE_IOSTREAMH -#include -#else -#include -#endif #include #include #include @@ -423,7 +418,7 @@ wxStringList *oglFormatText(wxDC& dc, const wxString& text, double width, double { wxString oldBuffer(buffer); - char *s = (char *)node->Data(); + wxChar *s = (wxChar *)node->Data(); if (!s) { // FORCE NEW LINE @@ -435,7 +430,7 @@ wxStringList *oglFormatText(wxDC& dc, const wxString& text, double width, double else { if (buffer.Length() != 0) - buffer += " "; + buffer += wxT(" "); buffer += s; dc.GetTextExtent(buffer, &x, &y); @@ -782,7 +777,7 @@ void UpdateListBox(wxListBox *item, wxList *list) wxNode *node = list->First(); while (node) { - char *s = (char *)node->Data(); + wxChar *s = (wxChar *)node->Data(); item->Append(s); node = node->Next(); } diff --git a/contrib/src/ogl/ogldiag.cpp b/contrib/src/ogl/ogldiag.cpp index f5b880414b..a1b71884b0 100644 --- a/contrib/src/ogl/ogldiag.cpp +++ b/contrib/src/ogl/ogldiag.cpp @@ -30,17 +30,6 @@ #undef new #endif -#if wxUSE_IOSTREAMH -#include -#include -#else -#include -#include -#ifdef _MSC_VER -//using namespace std; -#endif -#endif - #include #include #include @@ -225,7 +214,7 @@ void wxDiagram::RecentreAll(wxDC& dc) } // Input/output -#ifdef PROLOGIO +#if wxUSE_PROLOGIO bool wxDiagram::SaveFile(const wxString& filename) { wxBeginBusyCursor(); diff --git a/contrib/src/ogl/oglmisc.cpp b/contrib/src/ogl/oglmisc.cpp index a9a466c2da..30deb1d87b 100644 --- a/contrib/src/ogl/oglmisc.cpp +++ b/contrib/src/ogl/oglmisc.cpp @@ -32,11 +32,6 @@ #undef new #endif -#if wxUSE_IOSTREAMH -#include -#else -#include -#endif #include #include #include diff --git a/contrib/src/plot/Makefile.in b/contrib/src/plot/Makefile.in index 7b5c8a7fbf..f5435cd265 100644 --- a/contrib/src/plot/Makefile.in +++ b/contrib/src/plot/Makefile.in @@ -4,11 +4,11 @@ top_srcdir = @top_srcdir@/.. top_builddir = ../../.. libsrc_dir = contrib/src/plot -TARGET_LIBNAME=libwx_plot +TARGET_LIBNAME=lib@WX_LIBRARY_BASENAME@_plot-@WX_RELEASE@ -LIBVERSION_CURRENT=1 -LIBVERSION_REVISION=0 -LIBVERSION_AGE=0 +LIBVERSION_CURRENT=@WX_CURRENT@ +LIBVERSION_REVISION=@WX_REVISION@ +LIBVERSION_AGE=@WX_AGE@ HEADER_PATH=$(top_srcdir)/contrib/include/wx HEADER_SUBDIR=plot diff --git a/contrib/src/stc/Makefile.in b/contrib/src/stc/Makefile.in index 01b2877cb8..9df25a3db2 100644 --- a/contrib/src/stc/Makefile.in +++ b/contrib/src/stc/Makefile.in @@ -9,13 +9,13 @@ top_srcdir = @top_srcdir@/.. top_builddir = ../../.. scintilla_dir = $(top_srcdir)/contrib/src/stc/scintilla -libsrc_dir = contrib/src/stc@PATH_IFS@$(scintilla_dir)/src +libsrc_dir = contrib/src/stc/scintilla/src:$(top_srcdir)/contrib/src/stc -TARGET_LIBNAME=libstc +TARGET_LIBNAME=lib@WX_LIBRARY_BASENAME@_stc-@WX_RELEASE@ -LIBVERSION_CURRENT=1 -LIBVERSION_REVISION=0 -LIBVERSION_AGE=0 +LIBVERSION_CURRENT=@WX_CURRENT@ +LIBVERSION_REVISION=@WX_REVISION@ +LIBVERSION_AGE=@WX_AGE@ HEADER_PATH=$(top_srcdir)/contrib/include/wx HEADER_SUBDIR=stc @@ -34,18 +34,22 @@ OBJECTS=PlatWX.o ScintillaWX.o stc.o \ KeyMap.o \ KeyWords.o \ LexAVE.o \ + LexAda.o \ + LexAsm.o \ LexBaan.o \ LexBullant.o \ LexMatlab.o \ - LexAda.o \ LexCPP.o \ LexConf.o \ LexCrontab.o \ + LexCSS.o \ LexEiffel.o \ + LexFortran.o \ LexHTML.o \ LexLisp.o \ LexLua.o \ LexOthers.o \ + LexPOV.o \ LexPascal.o \ LexPerl.o \ LexPython.o \ @@ -61,6 +65,8 @@ OBJECTS=PlatWX.o ScintillaWX.o stc.o \ UniConversion.o \ ViewStyle.o \ WindowAccessor.o \ + XPM.o \ + DEPFILES=$(OBJECTS:.o=.d) diff --git a/contrib/src/stc/PlatWX.cpp b/contrib/src/stc/PlatWX.cpp index 8abff4b97d..8f2f37afa5 100644 --- a/contrib/src/stc/PlatWX.cpp +++ b/contrib/src/stc/PlatWX.cpp @@ -8,7 +8,10 @@ #include #include - +#include +#include +#include +#include #include "Platform.h" #include "PlatWX.h" @@ -213,42 +216,44 @@ public: SurfaceImpl(); ~SurfaceImpl(); - void Init(); - void Init(SurfaceID sid); - void InitPixMap(int width, int height, Surface *surface_); + virtual void Init(WindowID wid); + virtual void Init(SurfaceID sid, WindowID wid); + virtual void InitPixMap(int width, int height, Surface *surface_, WindowID wid); - void Release(); - bool Initialised(); - void PenColour(ColourAllocated fore); - int LogPixelsY(); - int DeviceHeightFont(int points); - void MoveTo(int x_, int y_); - void LineTo(int x_, int y_); - void Polygon(Point *pts, int npts, ColourAllocated fore, ColourAllocated back); - void RectangleDraw(PRectangle rc, ColourAllocated fore, ColourAllocated back); - void FillRectangle(PRectangle rc, ColourAllocated back); - void FillRectangle(PRectangle rc, Surface &surfacePattern); - void RoundedRectangle(PRectangle rc, ColourAllocated fore, ColourAllocated back); - void Ellipse(PRectangle rc, ColourAllocated fore, ColourAllocated back); - void Copy(PRectangle rc, Point from, Surface &surfaceSource); + virtual void Release(); + virtual bool Initialised(); + virtual void PenColour(ColourAllocated fore); + virtual int LogPixelsY(); + virtual int DeviceHeightFont(int points); + virtual void MoveTo(int x_, int y_); + virtual void LineTo(int x_, int y_); + virtual void Polygon(Point *pts, int npts, ColourAllocated fore, ColourAllocated back); + virtual void RectangleDraw(PRectangle rc, ColourAllocated fore, ColourAllocated back); + virtual void FillRectangle(PRectangle rc, ColourAllocated back); + virtual void FillRectangle(PRectangle rc, Surface &surfacePattern); + virtual void RoundedRectangle(PRectangle rc, ColourAllocated fore, ColourAllocated back); + virtual void Ellipse(PRectangle rc, ColourAllocated fore, ColourAllocated back); + virtual void Copy(PRectangle rc, Point from, Surface &surfaceSource); - void DrawTextNoClip(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore, ColourAllocated back); - void DrawTextClipped(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore, ColourAllocated back); - void MeasureWidths(Font &font_, const char *s, int len, int *positions); - int WidthText(Font &font_, const char *s, int len); - int WidthChar(Font &font_, char ch); - int Ascent(Font &font_); - int Descent(Font &font_); - int InternalLeading(Font &font_); - int ExternalLeading(Font &font_); - int Height(Font &font_); - int AverageCharWidth(Font &font_); + virtual void DrawTextNoClip(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore, ColourAllocated back); + virtual void DrawTextClipped(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore, ColourAllocated back); + virtual void DrawTextTransparent(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore); + virtual void MeasureWidths(Font &font_, const char *s, int len, int *positions); + virtual int WidthText(Font &font_, const char *s, int len); + virtual int WidthChar(Font &font_, char ch); + virtual int Ascent(Font &font_); + virtual int Descent(Font &font_); + virtual int InternalLeading(Font &font_); + virtual int ExternalLeading(Font &font_); + virtual int Height(Font &font_); + virtual int AverageCharWidth(Font &font_); - int SetPalette(Palette *pal, bool inBackGround); - void SetClip(PRectangle rc); - void FlushCachedState(); + virtual int SetPalette(Palette *pal, bool inBackGround); + virtual void SetClip(PRectangle rc); + virtual void FlushCachedState(); - void SetUnicodeMode(bool unicodeMode_); + virtual void SetUnicodeMode(bool unicodeMode_); + virtual void SetDBCSMode(int codePage); void BrushColour(ColourAllocated back); void SetFont(Font &font_); @@ -265,6 +270,35 @@ SurfaceImpl::~SurfaceImpl() { Release(); } +void SurfaceImpl::Init(WindowID wid) { +#if 0 + Release(); + hdc = new wxMemoryDC(); + hdcOwned = true; +#else + // On Mac and GTK the DC is not really valid until it has a bitmap + // selected into it. So instead of just creating the DC with no bitmap, + // go ahead and give it one. + InitPixMap(1,1,NULL,wid); +#endif +} + +void SurfaceImpl::Init(SurfaceID hdc_, WindowID) { + Release(); + hdc = (wxDC*)hdc_; +} + +void SurfaceImpl::InitPixMap(int width, int height, Surface *surface_, WindowID) { + Release(); + hdc = new wxMemoryDC(); + hdcOwned = true; + if (width < 1) width = 1; + if (height < 1) height = 1; + bitmap = new wxBitmap(width, height); + ((wxMemoryDC*)hdc)->SelectObject(*bitmap); +} + + void SurfaceImpl::Release() { if (bitmap) { ((wxMemoryDC*)hdc)->SelectObject(wxNullBitmap); @@ -283,33 +317,6 @@ bool SurfaceImpl::Initialised() { return hdc != 0; } -void SurfaceImpl::Init() { -#if 0 - Release(); - hdc = new wxMemoryDC(); - hdcOwned = true; -#else - // On Mac and GTK the DC is not really valid until it has a bitmap - // selected into it. So instead of just creating the DC with no bitmap, - // go ahead and give it one. - InitPixMap(1,1,NULL); -#endif -} - -void SurfaceImpl::Init(SurfaceID hdc_) { - Release(); - hdc = (wxDC*)hdc_; -} - -void SurfaceImpl::InitPixMap(int width, int height, Surface *surface_) { - Release(); - hdc = new wxMemoryDC(); - hdcOwned = true; - if (width < 1) width = 1; - if (height < 1) height = 1; - bitmap = new wxBitmap(width, height); - ((wxMemoryDC*)hdc)->SelectObject(*bitmap); -} void SurfaceImpl::PenColour(ColourAllocated fore) { hdc->SetPen(wxPen(wxColourFromCA(fore), 1, wxSOLID)); @@ -398,7 +405,7 @@ void SurfaceImpl::DrawTextNoClip(PRectangle rc, Font &font, int ybase, SetFont(font); hdc->SetTextForeground(wxColourFromCA(fore)); hdc->SetTextBackground(wxColourFromCA(back)); - FillRectangle(rc, back); + //FillRectangle(rc, back); // ybase is where the baseline should be, but wxWin uses the upper left // corner, so I need to calculate the real position for the text... @@ -411,28 +418,36 @@ void SurfaceImpl::DrawTextClipped(PRectangle rc, Font &font, int ybase, SetFont(font); hdc->SetTextForeground(wxColourFromCA(fore)); hdc->SetTextBackground(wxColourFromCA(back)); - FillRectangle(rc, back); + //FillRectangle(rc, back); hdc->SetClippingRegion(wxRectFromPRectangle(rc)); // see comments above hdc->DrawText(stc2wx(s, len), rc.left, ybase - font.ascent); - hdc->DestroyClippingRegion(); } -int SurfaceImpl::WidthText(Font &font, const char *s, int len) { - SetFont(font); - int w; - int h; - hdc->GetTextExtent(stc2wx(s, len), &w, &h); - return w; +void SurfaceImpl::DrawTextTransparent(PRectangle rc, Font &font, int ybase, + const char *s, int len, + ColourAllocated fore) { + + SetFont(font); + hdc->SetTextForeground(wxColourFromCA(fore)); + hdc->SetBackgroundMode(wxTRANSPARENT); + + // ybase is where the baseline should be, but wxWin uses the upper left + // corner, so I need to calculate the real position for the text... + hdc->DrawText(stc2wx(s, len), rc.left, ybase - font.ascent); + + hdc->SetBackgroundMode(wxSOLID); } void SurfaceImpl::MeasureWidths(Font &font, const char *s, int len, int *positions) { + wxString str = stc2wx(s, len); SetFont(font); +#ifndef __WXMAC__ // Calculate the position of each character based on the widths of // the previous characters int* tpos = new int[len]; @@ -444,9 +459,26 @@ void SurfaceImpl::MeasureWidths(Font &font, const char *s, int len, int *positio totalWidth += w; tpos[i] = totalWidth; } +#else + // Instead of a running total, remeasure from the begining of the + // text for each character's position. This is because with AA fonts + // on OS X widths can be fractions of pixels wide when more than one + // are drawn together, so the sum of all character widths is not necessarily + // (and probably not) the same as the whole string width. + int* tpos = new int[len]; + size_t i; + for (i=0; iGetTextExtent(str.Left(i+1), &w, &h); + tpos[i] = w; + } +#endif + #if wxUSE_UNICODE // Map the widths for UCS-2 characters back to the UTF-8 input string + // NOTE: I don't think this is right for when sizeof(wxChar) > 2, ie wxGTK2 + // so figure it out and fix it! i = 0; size_t ui = 0; while (i < len) { @@ -472,6 +504,16 @@ void SurfaceImpl::MeasureWidths(Font &font, const char *s, int len, int *positio } +int SurfaceImpl::WidthText(Font &font, const char *s, int len) { + SetFont(font); + int w; + int h; + + hdc->GetTextExtent(stc2wx(s, len), &w, &h); + return w; +} + + int SurfaceImpl::WidthChar(Font &font, char ch) { SetFont(font); int w; @@ -533,15 +575,13 @@ void SurfaceImpl::FlushCachedState() { void SurfaceImpl::SetUnicodeMode(bool unicodeMode_) { unicodeMode=unicodeMode_; -#if wxUSE_UNICODE - wxASSERT_MSG(unicodeMode == wxUSE_UNICODE, - wxT("Only unicode may be used when wxUSE_UNICODE is on.")); -#else - wxASSERT_MSG(unicodeMode == wxUSE_UNICODE, - wxT("Only non-unicode may be used when wxUSE_UNICODE is off.")); -#endif } +void SurfaceImpl::SetDBCSMode(int codePage) { + // dbcsMode = codePage == SC_CP_DBCS; +} + + Surface *Surface::Allocate() { return new SurfaceImpl; } @@ -556,8 +596,10 @@ Window::~Window() { } void Window::Destroy() { - if (id) + if (id) { + Show(FALSE); GETWIN(id)->Destroy(); + } id = 0; } @@ -566,6 +608,7 @@ bool Window::HasFocus() { } PRectangle Window::GetPosition() { + if (! id) return PRectangle(); wxRect rc(GETWIN(id)->GetPosition(), GETWIN(id)->GetSize()); return PRectangleFromwxRect(rc); } @@ -580,6 +623,7 @@ void Window::SetPositionRelative(PRectangle rc, Window) { } PRectangle Window::GetClientPosition() { + if (! id) return PRectangle(); wxSize sz = GETWIN(id)->GetClientSize(); return PRectangle(0, 0, sz.x, sz.y); } @@ -628,6 +672,8 @@ void Window::SetCursor(Cursor curs) { case cursorReverseArrow: cursorId = wxCURSOR_RIGHT_ARROW; break; + case cursorHand: + cursorId = wxCURSOR_HAND; default: cursorId = wxCURSOR_ARROW; break; @@ -650,194 +696,347 @@ void Window::SetTitle(const char *s) { // Helper classes for ListBox -#if 1 // defined(__WXMAC__) -class wxSTCListBoxWin : public wxListBox { +// This is a simple subclass of wxLIstView that just resets focus to the +// parent when it gets it. +class wxSTCListBox : public wxListView { public: - wxSTCListBoxWin(wxWindow* parent, wxWindowID id) - : wxListBox(parent, id, wxDefaultPosition, wxSize(0,0), - 0, NULL, wxLB_SINGLE | wxSIMPLE_BORDER) { - SetCursor(wxCursor(wxCURSOR_ARROW)); - Hide(); - } + wxSTCListBox(wxWindow* parent, wxWindowID id, + const wxPoint& pos, const wxSize& size, + long style) + : wxListView(parent, id, pos, size, style) + {} void OnFocus(wxFocusEvent& event) { GetParent()->SetFocus(); event.Skip(); } - wxListBox* GetLB() { return this; } - private: DECLARE_EVENT_TABLE() }; - -BEGIN_EVENT_TABLE(wxSTCListBoxWin, wxListBox) - EVT_SET_FOCUS(wxSTCListBoxWin::OnFocus) +BEGIN_EVENT_TABLE(wxSTCListBox, wxListView) + EVT_SET_FOCUS( wxSTCListBox::OnFocus) END_EVENT_TABLE() -#else - -class wxSTCListBox : public wxListBox { +// A window to place the wxSTCListBox upon +class wxSTCListBoxWin : public wxWindow { +private: + wxListView* lv; + CallBackAction doubleClickAction; + void* doubleClickActionData; public: - wxSTCListBox(wxWindow* parent, wxWindowID id) - : wxListBox(parent, id, wxDefaultPosition, wxDefaultSize, - 0, NULL, wxLB_SINGLE | wxSIMPLE_BORDER | wxWANTS_CHARS) - {} + wxSTCListBoxWin(wxWindow* parent, wxWindowID id) : + wxWindow(parent, id, wxDefaultPosition, wxSize(0,0), wxNO_BORDER ) + { - void OnKeyDown(wxKeyEvent& event) { - // Give the key events to the STC. It will then update - // the listbox as needed. - GetGrandParent()->GetEventHandler()->ProcessEvent(event); + SetBackgroundColour(*wxBLACK); + lv = new wxSTCListBox(this, id, wxDefaultPosition, wxDefaultSize, + wxLC_REPORT | wxLC_SINGLE_SEL | wxLC_NO_HEADER | wxNO_BORDER); + lv->SetCursor(wxCursor(wxCURSOR_ARROW)); + lv->InsertColumn(0, wxEmptyString); + lv->InsertColumn(1, wxEmptyString); + Hide(); } -private: - DECLARE_EVENT_TABLE() -}; - -BEGIN_EVENT_TABLE(wxSTCListBox, wxListBox) - EVT_KEY_DOWN(wxSTCListBox::OnKeyDown) - EVT_CHAR(wxSTCListBox::OnKeyDown) -END_EVENT_TABLE() + int IconWidth() { + wxImageList* il = lv->GetImageList(wxIMAGE_LIST_SMALL); + if (il != NULL) { + int w, h; + il->GetSize(0, w, h); + return w; + } + return 0; + } + void SetDoubleClickAction(CallBackAction action, void *data) { + doubleClickAction = action; + doubleClickActionData = data; + } -#undef wxSTC_USE_POPUP -#define wxSTC_USE_POPUP 0 // wxPopupWindow just doesn't work well in this case... -// A window to place the listbox upon. If wxPopupWindow is supported then -// that will be used so the listbox can extend beyond the client area of the -// wxSTC if needed. -#if wxUSE_POPUPWIN && wxSTC_USE_POPUP -#include -#define wxSTCListBoxWinBase wxPopupWindow -#define param2 wxBORDER_NONE // popup's 2nd param is flags -#else -#define wxSTCListBoxWinBase wxWindow -#define param2 -1 // wxWindow's 2nd param is ID -#endif - -class wxSTCListBoxWin : public wxSTCListBoxWinBase { -public: - wxSTCListBoxWin(wxWindow* parent, wxWindowID id) - : wxSTCListBoxWinBase(parent, param2) { - lb = new wxSTCListBox(this, id); - lb->SetCursor(wxCursor(wxCURSOR_ARROW)); - lb->SetFocus(); - } + void OnFocus(wxFocusEvent& event) { + GetParent()->SetFocus(); + event.Skip(); + } void OnSize(wxSizeEvent& event) { - lb->SetSize(GetSize()); + // resize the child, leaving a 1 pixel border + wxSize sz = GetClientSize(); + lv->SetSize(1, 1, sz.x-2, sz.y-2); + // reset the column widths + lv->SetColumnWidth(0, IconWidth()+4); + lv->SetColumnWidth(1, sz.x - 2 - lv->GetColumnWidth(0) - + wxSystemSettings::GetMetric(wxSYS_VSCROLL_X)); + event.Skip(); } - wxListBox* GetLB() { return lb; } - -#if wxUSE_POPUPWIN && wxSTC_USE_POPUP - virtual void DoSetSize(int x, int y, - int width, int height, - int sizeFlags = wxSIZE_AUTO) { - if (x != -1) - GetParent()->ClientToScreen(&x, NULL); - if (y != -1) - GetParent()->ClientToScreen(NULL, &y); - wxSTCListBoxWinBase::DoSetSize(x, y, width, height, sizeFlags); + void OnActivate(wxListEvent& event) { + doubleClickAction(doubleClickActionData); } -#endif + + wxListView* GetLB() { return lv; } private: - wxSTCListBox* lb; DECLARE_EVENT_TABLE() }; -BEGIN_EVENT_TABLE(wxSTCListBoxWin, wxSTCListBoxWinBase) - EVT_SIZE(wxSTCListBoxWin::OnSize) -END_EVENT_TABLE() -#endif -inline wxListBox* GETLB(WindowID win) { - return (((wxSTCListBoxWin*)win)->GetLB()); +BEGIN_EVENT_TABLE(wxSTCListBoxWin, wxWindow) + EVT_SET_FOCUS ( wxSTCListBoxWin::OnFocus) + EVT_SIZE ( wxSTCListBoxWin::OnSize) + EVT_LIST_ITEM_ACTIVATED(-1, wxSTCListBoxWin::OnActivate) +END_EVENT_TABLE() + + + +inline wxSTCListBoxWin* GETLBW(WindowID win) { + return ((wxSTCListBoxWin*)win); +} + +inline wxListView* GETLB(WindowID win) { + return GETLBW(win)->GetLB(); } //---------------------------------------------------------------------- +class ListBoxImpl : public ListBox { +private: + int lineHeight; + bool unicodeMode; + int desiredVisibleRows; + int aveCharWidth; + int maxStrWidth; + wxImageList* imgList; + wxArrayInt* imgTypeMap; + +public: + ListBoxImpl(); + ~ListBoxImpl(); + + virtual void SetFont(Font &font); + virtual void Create(Window &parent, int ctrlID, int lineHeight_, bool unicodeMode_); + virtual void SetAverageCharWidth(int width); + virtual void SetVisibleRows(int rows); + virtual PRectangle GetDesiredRect(); + virtual int CaretFromEdge(); + virtual void Clear(); + virtual void Append(char *s, int type = -1); + virtual int Length(); + virtual void Select(int n); + virtual int GetSelection(); + virtual int Find(const char *prefix); + virtual void GetValue(int n, char *value, int len); + virtual void Sort(); + virtual void RegisterImage(int type, const char *xpm_data); + virtual void ClearRegisteredImages(); + virtual void SetDoubleClickAction(CallBackAction, void *); + +}; + + +ListBoxImpl::ListBoxImpl() + : lineHeight(10), unicodeMode(false), + desiredVisibleRows(5), aveCharWidth(8), maxStrWidth(0), + imgList(NULL), imgTypeMap(NULL) +{ +} + +ListBoxImpl::~ListBoxImpl() { + if (imgList) { + delete imgList; + imgList = NULL; + } + if (imgTypeMap) { + delete imgTypeMap; + imgTypeMap = NULL; + } +} + + +void ListBoxImpl::SetFont(Font &font) { + GETLB(id)->SetFont(*((wxFont*)font.GetID())); +} + + +void ListBoxImpl::Create(Window &parent, int ctrlID, int lineHeight_, bool unicodeMode_) { + lineHeight = lineHeight_; + unicodeMode = unicodeMode_; + maxStrWidth = 0; + id = new wxSTCListBoxWin(GETWIN(parent.GetID()), ctrlID); + if (imgList != NULL) + GETLB(id)->SetImageList(imgList, wxIMAGE_LIST_SMALL); +} + + +void ListBoxImpl::SetAverageCharWidth(int width) { + aveCharWidth = width; +} + + +void ListBoxImpl::SetVisibleRows(int rows) { + desiredVisibleRows = rows; +} + + +PRectangle ListBoxImpl::GetDesiredRect() { + // wxListCtrl doesn't have a DoGetBestSize, so instead we kept track of + // the max size in Append and calculate it here... + int maxw = maxStrWidth; + int maxh = 0; + + // give it a default if there are no lines, and/or add a bit more + if (maxw == 0) maxw = 100; + maxw += aveCharWidth * 3 + + GETLBW(id)->IconWidth() + wxSystemSettings::GetMetric(wxSYS_VSCROLL_X); + if (maxw > 350) + maxw = 350; + + // estimate a desired height + int count = GETLB(id)->GetItemCount(); + if (count) { + wxRect rect; + GETLB(id)->GetItemRect(0, rect); + maxh = count * rect.GetHeight(); + if (maxh > 140) // TODO: Use desiredVisibleRows?? + maxh = 140; + + // Try to make the size an exact multiple of some number of lines + int lines = maxh / rect.GetHeight(); + maxh = (lines + 1) * rect.GetHeight() + 2; + } + else + maxh = 100; + + PRectangle rc; + rc.top = 0; + rc.left = 0; + rc.right = maxw; + rc.bottom = maxh; + return rc; +} + + +int ListBoxImpl::CaretFromEdge() { + return 4 + GETLBW(id)->IconWidth(); +} + + +void ListBoxImpl::Clear() { + GETLB(id)->DeleteAllItems(); +} + + +void ListBoxImpl::Append(char *s, int type) { + wxString text = stc2wx(s); + long count = GETLB(id)->GetItemCount(); + long itemID = GETLB(id)->InsertItem(count, wxEmptyString); + GETLB(id)->SetItem(itemID, 1, text); + int itemWidth = 0; + GETLB(id)->GetTextExtent(text, &itemWidth, NULL); + maxStrWidth = wxMax(maxStrWidth, itemWidth); + if (type != -1) { + wxCHECK_RET(imgTypeMap, wxT("Unexpected NULL imgTypeMap")); + long idx = imgTypeMap->Item(type); + GETLB(id)->SetItemImage(itemID, idx, idx); + } +} + + +int ListBoxImpl::Length() { + return GETLB(id)->GetItemCount(); +} + + +void ListBoxImpl::Select(int n) { + bool select = TRUE; + if (n == -1) { + n = 0; + select = FALSE; + } + GETLB(id)->Focus(n); + GETLB(id)->Select(n, select); +} + + +int ListBoxImpl::GetSelection() { + return GETLB(id)->GetFirstSelected(); +} + + +int ListBoxImpl::Find(const char *prefix) { + // No longer used + return -1; +} + + +void ListBoxImpl::GetValue(int n, char *value, int len) { + wxListItem item; + item.SetId(n); + item.SetColumn(1); + item.SetMask(wxLIST_MASK_TEXT); + GETLB(id)->GetItem(item); + strncpy(value, wx2stc(item.GetText()), len); + value[len-1] = '\0'; +} + +void ListBoxImpl::Sort() { +} + + +void ListBoxImpl::RegisterImage(int type, const char *xpm_data) { + wxMemoryInputStream stream(xpm_data, strlen(xpm_data)+1); + wxBitmap bmp(wxImage(stream, wxBITMAP_TYPE_XPM)); + + if (! imgList) { + // assumes all images are the same size + imgList = new wxImageList(bmp.GetWidth(), bmp.GetHeight(), TRUE); + imgTypeMap = new wxArrayInt; + } + + int idx = imgList->Add(bmp); + + // do we need to extend the mapping array? + wxArrayInt& itm = *imgTypeMap; + if ( itm.GetCount() < type+1) + itm.Add(-1, type - itm.GetCount() + 1); + + // Add an item that maps type to the image index + itm[type] = idx; +} + +void ListBoxImpl::ClearRegisteredImages() { + if (imgList) { + delete imgList; + imgList = NULL; + } + if (imgTypeMap) { + delete imgTypeMap; + imgTypeMap = NULL; + } + if (id) + GETLB(id)->SetImageList(NULL, wxIMAGE_LIST_SMALL); +} + + +void ListBoxImpl::SetDoubleClickAction(CallBackAction action, void *data) { + GETLBW(id)->SetDoubleClickAction(action, data); +} + + + ListBox::ListBox() { } ListBox::~ListBox() { } -void ListBox::Create(Window &parent, int ctrlID) { - id = new wxSTCListBoxWin(GETWIN(parent.GetID()), ctrlID); -} - -void ListBox::SetVisibleRows(int rows) { - desiredVisibleRows = rows; -} - -PRectangle ListBox::GetDesiredRect() { - wxSize sz = GETLB(id)->GetBestSize(); - PRectangle rc; - rc.top = 0; - rc.left = 0; - if (sz.x > 400) - sz.x = 400; - if (sz.y > 140) // TODO: Use desiredVisibleRows?? - sz.y = 140; - rc.right = sz.x; - rc.bottom = sz.y; - return rc; -} - -void ListBox::SetAverageCharWidth(int width) { - aveCharWidth = width; -} - -void ListBox::SetFont(Font &font) { - GETLB(id)->SetFont(*((wxFont*)font.GetID())); -} - -void ListBox::Clear() { - GETLB(id)->Clear(); -} - -void ListBox::Append(char *s) { - GETLB(id)->Append(s); -} - -int ListBox::Length() { - return GETLB(id)->GetCount(); -} - -void ListBox::Select(int n) { - GETLB(id)->SetSelection(n); -#ifdef __WXGTK__ - if (n > 4) - n = n - 4; - else - n = 1; - GETLB(id)->SetFirstItem(n); -#endif -} - -int ListBox::GetSelection() { - return GETLB(id)->GetSelection(); -} - -int ListBox::Find(const char *prefix) { - // No longer used - return -1; -} - -void ListBox::GetValue(int n, char *value, int len) { - wxString text = GETLB(id)->GetString(n); - strncpy(value, wx2stc(text), len); - value[len-1] = '\0'; -} - -void ListBox::Sort() { +ListBox *ListBox::Allocate() { + return new ListBoxImpl(); } //---------------------------------------------------------------------- @@ -882,13 +1081,16 @@ const char *Platform::DefaultFont() { } int Platform::DefaultFontSize() { - return 8; + return wxNORMAL_FONT->GetPointSize(); } unsigned int Platform::DoubleClickTime() { return 500; // **** ::GetDoubleClickTime(); } +bool Platform::MouseButtonBounce() { + return FALSE; +} void Platform::DebugDisplay(const char *s) { wxLogDebug(stc2wx(s)); } @@ -990,6 +1192,13 @@ bool Platform::IsDBCSLeadByte(int codePage, char ch) { return false; } +int Platform::DBCSCharLength(int codePage, const char *s) { + return 0; +} + +int Platform::DBCSCharMaxLength() { + return 0; +} //---------------------------------------------------------------------- diff --git a/contrib/src/stc/ScintillaWX.cpp b/contrib/src/stc/ScintillaWX.cpp index f1c0e43a0a..059dd4afaa 100644 --- a/contrib/src/stc/ScintillaWX.cpp +++ b/contrib/src/stc/ScintillaWX.cpp @@ -67,26 +67,28 @@ void wxSTCDropTarget::OnLeave() { #define param2 wxBORDER_NONE // popup's 2nd param is flags #else #define wxSTCCallTipBase wxWindow -#define param2 -1 // wxWindows 2nd param is ID +#define param2 -1 // wxWindow's 2nd param is ID #endif class wxSTCCallTip : public wxSTCCallTipBase { public: - wxSTCCallTip(wxWindow* parent, CallTip* ct) - : wxSTCCallTipBase(parent, param2) + wxSTCCallTip(wxWindow* parent, CallTip* ct, ScintillaWX* swx) + : wxSTCCallTipBase(parent, param2), + m_ct(ct), m_swx(swx) { - m_ct = ct; } ~wxSTCCallTip() { - if (HasCapture()) ReleaseMouse(); } + bool AcceptsFocus() const { return FALSE; } + void OnPaint(wxPaintEvent& evt) { wxPaintDC dc(this); Surface* surfaceWindow = Surface::Allocate(); - surfaceWindow->Init(&dc); + surfaceWindow->Init(&dc, m_ct->wDraw.GetID()); m_ct->PaintCT(surfaceWindow); + surfaceWindow->Release(); delete surfaceWindow; } @@ -95,6 +97,13 @@ public: event.Skip(); } + void OnLeftDown(wxMouseEvent& event) { + wxPoint pt = event.GetPosition(); + Point p(pt.x, pt.y); + m_ct->MouseClick(p); + m_swx->CallTipClick(); + } + #if wxUSE_POPUPWIN && wxSTC_USE_POPUP virtual void DoSetSize(int x, int y, int width, int height, @@ -105,32 +114,18 @@ public: GetParent()->ClientToScreen(NULL, &y); wxSTCCallTipBase::DoSetSize(x, y, width, height, sizeFlags); } - - virtual bool Show( bool show = TRUE ) { - bool retval = wxSTCCallTipBase::Show(show); - if (show) - CaptureMouse(); - else - if (HasCapture()) ReleaseMouse(); - return retval; - } - - void OnLeftDown(wxMouseEvent& ) { - Show(FALSE); - } #endif private: - CallTip* m_ct; + CallTip* m_ct; + ScintillaWX* m_swx; DECLARE_EVENT_TABLE() }; BEGIN_EVENT_TABLE(wxSTCCallTip, wxSTCCallTipBase) EVT_PAINT(wxSTCCallTip::OnPaint) EVT_SET_FOCUS(wxSTCCallTip::OnFocus) -#if wxUSE_POPUPWIN && wxSTC_USE_POPUP EVT_LEFT_DOWN(wxSTCCallTip::OnLeftDown) -#endif END_EVENT_TABLE() @@ -223,7 +218,7 @@ void ScintillaWX::SetTicking(bool on) { void ScintillaWX::SetMouseCapture(bool on) { if (on && !capturedMouse) stc->CaptureMouse(); - else if (!on && capturedMouse) + else if (!on && capturedMouse && stc->HasCapture()) stc->ReleaseMouse(); capturedMouse = on; } @@ -258,18 +253,23 @@ void ScintillaWX::SetHorizontalScrollPos() { } } + const int H_SCROLL_STEP = 20; bool ScintillaWX::ModifyScrollBars(int nMax, int nPage) { bool modified = false; + int vertEnd = nMax; + if (!verticalScrollBarVisible) + vertEnd = 0; + // Check the vertical scrollbar if (stc->m_vScrollBar == NULL) { // Use built-in scrollbar int sbMax = stc->GetScrollRange(wxVERTICAL); int sbThumb = stc->GetScrollThumb(wxVERTICAL); int sbPos = stc->GetScrollPos(wxVERTICAL); - if (sbMax != nMax || sbThumb != nPage) { - stc->SetScrollbar(wxVERTICAL, sbPos, nPage, nMax+1); + if (sbMax != vertEnd || sbThumb != nPage) { + stc->SetScrollbar(wxVERTICAL, sbPos, nPage, vertEnd+1); modified = true; } } @@ -277,8 +277,8 @@ bool ScintillaWX::ModifyScrollBars(int nMax, int nPage) { int sbMax = stc->m_vScrollBar->GetRange(); int sbPage = stc->m_vScrollBar->GetPageSize(); int sbPos = stc->m_vScrollBar->GetThumbPosition(); - if (sbMax != nMax || sbPage != nPage) { - stc->m_vScrollBar->SetScrollbar(sbPos, nPage, nMax+1, nPage); + if (sbMax != vertEnd || sbPage != nPage) { + stc->m_vScrollBar->SetScrollbar(sbPos, nPage, vertEnd+1, nPage); modified = true; } } @@ -298,7 +298,7 @@ bool ScintillaWX::ModifyScrollBars(int nMax, int nPage) { int sbThumb = stc->GetScrollThumb(wxHORIZONTAL); int sbPos = stc->GetScrollPos(wxHORIZONTAL); if ((sbMax != horizEnd) || (sbThumb != pageWidth) || (sbPos != 0)) { - stc->SetScrollbar(wxHORIZONTAL, 0, pageWidth, horizEnd); + stc->SetScrollbar(wxHORIZONTAL, sbPos, pageWidth, horizEnd); modified = true; if (scrollWidth < pageWidth) { HorizontalScrollTo(0); @@ -310,7 +310,7 @@ bool ScintillaWX::ModifyScrollBars(int nMax, int nPage) { int sbThumb = stc->m_hScrollBar->GetPageSize(); int sbPos = stc->m_hScrollBar->GetThumbPosition(); if ((sbMax != horizEnd) || (sbThumb != pageWidth) || (sbPos != 0)) { - stc->m_hScrollBar->SetScrollbar(0, pageWidth, horizEnd, pageWidth); + stc->m_hScrollBar->SetScrollbar(sbPos, pageWidth, horizEnd, pageWidth); modified = true; if (scrollWidth < pageWidth) { HorizontalScrollTo(0); @@ -338,7 +338,7 @@ void ScintillaWX::Copy() { SelectionText st; CopySelectionRange(&st); if (wxTheClipboard->Open()) { - wxTheClipboard->UsePrimarySelection(); + wxTheClipboard->UsePrimarySelection(FALSE); wxString text = stc2wx(st.s, st.len); wxTheClipboard->SetData(new wxTextDataObject(text)); wxTheClipboard->Close(); @@ -355,7 +355,7 @@ void ScintillaWX::Paste() { bool gotData = FALSE; if (wxTheClipboard->Open()) { - wxTheClipboard->UsePrimarySelection(); + wxTheClipboard->UsePrimarySelection(FALSE); gotData = wxTheClipboard->GetData(data); wxTheClipboard->Close(); } @@ -376,21 +376,25 @@ bool ScintillaWX::CanPaste() { bool canPaste = FALSE; bool didOpen; - if ( (didOpen = !wxTheClipboard->IsOpened()) ) - wxTheClipboard->Open(); + if (Editor::CanPaste()) { + if ( (didOpen = !wxTheClipboard->IsOpened()) ) + wxTheClipboard->Open(); - if (wxTheClipboard->IsOpened()) { - wxTheClipboard->UsePrimarySelection(); - canPaste = wxTheClipboard->IsSupported(wxUSE_UNICODE ? wxDF_UNICODETEXT : wxDF_TEXT); - if (didOpen) - wxTheClipboard->Close(); + if (wxTheClipboard->IsOpened()) { + wxTheClipboard->UsePrimarySelection(FALSE); + canPaste = wxTheClipboard->IsSupported(wxUSE_UNICODE ? wxDF_UNICODETEXT : wxDF_TEXT); + if (didOpen) + wxTheClipboard->Close(); + } } return canPaste; } void ScintillaWX::CreateCallTipWindow(PRectangle) { - ct.wCallTip = new wxSTCCallTip(stc, &ct); - ct.wDraw = ct.wCallTip; + if (! ct.wCallTip.Created() ) { + ct.wCallTip = new wxSTCCallTip(stc, &ct, this); + ct.wDraw = ct.wCallTip; + } } @@ -405,8 +409,28 @@ void ScintillaWX::AddToPopUp(const char *label, int cmd, bool enabled) { } +// This is called by the Editor base class whenever something is selected void ScintillaWX::ClaimSelection() { - +#if 0 + // Until wxGTK is able to support using both the primary selection and the + // clipboard at the same time I think it causes more problems than it is + // worth to implement this method. Selecting text should not clear the + // clipboard. --Robin +#ifdef __WXGTK__ + // Put the selected text in the PRIMARY selection + if (currentPos != anchor) { + SelectionText st; + CopySelectionRange(&st); + if (wxTheClipboard->Open()) { + wxTheClipboard->UsePrimarySelection(TRUE); + wxString text = stc2wx(st.s, st.len); + wxTheClipboard->SetData(new wxTextDataObject(text)); + wxTheClipboard->UsePrimarySelection(FALSE); + wxTheClipboard->Close(); + } + } +#endif +#endif } @@ -415,13 +439,45 @@ long ScintillaWX::DefWndProc(unsigned int /*iMessage*/, unsigned long /*wParam*/ } long ScintillaWX::WndProc(unsigned int iMessage, unsigned long wParam, long lParam) { -// switch (iMessage) { -// case EM_CANPASTE: -// return CanPaste(); -// default: - return ScintillaBase::WndProc(iMessage, wParam, lParam); -// } -// return 0; + switch (iMessage) { + case SCI_CALLTIPSHOW: { + // NOTE: This is copied here from scintilla/src/ScintillaBase.cxx + // because of the little tweak that needs done below for wxGTK. + // When updating new versions double check that this is still + // needed, and that any new code there is copied here too. + Point pt = LocationFromPosition(wParam); + char* defn = reinterpret_cast(lParam); + AutoCompleteCancel(); + pt.y += vs.lineHeight; + PRectangle rc = ct.CallTipStart(currentPos, pt, + defn, + vs.styles[STYLE_DEFAULT].fontName, + vs.styles[STYLE_DEFAULT].sizeZoomed, + IsUnicodeMode(), + wMain); + // If the call-tip window would be out of the client + // space, adjust so it displays above the text. + PRectangle rcClient = GetClientRectangle(); + if (rc.bottom > rcClient.bottom) { +#ifdef __WXGTK__ + int offset = int(vs.lineHeight * 1.25) + rc.Height(); +#else + int offset = vs.lineHeight + rc.Height(); +#endif + rc.top -= offset; + rc.bottom -= offset; + } + // Now display the window. + CreateCallTipWindow(rc); + ct.wCallTip.SetPositionRelative(rc, wMain); + ct.wCallTip.Show(); + break; + } + + default: + return ScintillaBase::WndProc(iMessage, wParam, lParam); + } + return 0; } @@ -433,22 +489,22 @@ void ScintillaWX::DoPaint(wxDC* dc, wxRect rect) { paintState = painting; Surface* surfaceWindow = Surface::Allocate(); - surfaceWindow->Init(dc); - PRectangle rcPaint = PRectangleFromwxRect(rect); + surfaceWindow->Init(dc, wMain.GetID()); + rcPaint = PRectangleFromwxRect(rect); + PRectangle rcClient = GetClientRectangle(); + paintingAllText = rcPaint.Contains(rcClient); + dc->BeginDrawing(); + ClipChildren(*dc, rcPaint); Paint(surfaceWindow, rcPaint); dc->EndDrawing(); + delete surfaceWindow; if (paintState == paintAbandoned) { // Painting area was insufficient to cover new styling or brace highlight positions FullPaint(); } paintState = notPainting; -#ifdef __WXGTK__ - // On wxGTK the editor window paints can overwrite the listbox... - if (ac.Active()) - ((wxWindow*)ac.lb.GetID())->Refresh(TRUE); -#endif } @@ -513,6 +569,8 @@ void ScintillaWX::DoMouseWheel(int rotation, int delta, } } else { // otherwise just scroll the window + if ( !delta ) + delta = 120; wheelRotation += rotation; lines = wheelRotation / delta; wheelRotation -= lines * delta; @@ -547,23 +605,63 @@ void ScintillaWX::DoSysColourChange() { InvalidateStyleData(); } -void ScintillaWX::DoButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt) { +void ScintillaWX::DoLeftButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt) { ButtonDown(pt, curTime, shift, ctrl, alt); } -void ScintillaWX::DoButtonUp(Point pt, unsigned int curTime, bool ctrl) { +void ScintillaWX::DoLeftButtonUp(Point pt, unsigned int curTime, bool ctrl) { ButtonUp(pt, curTime, ctrl); } -void ScintillaWX::DoButtonMove(Point pt) { +void ScintillaWX::DoLeftButtonMove(Point pt) { ButtonMove(pt); } +void ScintillaWX::DoMiddleButtonUp(Point pt) { +#ifdef __WXGTK__ + // Set the current position to the mouse click point and + // then paste in the PRIMARY selection, if any. wxGTK only. + int newPos = PositionFromLocation(pt); + MovePositionTo(newPos, 0, 1); + + pdoc->BeginUndoAction(); + wxTextDataObject data; + bool gotData = FALSE; + if (wxTheClipboard->Open()) { + wxTheClipboard->UsePrimarySelection(TRUE); + gotData = wxTheClipboard->GetData(data); + wxTheClipboard->UsePrimarySelection(FALSE); + wxTheClipboard->Close(); + } + if (gotData) { + wxWX2MBbuf buf = (wxWX2MBbuf)wx2stc(data.GetText()); + int len = strlen(buf); + pdoc->InsertString(currentPos, buf, len); + SetEmptySelection(currentPos + len); + } + pdoc->EndUndoAction(); + NotifyChange(); + Redraw(); + + ShowCaretAtCurrentPosition(); + EnsureCaretVisible(); +#endif +} + void ScintillaWX::DoAddChar(int key) { +#if wxUSE_UNICODE + wxChar wszChars[2]; + wszChars[0] = key; + wszChars[1] = 0; + wxWX2MBbuf buf = (wxWX2MBbuf)wx2stc(wszChars); + AddCharUTF((char*)buf.data(), strlen(buf)); +#else AddChar(key); +#endif } + int ScintillaWX::DoKeyDown(int key, bool shift, bool ctrl, bool alt, bool* consumed) { #if defined(__WXGTK__) || defined(__WXMAC__) // Ctrl chars (A-Z) end up with the wrong keycode on wxGTK... @@ -578,7 +676,9 @@ int ScintillaWX::DoKeyDown(int key, bool shift, bool ctrl, bool alt, bool* cons case WXK_RIGHT: key = SCK_RIGHT; break; case WXK_HOME: key = SCK_HOME; break; case WXK_END: key = SCK_END; break; + case WXK_PAGEUP: // fall through case WXK_PRIOR: key = SCK_PRIOR; break; + case WXK_PAGEDOWN: // fall through case WXK_NEXT: key = SCK_NEXT; break; case WXK_DELETE: key = SCK_DELETE; break; case WXK_INSERT: key = SCK_INSERT; break; @@ -681,16 +781,18 @@ void ScintillaWX::DoDragLeave() { // Redraw all of text area. This paint will not be abandoned. void ScintillaWX::FullPaint() { paintState = painting; - rcPaint = GetTextRectangle(); + rcPaint = GetClientRectangle(); paintingAllText = true; wxClientDC dc(stc); Surface* surfaceWindow = Surface::Allocate(); - surfaceWindow->Init(&dc); + surfaceWindow->Init(&dc, wMain.GetID()); + + dc.BeginDrawing(); + ClipChildren(dc, rcPaint); Paint(surfaceWindow, rcPaint); + dc.EndDrawing(); + delete surfaceWindow; - -// stc->Refresh(FALSE); - paintState = notPainting; } @@ -704,6 +806,21 @@ void ScintillaWX::DoScrollToColumn(int column) { HorizontalScrollTo(column * vs.spaceWidth); } +void ScintillaWX::ClipChildren(wxDC& dc, PRectangle rect) { +#ifdef __WXGTK__ + wxRegion rgn(wxRectFromPRectangle(rect)); + if (ac.Active()) { + wxRect childRect = ((wxWindow*)ac.lb->GetID())->GetRect(); + rgn.Subtract(childRect); + } + if (ct.inCallTipMode) { + wxRect childRect = ((wxWindow*)ct.wCallTip.GetID())->GetRect(); + rgn.Subtract(childRect); + } + + dc.SetClippingRegion(rgn); +#endif +} //---------------------------------------------------------------------- diff --git a/contrib/src/stc/ScintillaWX.h b/contrib/src/stc/ScintillaWX.h index 5f87911952..4c6b35c6e3 100644 --- a/contrib/src/stc/ScintillaWX.h +++ b/contrib/src/stc/ScintillaWX.h @@ -27,6 +27,7 @@ #include "Platform.h" #include "Scintilla.h" +#include "XPM.h" #ifdef SCI_LEXER #include "SciLexer.h" #include "PropSet.h" @@ -122,9 +123,10 @@ public: void DoLoseFocus(); void DoGainFocus(); void DoSysColourChange(); - void DoButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt); - void DoButtonUp(Point pt, unsigned int curTime, bool ctrl); - void DoButtonMove(Point pt); + void DoLeftButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt); + void DoLeftButtonUp(Point pt, unsigned int curTime, bool ctrl); + void DoLeftButtonMove(Point pt); + void DoMiddleButtonUp(Point pt); void DoMouseWheel(int rotation, int delta, int linesPerAction, int ctrlDown, bool isPageScroll); void DoAddChar(int key); int DoKeyDown(int key, bool shift, bool ctrl, bool alt, bool* consumed); @@ -148,6 +150,7 @@ public: bool GetHideSelection() { return hideSelection; } void DoScrollToLine(int line); void DoScrollToColumn(int column); + void ClipChildren(wxDC& dc, PRectangle rect); private: bool capturedMouse; @@ -158,6 +161,9 @@ private: wxDragResult dragResult; #endif int wheelRotation; + + + friend class wxSTCCallTip; }; //---------------------------------------------------------------------- diff --git a/contrib/src/stc/StcVC.dsp b/contrib/src/stc/StcVC.dsp index 97dc8f7f9f..1587293631 100644 --- a/contrib/src/stc/StcVC.dsp +++ b/contrib/src/stc/StcVC.dsp @@ -1,34 +1,35 @@ -# Microsoft Developer Studio Project File - Name="StcVC" - Package Owner=<4> +# Microsoft Developer Studio Project File - Name="stcVC" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 # TARGTYPE "Win32 (x86) Static Library" 0x0104 -CFG=StcVC - Win32 Debug +CFG=stcVC - Win32 Release DLL !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run -!MESSAGE +!MESSAGE !MESSAGE NMAKE /f "StcVC.mak". -!MESSAGE +!MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "StcVC.mak" CFG="StcVC - Win32 Debug" -!MESSAGE +!MESSAGE +!MESSAGE NMAKE /f "StcVC.mak" CFG="stcVC - Win32 Release DLL" +!MESSAGE !MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "StcVC - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "StcVC - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE +!MESSAGE +!MESSAGE "stcVC - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "stcVC - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "stcVC - Win32 Debug DLL" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "stcVC - Win32 Release DLL" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe -!IF "$(CFG)" == "StcVC - Win32 Release" +!IF "$(CFG)" == "stcVC - Win32 Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 @@ -40,9 +41,11 @@ RSC=rc.exe # PROP Output_Dir "Release" # PROP Intermediate_Dir "Release" # PROP Target_Dir "" +LINK32=link.exe +CPP=cl.exe # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../include" /I "../../include" /I "scintilla/include" /I "scintilla/src" /I "../../../lib/msw" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D "__WX__" /D "SCI_LEXER" /D "LINK_LEXERS" /FD /c -# SUBTRACT CPP /YX +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../include" /I "../../include" /I "../../../lib/msw" /I "./scintilla/include/" /I "./scintilla/src" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__HACK_MY_MSDEV40__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D "SCI_LEXER" /D "LINK_LEXERS" /D "__WX__" /YX /FD /c +RSC=rc.exe # ADD BASE RSC /l 0x809 # ADD RSC /l 0x809 BSC32=bscmake.exe @@ -52,7 +55,7 @@ LIB32=link.exe -lib # ADD BASE LIB32 /nologo # ADD LIB32 /nologo /out:"..\..\..\lib\stc.lib" -!ELSEIF "$(CFG)" == "StcVC - Win32 Debug" +!ELSEIF "$(CFG)" == "stcVC - Win32 Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 @@ -64,9 +67,11 @@ LIB32=link.exe -lib # PROP Output_Dir "Debug" # PROP Intermediate_Dir "Debug" # PROP Target_Dir "" +LINK32=link.exe +CPP=cl.exe # ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c -# ADD CPP /nologo /MDd /W3 /GX /Z7 /Od /I "../../../include" /I "../../include" /I "scintilla/include" /I "scintilla/src" /I "../../../lib/mswd" /D "_DEBUG" /D DEBUG=1 /D "__WXDEBUG__" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D "__WX__" /D "SCI_LEXER" /D "LINK_LEXERS" /FD /c -# SUBTRACT CPP /YX +# ADD CPP /nologo /MDd /W3 /GX /Zi /Od /I "../../../include" /I "../../include" /I "../../../lib/mswd" /I "./scintilla/include/" /I "./scintilla/src" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D "SCI_LEXER" /D "LINK_LEXERS" /D "__WX__" /YX /FD /c +RSC=rc.exe # ADD BASE RSC /l 0x809 # ADD RSC /l 0x809 BSC32=bscmake.exe @@ -76,15 +81,85 @@ LIB32=link.exe -lib # ADD BASE LIB32 /nologo # ADD LIB32 /nologo /out:"..\..\..\lib\stcd.lib" -!ENDIF +!ELSEIF "$(CFG)" == "stcVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug_DLL" +# PROP BASE Intermediate_Dir "Debug_DLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\lib" +# PROP Intermediate_Dir "Debug_DLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\lib\stcd.lib" +# ADD LIB32 /nologo /out:"..\..\..\lib\stcd.lib" +CPP=cl.exe +# ADD BASE CPP /nologo /MDd /W3 /GX /Zi /Od /I "../../../include" /I "../../include" /I "../../../lib/mswd" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT BASE CPP /YX +# ADD CPP /nologo /MDd /W3 /GX /Zi /Od /I "../../../include" /I "../../include" /I "../../../lib/mswdlld" /I "./scintilla/include/" /I "./scintilla/src" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D "WXUSINGDLL" /D "WXMAKING_STC_DLL" /D "SCI_LEXER" /D "LINK_LEXERS" /D "__WX__" /YX /FD /c +# SUBTRACT CPP /u +MTL=midl.exe +RSC=rc.exe +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /machine:IX86 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib comdlg32.lib shell32.lib ole32.lib oleaut32.lib odbc32.lib uuid.lib rpcrt4.lib comctl32.lib wsock32.lib winmm.lib wxmsw24d.lib /nologo /version:1.0 /dll /debug /machine:IX86 /out:"../../../lib/stcdlld.dll" /libpath:"../../../lib" +# SUBTRACT LINK32 /pdb:none + +!ELSEIF "$(CFG)" == "stcVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "stcVC___Win32_Release_DLL" +# PROP BASE Intermediate_Dir "stcVC___Win32_Release_DLL" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "..\..\..\lib" +# PROP Intermediate_Dir "Release_DLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\lib\stc.lib" +# ADD LIB32 /nologo /out:"..\..\..\lib\stc.lib" +CPP=cl.exe +# ADD BASE CPP /nologo /MDd /W3 /GX /Zi /Od /I "../../../include" /I "../../include" /I "../../../lib/mswdll" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /D "WXBUILD_STC_DLL" /YX /FD /c +# SUBTRACT BASE CPP /u +# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /Ob2 /I "../../../include" /I "../../include" /I "../../../lib/mswdll" /I "./scintilla/include/" /I "./scintilla/src" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D "WXUSINGDLL" /D "WXMAKING_STC_DLL" /D "SCI_LEXER" /D "LINK_LEXERS" /D "__WX__" /YX /FD /c +# SUBTRACT CPP /u +MTL=midl.exe +RSC=rc.exe +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib comdlg32.lib shell32.lib ole32.lib oleaut32.lib odbc32.lib uuid.lib rpcrt4.lib comctl32.lib wsock32.lib winmm.lib wxmsw24.lib /nologo /version:1.0 /dll /debug /machine:IX86 /out:"../../../lib/stcdlld.dll" /libpath:"../../../lib" +# SUBTRACT BASE LINK32 /pdb:none +# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib comdlg32.lib shell32.lib ole32.lib oleaut32.lib odbc32.lib uuid.lib rpcrt4.lib comctl32.lib wsock32.lib winmm.lib wxmsw24.lib /nologo /version:1.0 /dll /machine:IX86 /out:"../../../lib/stcdll.dll" /libpath:"../../../lib" +# SUBTRACT LINK32 /pdb:none /incremental:no /debug + +!ENDIF # Begin Target -# Name "StcVC - Win32 Release" -# Name "StcVC - Win32 Debug" -# Begin Group "Stc" +# Name "stcVC - Win32 Release" +# Name "stcVC - Win32 Debug" +# Name "stcVC - Win32 Debug DLL" +# Name "stcVC - Win32 Release DLL" +# Begin Group "wxStyledTextCtrl Src" -# PROP Default_Filter "" +# PROP Default_Filter "*.cpp" # Begin Source File SOURCE=.\PlatWX.cpp @@ -95,11 +170,23 @@ SOURCE=.\ScintillaWX.cpp # End Source File # Begin Source File +SOURCE=.\stc.cpp +# End Source File +# End Group +# Begin Group "wxStyledTextCtrl Headers" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\PlatWX.h +# End Source File +# Begin Source File + SOURCE=.\ScintillaWX.h # End Source File # Begin Source File -SOURCE=.\stc.cpp +SOURCE=..\..\include\wx\stc\stc.h # End Source File # End Group # Begin Group "Scintilla" @@ -107,6 +194,10 @@ SOURCE=.\stc.cpp # PROP Default_Filter "" # Begin Source File +SOURCE=.\scintilla\include\Accessor.h +# End Source File +# Begin Source File + SOURCE=.\scintilla\src\AutoComplete.cxx # End Source File # Begin Source File @@ -151,6 +242,10 @@ SOURCE=.\scintilla\src\DocumentAccessor.cxx # End Source File # Begin Source File +SOURCE=.\scintilla\src\DocumentAccessor.h +# End Source File +# Begin Source File + SOURCE=.\scintilla\src\Editor.cxx # End Source File # Begin Source File @@ -179,10 +274,18 @@ SOURCE=.\scintilla\src\KeyWords.cxx # End Source File # Begin Source File +SOURCE=.\scintilla\include\KeyWords.h +# End Source File +# Begin Source File + SOURCE=.\scintilla\src\LexAda.cxx # End Source File # Begin Source File +SOURCE=.\scintilla\src\LexAsm.cxx +# End Source File +# Begin Source File + SOURCE=.\scintilla\src\LexAVE.cxx # End Source File # Begin Source File @@ -207,10 +310,18 @@ SOURCE=.\scintilla\src\LexCrontab.cxx # End Source File # Begin Source File +SOURCE=.\scintilla\src\LexCSS.cxx +# End Source File +# Begin Source File + SOURCE=.\scintilla\src\LexEiffel.cxx # End Source File # Begin Source File +SOURCE=.\scintilla\src\LexFortran.cxx +# End Source File +# Begin Source File + SOURCE=.\scintilla\src\LexHTML.cxx # End Source File # Begin Source File @@ -231,6 +342,10 @@ SOURCE=.\scintilla\src\LexOthers.cxx # End Source File # Begin Source File +SOURCE=.\scintilla\src\LexPOV.cxx +# End Source File +# Begin Source File + SOURCE=.\scintilla\src\LexPascal.cxx # End Source File # Begin Source File @@ -263,14 +378,34 @@ SOURCE=.\scintilla\src\LineMarker.h # End Source File # Begin Source File +SOURCE=.\scintilla\include\Platform.h +# End Source File +# Begin Source File + SOURCE=.\scintilla\src\PropSet.cxx # End Source File # Begin Source File +SOURCE=.\scintilla\include\PropSet.h +# End Source File +# Begin Source File + SOURCE=.\scintilla\src\RESearch.cxx # End Source File # Begin Source File +SOURCE=.\scintilla\src\RESearch.h +# End Source File +# Begin Source File + +SOURCE=.\scintilla\include\SciLexer.h +# End Source File +# Begin Source File + +SOURCE=.\scintilla\include\Scintilla.h +# End Source File +# Begin Source File + SOURCE=.\scintilla\src\ScintillaBase.cxx # End Source File # Begin Source File @@ -279,6 +414,14 @@ SOURCE=.\scintilla\src\ScintillaBase.h # End Source File # Begin Source File +SOURCE=.\scintilla\include\ScintillaWidget.h +# End Source File +# Begin Source File + +SOURCE=.\scintilla\include\SString.h +# End Source File +# Begin Source File + SOURCE=.\scintilla\src\Style.cxx # End Source File # Begin Source File @@ -291,10 +434,22 @@ SOURCE=.\scintilla\src\StyleContext.cxx # End Source File # Begin Source File +SOURCE=.\scintilla\src\StyleContext.h +# End Source File +# Begin Source File + SOURCE=.\scintilla\src\SVector.h # End Source File # Begin Source File +SOURCE=.\scintilla\src\UniConversion.cxx +# End Source File +# Begin Source File + +SOURCE=.\scintilla\src\UniConversion.h +# End Source File +# Begin Source File + SOURCE=.\scintilla\src\ViewStyle.cxx # End Source File # Begin Source File @@ -305,6 +460,14 @@ SOURCE=.\scintilla\src\ViewStyle.h SOURCE=.\scintilla\src\WindowAccessor.cxx # End Source File +# Begin Source File + +SOURCE=.\scintilla\src\XPM.cxx +# End Source File +# Begin Source File + +SOURCE=.\scintilla\include\WindowAccessor.h +# End Source File # End Group # End Target # End Project diff --git a/contrib/src/stc/gen_iface.py b/contrib/src/stc/gen_iface.py index b5342b73e6..885357f398 100644 --- a/contrib/src/stc/gen_iface.py +++ b/contrib/src/stc/gen_iface.py @@ -36,7 +36,16 @@ valPrefixes = [('SCI_', ''), ] # Message function values that should have a CMD_ constant as well -cmdValues = [ (2300, 2350), 2011, 2013, (2176, 2180) ] +cmdValues = [ (2300, 2349), + 2011, + 2013, + (2176, 2180), + (2390, 2393), + (2395, 2396), + 2404, + (2413, 2416), + (2450, 2454), + ] # Map some generic typenames to wx types, using return value syntax @@ -82,90 +91,114 @@ methodOverrideMap = { 'GetViewWS' : ( 'GetViewWhiteSpace', 0, 0, 0), 'SetViewWS' : ( 'SetViewWhiteSpace', 0, 0, 0), - 'GetCharAt' : ( 0, 0, - '''int %s(int pos) { - return (unsigned char)SendMsg(%s, pos, 0);''', - 0), + 'GetCharAt' : + ( 0, 0, + '''int %s(int pos) { + return (unsigned char)SendMsg(%s, pos, 0);''', + 0), - 'GetStyleAt' : ( 0, 0, - '''int %s(int pos) { - return (unsigned char)SendMsg(%s, pos, 0);''', - 0), + 'GetStyleAt' : + ( 0, 0, + '''int %s(int pos) { + return (unsigned char)SendMsg(%s, pos, 0);''', + 0), - 'GetStyledText' : (0, - 'wxMemoryBuffer %s(int startPos, int endPos);', + 'GetStyledText' : + (0, + 'wxMemoryBuffer %s(int startPos, int endPos);', - '''wxMemoryBuffer %s(int startPos, int endPos) { - wxMemoryBuffer buf; - if (endPos < startPos) { - int temp = startPos; - startPos = endPos; - endPos = temp; - } - int len = endPos - startPos; - if (!len) return buf; - TextRange tr; - tr.lpstrText = (char*)buf.GetWriteBuf(len*2+1); - tr.chrg.cpMin = startPos; - tr.chrg.cpMax = endPos; - len = SendMsg(%s, 0, (long)&tr); - buf.UngetWriteBuf(len); - return buf;''', + '''wxMemoryBuffer %s(int startPos, int endPos) { + wxMemoryBuffer buf; + if (endPos < startPos) { + int temp = startPos; + startPos = endPos; + endPos = temp; + } + int len = endPos - startPos; + if (!len) return buf; + TextRange tr; + tr.lpstrText = (char*)buf.GetWriteBuf(len*2+1); + tr.chrg.cpMin = startPos; + tr.chrg.cpMax = endPos; + len = SendMsg(%s, 0, (long)&tr); + buf.UngetWriteBuf(len); + return buf;''', - ('Retrieve a buffer of cells.',)), + ('Retrieve a buffer of cells.',)), - 'PositionFromPoint' : (0, - 'int %s(wxPoint pt);', + 'PositionFromPoint' : + (0, + 'int %s(wxPoint pt);', - '''int %s(wxPoint pt) { - return SendMsg(%s, pt.x, pt.y);''', + '''int %s(wxPoint pt) { + return SendMsg(%s, pt.x, pt.y);''', + 0), - 0), + 'GetCurLine' : + (0, + '#ifdef SWIG\n wxString %s(int* OUTPUT);\n#else\n wxString GetCurLine(int* linePos=NULL);\n#endif', - 'GetCurLine' : (0, - '#ifdef SWIG\n wxString %s(int* OUTPUT);\n#else\n wxString GetCurLine(int* linePos=NULL);\n#endif', + '''wxString %s(int* linePos) { + int len = LineLength(GetCurrentLine()); + if (!len) { + if (linePos) *linePos = 0; + return wxEmptyString; + } - '''wxString %s(int* linePos) { - int len = LineLength(GetCurrentLine()); - if (!len) { - if (linePos) *linePos = 0; - return wxEmptyString; - } + wxMemoryBuffer mbuf(len+1); + char* buf = (char*)mbuf.GetWriteBuf(len+1); - wxMemoryBuffer mbuf(len+1); - char* buf = (char*)mbuf.GetWriteBuf(len+1); + int pos = SendMsg(%s, len+1, (long)buf); + mbuf.UngetWriteBuf(len); + mbuf.AppendByte(0); + if (linePos) *linePos = pos; + return stc2wx(buf);''', - int pos = SendMsg(%s, len+1, (long)buf); - mbuf.UngetWriteBuf(len); - mbuf.AppendByte(0); - if (linePos) *linePos = pos; - return stc2wx(buf);''', - - 0), + 0), 'SetUsePalette' : (None, 0,0,0), 'MarkerSetFore' : ('MarkerSetForeground', 0, 0, 0), 'MarkerSetBack' : ('MarkerSetBackground', 0, 0, 0), - 'MarkerDefine' : (0, - '''void %s(int markerNumber, int markerSymbol, - const wxColour& foreground = wxNullColour, - const wxColour& background = wxNullColour);''', + 'MarkerDefine' : + (0, + '''void %s(int markerNumber, int markerSymbol, + const wxColour& foreground = wxNullColour, + const wxColour& background = wxNullColour);''', - '''void %s(int markerNumber, int markerSymbol, - const wxColour& foreground, - const wxColour& background) { + '''void %s(int markerNumber, int markerSymbol, + const wxColour& foreground, + const wxColour& background) { - SendMsg(%s, markerNumber, markerSymbol); - if (foreground.Ok()) - MarkerSetForeground(markerNumber, foreground); - if (background.Ok()) - MarkerSetBackground(markerNumber, background);''', + SendMsg(%s, markerNumber, markerSymbol); + if (foreground.Ok()) + MarkerSetForeground(markerNumber, foreground); + if (background.Ok()) + MarkerSetBackground(markerNumber, background);''', + + ('Set the symbol used for a particular marker number,', + 'and optionally the fore and background colours.')), + + + 'MarkerDefinePixmap' : + ('MarkerDefineBitmap', + '''void %s(int markerNumber, const wxBitmap& bmp);''', + '''void %s(int markerNumber, const wxBitmap& bmp) { + // convert bmp to a xpm in a string + wxMemoryOutputStream strm; + wxImage img = bmp.ConvertToImage(); + img.SaveFile(strm, wxBITMAP_TYPE_XPM); + size_t len = strm.GetSize(); + char* buff = new char[len+1]; + strm.CopyTo(buff, len); + buff[len] = 0; + SendMsg(%s, markerNumber, (long)buff); + delete [] buff; + ''', + ('Define a marker from a bitmap',)), - ('Set the symbol used for a particular marker number,', - 'and optionally the fore and background colours.')), 'SetMarginTypeN' : ('SetMarginType', 0, 0, 0), 'GetMarginTypeN' : ('GetMarginType', 0, 0, 0), @@ -183,32 +216,33 @@ methodOverrideMap = { 'SetCaretFore' : ('SetCaretForeground', 0, 0, 0), 'StyleSetFont' : ('StyleSetFaceName', 0, 0, 0), - 'AssignCmdKey' : ('CmdKeyAssign', - 'void %s(int key, int modifiers, int cmd);', + 'AssignCmdKey' : + ('CmdKeyAssign', + 'void %s(int key, int modifiers, int cmd);', - '''void %s(int key, int modifiers, int cmd) { - SendMsg(%s, MAKELONG(key, modifiers), cmd);''', + '''void %s(int key, int modifiers, int cmd) { + SendMsg(%s, MAKELONG(key, modifiers), cmd);''', + 0), - 0), - 'ClearCmdKey' : ('CmdKeyClear', - 'void %s(int key, int modifiers);', + 'ClearCmdKey' : + ('CmdKeyClear', + 'void %s(int key, int modifiers);', - '''void %s(int key, int modifiers) { - SendMsg(%s, MAKELONG(key, modifiers));''', - - 0), + '''void %s(int key, int modifiers) { + SendMsg(%s, MAKELONG(key, modifiers));''', + 0), 'ClearAllCmdKeys' : ('CmdKeyClearAll', 0, 0, 0), - 'SetStylingEx' : ('SetStyleBytes', - 'void %s(int length, char* styleBytes);', + 'SetStylingEx' : + ('SetStyleBytes', + 'void %s(int length, char* styleBytes);', - '''void %s(int length, char* styleBytes) { - SendMsg(%s, length, (long)styleBytes);''', - - 0), + '''void %s(int length, char* styleBytes) { + SendMsg(%s, length, (long)styleBytes);''', + 0), 'IndicSetStyle' : ('IndicatorSetStyle', 0, 0, 0), @@ -239,129 +273,162 @@ methodOverrideMap = { 'AutoCGetAutoHide' : ('AutoCompGetAutoHide', 0, 0, 0), 'AutoCSetDropRestOfWord' : ('AutoCompSetDropRestOfWord', 0,0,0), 'AutoCGetDropRestOfWord' : ('AutoCompGetDropRestOfWord', 0,0,0), + 'AutoCGetTypeSeparator' : ('AutoCompGetTypeSeparator', 0, 0, 0), + 'AutoCSetTypeSeparator' : ('AutoCompSetTypeSeparator', 0, 0, 0), + + 'RegisterImage' : + (0, + '''void %s(int type, const wxBitmap& bmp);''', + '''void %s(int type, const wxBitmap& bmp) { + // convert bmp to a xpm in a string + wxMemoryOutputStream strm; + wxImage img = bmp.ConvertToImage(); + img.SaveFile(strm, wxBITMAP_TYPE_XPM); + size_t len = strm.GetSize(); + char* buff = new char[len+1]; + strm.CopyTo(buff, len); + buff[len] = 0; + SendMsg(%s, type, (long)buff); + delete [] buff; + ''', + ('Register an image for use in autocompletion lists.',)), + + + 'ClearRegisteredImages' : (0, 0, 0, + ('Clear all the registered images.',)), 'SetHScrollBar' : ('SetUseHorizontalScrollBar', 0, 0, 0), 'GetHScrollBar' : ('GetUseHorizontalScrollBar', 0, 0, 0), + 'SetVScrollBar' : ('SetUseVerticalScrollBar', 0, 0, 0), + 'GetVScrollBar' : ('GetUseVerticalScrollBar', 0, 0, 0), + 'GetCaretFore' : ('GetCaretForeground', 0, 0, 0), 'GetUsePalette' : (None, 0, 0, 0), - 'FindText' : (0, - '''int %s(int minPos, int maxPos, const wxString& text, int flags=0);''', + 'FindText' : + (0, + '''int %s(int minPos, int maxPos, const wxString& text, int flags=0);''', - '''int %s(int minPos, int maxPos, - const wxString& text, - int flags) { - TextToFind ft; - ft.chrg.cpMin = minPos; - ft.chrg.cpMax = maxPos; - wxWX2MBbuf buf = (wxWX2MBbuf)wx2stc(text); - ft.lpstrText = (char*)(const char*)buf; + '''int %s(int minPos, int maxPos, + const wxString& text, + int flags) { + TextToFind ft; + ft.chrg.cpMin = minPos; + ft.chrg.cpMax = maxPos; + wxWX2MBbuf buf = (wxWX2MBbuf)wx2stc(text); + ft.lpstrText = (char*)(const char*)buf; - return SendMsg(%s, flags, (long)&ft);''', - 0), + return SendMsg(%s, flags, (long)&ft);''', + 0), - 'FormatRange' : (0, - '''int %s(bool doDraw, - int startPos, - int endPos, - wxDC* draw, - wxDC* target, // Why does it use two? Can they be the same? - wxRect renderRect, - wxRect pageRect);''', - ''' int %s(bool doDraw, - int startPos, - int endPos, - wxDC* draw, - wxDC* target, // Why does it use two? Can they be the same? - wxRect renderRect, - wxRect pageRect) { - RangeToFormat fr; + 'FormatRange' : + (0, + '''int %s(bool doDraw, + int startPos, + int endPos, + wxDC* draw, + wxDC* target, // Why does it use two? Can they be the same? + wxRect renderRect, + wxRect pageRect);''', + ''' int %s(bool doDraw, + int startPos, + int endPos, + wxDC* draw, + wxDC* target, // Why does it use two? Can they be the same? + wxRect renderRect, + wxRect pageRect) { + RangeToFormat fr; - if (endPos < startPos) { - int temp = startPos; - startPos = endPos; - endPos = temp; - } - fr.hdc = draw; - fr.hdcTarget = target; - fr.rc.top = renderRect.GetTop(); - fr.rc.left = renderRect.GetLeft(); - fr.rc.right = renderRect.GetRight(); - fr.rc.bottom = renderRect.GetBottom(); - fr.rcPage.top = pageRect.GetTop(); - fr.rcPage.left = pageRect.GetLeft(); - fr.rcPage.right = pageRect.GetRight(); - fr.rcPage.bottom = pageRect.GetBottom(); - fr.chrg.cpMin = startPos; - fr.chrg.cpMax = endPos; + if (endPos < startPos) { + int temp = startPos; + startPos = endPos; + endPos = temp; + } + fr.hdc = draw; + fr.hdcTarget = target; + fr.rc.top = renderRect.GetTop(); + fr.rc.left = renderRect.GetLeft(); + fr.rc.right = renderRect.GetRight(); + fr.rc.bottom = renderRect.GetBottom(); + fr.rcPage.top = pageRect.GetTop(); + fr.rcPage.left = pageRect.GetLeft(); + fr.rcPage.right = pageRect.GetRight(); + fr.rcPage.bottom = pageRect.GetBottom(); + fr.chrg.cpMin = startPos; + fr.chrg.cpMax = endPos; - return SendMsg(%s, doDraw, (long)&fr);''', - 0), + return SendMsg(%s, doDraw, (long)&fr);''', + 0), - 'GetLine' : (0, - 'wxString %s(int line);', + 'GetLine' : + (0, + 'wxString %s(int line);', - '''wxString %s(int line) { - int len = LineLength(line); - if (!len) return wxEmptyString; + '''wxString %s(int line) { + int len = LineLength(line); + if (!len) return wxEmptyString; - wxMemoryBuffer mbuf(len+1); - char* buf = (char*)mbuf.GetWriteBuf(len+1); - SendMsg(%s, line, (long)buf); - mbuf.UngetWriteBuf(len); - mbuf.AppendByte(0); - return stc2wx(buf);''', + wxMemoryBuffer mbuf(len+1); + char* buf = (char*)mbuf.GetWriteBuf(len+1); + SendMsg(%s, line, (long)buf); + mbuf.UngetWriteBuf(len); + mbuf.AppendByte(0); + return stc2wx(buf);''', - ('Retrieve the contents of a line.',)), + ('Retrieve the contents of a line.',)), 'SetSel' : ('SetSelection', 0, 0, 0), - 'GetSelText' : ('GetSelectedText', - 'wxString %s();', - '''wxString %s() { - int start; - int end; + 'GetSelText' : + ('GetSelectedText', + 'wxString %s();', - GetSelection(&start, &end); - int len = end - start; - if (!len) return wxEmptyString; + '''wxString %s() { + int start; + int end; - wxMemoryBuffer mbuf(len+1); - char* buf = (char*)mbuf.GetWriteBuf(len+1); - SendMsg(%s, 0, (long)buf); - mbuf.UngetWriteBuf(len); - mbuf.AppendByte(0); - return stc2wx(buf);''', + GetSelection(&start, &end); + int len = end - start; + if (!len) return wxEmptyString; - ('Retrieve the selected text.',)), + wxMemoryBuffer mbuf(len+1); + char* buf = (char*)mbuf.GetWriteBuf(len+1); + SendMsg(%s, 0, (long)buf); + mbuf.UngetWriteBuf(len); + mbuf.AppendByte(0); + return stc2wx(buf);''', - 'GetTextRange' : (0, - 'wxString %s(int startPos, int endPos);', + ('Retrieve the selected text.',)), - '''wxString %s(int startPos, int endPos) { - if (endPos < startPos) { - int temp = startPos; - startPos = endPos; - endPos = temp; - } - int len = endPos - startPos; - if (!len) return wxEmptyString; - wxMemoryBuffer mbuf(len+1); - char* buf = (char*)mbuf.GetWriteBuf(len); - TextRange tr; - tr.lpstrText = buf; - tr.chrg.cpMin = startPos; - tr.chrg.cpMax = endPos; - SendMsg(%s, 0, (long)&tr); - mbuf.UngetWriteBuf(len); - mbuf.AppendByte(0); - return stc2wx(buf);''', - ('Retrieve a range of text.',)), + 'GetTextRange' : + (0, + 'wxString %s(int startPos, int endPos);', + + '''wxString %s(int startPos, int endPos) { + if (endPos < startPos) { + int temp = startPos; + startPos = endPos; + endPos = temp; + } + int len = endPos - startPos; + if (!len) return wxEmptyString; + wxMemoryBuffer mbuf(len+1); + char* buf = (char*)mbuf.GetWriteBuf(len); + TextRange tr; + tr.lpstrText = buf; + tr.chrg.cpMin = startPos; + tr.chrg.cpMax = endPos; + SendMsg(%s, 0, (long)&tr); + mbuf.UngetWriteBuf(len); + mbuf.AppendByte(0); + return stc2wx(buf);''', + + ('Retrieve a range of text.',)), 'PointXFromPosition' : (None, 0, 0, 0), 'PointYFromPosition' : (None, 0, 0, 0), @@ -370,54 +437,121 @@ methodOverrideMap = { 'ReplaceSel' : ('ReplaceSelection', 0, 0, 0), 'Null' : (None, 0, 0, 0), - 'GetText' : (0, - 'wxString %s();', + 'GetText' : + (0, + 'wxString %s();', - '''wxString %s() { - int len = GetTextLength(); - wxMemoryBuffer mbuf(len+1); // leave room for the null... - char* buf = (char*)mbuf.GetWriteBuf(len+1); - SendMsg(%s, len+1, (long)buf); - mbuf.UngetWriteBuf(len); - mbuf.AppendByte(0); - return stc2wx(buf);''', + '''wxString %s() { + int len = GetTextLength(); + wxMemoryBuffer mbuf(len+1); // leave room for the null... + char* buf = (char*)mbuf.GetWriteBuf(len+1); + SendMsg(%s, len+1, (long)buf); + mbuf.UngetWriteBuf(len); + mbuf.AppendByte(0); + return stc2wx(buf);''', - ('Retrieve all the text in the document.', )), + ('Retrieve all the text in the document.', )), 'GetDirectFunction' : (None, 0, 0, 0), 'GetDirectPointer' : (None, 0, 0, 0), - 'CallTipPosStart' : ('CallTipPosAtStart', 0, 0, 0), - 'CallTipSetHlt' : ('CallTipSetHighlight', 0, 0, 0), - 'CallTipSetBack' : ('CallTipSetBackground', 0, 0, 0), + 'CallTipPosStart' : ('CallTipPosAtStart', 0, 0, 0), + 'CallTipSetHlt' : ('CallTipSetHighlight', 0, 0, 0), + 'CallTipSetBack' : ('CallTipSetBackground', 0, 0, 0), + 'CallTipSetFore' : ('CallTipSetForeground', 0, 0, 0), + 'CallTipSetForeHlt' : ('CallTipSetForegroundHighlight', 0, 0, 0), + + 'SetHotspotActiveFore' : ('SetHotspotActiveForeground', 0, 0, 0), + 'SetHotspotActiveBack' : ('SetHotspotActiveBackground', 0, 0, 0), - 'ReplaceTarget' : (0, - 'int %s(const wxString& text);', + 'ReplaceTarget' : + (0, + 'int %s(const wxString& text);', - ''' - int %s(const wxString& text) { - wxWX2MBbuf buf = (wxWX2MBbuf)wx2stc(text); - return SendMsg(%s, strlen(buf), (long)(const char*)buf);''', - 0), + ''' + int %s(const wxString& text) { + wxWX2MBbuf buf = (wxWX2MBbuf)wx2stc(text); + return SendMsg(%s, strlen(buf), (long)(const char*)buf);''', + 0), - 'ReplaceTargetRE' : (0, - 'int %s(const wxString& text);', + 'ReplaceTargetRE' : + (0, + 'int %s(const wxString& text);', - ''' - int %s(const wxString& text) { - wxWX2MBbuf buf = (wxWX2MBbuf)wx2stc(text); - return SendMsg(%s, strlen(buf), (long)(const char*)buf);''', - 0), + ''' + int %s(const wxString& text) { + wxWX2MBbuf buf = (wxWX2MBbuf)wx2stc(text); + return SendMsg(%s, strlen(buf), (long)(const char*)buf);''', + 0), - 'SearchInTarget' : (0, - 'int %s(const wxString& text);', + 'SearchInTarget' : + (0, + 'int %s(const wxString& text);', - ''' - int %s(const wxString& text) { - wxWX2MBbuf buf = (wxWX2MBbuf)wx2stc(text); - return SendMsg(%s, strlen(buf), (long)(const char*)buf);''', - 0), + ''' + int %s(const wxString& text) { + wxWX2MBbuf buf = (wxWX2MBbuf)wx2stc(text); + return SendMsg(%s, strlen(buf), (long)(const char*)buf);''', + 0), + + + 'GetDocPointer' : + (0, + 'void* %s();', + '''void* %s() { + return (void*)SendMsg(%s);''', + 0), + + 'SetDocPointer' : + (0, + 'void %s(void* docPointer);', + '''void %s(void* docPointer) { + SendMsg(%s, 0, (long)docPointer);''', + 0), + + 'CreateDocument' : + (0, + 'void* %s();', + '''void* %s() { + return (void*)SendMsg(%s);''', + 0), + + 'AddRefDocument' : + (0, + 'void %s(void* docPointer);', + '''void %s(void* docPointer) { + SendMsg(%s, 0, (long)docPointer);''', + 0), + + 'ReleaseDocument' : + (0, + 'void %s(void* docPointer);', + '''void %s(void* docPointer) { + SendMsg(%s, 0, (long)docPointer);''', + 0), + + 'SetCodePage' : + (0, + 0, + '''void %s(int codePage) { +#if wxUSE_UNICODE + wxASSERT_MSG(codePage == wxSTC_CP_UTF8, + wxT("Only wxSTC_CP_UTF8 may be used when wxUSE_UNICODE is on.")); +#else + wxASSERT_MSG(codePage != wxSTC_CP_UTF8, + wxT("wxSTC_CP_UTF8 may not be used when wxUSE_UNICODE is off.")); +#endif + SendMsg(%s, codePage);''', + ("Set the code page used to interpret the bytes of the document as characters.",) ), + + + 'GrabFocus' : (None, 0, 0, 0), + 'SetFocus' : ('SetSTCFocus', 0, 0, 0), + 'GetFocus' : ('GetSTCFocus', 0, 0, 0), + + + 'LoadLexerLibrary' : (None, 0,0,0), @@ -468,54 +602,16 @@ methodOverrideMap = { 'LineScrollDown' : (None, 0, 0, 0), 'LineScrollUp' : (None, 0, 0, 0), 'DeleteBackNotLine' : (None, 0, 0, 0), - - - 'GetDocPointer' : (0, - 'void* %s();', - '''void* %s() { - return (void*)SendMsg(%s);''', - 0), - - 'SetDocPointer' : (0, - 'void %s(void* docPointer);', - '''void %s(void* docPointer) { - SendMsg(%s, 0, (long)docPointer);''', - 0), - - 'CreateDocument' : (0, - 'void* %s();', - '''void* %s() { - return (void*)SendMsg(%s);''', - 0), - - 'AddRefDocument' : (0, - 'void %s(void* docPointer);', - '''void %s(void* docPointer) { - SendMsg(%s, 0, (long)docPointer);''', - 0), - - 'ReleaseDocument' : (0, - 'void %s(void* docPointer);', - '''void %s(void* docPointer) { - SendMsg(%s, 0, (long)docPointer);''', - 0), - 'SetCodePage' : (0, - 0, - '''void %s(int codePage) { -#if wxUSE_UNICODE - wxASSERT_MSG(codePage == wxSTC_CP_UTF8, - wxT("Only wxSTC_CP_UTF8 may be used when wxUSE_UNICODE is on.")); -#else - wxASSERT_MSG(codePage != wxSTC_CP_UTF8, - wxT("wxSTC_CP_UTF8 may not be used when wxUSE_UNICODE is off.")); -#endif - SendMsg(%s, codePage);''', - ("Set the code page used to interpret the bytes of the document as characters.",) ), - - - 'GrabFocus' : (None, 0, 0, 0), - 'SetFocus' : ('SetSTCFocus', 0, 0, 0), - 'GetFocus' : ('GetSTCFocus', 0, 0, 0), + 'HomeWrap' : (None, 0, 0, 0), + 'HomeWrapExtend' : (None, 0, 0, 0), + 'LineEndWrap' : (None, 0, 0, 0), + 'LineEndWrapExtend' : (None, 0, 0, 0), + 'VCHomeWrap' : (None, 0, 0, 0), + 'VCHomeWrapExtend' : (None, 0, 0, 0), + 'ParaDown' : (None, 0, 0, 0), + 'ParaDownExtend' : (None, 0, 0, 0), + 'ParaUp' : (None, 0, 0, 0), + 'ParaUpExtend' : (None, 0, 0, 0), @@ -529,6 +625,7 @@ def processIface(iface, h_tmplt, cpp_tmplt, h_dest, cpp_dest): curDocStrings = [] values = [] methods = [] + cmds = [] # parse iface file fi = FileInput(iface) @@ -547,7 +644,7 @@ def processIface(iface, h_tmplt, cpp_tmplt, h_dest, cpp_dest): curDocStrings = [] elif op == 'fun ' or op == 'set ' or op == 'get ': - parseFun(line[4:], methods, curDocStrings, values) + parseFun(line[4:], methods, curDocStrings, cmds) curDocStrings = [] elif op == 'cat ': @@ -570,6 +667,7 @@ def processIface(iface, h_tmplt, cpp_tmplt, h_dest, cpp_dest): # process templates data = {} data['VALUES'] = processVals(values) + data['CMDS'] = processVals(cmds) defs, imps = processMethods(methods) data['METHOD_DEFS'] = defs data['METHOD_IMPS'] = imps @@ -747,10 +845,10 @@ def parseFun(line, methods, docs, values): param1 = parseParam(param1) param2 = parseParam(param2) - # Special case. For the key command functionss we want a value defined too + # Special case. For the key command functions we want a value defined too num = string.atoi(number) for v in cmdValues: - if (type(v) == type(()) and v[0] <= num < v[1]) or v == num: + if (type(v) == type(()) and v[0] <= num <= v[1]) or v == num: parseVal('CMD_%s=%s' % (string.upper(name), number), values, docs) #if retType == 'void' and not param1 and not param2: diff --git a/contrib/src/stc/makefile.b32 b/contrib/src/stc/makefile.b32 index 0ac8176647..ac6a1b59c3 100644 --- a/contrib/src/stc/makefile.b32 +++ b/contrib/src/stc/makefile.b32 @@ -19,7 +19,7 @@ S=$(SCINTILLA)\src STCEXTRACPPFLAGS=-D__WX__ -DSCI_LEXER -DLINK_LEXERS -I$(SCINTILLA)/include -I$(S) -LIBTARGET=$(WXDIR)\contrib\lib\stc.lib +LIBTARGET=$(WXDIR)\lib\stc.lib OBJECTS = \ AutoComplete.obj \ @@ -34,17 +34,21 @@ OBJECTS = \ KeyWords.obj \ LexAVE.obj \ LexAda.obj \ + LexAsm.obj \ LexBaan.obj \ LexBullant.obj \ LexMatlab.obj \ LexCPP.obj \ LexConf.obj \ LexCrontab.obj \ + LexCSS.obj \ LexEiffel.obj \ + LexFortran.obj \ LexHTML.obj \ LexLisp.obj \ LexLua.obj \ LexOthers.obj \ + LexPOV.obj \ LexPascal.obj \ LexPerl.obj \ LexPython.obj \ @@ -60,17 +64,19 @@ OBJECTS = \ UniConversion.obj \ ViewStyle.obj \ WindowAccessor.obj \ + XPM.obj \ \ PlatWX.obj \ ScintillaWX.obj \ stc.obj \ + STCCFG = stc.cfg STCCPPFLAGS=$(DLL_FLAGS) $(EXTRACPPFLAGS) @$(STCCFG) default: $(STCCFG) $(LIBTARGET) -cleancfg: +cleancfg: del $(STCCFG) {$(S)}.cxx.obj: @@ -89,7 +95,6 @@ $(STCCFG): makefile.b32 -w-par -w-aus -w-hid # virtual function A hides virtual function B --WE -tWM -I$(WXINC);$(BCCDIR)\include;$(WXDIR)/src/generic;$(WXDIR)/src/png;$(WXDIR)/src/jpeg;$(WXDIR)/src/zlib;$(WXDIR)/src/xpm;$(WXDIR)/src/tiff diff --git a/contrib/src/stc/makefile.g95 b/contrib/src/stc/makefile.g95 index 4ae99521f5..25dd4ad0cd 100644 --- a/contrib/src/stc/makefile.g95 +++ b/contrib/src/stc/makefile.g95 @@ -22,17 +22,21 @@ OBJECTS = \ $(S)/KeyWords.$(OBJSUFF) \ $(S)/LexAVE.$(OBJSUFF) \ $(S)/LexAda.$(OBJSUFF) \ + $(S)/LexAsm.$(OBJSUFF) \ $(S)/LexBaan.$(OBJSUFF) \ $(S)/LexBullant.$(OBJSUFF) \ $(S)/LexMatlab.$(OBJSUFF) \ $(S)/LexCPP.$(OBJSUFF) \ $(S)/LexConf.$(OBJSUFF) \ $(S)/LexCrontab.$(OBJSUFF) \ + $(S)/LexCSS.$(OBJSUFF) \ $(S)/LexEiffel.$(OBJSUFF) \ + $(S)/LexFortran.$(OBJSUFF) \ $(S)/LexHTML.$(OBJSUFF) \ $(S)/LexLisp.$(OBJSUFF) \ $(S)/LexLua.$(OBJSUFF) \ $(S)/LexOthers.$(OBJSUFF) \ + $(S)/LexPOV.$(OBJSUFF) \ $(S)/LexPascal.$(OBJSUFF) \ $(S)/LexPerl.$(OBJSUFF) \ $(S)/LexPython.$(OBJSUFF) \ @@ -48,11 +52,13 @@ OBJECTS = \ $(S)/UniConversion.$(OBJSUFF) \ $(S)/ViewStyle.$(OBJSUFF) \ $(S)/WindowAccessor.$(OBJSUFF) \ + $(S)/XPM.$(OBJSUFF) \ \ PlatWX.$(OBJSUFF) \ ScintillaWX.$(OBJSUFF) \ stc.$(OBJSUFF) + LIBTARGET = $(WXDIR)/lib/libstc.a include $(WXDIR)/src/makelib.g95 \ No newline at end of file diff --git a/contrib/src/stc/makefile.vc b/contrib/src/stc/makefile.vc index 9a3fdc08e7..4aa0e2c352 100644 --- a/contrib/src/stc/makefile.vc +++ b/contrib/src/stc/makefile.vc @@ -27,17 +27,21 @@ OBJECTS = \ $(D)\KeyWords.obj \ $(D)\LexAVE.obj \ $(D)\LexAda.obj \ + $(D)\LexAsm.obj \ $(D)\LexBaan.obj \ $(D)\LexBullant.obj \ $(D)\LexMatlab.obj \ $(D)\LexCPP.obj \ $(D)\LexConf.obj \ $(D)\LexCrontab.obj \ + $(D)\LexCSS.obj \ $(D)\LexEiffel.obj \ + $(D)\LexFortran.obj \ $(D)\LexHTML.obj \ $(D)\LexLisp.obj \ $(D)\LexLua.obj \ $(D)\LexOthers.obj \ + $(D)\LexPOV.obj \ $(D)\LexPascal.obj \ $(D)\LexPerl.obj \ $(D)\LexPython.obj \ @@ -53,6 +57,7 @@ OBJECTS = \ $(D)\UniConversion.obj \ $(D)\ViewStyle.obj \ $(D)\WindowAccessor.obj \ + $(D)\XPM.obj \ \ $(D)\PlatWX.obj \ $(D)\ScintillaWX.obj \ diff --git a/contrib/src/stc/makefile.wat b/contrib/src/stc/makefile.wat new file mode 100644 index 0000000000..76a2985a3b --- /dev/null +++ b/contrib/src/stc/makefile.wat @@ -0,0 +1,88 @@ +# STC makefile for Watcom C++ + +WXDIR = ..\..\.. + +SCINTILLA=$(WXDIR)\contrib\src\stc\scintilla +S=$(SCINTILLA)\src +STCEXTRACPPFLAGS=-D__WX__ -DSCI_LEXER -DLINK_LEXERS -I$(SCINTILLA)\include -I$(S) + +EXTRACPPFLAGS = -I$(WXDIR)\contrib\include $(STCEXTRACPPFLAGS) + +!include $(WXDIR)\src\makewat.env + +STCLIB = $(WXDIR)\lib\stc_w.lib +THISDIR = $(WXDIR)\contrib\src\stc +OUTPUTDIR = $(THISDIR)\ + + +NAME = stc +LNK = $(name).lnk + +OBJECTS = & + AutoComplete.obj & + CallTip.obj & + CellBuffer.obj & + ContractionState.obj & + Document.obj & + DocumentAccessor.obj & + Editor.obj & + Indicator.obj & + KeyMap.obj & + KeyWords.obj & + LexAVE.obj & + LexAda.obj & + LexAsm.obj & + LexBaan.obj & + LexBullant.obj & + LexMatlab.obj & + LexCPP.obj & + LexConf.obj & + LexCrontab.obj & + LexCSS.obj & + LexEiffel.obj & + LexFortran.obj & + LexHTML.obj & + LexLisp.obj & + LexLua.obj & + LexOthers.obj & + LexPOV.obj & + LexPascal.obj & + LexPerl.obj & + LexPython.obj & + LexRuby.obj & + LexSQL.obj & + LexVB.obj & + LineMarker.obj & + PropSet.obj & + RESearch.obj & + ScintillaBase.obj & + Style.obj & + StyleContext.obj & + UniConversion.obj & + ViewStyle.obj & + WindowAccessor.obj & + XPM.obj & + PlatWX.obj & + ScintillaWX.obj & + stc.obj + +all: $(STCLIB) .SYMBOLIC + +$(STCLIB): $(OBJECTS) + *wlib /b /c /n /P=256 $(STCLIB) $(OBJECTS) + +clean: .SYMBOLIC + -erase *.obj + -erase *.bak + -erase *.err + -erase *.pch + -erase $(STCLIB) + -erase *.lbc + +.EXTENSIONS: .cxx +.cxx: $(S) + +.cxx.obj: + $(CXX) $[*.cxx $(CXXFLAGS) $(STCEXTRACPPFLAGS) + + diff --git a/contrib/src/stc/scintilla/License.txt b/contrib/src/stc/scintilla/License.txt new file mode 100644 index 0000000000..cbe25b2fc2 --- /dev/null +++ b/contrib/src/stc/scintilla/License.txt @@ -0,0 +1,20 @@ +License for Scintilla and SciTE + +Copyright 1998-2003 by Neil Hodgson + +All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation. + +NEIL HODGSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL NEIL HODGSON BE LIABLE FOR ANY +SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE +OR PERFORMANCE OF THIS SOFTWARE. \ No newline at end of file diff --git a/contrib/src/stc/scintilla/README.txt b/contrib/src/stc/scintilla/README.txt index 8538707cde..4f5b08f1cb 100644 --- a/contrib/src/stc/scintilla/README.txt +++ b/contrib/src/stc/scintilla/README.txt @@ -3,5 +3,4 @@ scintilla/include directories from the Scintilla/SCiTE source distribution. All other code needed to implement Scintilla on top of wxWindows is located in the directory above this one. -The current version of the Scintilla code is 1.48 - +The current version of the Scintilla code is 1.52 diff --git a/contrib/src/stc/scintilla/include/Accessor.h b/contrib/src/stc/scintilla/include/Accessor.h index 0b2c4baee2..3f59c07939 100644 --- a/contrib/src/stc/scintilla/include/Accessor.h +++ b/contrib/src/stc/scintilla/include/Accessor.h @@ -25,7 +25,7 @@ protected: char buf[bufferSize+1]; int startPos; int endPos; - int codePage; + int codePage; virtual bool InternalIsLeadByte(char ch)=0; virtual void Fill(int position)=0; @@ -44,7 +44,7 @@ public: if (position < startPos || position >= endPos) { Fill(position); if (position < startPos || position >= endPos) { - // Position is outside range of document + // Position is outside range of document return chDefault; } } diff --git a/contrib/src/stc/scintilla/include/KeyWords.h b/contrib/src/stc/scintilla/include/KeyWords.h index df4e870c58..c51c88ef59 100644 --- a/contrib/src/stc/scintilla/include/KeyWords.h +++ b/contrib/src/stc/scintilla/include/KeyWords.h @@ -7,7 +7,7 @@ typedef void (*LexerFunction)(unsigned int startPos, int lengthDoc, int initStyle, WordList *keywordlists[], Accessor &styler); - + /** * A LexerModule is responsible for lexing and folding a particular language. * The class maintains a list of LexerModules which can be searched to find a @@ -26,7 +26,7 @@ protected: public: const char *languageName; - LexerModule(int language_, LexerFunction fnLexer_, + LexerModule(int language_, LexerFunction fnLexer_, const char *languageName_=0, LexerFunction fnFolder_=0, const char * const wordListDescriptions_[] = NULL); int GetLanguage() const { return language; } diff --git a/contrib/src/stc/scintilla/include/Platform.h b/contrib/src/stc/scintilla/include/Platform.h index 1a8dfaa96e..7f5985c765 100644 --- a/contrib/src/stc/scintilla/include/Platform.h +++ b/contrib/src/stc/scintilla/include/Platform.h @@ -3,7 +3,7 @@ ** Interface to platform facilities. Also includes some basic utilities. ** Implemented in PlatGTK.cxx for GTK+/Linux, PlatWin.cxx for Windows, and PlatWX.cxx for wxWindows. **/ -// Copyright 1998-2002 by Neil Hodgson +// Copyright 1998-2003 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef PLATFORM_H @@ -109,6 +109,12 @@ public: return (right > other.left) && (left < other.right) && (bottom > other.top) && (top < other.bottom); } + void Move(int xDelta, int yDelta) { + left += xDelta; + top += yDelta; + right += xDelta; + bottom += yDelta; + } int Width() { return right - left; } int Height() { return bottom - top; } }; @@ -136,7 +142,7 @@ public: } ColourDesired(unsigned int red, unsigned int green, unsigned int blue) { - co = red | (green << 8) | (blue << 16); + Set(red, green, blue); } bool operator==(const ColourDesired &other) const { @@ -147,6 +153,31 @@ public: co = lcol; } + void Set(unsigned int red, unsigned int green, unsigned int blue) { + co = red | (green << 8) | (blue << 16); + } + + static inline unsigned int ValueOfHex(const char ch) { + if (ch >= '0' && ch <= '9') + return ch - '0'; + else if (ch >= 'A' && ch <= 'F') + return ch - 'A' + 10; + else if (ch >= 'a' && ch <= 'f') + return ch - 'a' + 10; + else + return 0; + } + + void Set(const char *val) { + if (*val == '#') { + val++; + } + unsigned int r = ValueOfHex(val[0]) * 16 + ValueOfHex(val[1]); + unsigned int g = ValueOfHex(val[2]) * 16 + ValueOfHex(val[3]); + unsigned int b = ValueOfHex(val[4]) * 16 + ValueOfHex(val[5]); + Set(r, g, b); + } + long AsLong() const { return co; } @@ -196,6 +227,9 @@ struct ColourPair { desired = desired_; allocated.Set(desired.AsLong()); } + void Copy() { + allocated.Set(desired.AsLong()); + } }; class Window; // Forward declaration for Palette @@ -271,9 +305,9 @@ public: virtual ~Surface() {}; static Surface *Allocate(); - virtual void Init()=0; - virtual void Init(SurfaceID sid)=0; - virtual void InitPixMap(int width, int height, Surface *surface_)=0; + virtual void Init(WindowID wid)=0; + virtual void Init(SurfaceID sid, WindowID wid)=0; + virtual void InitPixMap(int width, int height, Surface *surface_, WindowID wid)=0; virtual void Release()=0; virtual bool Initialised()=0; @@ -292,6 +326,7 @@ public: virtual void DrawTextNoClip(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore, ColourAllocated back)=0; virtual void DrawTextClipped(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore, ColourAllocated back)=0; + virtual void DrawTextTransparent(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore)=0; virtual void MeasureWidths(Font &font_, const char *s, int len, int *positions)=0; virtual int WidthText(Font &font_, const char *s, int len)=0; virtual int WidthChar(Font &font_, char ch)=0; @@ -307,6 +342,7 @@ public: virtual void FlushCachedState()=0; virtual void SetUnicodeMode(bool unicodeMode_)=0; + virtual void SetDBCSMode(int codePage)=0; }; /** @@ -329,8 +365,8 @@ public: id = id_; return *this; } - WindowID GetID() { return id; } - bool Created() { return id != 0; } + WindowID GetID() const { return id; } + bool Created() const { return id != 0; } void Destroy(); bool HasFocus(); PRectangle GetPosition(); @@ -341,7 +377,7 @@ public: void InvalidateAll(); void InvalidateRectangle(PRectangle rc); virtual void SetFont(Font &font); - enum Cursor { cursorInvalid, cursorText, cursorArrow, cursorUp, cursorWait, cursorHoriz, cursorVert, cursorReverseArrow }; + enum Cursor { cursorInvalid, cursorText, cursorArrow, cursorUp, cursorWait, cursorHoriz, cursorVert, cursorReverseArrow, cursorHand }; void SetCursor(Cursor curs); void SetTitle(const char *s); private: @@ -353,38 +389,28 @@ private: */ class ListBox : public Window { -private: -#if PLAT_GTK - WindowID list; - WindowID scroller; - int current; -#endif - int desiredVisibleRows; - unsigned int maxItemCharacters; - unsigned int aveCharWidth; -public: - CallBackAction doubleClickAction; - void *doubleClickActionData; public: ListBox(); virtual ~ListBox(); - void Create(Window &parent, int ctrlID); - virtual void SetFont(Font &font); - void SetAverageCharWidth(int width); - void SetVisibleRows(int rows); - PRectangle GetDesiredRect(); - void Clear(); - void Append(char *s); - int Length(); - void Select(int n); - int GetSelection(); - int Find(const char *prefix); - void GetValue(int n, char *value, int len); - void Sort(); - void SetDoubleClickAction(CallBackAction action, void *data) { - doubleClickAction = action; - doubleClickActionData = data; - } + static ListBox *Allocate(); + + virtual void SetFont(Font &font)=0; + virtual void Create(Window &parent, int ctrlID, int lineHeight_, bool unicodeMode_)=0; + virtual void SetAverageCharWidth(int width)=0; + virtual void SetVisibleRows(int rows)=0; + virtual PRectangle GetDesiredRect()=0; + virtual int CaretFromEdge()=0; + virtual void Clear()=0; + virtual void Append(char *s, int type = -1)=0; + virtual int Length()=0; + virtual void Select(int n)=0; + virtual int GetSelection()=0; + virtual int Find(const char *prefix)=0; + virtual void GetValue(int n, char *value, int len)=0; + virtual void Sort()=0; + virtual void RegisterImage(int type, const char *xpm_data)=0; + virtual void ClearRegisteredImages()=0; + virtual void SetDoubleClickAction(CallBackAction, void *)=0; }; /** @@ -426,6 +452,7 @@ public: static const char *DefaultFont(); static int DefaultFontSize(); static unsigned int DoubleClickTime(); + static bool MouseButtonBounce(); static void DebugDisplay(const char *s); static bool IsKeyDown(int key); static long SendScintilla( @@ -433,6 +460,8 @@ public: static long SendScintillaPointer( WindowID w, unsigned int msg, unsigned long wParam=0, void *lParam=0); static bool IsDBCSLeadByte(int codePage, char ch); + static int DBCSCharLength(int codePage, const char *s); + static int DBCSCharMaxLength(); // These are utility functions not really tied to a platform static int Minimum(int a, int b); diff --git a/contrib/src/stc/scintilla/include/PropSet.h b/contrib/src/stc/scintilla/include/PropSet.h index 59588c62ed..3f1b64f77f 100644 --- a/contrib/src/stc/scintilla/include/PropSet.h +++ b/contrib/src/stc/scintilla/include/PropSet.h @@ -60,7 +60,7 @@ public: bool onlyLineEnds; ///< Delimited by any white space or only line ends bool sorted; int starts[256]; - WordList(bool onlyLineEnds_ = false) : + WordList(bool onlyLineEnds_ = false) : words(0), wordsNoCase(0), list(0), len(0), onlyLineEnds(onlyLineEnds_), sorted(false) {} ~WordList() { Clear(); } operator bool() { return len ? true : false; } @@ -70,9 +70,9 @@ public: char *Allocate(int size); void SetFromAllocated(); bool InList(const char *s); - const char *GetNearestWord(const char *wordStart, int searchLen = -1, + const char *GetNearestWord(const char *wordStart, int searchLen = -1, bool ignoreCase = false, SString wordCharacters=""); - char *GetNearestWords(const char *wordStart, int searchLen=-1, + char *GetNearestWords(const char *wordStart, int searchLen=-1, bool ignoreCase=false, char otherSeparator='\0'); }; diff --git a/contrib/src/stc/scintilla/include/SString.h b/contrib/src/stc/scintilla/include/SString.h index 6bfe50fccd..01602df781 100644 --- a/contrib/src/stc/scintilla/include/SString.h +++ b/contrib/src/stc/scintilla/include/SString.h @@ -238,7 +238,7 @@ public: return append(sOther, static_cast(measure_length)); } SString &operator+=(const SString &sOther) { - return append(sOther.s, sOther.sSize); + return append(sOther.s, sOther.sLen); } SString &operator+=(char ch) { return append(&ch, 1); diff --git a/contrib/src/stc/scintilla/include/SciLexer.h b/contrib/src/stc/scintilla/include/SciLexer.h index a6066cd585..e1da492b27 100644 --- a/contrib/src/stc/scintilla/include/SciLexer.h +++ b/contrib/src/stc/scintilla/include/SciLexer.h @@ -48,6 +48,12 @@ #define SCLEX_BAAN 31 #define SCLEX_MATLAB 32 #define SCLEX_SCRIPTOL 33 +#define SCLEX_ASM 34 +#define SCLEX_CPPNOCASE 35 +#define SCLEX_FORTRAN 36 +#define SCLEX_F77 37 +#define SCLEX_CSS 38 +#define SCLEX_POV 39 #define SCLEX_AUTOMATIC 1000 #define SCE_P_DEFAULT 0 #define SCE_P_COMMENTLINE 1 @@ -273,6 +279,9 @@ #define SCE_ERR_DIFF_ADDITION 11 #define SCE_ERR_DIFF_DELETION 12 #define SCE_ERR_DIFF_MESSAGE 13 +#define SCE_ERR_PHP 14 +#define SCE_ERR_ELF 15 +#define SCE_ERR_IFC 16 #define SCE_BAT_DEFAULT 0 #define SCE_BAT_COMMENT 1 #define SCE_BAT_WORD 2 @@ -309,22 +318,29 @@ #define SCE_AVE_COMMENT 1 #define SCE_AVE_NUMBER 2 #define SCE_AVE_WORD 3 -#define SCE_AVE_KEYWORD 4 -#define SCE_AVE_STATEMENT 5 #define SCE_AVE_STRING 6 #define SCE_AVE_ENUM 7 #define SCE_AVE_STRINGEOL 8 #define SCE_AVE_IDENTIFIER 9 #define SCE_AVE_OPERATOR 10 +#define SCE_AVE_WORD1 11 +#define SCE_AVE_WORD2 12 +#define SCE_AVE_WORD3 13 +#define SCE_AVE_WORD4 14 +#define SCE_AVE_WORD5 15 +#define SCE_AVE_WORD6 16 #define SCE_ADA_DEFAULT 0 -#define SCE_ADA_COMMENT 1 -#define SCE_ADA_NUMBER 2 -#define SCE_ADA_WORD 3 -#define SCE_ADA_STRING 4 +#define SCE_ADA_WORD 1 +#define SCE_ADA_IDENTIFIER 2 +#define SCE_ADA_NUMBER 3 +#define SCE_ADA_DELIMITER 4 #define SCE_ADA_CHARACTER 5 -#define SCE_ADA_OPERATOR 6 -#define SCE_ADA_IDENTIFIER 7 +#define SCE_ADA_CHARACTEREOL 6 +#define SCE_ADA_STRING 7 #define SCE_ADA_STRINGEOL 8 +#define SCE_ADA_LABEL 9 +#define SCE_ADA_COMMENTLINE 10 +#define SCE_ADA_ILLEGAL 11 #define SCE_BAAN_DEFAULT 0 #define SCE_BAAN_COMMENT 1 #define SCE_BAAN_COMMENTDOC 2 @@ -392,6 +408,58 @@ #define SCE_SCRIPTOL_COMMENTDOCKEYWORD 17 #define SCE_SCRIPTOL_COMMENTDOCKEYWORDERROR 18 #define SCE_SCRIPTOL_COMMENTBASIC 19 +#define SCE_ASM_DEFAULT 0 +#define SCE_ASM_COMMENT 1 +#define SCE_ASM_NUMBER 2 +#define SCE_ASM_STRING 3 +#define SCE_ASM_OPERATOR 4 +#define SCE_ASM_IDENTIFIER 5 +#define SCE_ASM_CPUINSTRUCTION 6 +#define SCE_ASM_MATHINSTRUCTION 7 +#define SCE_ASM_REGISTER 8 +#define SCE_ASM_DIRECTIVE 9 +#define SCE_ASM_DIRECTIVEOPERAND 10 +#define SCE_F_DEFAULT 0 +#define SCE_F_COMMENT 1 +#define SCE_F_NUMBER 2 +#define SCE_F_STRING1 3 +#define SCE_F_STRING2 4 +#define SCE_F_STRINGEOL 5 +#define SCE_F_OPERATOR 6 +#define SCE_F_IDENTIFIER 7 +#define SCE_F_WORD 8 +#define SCE_F_WORD2 9 +#define SCE_F_WORD3 10 +#define SCE_F_PREPROCESSOR 11 +#define SCE_F_OPERATOR2 12 +#define SCE_F_LABEL 13 +#define SCE_F_CONTINUATION 14 +#define SCE_CSS_DEFAULT 0 +#define SCE_CSS_TAG 1 +#define SCE_CSS_CLASS 2 +#define SCE_CSS_PSEUDOCLASS 3 +#define SCE_CSS_UNKNOWN_PSEUDOCLASS 4 +#define SCE_CSS_OPERATOR 5 +#define SCE_CSS_IDENTIFIER 6 +#define SCE_CSS_UNKNOWN_IDENTIFIER 7 +#define SCE_CSS_VALUE 8 +#define SCE_CSS_COMMENT 9 +#define SCE_CSS_ID 10 +#define SCE_CSS_IMPORTANT 11 +#define SCE_CSS_DIRECTIVE 12 +#define SCE_CSS_DOUBLESTRING 13 +#define SCE_CSS_SINGLESTRING 14 +#define SCE_POV_DEFAULT 0 +#define SCE_POV_COMMENT 1 +#define SCE_POV_COMMENTLINE 2 +#define SCE_POV_COMMENTDOC 3 +#define SCE_POV_NUMBER 4 +#define SCE_POV_WORD 5 +#define SCE_POV_STRING 6 +#define SCE_POV_OPERATOR 7 +#define SCE_POV_IDENTIFIER 8 +#define SCE_POV_BRACE 9 +#define SCE_POV_WORD2 10 //--Autogenerated -- end of section automatically generated from Scintilla.iface #endif diff --git a/contrib/src/stc/scintilla/include/Scintilla.h b/contrib/src/stc/scintilla/include/Scintilla.h index 30fcf50fc4..c377d07cc2 100644 --- a/contrib/src/stc/scintilla/include/Scintilla.h +++ b/contrib/src/stc/scintilla/include/Scintilla.h @@ -2,7 +2,7 @@ /** @file Scintilla.h ** Interface to the edit control. **/ -// Copyright 1998-2002 by Neil Hodgson +// Copyright 1998-2003 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. // Most of this file is automatically generated from the Scintilla.iface interface definition @@ -83,6 +83,7 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, #define SCI_SETTABWIDTH 2036 #define SCI_GETTABWIDTH 2121 #define SC_CP_UTF8 65001 +#define SC_CP_DBCS 1 #define SCI_SETCODEPAGE 2037 #define SCI_SETUSEPALETTE 2039 #define MARKER_MAX 31 @@ -111,6 +112,7 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, #define SC_MARK_BACKGROUND 22 #define SC_MARK_DOTDOTDOT 23 #define SC_MARK_ARROWS 24 +#define SC_MARK_PIXMAP 25 #define SC_MARK_CHARACTER 10000 #define SC_MARKNUM_FOLDEREND 25 #define SC_MARKNUM_FOLDEROPENMID 26 @@ -129,6 +131,7 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, #define SCI_MARKERGET 2046 #define SCI_MARKERNEXT 2047 #define SCI_MARKERPREVIOUS 2048 +#define SCI_MARKERDEFINEPIXMAP 2049 #define SC_MARGIN_SYMBOL 0 #define SC_MARGIN_NUMBER 1 #define SCI_SETMARGINTYPEN 2240 @@ -181,6 +184,7 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, #define SC_CASE_LOWER 2 #define SCI_STYLESETCASE 2060 #define SCI_STYLESETCHARACTERSET 2066 +#define SCI_STYLESETHOTSPOT 2409 #define SCI_SETSELFORE 2067 #define SCI_SETSELBACK 2068 #define SCI_SETCARETFORE 2069 @@ -241,6 +245,10 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, #define SCI_AUTOCGETAUTOHIDE 2119 #define SCI_AUTOCSETDROPRESTOFWORD 2270 #define SCI_AUTOCGETDROPRESTOFWORD 2271 +#define SCI_REGISTERIMAGE 2405 +#define SCI_CLEARREGISTEREDIMAGES 2408 +#define SCI_AUTOCGETTYPESEPARATOR 2285 +#define SCI_AUTOCSETTYPESEPARATOR 2286 #define SCI_SETINDENT 2122 #define SCI_GETINDENT 2123 #define SCI_SETUSETABS 2124 @@ -278,6 +286,7 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, #define SCFIND_MATCHCASE 4 #define SCFIND_WORDSTART 0x00100000 #define SCFIND_REGEXP 0x00200000 +#define SCFIND_POSIX 0x00400000 #define SCI_FINDTEXT 2150 #define SCI_FORMATRANGE 2151 #define SCI_GETFIRSTVISIBLELINE 2152 @@ -333,11 +342,17 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, #define SCI_CALLTIPPOSSTART 2203 #define SCI_CALLTIPSETHLT 2204 #define SCI_CALLTIPSETBACK 2205 +#define SCI_CALLTIPSETFORE 2206 +#define SCI_CALLTIPSETFOREHLT 2207 #define SCI_VISIBLEFROMDOCLINE 2220 #define SCI_DOCLINEFROMVISIBLE 2221 #define SC_FOLDLEVELBASE 0x400 #define SC_FOLDLEVELWHITEFLAG 0x1000 #define SC_FOLDLEVELHEADERFLAG 0x2000 +#define SC_FOLDLEVELBOXHEADERFLAG 0x4000 +#define SC_FOLDLEVELBOXFOOTERFLAG 0x8000 +#define SC_FOLDLEVELCONTRACTED 0x10000 +#define SC_FOLDLEVELUNINDENT 0x20000 #define SC_FOLDLEVELNUMBERMASK 0x0FFF #define SCI_SETFOLDLEVEL 2222 #define SCI_GETFOLDLEVEL 2223 @@ -350,6 +365,12 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, #define SCI_GETFOLDEXPANDED 2230 #define SCI_TOGGLEFOLD 2231 #define SCI_ENSUREVISIBLE 2232 +#define SC_FOLDFLAG_LINEBEFORE_EXPANDED 0x0002 +#define SC_FOLDFLAG_LINEBEFORE_CONTRACTED 0x0004 +#define SC_FOLDFLAG_LINEAFTER_EXPANDED 0x0008 +#define SC_FOLDFLAG_LINEAFTER_CONTRACTED 0x0010 +#define SC_FOLDFLAG_LEVELNUMBERS 0x0040 +#define SC_FOLDFLAG_BOX 0x0001 #define SCI_SETFOLDFLAGS 2233 #define SCI_ENSUREVISIBLEENFORCEPOLICY 2234 #define SCI_SETTABINDENTS 2260 @@ -377,6 +398,16 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, #define SCI_SETENDATLASTLINE 2277 #define SCI_GETENDATLASTLINE 2278 #define SCI_TEXTHEIGHT 2279 +#define SCI_SETVSCROLLBAR 2280 +#define SCI_GETVSCROLLBAR 2281 +#define SCI_APPENDTEXT 2282 +#define SCI_GETTWOPHASEDRAW 2283 +#define SCI_SETTWOPHASEDRAW 2284 +#define SCI_TARGETFROMSELECTION 2287 +#define SCI_LINESJOIN 2288 +#define SCI_LINESSPLIT 2289 +#define SCI_SETFOLDMARGINCOLOUR 2290 +#define SCI_SETFOLDMARGINHICOLOUR 2291 #define SCI_LINEDOWN 2300 #define SCI_LINEDOWNEXTEND 2301 #define SCI_LINEUP 2302 @@ -417,6 +448,7 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, #define SCI_LINECUT 2337 #define SCI_LINEDELETE 2338 #define SCI_LINETRANSPOSE 2339 +#define SCI_LINEDUPLICATE 2404 #define SCI_LOWERCASE 2340 #define SCI_UPPERCASE 2341 #define SCI_LINESCROLLDOWN 2342 @@ -426,6 +458,12 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, #define SCI_HOMEDISPLAYEXTEND 2346 #define SCI_LINEENDDISPLAY 2347 #define SCI_LINEENDDISPLAYEXTEND 2348 +#define SCI_HOMEWRAP 2349 +#define SCI_HOMEWRAPEXTEND 2450 +#define SCI_LINEENDWRAP 2451 +#define SCI_LINEENDWRAPEXTEND 2452 +#define SCI_VCHOMEWRAP 2453 +#define SCI_VCHOMEWRAPEXTEND 2454 #define SCI_MOVECARETINSIDEVIEW 2401 #define SCI_LINELENGTH 2350 #define SCI_BRACEHIGHLIGHT 2351 @@ -464,7 +502,7 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, #define SCI_SETMOUSEDOWNCAPTURES 2384 #define SCI_GETMOUSEDOWNCAPTURES 2385 #define SC_CURSORNORMAL -1 -#define SC_CURSORWAIT 3 +#define SC_CURSORWAIT 4 #define SCI_SETCURSOR 2386 #define SCI_GETCURSOR 2387 #define SCI_SETCONTROLCHARSYMBOL 2388 @@ -480,6 +518,7 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, #define SCI_DELLINERIGHT 2396 #define SCI_SETXOFFSET 2397 #define SCI_GETXOFFSET 2398 +#define SCI_CHOOSECARETX 2399 #define SCI_GRABFOCUS 2400 #define CARET_SLOP 0x01 #define CARET_STRICT 0x04 @@ -487,6 +526,15 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, #define CARET_EVEN 0x08 #define SCI_SETXCARETPOLICY 2402 #define SCI_SETYCARETPOLICY 2403 +#define SCI_SETPRINTWRAPMODE 2406 +#define SCI_GETPRINTWRAPMODE 2407 +#define SCI_SETHOTSPOTACTIVEFORE 2410 +#define SCI_SETHOTSPOTACTIVEBACK 2411 +#define SCI_SETHOTSPOTACTIVEUNDERLINE 2412 +#define SCI_PARADOWN 2413 +#define SCI_PARADOWNEXTEND 2414 +#define SCI_PARAUP 2415 +#define SCI_PARAUPEXTEND 2416 #define SCI_STARTRECORD 3001 #define SCI_STOPRECORD 3002 #define SCI_SETLEXER 4001 @@ -495,6 +543,7 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, #define SCI_SETPROPERTY 4004 #define SCI_SETKEYWORDS 4005 #define SCI_SETLEXERLANGUAGE 4006 +#define SCI_LOADLEXERLIBRARY 4007 #define SC_MOD_INSERTTEXT 0x1 #define SC_MOD_DELETETEXT 0x2 #define SC_MOD_CHANGESTYLE 0x4 @@ -548,6 +597,9 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, #define SCN_DWELLSTART 2016 #define SCN_DWELLEND 2017 #define SCN_ZOOM 2018 +#define SCN_HOTSPOTCLICK 2019 +#define SCN_HOTSPOTDOUBLECLICK 2020 +#define SCN_CALLTIPCLICK 2021 //--Autogenerated -- end of section automatically generated from Scintilla.iface // These structures are defined to be exactly the same shape as the Win32 diff --git a/contrib/src/stc/scintilla/include/Scintilla.iface b/contrib/src/stc/scintilla/include/Scintilla.iface index 776fe8f2b7..c5dacbdf04 100644 --- a/contrib/src/stc/scintilla/include/Scintilla.iface +++ b/contrib/src/stc/scintilla/include/Scintilla.iface @@ -221,6 +221,9 @@ get int GetTabWidth=2121(,) # This is the same value as CP_UTF8 in Windows val SC_CP_UTF8=65001 +# The SC_CP_DBCS value can be used to indicate a DBCS mode for GTK+. +val SC_CP_DBCS=1 + # Set the code page used to interpret the bytes of the document as characters. # The SC_CP_UTF8 value can be used to enter Unicode mode. set void SetCodePage=2037(int codePage,) @@ -260,6 +263,7 @@ val SC_MARK_CIRCLEMINUSCONNECTED=21 val SC_MARK_BACKGROUND=22 val SC_MARK_DOTDOTDOT=23 val SC_MARK_ARROWS=24 +val SC_MARK_PIXMAP=25 val SC_MARK_CHARACTER=10000 @@ -302,6 +306,9 @@ fun int MarkerNext=2047(int lineStart, int markerMask) # Find the previous line before lineStart that includes a marker in mask. fun int MarkerPrevious=2048(int lineStart, int markerMask) +# Define a marker from a pixmap. +fun void MarkerDefinePixmap=2049(int markerNumber, string pixmap) + enu MarginType=SC_MARGIN_ val SC_MARGIN_SYMBOL=0 val SC_MARGIN_NUMBER=1 @@ -405,6 +412,9 @@ set void StyleSetCase=2060(int style, int caseForce) # Set the character set of the font in a style. set void StyleSetCharacterSet=2066(int style, int characterSet) +# Set a style to be a hotspot or not. +set void StyleSetHotSpot=2409(int style, bool hotspot) + # Set the foreground colour of the selection and whether to use this setting. fun void SetSelFore=2067(bool useSetting, colour fore) @@ -578,6 +588,19 @@ set void AutoCSetDropRestOfWord=2270(bool dropRestOfWord,) # after the inserted text upon completion. get bool AutoCGetDropRestOfWord=2271(,) +# Register an XPM image for use in autocompletion lists. +fun void RegisterImage=2405(int type, string xpmData) + +# Clear all the registered XPM images. +fun void ClearRegisteredImages=2408(,) + +# Retrieve the auto-completion list type-separator character. +get int AutoCGetTypeSeparator=2285(,) + +# Change the type-separator character in the string setting up an auto-completion list. +# Default is '?' but can be changed if items contain '?'. +set void AutoCSetTypeSeparator=2286(int separatorCharacter,) + # Set the number of spaces used for one level of indentation. set void SetIndent=2122(int indentSize,) @@ -681,6 +704,7 @@ val SCFIND_WHOLEWORD=2 val SCFIND_MATCHCASE=4 val SCFIND_WORDSTART=0x00100000 val SCFIND_REGEXP=0x00200000 +val SCFIND_POSIX=0x00400000 # Find some text in the document. fun position FindText=2150(int flags, findtext ft) @@ -688,7 +712,7 @@ fun position FindText=2150(int flags, findtext ft) # On Windows, will draw the document into a display context such as a printer. fun void FormatRange=2151(bool draw, formatrange fr) -# Retrieve the line at the top of the display. +# Retrieve the display line at the top of the display. get int GetFirstVisibleLine=2152(,) # Retrieve the contents of a line. @@ -863,6 +887,12 @@ fun void CallTipSetHlt=2204(int start, int end) # Set the background colour for the call tip. set void CallTipSetBack=2205(colour back,) +# Set the foreground colour for the call tip. +set void CallTipSetFore=2206(colour fore,) + +# Set the foreground colour for the highlighted part of the call tip. +set void CallTipSetForeHlt=2207(colour fore,) + # Find the display line of a document line taking hidden lines into account. fun int VisibleFromDocLine=2220(int line,) @@ -873,6 +903,10 @@ enu FoldLevel=SC_FOLDLEVEL val SC_FOLDLEVELBASE=0x400 val SC_FOLDLEVELWHITEFLAG=0x1000 val SC_FOLDLEVELHEADERFLAG=0x2000 +val SC_FOLDLEVELBOXHEADERFLAG=0x4000 +val SC_FOLDLEVELBOXFOOTERFLAG=0x8000 +val SC_FOLDLEVELCONTRACTED=0x10000 +val SC_FOLDLEVELUNINDENT=0x20000 val SC_FOLDLEVELNUMBERMASK=0x0FFF # Set the fold level of a line. @@ -910,7 +944,15 @@ fun void ToggleFold=2231(int line,) # Ensure a particular line is visible by expanding any header line hiding it. fun void EnsureVisible=2232(int line,) -# Set some debugging options for folding. +enu FoldFlag=SC_FOLDFLAG_ +val SC_FOLDFLAG_LINEBEFORE_EXPANDED=0x0002 +val SC_FOLDFLAG_LINEBEFORE_CONTRACTED=0x0004 +val SC_FOLDFLAG_LINEAFTER_EXPANDED=0x0008 +val SC_FOLDFLAG_LINEAFTER_CONTRACTED=0x0010 +val SC_FOLDFLAG_LEVELNUMBERS=0x0040 +val SC_FOLDFLAG_BOX=0x0001 + +# Set some style options for folding. fun void SetFoldFlags=2233(int flags,) # Ensure a particular line is visible by expanding any header line hiding it. @@ -988,6 +1030,38 @@ get int GetEndAtLastLine=2278(,) # Retrieve the height of a particular line of text in pixels. fun int TextHeight=2279(int line,) +# Show or hide the vertical scroll bar. +set void SetVScrollBar=2280(bool show,) + +# Is the vertical scroll bar visible? +get bool GetVScrollBar=2281(,) + +# Append a string to the end of the document without changing the selection. +fun void AppendText=2282(int length, string text) + +# Is drawing done in two phases with backgrounds drawn before foregrounds? +get bool GetTwoPhaseDraw=2283(,) + +# In twoPhaseDraw mode, drawing is performed in two phases, first the background +# and then the foreground. This avoids chopping off characters that overlap the next run. +set void SetTwoPhaseDraw=2284(bool twoPhase,) + +# Make the target range start and end be the same as the selection range start and end. +fun void TargetFromSelection=2287(,) + +# Join the lines in the target. +fun void LinesJoin=2288(,) + +# Split the lines in the target into lines that are less wide than pixelWidth +# where possible. +fun void LinesSplit=2289(int pixelWidth,) + +# Set the colours used as a chequerboard pattern in the fold margin +fun void SetFoldMarginColour=2290(bool useSetting, colour back) +fun void SetFoldMarginHiColour=2291(bool useSetting, colour fore) + +## New messages go here + ## Start of key messages # Move caret down one line. fun void LineDown=2300(,) @@ -1111,6 +1185,9 @@ fun void LineDelete=2338(,) # Switch the current line with the previous. fun void LineTranspose=2339(,) +# Duplicate the current line. +fun void LineDuplicate=2404(,) + # Transform the selection to lower case. fun void LowerCase=2340(,) @@ -1130,17 +1207,30 @@ fun void DeleteBackNotLine=2344(,) # Move caret to first position on display line. fun void HomeDisplay=2345(,) -# Move caret to first position on display line extending selection to +# Move caret to first position on display line extending selection to # new caret position. fun void HomeDisplayExtend=2346(,) # Move caret to last position on display line. fun void LineEndDisplay=2347(,) -# Move caret to last position on display line extending selection to new +# Move caret to last position on display line extending selection to new # caret position. fun void LineEndDisplayExtend=2348(,) +# These are like their namesakes Home(Extend)?, LineEnd(Extend)?, VCHome(Extend)? +# except they behave differently when word-wrap is enabled: +# They go first to the start / end of the display line, like (Home|LineEnd)Display +# The difference is that, the cursor is already at the point, it goes on to the start +# or end of the document line, as appropriate for (Home|LineEnd|VCHome)Extend. + +fun void HomeWrap=2349(,) +fun void HomeWrapExtend=2450(,) +fun void LineEndWrap=2451(,) +fun void LineEndWrapExtend=2452(,) +fun void VCHomeWrap=2453(,) +fun void VCHomeWrapExtend=2454(,) + # Move the caret inside current view if it's not there already. fun void MoveCaretInsideView=2401(,) @@ -1251,7 +1341,7 @@ get bool GetMouseDownCaptures=2385(,) enu CursorShape=SC_CURSOR val SC_CURSORNORMAL=-1 -val SC_CURSORWAIT=3 +val SC_CURSORWAIT=4 # Sets the cursor to one of the SC_CURSOR* values. set void SetCursor=2386(int cursorType,) # Get cursor type. @@ -1291,6 +1381,9 @@ fun void DelLineRight=2396(,) set void SetXOffset=2397(int newOffset,) get int GetXOffset=2398(,) +# Set the last x chosen value to be the caret x position +fun void ChooseCaretX=2399(,) + # Set the focus to this Scintilla widget. # GTK+ Specific. fun void GrabFocus=2400(,) @@ -1327,6 +1420,27 @@ fun void SetXCaretPolicy=2402(int caretPolicy, int caretSlop) # The exclusion zone is given in lines. fun void SetYCaretPolicy=2403(int caretPolicy, int caretSlop) +# Set printing to line wrapped (SC_WRAP_WORD) or not line wrapped (SC_WRAP_NONE). +set void SetPrintWrapMode=2406(int mode,) + +# Is printing line wrapped. +get int GetPrintWrapMode=2407(,) + +# Set a fore colour for active hotspots. +set void SetHotspotActiveFore=2410(bool useSetting, colour fore) + +# Set a back colour for active hotspots. +set void SetHotspotActiveBack=2411(bool useSetting, colour back) + +# Enable / Disable underlining active hotspots. +set void SetHotspotActiveUnderline=2412(bool underline,) + +# Move caret between paragraphs (delimited by empty lines) +fun void ParaDown=2413(,) +fun void ParaDownExtend=2414(,) +fun void ParaUp=2415(,) +fun void ParaUpExtend=2416(,) + # Start notifying the container of all key presses and commands. fun void StartRecord=3001(,) @@ -1351,6 +1465,10 @@ set void SetKeyWords=4005(int keywordSet, string keyWords) # Set the lexing language of the document based on string name. set void SetLexerLanguage=4006(, string language) +# Load a lexer library (dll / so) +# NOT YET IMPLEMENTED +fun void LoadLexerLibrary=4007(, string path) + # Notifications # Type of modification and the action which caused the modification. # These are defined as a bit mask to make it easy to specify which notifications are wanted. @@ -1442,6 +1560,12 @@ val SCLEX_PHP=30 val SCLEX_BAAN=31 val SCLEX_MATLAB=32 val SCLEX_SCRIPTOL=33 +val SCLEX_ASM=34 +val SCLEX_CPPNOCASE=35 +val SCLEX_FORTRAN=36 +val SCLEX_F77=37 +val SCLEX_CSS=38 +val SCLEX_POV=39 # When a lexer specifies its language as SCLEX_AUTOMATIC it receives a # value assigned in sequence from SCLEX_AUTOMATIC+1. @@ -1708,6 +1832,9 @@ val SCE_ERR_DIFF_CHANGED=10 val SCE_ERR_DIFF_ADDITION=11 val SCE_ERR_DIFF_DELETION=12 val SCE_ERR_DIFF_MESSAGE=13 +val SCE_ERR_PHP=14 +val SCE_ERR_ELF=15 +val SCE_ERR_IFC=16 # Lexical states for SCLEX_BATCH lex Batch=SCLEX_BATCH SCE_BAT_ val SCE_BAT_DEFAULT=0 @@ -1754,24 +1881,31 @@ val SCE_AVE_DEFAULT=0 val SCE_AVE_COMMENT=1 val SCE_AVE_NUMBER=2 val SCE_AVE_WORD=3 -val SCE_AVE_KEYWORD=4 -val SCE_AVE_STATEMENT=5 val SCE_AVE_STRING=6 val SCE_AVE_ENUM=7 val SCE_AVE_STRINGEOL=8 val SCE_AVE_IDENTIFIER=9 val SCE_AVE_OPERATOR=10 +val SCE_AVE_WORD1=11 +val SCE_AVE_WORD2=12 +val SCE_AVE_WORD3=13 +val SCE_AVE_WORD4=14 +val SCE_AVE_WORD5=15 +val SCE_AVE_WORD6=16 # Lexical states for SCLEX_ADA lex Ada=SCLEX_ADA SCE_ADA_ val SCE_ADA_DEFAULT=0 -val SCE_ADA_COMMENT=1 -val SCE_ADA_NUMBER=2 -val SCE_ADA_WORD=3 -val SCE_ADA_STRING=4 +val SCE_ADA_WORD=1 +val SCE_ADA_IDENTIFIER=2 +val SCE_ADA_NUMBER=3 +val SCE_ADA_DELIMITER=4 val SCE_ADA_CHARACTER=5 -val SCE_ADA_OPERATOR=6 -val SCE_ADA_IDENTIFIER=7 +val SCE_ADA_CHARACTEREOL=6 +val SCE_ADA_STRING=7 val SCE_ADA_STRINGEOL=8 +val SCE_ADA_LABEL=9 +val SCE_ADA_COMMENTLINE=10 +val SCE_ADA_ILLEGAL=11 # Lexical states for SCLEX_BAAN lex Baan=SCLEX_BAAN SCE_BAAN_ val SCE_BAAN_DEFAULT=0 @@ -1852,7 +1986,67 @@ val SCE_SCRIPTOL_WORD2=16 val SCE_SCRIPTOL_COMMENTDOCKEYWORD=17 val SCE_SCRIPTOL_COMMENTDOCKEYWORDERROR=18 val SCE_SCRIPTOL_COMMENTBASIC=19 - +# Lexical states for SCLEX_ASM +lex Asm=SCLEX_ASM SCE_ASM_ +val SCE_ASM_DEFAULT=0 +val SCE_ASM_COMMENT=1 +val SCE_ASM_NUMBER=2 +val SCE_ASM_STRING=3 +val SCE_ASM_OPERATOR=4 +val SCE_ASM_IDENTIFIER=5 +val SCE_ASM_CPUINSTRUCTION=6 +val SCE_ASM_MATHINSTRUCTION=7 +val SCE_ASM_REGISTER=8 +val SCE_ASM_DIRECTIVE=9 +val SCE_ASM_DIRECTIVEOPERAND=10 +# Lexical states for SCLEX_FORTRAN +lex Fortran=SCLEX_FORTRAN SCE_F_ +lex F77=SCLEX_F77 SCE_F_ +val SCE_F_DEFAULT=0 +val SCE_F_COMMENT=1 +val SCE_F_NUMBER=2 +val SCE_F_STRING1=3 +val SCE_F_STRING2=4 +val SCE_F_STRINGEOL=5 +val SCE_F_OPERATOR=6 +val SCE_F_IDENTIFIER=7 +val SCE_F_WORD=8 +val SCE_F_WORD2=9 +val SCE_F_WORD3=10 +val SCE_F_PREPROCESSOR=11 +val SCE_F_OPERATOR2=12 +val SCE_F_LABEL=13 +val SCE_F_CONTINUATION=14 +# Lexical states for SCLEX_CSS +lex CSS=SCLEX_CSS SCE_CSS_ +val SCE_CSS_DEFAULT=0 +val SCE_CSS_TAG=1 +val SCE_CSS_CLASS=2 +val SCE_CSS_PSEUDOCLASS=3 +val SCE_CSS_UNKNOWN_PSEUDOCLASS=4 +val SCE_CSS_OPERATOR=5 +val SCE_CSS_IDENTIFIER=6 +val SCE_CSS_UNKNOWN_IDENTIFIER=7 +val SCE_CSS_VALUE=8 +val SCE_CSS_COMMENT=9 +val SCE_CSS_ID=10 +val SCE_CSS_IMPORTANT=11 +val SCE_CSS_DIRECTIVE=12 +val SCE_CSS_DOUBLESTRING=13 +val SCE_CSS_SINGLESTRING=14 +# Lexical states for SCLEX_POV +lex POV=SCLEX_POV SCE_POV_ +val SCE_POV_DEFAULT=0 +val SCE_POV_COMMENT=1 +val SCE_POV_COMMENTLINE=2 +val SCE_POV_COMMENTDOC=3 +val SCE_POV_NUMBER=4 +val SCE_POV_WORD=5 +val SCE_POV_STRING=6 +val SCE_POV_OPERATOR=7 +val SCE_POV_IDENTIFIER=8 +val SCE_POV_BRACE=9 +val SCE_POV_WORD2=10 # Events evt void StyleNeeded=2000(int position) @@ -1874,6 +2068,9 @@ evt void URIDropped=2015(string text) evt void DwellStart=2016(int position) evt void DwellEnd=2017(int position) evt void Zoom=2018(void) +evt void HotSpotClick=2019(int modifiers, int position) +evt void HotSpotDoubleClick=2020(int modifiers, int position) +evt void CallTipClick=2021(int position) cat Deprecated diff --git a/contrib/src/stc/scintilla/include/ScintillaWidget.h b/contrib/src/stc/scintilla/include/ScintillaWidget.h index 203f357339..765fd8594d 100644 --- a/contrib/src/stc/scintilla/include/ScintillaWidget.h +++ b/contrib/src/stc/scintilla/include/ScintillaWidget.h @@ -37,7 +37,8 @@ struct _ScintillaClass { guint scintilla_get_type (void); GtkWidget* scintilla_new (void); void scintilla_set_id (ScintillaObject *sci,int id); -sptr_t scintilla_send_message (ScintillaObject *sci,unsigned int iMessage, uptr_t wParam, sptr_t lParam); +sptr_t scintilla_send_message (ScintillaObject *sci,unsigned int iMessage, uptr_t wParam, sptr_t lParam); +void scintilla_release_resources(void); #if GTK_MAJOR_VERSION < 2 #define SCINTILLA_NOTIFY "notify" diff --git a/contrib/src/stc/scintilla/include/WindowAccessor.h b/contrib/src/stc/scintilla/include/WindowAccessor.h index 6c16b150f2..4324605017 100644 --- a/contrib/src/stc/scintilla/include/WindowAccessor.h +++ b/contrib/src/stc/scintilla/include/WindowAccessor.h @@ -26,8 +26,8 @@ protected: bool InternalIsLeadByte(char ch); void Fill(int position); public: - WindowAccessor(WindowID id_, PropSet &props_) : - Accessor(), id(id_), props(props_), + WindowAccessor(WindowID id_, PropSet &props_) : + Accessor(), id(id_), props(props_), lenDoc(-1), validLen(0), chFlags(0), chWhile(0) { } ~WindowAccessor(); @@ -40,8 +40,8 @@ public: void Flush(); int GetLineState(int line); int SetLineState(int line, int state); - int GetPropertyInt(const char *key, int defaultValue=0) { - return props.GetInt(key, defaultValue); + int GetPropertyInt(const char *key, int defaultValue=0) { + return props.GetInt(key, defaultValue); } char *GetProperties() { return props.ToString(); diff --git a/contrib/src/stc/scintilla/src/AutoComplete.cxx b/contrib/src/stc/scintilla/src/AutoComplete.cxx index d971fa12a0..adbd24d038 100644 --- a/contrib/src/stc/scintilla/src/AutoComplete.cxx +++ b/contrib/src/stc/scintilla/src/AutoComplete.cxx @@ -2,7 +2,7 @@ /** @file AutoComplete.cxx ** Defines the auto completion list box. **/ -// Copyright 1998-2002 by Neil Hodgson +// Copyright 1998-2003 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include @@ -14,33 +14,42 @@ #include "PropSet.h" #include "AutoComplete.h" -AutoComplete::AutoComplete() : +AutoComplete::AutoComplete() : active(false), separator(' '), + typesep('?'), ignoreCase(false), chooseSingle(false), + lb(0), posStart(0), startLen(0), cancelAtStartPos(true), autoHide(true), dropRestOfWord(false) { + lb = ListBox::Allocate(); stopChars[0] = '\0'; fillUpChars[0] = '\0'; } AutoComplete::~AutoComplete() { - lb.Destroy(); + if (lb) { + lb->Destroy(); + delete lb; + lb = 0; + } } bool AutoComplete::Active() { return active; } -void AutoComplete::Start(Window &parent, int ctrlID, int position, int startLen_) { - if (!lb.Created()) { - lb.Create(parent, ctrlID); +void AutoComplete::Start(Window &parent, int ctrlID, int position, + int startLen_, int lineHeight, bool unicodeMode) { + if (active) { + Cancel(); } - lb.Clear(); + lb->Create(parent, ctrlID, lineHeight, unicodeMode); + lb->Clear(); active = true; startLen = startLen_; posStart = position; @@ -63,7 +72,7 @@ void AutoComplete::SetFillUpChars(const char *fillUpChars_) { bool AutoComplete::IsFillUpChar(char ch) { return ch && strchr(fillUpChars, ch); } - + void AutoComplete::SetSeparator(char separator_) { separator = separator_; } @@ -72,49 +81,65 @@ char AutoComplete::GetSeparator() { return separator; } +void AutoComplete::SetTypesep(char separator_) { + typesep = separator_; +} + +char AutoComplete::GetTypesep() { + return typesep; +} + void AutoComplete::SetList(const char *list) { - lb.Clear(); + lb->Clear(); char *words = new char[strlen(list) + 1]; if (words) { strcpy(words, list); char *startword = words; + char *numword = NULL; int i = 0; for (; words && words[i]; i++) { if (words[i] == separator) { words[i] = '\0'; - lb.Append(startword); + if (numword) + *numword = '\0'; + lb->Append(startword, numword?atoi(numword + 1):-1); startword = words + i + 1; + numword = NULL; + } else if (words[i] == typesep) { + numword = words + i; } } if (startword) { - lb.Append(startword); + if (numword) + *numword = '\0'; + lb->Append(startword, numword?atoi(numword + 1):-1); } delete []words; } } void AutoComplete::Show() { - lb.Show(); - lb.Select(0); + lb->Show(); + lb->Select(0); } void AutoComplete::Cancel() { - if (lb.Created()) { - lb.Destroy(); + if (lb->Created()) { + lb->Destroy(); active = false; } } void AutoComplete::Move(int delta) { - int count = lb.Length(); - int current = lb.GetSelection(); + int count = lb->Length(); + int current = lb->GetSelection(); current += delta; if (current >= count) current = count - 1; if (current < 0) current = 0; - lb.Select(current); + lb->Select(current); } void AutoComplete::Select(const char *word) { @@ -123,10 +148,10 @@ void AutoComplete::Select(const char *word) { const int maxItemLen=1000; char item[maxItemLen]; int start = 0; // lower bound of the api array block to search - int end = lb.Length() - 1; // upper bound of the api array block to search + int end = lb->Length() - 1; // upper bound of the api array block to search while ((start <= end) && (location == -1)) { // Binary searching loop int pivot = (start + end) / 2; - lb.GetValue(pivot, item, maxItemLen); + lb->GetValue(pivot, item, maxItemLen); int cond; if (ignoreCase) cond = CompareNCaseInsensitive(word, item, lenWord); @@ -135,7 +160,7 @@ void AutoComplete::Select(const char *word) { if (!cond) { // Find first match while (pivot > start) { - lb.GetValue(pivot-1, item, maxItemLen); + lb->GetValue(pivot-1, item, maxItemLen); if (ignoreCase) cond = CompareNCaseInsensitive(word, item, lenWord); else @@ -154,6 +179,6 @@ void AutoComplete::Select(const char *word) { if (location == -1 && autoHide) Cancel(); else - lb.Select(location); + lb->Select(location); } diff --git a/contrib/src/stc/scintilla/src/AutoComplete.h b/contrib/src/stc/scintilla/src/AutoComplete.h index 622a5666ec..981fb44c06 100644 --- a/contrib/src/stc/scintilla/src/AutoComplete.h +++ b/contrib/src/stc/scintilla/src/AutoComplete.h @@ -2,7 +2,7 @@ /** @file AutoComplete.h ** Defines the auto completion list box. **/ -// Copyright 1998-2002 by Neil Hodgson +// Copyright 1998-2003 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef AUTOCOMPLETE_H @@ -15,11 +15,12 @@ class AutoComplete { char stopChars[256]; char fillUpChars[256]; char separator; + char typesep; // Type seperator public: bool ignoreCase; bool chooseSingle; - ListBox lb; + ListBox *lb; int posStart; int startLen; /// Should autocompletion be canceled if editor's currentPos <= startPos? @@ -34,7 +35,8 @@ public: bool Active(); /// Display the auto completion list positioned to be near a character position - void Start(Window &parent, int ctrlID, int position, int startLen_); + void Start(Window &parent, int ctrlID, int position, + int startLen_, int lineHeight, bool unicodeMode); /// The stop chars are characters which, when typed, cause the auto completion list to disappear void SetStopChars(const char *stopChars_); @@ -48,6 +50,10 @@ public: void SetSeparator(char separator_); char GetSeparator(); + /// The typesep character is used for seperating the word from the type + void SetTypesep(char separator_); + char GetTypesep(); + /// The list string contains a sequence of words separated by the separator character void SetList(const char *list); diff --git a/contrib/src/stc/scintilla/src/CallTip.cxx b/contrib/src/stc/scintilla/src/CallTip.cxx index d67173b084..314f9bfa71 100644 --- a/contrib/src/stc/scintilla/src/CallTip.cxx +++ b/contrib/src/stc/scintilla/src/CallTip.cxx @@ -18,6 +18,9 @@ CallTip::CallTip() { inCallTipMode = false; posStartCallTip = 0; val = 0; + xUp = -100; + xDown = -100; + lineHeight = 1; startHighlight = 0; endHighlight = 0; @@ -35,6 +38,8 @@ CallTip::~CallTip() { val = 0; } +const int widthArrow = 14; + void CallTip::RefreshColourPalette(Palette &pal, bool want) { pal.WantFind(colourBG, want); pal.WantFind(colourUnSel, want); @@ -43,24 +48,98 @@ void CallTip::RefreshColourPalette(Palette &pal, bool want) { pal.WantFind(colourLight, want); } -void CallTip::PaintCT(Surface *surfaceWindow) { - if (!val) - return ; +void CallTip::DrawChunk(Surface *surface, int &x, const char *s, + int posStart, int posEnd, int ytext, PRectangle rcClient, + bool highlight, bool draw) { + s += posStart; + int len = posEnd - posStart; + int maxEnd = 0; + int ends[10]; + for (int i=0;i 0) + ends[maxEnd++] = i; + ends[maxEnd++] = i+1; + } + } + ends[maxEnd++] = len; + int startSeg = 0; + int xEnd; + for (int seg = 0; seg startSeg) { + if (s[startSeg] <= '\002') { + xEnd = x + widthArrow; + offsetMain = xEnd; + if (draw) { + const int halfWidth = widthArrow / 2 - 3; + const int centreX = x + widthArrow / 2 - 1; + const int centreY = (rcClient.top + rcClient.bottom) / 2; + rcClient.left = x; + rcClient.right = xEnd; + surface->FillRectangle(rcClient, colourBG.allocated); + PRectangle rcClientInner(rcClient.left+1, rcClient.top+1, rcClient.right-2, rcClient.bottom-1); + surface->FillRectangle(rcClientInner, colourUnSel.allocated); + + if (s[startSeg] == '\001') { + // Up arrow + Point pts[] = { + Point(centreX - halfWidth, centreY + halfWidth / 2), + Point(centreX + halfWidth, centreY + halfWidth / 2), + Point(centreX, centreY - halfWidth + halfWidth / 2), + }; + surface->Polygon(pts, sizeof(pts) / sizeof(pts[0]), + colourBG.allocated, colourBG.allocated); + } else { + // Down arrow + Point pts[] = { + Point(centreX - halfWidth, centreY - halfWidth / 2), + Point(centreX + halfWidth, centreY - halfWidth / 2), + Point(centreX, centreY + halfWidth - halfWidth / 2), + }; + surface->Polygon(pts, sizeof(pts) / sizeof(pts[0]), + colourBG.allocated, colourBG.allocated); + } + } else { + if (s[startSeg] == '\001') { + xUp = x+1; + } else { + xDown = x+1; + } + } + } else { + xEnd = x + surface->WidthText(font, s+startSeg, endSeg - startSeg); + if (draw) { + rcClient.left = x; + rcClient.right = xEnd; + surface->DrawTextNoClip(rcClient, font, ytext, + s+startSeg, endSeg - startSeg, + highlight ? colourSel.allocated : colourUnSel.allocated, + colourBG.allocated); + } + } + x = xEnd; + startSeg = endSeg; + } + } +} + +int CallTip::PaintContents(Surface *surfaceWindow, bool draw) { PRectangle rcClientPos = wCallTip.GetClientPosition(); PRectangle rcClientSize(0, 0, rcClientPos.right - rcClientPos.left, rcClientPos.bottom - rcClientPos.top); PRectangle rcClient(1, 1, rcClientSize.right - 1, rcClientSize.bottom - 1); - surfaceWindow->FillRectangle(rcClient, colourBG.allocated); // To make a nice small call tip window, it is only sized to fit most normal characters without accents - int lineHeight = surfaceWindow->Height(font); int ascent = surfaceWindow->Ascent(font) - surfaceWindow->InternalLeading(font); // For each line... // Draw the definition in three parts: before highlight, highlighted, after highlight int ytext = rcClient.top + ascent + 1; + rcClient.bottom = ytext + surfaceWindow->Descent(font) + 1; char *chunkVal = val; bool moreChunks = true; + int maxWidth = 0; while (moreChunks) { char *chunkEnd = strchr(chunkVal, '\n'); if (chunkEnd == NULL) { @@ -76,36 +155,38 @@ void CallTip::PaintCT(Surface *surfaceWindow) { int thisEndHighlight = Platform::Maximum(endHighlight, chunkOffset); thisEndHighlight = Platform::Minimum(thisEndHighlight, chunkEndOffset); thisEndHighlight -= chunkOffset; - int x = 5; - int xEnd = x + surfaceWindow->WidthText(font, chunkVal, thisStartHighlight); - rcClient.left = x; rcClient.top = ytext - ascent - 1; - rcClient.right = xEnd; - surfaceWindow->DrawTextNoClip(rcClient, font, ytext, - chunkVal, thisStartHighlight, - colourUnSel.allocated, colourBG.allocated); - x = xEnd; - xEnd = x + surfaceWindow->WidthText(font, chunkVal + thisStartHighlight, - thisEndHighlight - thisStartHighlight); - rcClient.top = ytext; - rcClient.left = x; - rcClient.right = xEnd; - surfaceWindow->DrawTextNoClip(rcClient, font, ytext, - chunkVal + thisStartHighlight, thisEndHighlight - thisStartHighlight, - colourSel.allocated, colourBG.allocated); - x = xEnd; + int x = 5; + + DrawChunk(surfaceWindow, x, chunkVal, 0, thisStartHighlight, + ytext, rcClient, false, draw); + DrawChunk(surfaceWindow, x, chunkVal, thisStartHighlight, thisEndHighlight, + ytext, rcClient, true, draw); + DrawChunk(surfaceWindow, x, chunkVal, thisEndHighlight, chunkLength, + ytext, rcClient, false, draw); - xEnd = x + surfaceWindow->WidthText(font, chunkVal + thisEndHighlight, - chunkLength - thisEndHighlight); - rcClient.left = x; - rcClient.right = xEnd; - surfaceWindow->DrawTextNoClip(rcClient, font, ytext, - chunkVal + thisEndHighlight, chunkLength - thisEndHighlight, - colourUnSel.allocated, colourBG.allocated); chunkVal = chunkEnd + 1; ytext += lineHeight; + rcClient.bottom += lineHeight; + maxWidth = Platform::Maximum(maxWidth, x); } + return maxWidth; +} + +void CallTip::PaintCT(Surface *surfaceWindow) { + if (!val) + return; + PRectangle rcClientPos = wCallTip.GetClientPosition(); + PRectangle rcClientSize(0, 0, rcClientPos.right - rcClientPos.left, + rcClientPos.bottom - rcClientPos.top); + PRectangle rcClient(1, 1, rcClientSize.right - 1, rcClientSize.bottom - 1); + + surfaceWindow->FillRectangle(rcClient, colourBG.allocated); + + offsetMain = 5; + PaintContents(surfaceWindow, true); + // Draw a raised border around the edges of the window surfaceWindow->MoveTo(0, rcClientSize.bottom - 1); surfaceWindow->PenColour(colourShade.allocated); @@ -116,20 +197,34 @@ void CallTip::PaintCT(Surface *surfaceWindow) { surfaceWindow->LineTo(0, rcClientSize.bottom - 1); } +void CallTip::MouseClick(Point pt) { + clickPlace = 0; + if (pt.y < lineHeight) { + if ((pt.x > xUp) && (pt.x < xUp + widthArrow - 2)) { + clickPlace = 1; + } else if ((pt.x > xDown) && (pt.x < xDown + widthArrow - 2)) { + clickPlace = 2; + } + } +} + PRectangle CallTip::CallTipStart(int pos, Point pt, const char *defn, - const char *faceName, int size, bool unicodeMode_) { + const char *faceName, int size, + int codePage_, Window &wParent) { + clickPlace = 0; if (val) delete []val; val = new char[strlen(defn) + 1]; if (!val) return PRectangle(); strcpy(val, defn); - unicodeMode = unicodeMode_; + codePage = codePage_; Surface *surfaceMeasure = Surface::Allocate(); if (!surfaceMeasure) return PRectangle(); - surfaceMeasure->Init(); - surfaceMeasure->SetUnicodeMode(unicodeMode); + surfaceMeasure->Init(wParent.GetID()); + surfaceMeasure->SetUnicodeMode(SC_CP_UTF8 == codePage); + surfaceMeasure->SetDBCSMode(codePage); startHighlight = 0; endHighlight = 0; inCallTipMode = true; @@ -138,23 +233,22 @@ PRectangle CallTip::CallTipStart(int pos, Point pt, const char *defn, font.Create(faceName, SC_CHARSET_DEFAULT, deviceHeight, false, false); // Look for multiple lines in the text // Only support \n here - simply means container must avoid \r! - int width = 0; int numLines = 1; const char *newline; const char *look = val; + xUp = -100; + xDown = -100; + offsetMain = 5; + int width = PaintContents(surfaceMeasure, false) + 5; while ((newline = strchr(look, '\n')) != NULL) { - int thisWidth = surfaceMeasure->WidthText(font, look, newline - look); - width = Platform::Maximum(width, thisWidth); look = newline + 1; numLines++; } - int lastWidth = surfaceMeasure->WidthText(font, look, static_cast(strlen(look))); - width = Platform::Maximum(width, lastWidth) + 10; - int lineHeight = surfaceMeasure->Height(font); + lineHeight = surfaceMeasure->Height(font); // Extra line for border and an empty line at top and bottom int height = lineHeight * numLines - surfaceMeasure->InternalLeading(font) + 2 + 2; delete surfaceMeasure; - return PRectangle(pt.x -5, pt.y + 1, pt.x + width - 5, pt.y + 1 + height); + return PRectangle(pt.x - offsetMain, pt.y + 1, pt.x + width - offsetMain, pt.y + 1 + height); } void CallTip::CallTipCancel() { diff --git a/contrib/src/stc/scintilla/src/CallTip.h b/contrib/src/stc/scintilla/src/CallTip.h index 9f5025f63b..ffaedb0771 100644 --- a/contrib/src/stc/scintilla/src/CallTip.h +++ b/contrib/src/stc/scintilla/src/CallTip.h @@ -15,9 +15,17 @@ class CallTip { int endHighlight; char *val; Font font; + int xUp; + int xDown; + int lineHeight; + int offsetMain; // Private so CallTip objects can not be copied CallTip(const CallTip &) {} CallTip &operator=(const CallTip &) { return *this; } + void DrawChunk(Surface *surface, int &x, const char *s, + int posStart, int posEnd, int ytext, PRectangle rcClient, + bool highlight, bool draw); + int PaintContents(Surface *surfaceWindow, bool draw); public: Window wCallTip; @@ -29,22 +37,25 @@ public: ColourPair colourSel; ColourPair colourShade; ColourPair colourLight; - bool unicodeMode; - + int codePage; + int clickPlace; + CallTip(); ~CallTip(); - + /// Claim or accept palette entries for the colours required to paint a calltip. void RefreshColourPalette(Palette &pal, bool want); - + void PaintCT(Surface *surfaceWindow); - + + void MouseClick(Point pt); + /// Setup the calltip and return a rectangle of the area required. - PRectangle CallTipStart(int pos, Point pt, const char *defn, - const char *faceName, int size, bool unicodeMode_); - + PRectangle CallTipStart(int pos, Point pt, const char *defn, + const char *faceName, int size, int codePage_, Window &wParent); + void CallTipCancel(); - + /// Set a range of characters to be displayed in a highlight style. /// Commonly used to highlight the current parameter. void SetHighlight(int start, int end); diff --git a/contrib/src/stc/scintilla/src/CellBuffer.cxx b/contrib/src/stc/scintilla/src/CellBuffer.cxx index 420dee6ff7..8f292869d7 100644 --- a/contrib/src/stc/scintilla/src/CellBuffer.cxx +++ b/contrib/src/stc/scintilla/src/CellBuffer.cxx @@ -739,6 +739,7 @@ void CellBuffer::InsertCharStyle(int position, char ch, char style) { } bool CellBuffer::SetStyleAt(int position, char style, char mask) { + style &= mask; char curVal = ByteAt(position * 2 + 1); if ((curVal & mask) != style) { SetByteAt(position*2 + 1, static_cast((curVal & ~mask) | style)); diff --git a/contrib/src/stc/scintilla/src/CellBuffer.h b/contrib/src/stc/scintilla/src/CellBuffer.h index 5cfcbfe1f0..2866d548cb 100644 --- a/contrib/src/stc/scintilla/src/CellBuffer.h +++ b/contrib/src/stc/scintilla/src/CellBuffer.h @@ -212,7 +212,7 @@ public: int GetMark(int line); void DeleteAllMarks(int markerNum); int LineFromHandle(int markerHandle); - + /// Actions without undo void BasicInsertString(int position, char *s, int insertLength); void BasicDeleteChars(int position, int deleteLength); diff --git a/contrib/src/stc/scintilla/src/Document.cxx b/contrib/src/stc/scintilla/src/Document.cxx index 7458120442..20900bcf97 100644 --- a/contrib/src/stc/scintilla/src/Document.cxx +++ b/contrib/src/stc/scintilla/src/Document.cxx @@ -2,7 +2,7 @@ /** @file Document.cxx ** Text document that handles notifications, DBCS, styling, words and end of line. **/ -// Copyright 1998-2002 by Neil Hodgson +// Copyright 1998-2003 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include @@ -23,6 +23,22 @@ static inline bool isspacechar(unsigned char ch) { return (ch == ' ') || ((ch >= 0x09) && (ch <= 0x0d)); } +static inline bool IsPunctuation(char ch) { + return isascii(ch) && ispunct(ch); +} + +static inline bool IsADigit(char ch) { + return isascii(ch) && isdigit(ch); +} + +static inline bool IsLowerCase(char ch) { + return isascii(ch) && islower(ch); +} + +static inline bool IsUpperCase(char ch) { + return isascii(ch) && isupper(ch); +} + Document::Document() { refCount = 0; #ifdef unix @@ -218,32 +234,12 @@ bool Document::IsCrLf(int pos) { return (cb.CharAt(pos) == '\r') && (cb.CharAt(pos + 1) == '\n'); } -bool Document::IsDBCS(int pos) { - if (dbcsCodePage) { - if (SC_CP_UTF8 == dbcsCodePage) { - unsigned char ch = static_cast(cb.CharAt(pos)); - return ch >= 0x80; - } else { - // Anchor DBCS calculations at start of line because start of line can - // not be a DBCS trail byte. - int startLine = pos; - while (startLine > 0 && cb.CharAt(startLine) != '\r' && cb.CharAt(startLine) != '\n') - startLine--; - while (startLine <= pos) { - if (Platform::IsDBCSLeadByte(dbcsCodePage, cb.CharAt(startLine))) { - startLine++; - if (startLine >= pos) - return true; - } - startLine++; - } - } - } - return false; -} +static const int maxBytesInDBCSCharacter=5; int Document::LenChar(int pos) { - if (IsCrLf(pos)) { + if (pos < 0) { + return 1; + } else if (IsCrLf(pos)) { return 2; } else if (SC_CP_UTF8 == dbcsCodePage) { unsigned char ch = static_cast(cb.CharAt(pos)); @@ -257,8 +253,14 @@ int Document::LenChar(int pos) { return lengthDoc -pos; else return len; - } else if (IsDBCS(pos)) { - return 2; + } else if (dbcsCodePage) { + char mbstr[maxBytesInDBCSCharacter+1]; + int i; + for (i=0; i 0 && cb.CharAt(startLine) != '\r' && cb.CharAt(startLine) != '\n') startLine--; - bool atLeadByte = false; while (startLine < pos) { - if (atLeadByte) - atLeadByte = false; - else if (Platform::IsDBCSLeadByte(dbcsCodePage, cb.CharAt(startLine))) - atLeadByte = true; - else - atLeadByte = false; - startLine++; - } + char mbstr[maxBytesInDBCSCharacter+1]; + int i; + for(i=0;i 0) - return pos + 1; - else - return pos - 1; + int mbsize = Platform::DBCSCharLength(dbcsCodePage, mbstr); + if (startLine + mbsize == pos) { + return pos; + } else if (startLine + mbsize > pos) { + if (moveDir > 0) { + return startLine + mbsize; + } else { + return startLine; + } + } + startLine += mbsize; } } } @@ -524,7 +528,7 @@ bool Document::InsertString(int position, const char *s, size_t insertLength) { sWithStyle[i*2] = s[i]; sWithStyle[i*2 + 1] = 0; } - changed = InsertStyledString(position*2, sWithStyle, + changed = InsertStyledString(position*2, sWithStyle, static_cast(insertLength*2)); delete []sWithStyle; } @@ -545,11 +549,9 @@ void Document::DelCharBack(int pos) { return; } else if (IsCrLf(pos - 2)) { DeleteChars(pos - 2, 2); - } else if (SC_CP_UTF8 == dbcsCodePage) { + } else if (dbcsCodePage) { int startChar = MovePositionOutsideChar(pos - 1, -1, false); DeleteChars(startChar, pos - startChar); - } else if (IsDBCS(pos - 1)) { - DeleteChars(pos - 2, 2); } else { DeleteChars(pos - 1, 1); } @@ -718,6 +720,33 @@ void Document::ConvertLineEnds(int eolModeSet) { EndUndoAction(); } +int Document::ParaDown(int pos) { + int line = LineFromPosition(pos); + while (line < LinesTotal() && LineStart(line) != LineEnd(line)) { // skip non-empty lines + line++; + } + while (line < LinesTotal() && LineStart(line) == LineEnd(line)) { // skip empty lines + line++; + } + if (line < LinesTotal()) + return LineStart(line); + else // end of a document + return LineEnd(line-1); +} + +int Document::ParaUp(int pos) { + int line = LineFromPosition(pos); + line--; + while (line >= 0 && LineStart(line) == LineEnd(line)) { // skip empty lines + line--; + } + while (line >= 0 && LineStart(line) != LineEnd(line)) { // skip non-empty lines + line--; + } + line++; + return LineStart(line); +} + Document::charClassification Document::WordCharClass(unsigned char ch) { if ((SC_CP_UTF8 == dbcsCodePage) && (ch >= 0x80)) return ccWord; @@ -745,7 +774,7 @@ int Document::ExtendWordSelect(int pos, int delta, bool onlyWordCharacters) { } /** - * Find the start of the next word in either a forward (delta >= 0) or backwards direction + * Find the start of the next word in either a forward (delta >= 0) or backwards direction * (delta < 0). * This is looking for a transition between character classes although there is also some * additional movement to transit white space. @@ -798,7 +827,7 @@ bool Document::IsWordEndAt(int pos) { } /** - * Check that the given range is has transitions between character classes at both + * Check that the given range is has transitions between character classes at both * ends and where the characters on the inside are word or punctuation characters. */ bool Document::IsWordAt(int start, int end) { @@ -845,7 +874,7 @@ public: * Has not been tested with backwards DBCS searches yet. */ long Document::FindText(int minPos, int maxPos, const char *s, - bool caseSensitive, bool word, bool wordStart, bool regExp, + bool caseSensitive, bool word, bool wordStart, bool regExp, bool posix, int *length) { if (regExp) { if (!pre) @@ -853,22 +882,16 @@ long Document::FindText(int minPos, int maxPos, const char *s, if (!pre) return -1; - int startPos; - int endPos; + int increment = (minPos <= maxPos) ? 1 : -1; - if (minPos <= maxPos) { - startPos = minPos; - endPos = maxPos; - } else { - startPos = maxPos; - endPos = minPos; - } + int startPos = minPos; + int endPos = maxPos; // Range endpoints should not be inside DBCS characters, but just in case, move them. startPos = MovePositionOutsideChar(startPos, 1, false); endPos = MovePositionOutsideChar(endPos, 1, false); - const char *errmsg = pre->Compile(s, *length, caseSensitive); + const char *errmsg = pre->Compile(s, *length, caseSensitive, posix); if (errmsg) { return -1; } @@ -878,7 +901,9 @@ long Document::FindText(int minPos, int maxPos, const char *s, // Replace: $(\1-\2) int lineRangeStart = LineFromPosition(startPos); int lineRangeEnd = LineFromPosition(endPos); - if ((startPos >= LineEnd(lineRangeStart)) && (lineRangeStart < lineRangeEnd)) { + if ((increment == 1) && + (startPos >= LineEnd(lineRangeStart)) && + (lineRangeStart < lineRangeEnd)) { // the start position is at end of line or between line end characters. lineRangeStart++; startPos = LineStart(lineRangeStart); @@ -886,36 +911,54 @@ long Document::FindText(int minPos, int maxPos, const char *s, int pos = -1; int lenRet = 0; char searchEnd = s[*length - 1]; - if (*length == 1) { - // These produce empty selections so nudge them on if needed - if (s[0] == '^') { - if (startPos == LineStart(lineRangeStart)) - startPos++; - } else if (s[0] == '$') { - if ((startPos == LineEnd(lineRangeStart)) && (lineRangeStart < lineRangeEnd)) - startPos = LineStart(lineRangeStart + 1); - } - lineRangeStart = LineFromPosition(startPos); - lineRangeEnd = LineFromPosition(endPos); - } - for (int line = lineRangeStart; line <= lineRangeEnd; line++) { + int lineRangeBreak = lineRangeEnd + increment; + for (int line = lineRangeStart; line != lineRangeBreak; line += increment) { int startOfLine = LineStart(line); int endOfLine = LineEnd(line); - if (line == lineRangeStart) { - if ((startPos != startOfLine) && (s[0] == '^')) - continue; // Can't match start of line if start position after start of line - startOfLine = startPos; - } - if (line == lineRangeEnd) { - if ((endPos != endOfLine) && (searchEnd == '$')) - continue; // Can't match end of line if end position before end of line - endOfLine = endPos; + if (increment == 1) { + if (line == lineRangeStart) { + if ((startPos != startOfLine) && (s[0] == '^')) + continue; // Can't match start of line if start position after start of line + startOfLine = startPos; + } + if (line == lineRangeEnd) { + if ((endPos != endOfLine) && (searchEnd == '$')) + continue; // Can't match end of line if end position before end of line + endOfLine = endPos; + } + } else { + if (line == lineRangeEnd) { + if ((endPos != startOfLine) && (s[0] == '^')) + continue; // Can't match start of line if end position after start of line + startOfLine = endPos; + } + if (line == lineRangeStart) { + if ((startPos != endOfLine) && (searchEnd == '$')) + continue; // Can't match end of line if start position before end of line + endOfLine = startPos; + } } + DocumentIndexer di(this, endOfLine); int success = pre->Execute(di, startOfLine, endOfLine); if (success) { pos = pre->bopat[0]; lenRet = pre->eopat[0] - pre->bopat[0]; + if (increment == -1) { + // Check for the last match on this line. + int repetitions = 1000; // Break out of infinite loop + while (success && (pre->eopat[0] < endOfLine) && (repetitions--)) { + success = pre->Execute(di, pre->eopat[0], endOfLine); + if (success) { + if (pre->eopat[0] <= minPos) { + pos = pre->bopat[0]; + lenRet = pre->eopat[0] - pre->bopat[0]; + } else { + success = 0; + } + } + } + } break; } } @@ -1033,16 +1076,17 @@ int Document::LinesTotal() { void Document::ChangeCase(Range r, bool makeUpperCase) { for (int pos = r.start; pos < r.end; pos++) { - char ch = CharAt(pos); - if (dbcsCodePage && IsDBCS(pos)) { - pos += LenChar(pos); + int len = LenChar(pos); + if (dbcsCodePage && (len > 1)) { + pos += len; } else { + char ch = CharAt(pos); if (makeUpperCase) { - if (islower(ch)) { + if (IsLowerCase(ch)) { ChangeChar(pos, static_cast(MakeUpperCase(ch))); } } else { - if (isupper(ch)) { + if (IsUpperCase(ch)) { ChangeChar(pos, static_cast(MakeLowerCase(ch))); } } @@ -1067,7 +1111,7 @@ void Document::SetWordChars(unsigned char *chars) { } } else { for (ch = 0; ch < 256; ch++) { - if (ch >= 0x80 || isalnum(ch) || ch == '_') + if (ch >= 0x80 || isalnum(ch) || ch == '_') charClass[ch] = ccWord; } } @@ -1092,6 +1136,7 @@ bool Document::SetStyleFor(int length, char style) { return false; } else { enteredCount++; + style &= stylingMask; int prevEndStyled = endStyled; if (cb.SetStyleFor(endStyled, length, style, stylingMask)) { DocModification mh(SC_MOD_CHANGESTYLE | SC_PERFORMED_USER, @@ -1206,7 +1251,7 @@ void Document::NotifyModified(DocModification mh) { } bool Document::IsWordPartSeparator(char ch) { - return ispunct(ch) && (WordCharClass(ch) == ccWord); + return (WordCharClass(ch) == ccWord) && IsPunctuation(ch); } int Document::WordPartLeft(int pos) { @@ -1221,31 +1266,38 @@ int Document::WordPartLeft(int pos) { if (pos > 0) { startChar = cb.CharAt(pos); --pos; - if (islower(startChar)) { - while (pos > 0 && islower(cb.CharAt(pos))) + if (IsLowerCase(startChar)) { + while (pos > 0 && IsLowerCase(cb.CharAt(pos))) --pos; - if (!isupper(cb.CharAt(pos)) && !islower(cb.CharAt(pos))) + if (!IsUpperCase(cb.CharAt(pos)) && !IsLowerCase(cb.CharAt(pos))) ++pos; - } else if (isupper(startChar)) { - while (pos > 0 && isupper(cb.CharAt(pos))) + } else if (IsUpperCase(startChar)) { + while (pos > 0 && IsUpperCase(cb.CharAt(pos))) --pos; - if (!isupper(cb.CharAt(pos))) + if (!IsUpperCase(cb.CharAt(pos))) ++pos; - } else if (isdigit(startChar)) { - while (pos > 0 && isdigit(cb.CharAt(pos))) + } else if (IsADigit(startChar)) { + while (pos > 0 && IsADigit(cb.CharAt(pos))) --pos; - if (!isdigit(cb.CharAt(pos))) + if (!IsADigit(cb.CharAt(pos))) ++pos; - } else if (ispunct(startChar)) { - while (pos > 0 && ispunct(cb.CharAt(pos))) + } else if (IsPunctuation(startChar)) { + while (pos > 0 && IsPunctuation(cb.CharAt(pos))) --pos; - if (!ispunct(cb.CharAt(pos))) + if (!IsPunctuation(cb.CharAt(pos))) ++pos; } else if (isspacechar(startChar)) { while (pos > 0 && isspacechar(cb.CharAt(pos))) --pos; if (!isspacechar(cb.CharAt(pos))) ++pos; + } else if (!isascii(startChar)) { + while (pos > 0 && !isascii(cb.CharAt(pos))) + --pos; + if (isascii(cb.CharAt(pos))) + ++pos; + } else { + ++pos; } } } @@ -1260,29 +1312,47 @@ int Document::WordPartRight(int pos) { ++pos; startChar = cb.CharAt(pos); } - if (islower(startChar)) { - while (pos < length && islower(cb.CharAt(pos))) + if (!isascii(startChar)) { + while (pos < length && !isascii(cb.CharAt(pos))) ++pos; - } else if (isupper(startChar)) { - if (islower(cb.CharAt(pos + 1))) { + } else if (IsLowerCase(startChar)) { + while (pos < length && IsLowerCase(cb.CharAt(pos))) ++pos; - while (pos < length && islower(cb.CharAt(pos))) + } else if (IsUpperCase(startChar)) { + if (IsLowerCase(cb.CharAt(pos + 1))) { + ++pos; + while (pos < length && IsLowerCase(cb.CharAt(pos))) ++pos; } else { - while (pos < length && isupper(cb.CharAt(pos))) + while (pos < length && IsUpperCase(cb.CharAt(pos))) ++pos; } - if (islower(cb.CharAt(pos)) && isupper(cb.CharAt(pos - 1))) + if (IsLowerCase(cb.CharAt(pos)) && IsUpperCase(cb.CharAt(pos - 1))) --pos; - } else if (isdigit(startChar)) { - while (pos < length && isdigit(cb.CharAt(pos))) + } else if (IsADigit(startChar)) { + while (pos < length && IsADigit(cb.CharAt(pos))) ++pos; - } else if (ispunct(startChar)) { - while (pos < length && ispunct(cb.CharAt(pos))) + } else if (IsPunctuation(startChar)) { + while (pos < length && IsPunctuation(cb.CharAt(pos))) ++pos; } else if (isspacechar(startChar)) { while (pos < length && isspacechar(cb.CharAt(pos))) ++pos; + } else { + ++pos; + } + return pos; +} + +int Document::ExtendStyleRange(int pos, int delta) { + int sStart = cb.StyleAt(pos); + if (delta < 0) { + while (pos > 0 && (cb.StyleAt(pos) == sStart)) + pos--; + pos++; + } else { + while (pos < (Length()) && (cb.StyleAt(pos) == sStart)) + pos++; } return pos; } diff --git a/contrib/src/stc/scintilla/src/Document.h b/contrib/src/stc/scintilla/src/Document.h index 82931207cf..bcdbe00ca5 100644 --- a/contrib/src/stc/scintilla/src/Document.h +++ b/contrib/src/stc/scintilla/src/Document.h @@ -2,7 +2,7 @@ /** @file Document.h ** Text document that handles notifications, DBCS, styling, words and end of line. **/ -// Copyright 1998-2002 by Neil Hodgson +// Copyright 1998-2003 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef DOCUMENT_H @@ -26,10 +26,10 @@ public: Position start; Position end; - Range(Position pos=0) : + Range(Position pos=0) : start(pos), end(pos) { }; - Range(Position start_, Position end_) : + Range(Position start_, Position end_) : start(start_), end(end_) { }; @@ -60,7 +60,7 @@ public: } bool Overlaps(Range other) const { - return + return Contains(other.start) || Contains(other.end) || other.Contains(start) || @@ -88,7 +88,7 @@ public: } }; -private: +private: int refCount; CellBuffer cb; enum charClassification { ccSpace, ccNewLine, ccWord, ccPunctuation }; @@ -191,8 +191,8 @@ public: int ExtendWordSelect(int pos, int delta, bool onlyWordCharacters=false); int NextWordStart(int pos, int delta); int Length() { return cb.Length(); } - long FindText(int minPos, int maxPos, const char *s, - bool caseSensitive, bool word, bool wordStart, bool regExp, int *length); + long FindText(int minPos, int maxPos, const char *s, + bool caseSensitive, bool word, bool wordStart, bool regExp, bool posix, int *length); long FindText(int iMessage, unsigned long wParam, long lParam); const char *SubstituteByPosition(const char *text, int *length); int LinesTotal(); @@ -220,9 +220,11 @@ public: bool IsWordPartSeparator(char ch); int WordPartLeft(int pos); int WordPartRight(int pos); + int ExtendStyleRange(int pos, int delta); + int ParaUp(int pos); + int ParaDown(int pos); private: - bool IsDBCS(int pos); charClassification WordCharClass(unsigned char ch); bool IsWordStartAt(int pos); bool IsWordEndAt(int pos); @@ -252,7 +254,7 @@ public: int foldLevelNow; int foldLevelPrev; - DocModification(int modificationType_, int position_=0, int length_=0, + DocModification(int modificationType_, int position_=0, int length_=0, int linesAdded_=0, const char *text_=0) : modificationType(modificationType_), position(position_), diff --git a/contrib/src/stc/scintilla/src/DocumentAccessor.cxx b/contrib/src/stc/scintilla/src/DocumentAccessor.cxx index 595edf8ba2..b7902df35a 100644 --- a/contrib/src/stc/scintilla/src/DocumentAccessor.cxx +++ b/contrib/src/stc/scintilla/src/DocumentAccessor.cxx @@ -174,7 +174,7 @@ int DocumentAccessor::IndentAmount(int line, int *flags, PFNIsCommentLeader pfnI *flags = spaceFlags; indent += SC_FOLDLEVELBASE; // if completely empty line or the start of a comment... - if ((ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r') || + if ((ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r') || (pfnIsCommentLeader && (*pfnIsCommentLeader)(*this, pos, end-pos)) ) return indent | SC_FOLDLEVELWHITEFLAG; else diff --git a/contrib/src/stc/scintilla/src/DocumentAccessor.h b/contrib/src/stc/scintilla/src/DocumentAccessor.h index dc591d13ec..f6523c94f9 100644 --- a/contrib/src/stc/scintilla/src/DocumentAccessor.h +++ b/contrib/src/stc/scintilla/src/DocumentAccessor.h @@ -32,9 +32,9 @@ protected: void Fill(int position); public: - DocumentAccessor(Document *pdoc_, PropSet &props_, WindowID id_=0) : + DocumentAccessor(Document *pdoc_, PropSet &props_, WindowID id_=0) : Accessor(), pdoc(pdoc_), props(props_), id(id_), - lenDoc(-1), validLen(0), chFlags(0), chWhile(0), + lenDoc(-1), validLen(0), chFlags(0), chWhile(0), startSeg(0), startPosStyling(0) { } ~DocumentAccessor(); @@ -47,8 +47,8 @@ public: void Flush(); int GetLineState(int line); int SetLineState(int line, int state); - int GetPropertyInt(const char *key, int defaultValue=0) { - return props.GetInt(key, defaultValue); + int GetPropertyInt(const char *key, int defaultValue=0) { + return props.GetInt(key, defaultValue); } char *GetProperties() { return props.ToString(); diff --git a/contrib/src/stc/scintilla/src/Editor.cxx b/contrib/src/stc/scintilla/src/Editor.cxx index f2ba9f088b..44399a5fb0 100644 --- a/contrib/src/stc/scintilla/src/Editor.cxx +++ b/contrib/src/stc/scintilla/src/Editor.cxx @@ -2,7 +2,7 @@ /** @file Editor.cxx ** Main code for the edit control. **/ -// Copyright 1998-2002 by Neil Hodgson +// Copyright 1998-2003 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include @@ -12,7 +12,9 @@ #include "Platform.h" +#ifndef PLAT_QT #define INCLUDE_DEPRECATED_FEATURES +#endif #include "Scintilla.h" #include "ContractionState.h" @@ -20,6 +22,7 @@ #include "CellBuffer.h" #include "KeyMap.h" #include "Indicator.h" +#include "XPM.h" #include "LineMarker.h" #include "Style.h" #include "ViewStyle.h" @@ -52,7 +55,7 @@ LineLayout::LineLayout(int maxLineLength_) : positions(0), widthLine(wrapWidthInfinite), lines(1) { - Resize(maxLineLength_); + Resize(maxLineLength_); } LineLayout::~LineLayout() { @@ -96,7 +99,7 @@ void LineLayout::SetLineStart(int line, int start) { int *newLineStarts = new int[newMaxLines]; if (!newLineStarts) return; - for (int i=0; i= rangeLine.start && braces[1] <= rangeLine.end) || - (braces[1] >= rangeLine.start && braces[0] <= rangeLine.end)) { + (braces[1] >= rangeLine.start && braces[0] <= rangeLine.end)) { xHighlightGuide = xHighlight; } } @@ -165,9 +168,9 @@ void LineLayoutCache::Allocate(int length_) { size = (size / 16 + 1) * 16; } if (size > 0) { - cache = new LineLayout *[size]; + cache = new LineLayout * [size]; } - for (int i=0; i size) { Deallocate(); } else if (lengthForLevel < length) { - for (int i=lengthForLevel; iInvalidate(validity_); } @@ -223,7 +226,7 @@ void LineLayoutCache::SetLevel(int level_) { } LineLayout *LineLayoutCache::Retrieve(int lineNumber, int lineCaret, int maxChars, int styleClock_, - int linesOnScreen, int linesInDoc) { + int linesOnScreen, int linesInDoc) { AllocateForLevel(linesOnScreen, linesInDoc); if (styleClock != styleClock_) { Invalidate(LineLayout::llCheckTextAndStyle); @@ -243,7 +246,7 @@ LineLayout *LineLayoutCache::Retrieve(int lineNumber, int lineCaret, int maxChar if (cache && (pos < length)) { if (cache[pos]) { if ((cache[pos]->lineNumber != lineNumber) || - (cache[pos]->maxLineLength < maxChars)) { + (cache[pos]->maxLineLength < maxChars)) { delete cache[pos]; cache[pos] = 0; } @@ -283,6 +286,7 @@ Editor::Editor() { printMagnification = 0; printColourMode = SC_PRINT_NORMAL; + printWrapState = eWrapWord; cursorMode = SC_CURSORNORMAL; controlCharSymbol = 0; /* Draw the control characters */ @@ -293,6 +297,7 @@ Editor::Editor() { mouseDownCaptures = true; bufferedDraw = true; + twoPhaseDraw = true; lastClickTime = 0; dwellDelay = SC_TIME_FOREVER; @@ -327,6 +332,7 @@ Editor::Editor() { xCaretMargin = 50; horizontalScrollBarVisible = true; scrollWidth = 2000; + verticalScrollBarVisible = true; endAtLastLine = true; pixmapLine = Surface::Allocate(); @@ -358,7 +364,7 @@ Editor::Editor() { modEventMask = SC_MODEVENTMASKALL; pdoc = new Document(); - pdoc ->AddRef(); + pdoc->AddRef(); pdoc->AddWatcher(this, 0); recordingMacro = false; @@ -368,7 +374,10 @@ Editor::Editor() { wrapWidth = LineLayout::wrapWidthInfinite; docLineLastWrapped = -1; - llc.SetLevel(LineLayoutCache::llcDocument); + hsStart = -1; + hsEnd = -1; + + llc.SetLevel(LineLayoutCache::llcCaret); } Editor::~Editor() { @@ -414,7 +423,7 @@ void Editor::RefreshColourPalette(Palette &pal, bool want) { void Editor::RefreshStyleData() { if (!stylesValid) { stylesValid = true; - AutoSurface surface(IsUnicodeMode()); + AutoSurface surface(this); if (surface) { vs.Refresh(*surface); RefreshColourPalette(palette, true); @@ -474,10 +483,10 @@ static inline bool IsControlCharacter(char ch) { const char *ControlCharacterString(unsigned char ch) { const char *reps[] = { - "NUL", "SOH", "STX", "ETX", "EOT", "ENQ", "ACK", "BEL", - "BS", "HT", "LF", "VT", "FF", "CR", "SO", "SI", - "DLE", "DC1", "DC2", "DC3", "DC4", "NAK", "SYN", "ETB", - "CAN", "EM", "SUB", "ESC", "FS", "GS", "RS", "US" + "NUL", "SOH", "STX", "ETX", "EOT", "ENQ", "ACK", "BEL", + "BS", "HT", "LF", "VT", "FF", "CR", "SO", "SI", + "DLE", "DC1", "DC2", "DC3", "DC4", "NAK", "SYN", "ETB", + "CAN", "EM", "SUB", "ESC", "FS", "GS", "RS", "US" }; if (ch < (sizeof(reps) / sizeof(reps[0]))) { return reps[ch]; @@ -486,6 +495,29 @@ const char *ControlCharacterString(unsigned char ch) { } } +// Convenience class to ensure LineLayout objects are always disposed. +class AutoLineLayout { + LineLayoutCache &llc; + LineLayout *ll; + AutoLineLayout &operator=(const AutoLineLayout &) { return * this; } +public: + AutoLineLayout(LineLayoutCache &llc_, LineLayout *ll_) : llc(llc_), ll(ll_) {} + ~AutoLineLayout() { + llc.Dispose(ll); + ll = 0; + } + LineLayout *operator->() const { + return ll; + } + operator LineLayout *() const { + return ll; + } + void Set(LineLayout *ll_) { + llc.Dispose(ll); + ll = ll_; + } +}; + Point Editor::LocationFromPosition(int pos) { Point pt; RefreshStyleData(); @@ -494,8 +526,8 @@ Point Editor::LocationFromPosition(int pos) { int line = pdoc->LineFromPosition(pos); int lineVisible = cs.DisplayFromDoc(line); //Platform::DebugPrintf("line=%d\n", line); - AutoSurface surface(IsUnicodeMode()); - LineLayout *ll = RetrieveLineLayout(line); + AutoSurface surface(this); + AutoLineLayout ll(llc, RetrieveLineLayout(line)); if (surface && ll) { // -1 because of adding in for visible lines in following loop. pt.y = (lineVisible - topLine - 1) * vs.lineHeight; @@ -507,8 +539,8 @@ Point Editor::LocationFromPosition(int pos) { if (posInLine > ll->maxLineLength) { pt.x = ll->positions[ll->maxLineLength] - ll->positions[ll->LineStart(ll->lines)]; } - for (int subLine=0; subLinelines; subLine++) { - if ((posInLine >= ll->LineStart(subLine)) && (posInLine <= ll->LineStart(subLine+1))) { + for (int subLine = 0; subLine < ll->lines; subLine++) { + if ((posInLine >= ll->LineStart(subLine)) && (posInLine <= ll->LineStart(subLine + 1))) { pt.x = ll->positions[posInLine] - ll->positions[ll->LineStart(subLine)]; } if (posInLine >= ll->LineStart(subLine)) { @@ -517,7 +549,6 @@ Point Editor::LocationFromPosition(int pos) { } pt.x += vs.fixedColumnWidth - xOffset; } - llc.Dispose(ll); return pt; } @@ -535,6 +566,10 @@ void Editor::SetTopLine(int topLineNew) { posTopLine = pdoc->LineStart(topLine); } +static inline bool IsEOLChar(char ch) { + return (ch == '\r') || (ch == '\n'); +} + int Editor::PositionFromLocation(Point pt) { RefreshStyleData(); pt.x = pt.x - vs.fixedColumnWidth + xOffset; @@ -547,31 +582,28 @@ int Editor::PositionFromLocation(Point pt) { int lineDoc = cs.DocFromDisplay(visibleLine); if (lineDoc >= pdoc->LinesTotal()) return pdoc->Length(); - AutoSurface surface(IsUnicodeMode()); - int retVal = 0; - LineLayout *ll = RetrieveLineLayout(lineDoc); + unsigned int posLineStart = pdoc->LineStart(lineDoc); + int retVal = posLineStart; + AutoSurface surface(this); + AutoLineLayout ll(llc, RetrieveLineLayout(lineDoc)); if (surface && ll) { LayoutLine(lineDoc, surface, vs, ll, wrapWidth); - unsigned int posLineStart = pdoc->LineStart(lineDoc); int lineStartSet = cs.DisplayFromDoc(lineDoc); int subLine = visibleLine - lineStartSet; if (subLine < ll->lines) { int lineStart = ll->LineStart(subLine); - int lineEnd = ll->LineStart(subLine+1); + int lineEnd = ll->LineStart(subLine + 1); int subLineStart = ll->positions[lineStart]; for (int i = lineStart; i < lineEnd; i++) { if (pt.x < (((ll->positions[i] + ll->positions[i + 1]) / 2) - subLineStart) || - ll->chars[i] == '\r' || ll->chars[i] == '\n') { - llc.Dispose(ll); + IsEOLChar(ll->chars[i])) { return pdoc->MovePositionOutsideChar(i + posLineStart, 1); } } - llc.Dispose(ll); return lineEnd + posLineStart; } retVal = ll->numCharsInLine + posLineStart; } - llc.Dispose(ll); return retVal; } @@ -595,8 +627,8 @@ int Editor::PositionFromLocationClose(Point pt) { return INVALID_POSITION; if (lineDoc >= pdoc->LinesTotal()) return INVALID_POSITION; - AutoSurface surface(IsUnicodeMode()); - LineLayout *ll = RetrieveLineLayout(lineDoc); + AutoSurface surface(this); + AutoLineLayout ll(llc, RetrieveLineLayout(lineDoc)); if (surface && ll) { LayoutLine(lineDoc, surface, vs, ll, wrapWidth); unsigned int posLineStart = pdoc->LineStart(lineDoc); @@ -604,18 +636,16 @@ int Editor::PositionFromLocationClose(Point pt) { int subLine = visibleLine - lineStartSet; if (subLine < ll->lines) { int lineStart = ll->LineStart(subLine); - int lineEnd = ll->LineStart(subLine+1); + int lineEnd = ll->LineStart(subLine + 1); int subLineStart = ll->positions[lineStart]; for (int i = lineStart; i < lineEnd; i++) { if (pt.x < (((ll->positions[i] + ll->positions[i + 1]) / 2) - subLineStart) || - ll->chars[i] == '\r' || ll->chars[i] == '\n') { - llc.Dispose(ll); + IsEOLChar(ll->chars[i])) { return pdoc->MovePositionOutsideChar(i + posLineStart, 1); } } } } - llc.Dispose(ll); return INVALID_POSITION; } @@ -629,8 +659,8 @@ int Editor::PositionFromLineX(int lineDoc, int x) { if (lineDoc >= pdoc->LinesTotal()) return pdoc->Length(); //Platform::DebugPrintf("Position of (%d,%d) line = %d top=%d\n", pt.x, pt.y, line, topLine); - AutoSurface surface(IsUnicodeMode()); - LineLayout *ll = RetrieveLineLayout(lineDoc); + AutoSurface surface(this); + AutoLineLayout ll(llc, RetrieveLineLayout(lineDoc)); int retVal = 0; if (surface && ll) { unsigned int posLineStart = pdoc->LineStart(lineDoc); @@ -638,17 +668,16 @@ int Editor::PositionFromLineX(int lineDoc, int x) { retVal = ll->numCharsInLine + posLineStart; int subLine = 0; int lineStart = ll->LineStart(subLine); - int lineEnd = ll->LineStart(subLine+1); + int lineEnd = ll->LineStart(subLine + 1); int subLineStart = ll->positions[lineStart]; for (int i = lineStart; i < lineEnd; i++) { if (x < (((ll->positions[i] + ll->positions[i + 1]) / 2) - subLineStart) || - ll->chars[i] == '\r' || ll->chars[i] == '\n') { + IsEOLChar(ll->chars[i])) { retVal = pdoc->MovePositionOutsideChar(i + posLineStart, 1); break; } } } - llc.Dispose(ll); return retVal; } @@ -820,18 +849,45 @@ void Editor::SetEmptySelection(int currentPos_) { SetSelection(currentPos_, currentPos_); } +bool Editor::RangeContainsProtected(int start, int end) const { + if (vs.ProtectionActive()) { + if (start > end) { + int t = start; + start = end; + end = t; + } + int mask = pdoc->stylingBitsMask; + for (int pos = start; pos < end; pos++) { + if (vs.styles[pdoc->StyleAt(pos) & mask].IsProtected()) + return true; + } + } + return false; +} + +bool Editor::SelectionContainsProtected() const { + // TODO: make support rectangular selection + return RangeContainsProtected(anchor, currentPos); +} + int Editor::MovePositionOutsideChar(int pos, int moveDir, bool checkLineEnd) { // Asks document to find a good position and then moves out of any invisible positions pos = pdoc->MovePositionOutsideChar(pos, moveDir, checkLineEnd); - int mask = pdoc->stylingBitsMask; - if (moveDir > 0) { - while ((pos < pdoc->Length()) && - (vs.styles[pdoc->StyleAt(pos - 1) & mask].IsProtected())) - pos++; - } else { - while ((pos > 0) && - (vs.styles[pdoc->StyleAt(pos - 1) & mask].IsProtected())) - pos--; + if (vs.ProtectionActive()) { + int mask = pdoc->stylingBitsMask; + if (moveDir > 0) { + if ((pos > 0) && vs.styles[pdoc->StyleAt(pos - 1) & mask].IsProtected()) { + while ((pos < pdoc->Length()) && + (vs.styles[pdoc->StyleAt(pos) & mask].IsProtected())) + pos++; + } + } else if (moveDir < 0) { + if (vs.styles[pdoc->StyleAt(pos) & mask].IsProtected()) { + while ((pos > 0) && + (vs.styles[pdoc->StyleAt(pos - 1) & mask].IsProtected())) + pos--; + } + } } return pos; } @@ -845,9 +901,9 @@ int Editor::MovePositionTo(int newPos, bool extend, bool ensureVisible) { } else { SetEmptySelection(newPos); } + ShowCaretAtCurrentPosition(); if (ensureVisible) EnsureCaretVisible(); - ShowCaretAtCurrentPosition(); NotifyMove(newPos); return 0; } @@ -877,7 +933,7 @@ void Editor::SetLastXChosen() { lastXChosen = pt.x; } -void Editor::ScrollTo(int line) { +void Editor::ScrollTo(int line, bool moveThumb) { int topLineNew = Platform::Clamp(line, 0, MaxScrollPos()); if (topLineNew != topLine) { // Try to optimise small scrolls @@ -890,7 +946,9 @@ void Editor::ScrollTo(int line) { } else { Redraw(); } - SetVerticalScrollPos(); + if (moveThumb) { + SetVerticalScrollPos(); + } } } @@ -916,32 +974,31 @@ void Editor::MoveCaretInsideView(bool ensureVisible) { if (pt.y < rcClient.top) { MovePositionTo(PositionFromLocation( Point(lastXChosen, rcClient.top)), - false, ensureVisible); + false, ensureVisible); } else if ((pt.y + vs.lineHeight - 1) > rcClient.bottom) { int yOfLastLineFullyDisplayed = rcClient.top + (LinesOnScreen() - 1) * vs.lineHeight; MovePositionTo(PositionFromLocation( Point(lastXChosen, rcClient.top + yOfLastLineFullyDisplayed)), - false, ensureVisible); + false, ensureVisible); } } int Editor::DisplayFromPosition(int pos) { int lineDoc = pdoc->LineFromPosition(pos); int lineDisplay = cs.DisplayFromDoc(lineDoc); - AutoSurface surface(IsUnicodeMode()); - LineLayout *ll = RetrieveLineLayout(lineDoc); + AutoSurface surface(this); + AutoLineLayout ll(llc, RetrieveLineLayout(lineDoc)); if (surface && ll) { LayoutLine(lineDoc, surface, vs, ll, wrapWidth); unsigned int posLineStart = pdoc->LineStart(lineDoc); int posInLine = pos - posLineStart; lineDisplay--; // To make up for first increment ahead. - for (int subLine=0; subLinelines; subLine++) { - if (posInLine >= ll->LineStart(subLine)) { + for (int subLine = 0; subLine < ll->lines; subLine++) { + if (posInLine >= ll->LineStart(subLine)) { lineDisplay++; } } } - llc.Dispose(ll); return lineDisplay; } @@ -1092,9 +1149,9 @@ void Editor::EnsureCaretVisible(bool useMargin, bool vert, bool horiz) { } newTopLine = Platform::Clamp(newTopLine, 0, MaxScrollPos()); if (newTopLine != topLine) { + Redraw(); SetTopLine(newTopLine); SetVerticalScrollPos(); - Redraw(); } } @@ -1166,7 +1223,7 @@ void Editor::EnsureCaretVisible(bool useMargin, bool vert, bool horiz) { } } else { // No slop if (bStrict || - (bJump && (pt.x < rcClient.left || pt.x >= rcClient.right))) { + (bJump && (pt.x < rcClient.left || pt.x >= rcClient.right))) { // Strict or going out of display if (bEven) { // Center caret @@ -1201,6 +1258,14 @@ void Editor::EnsureCaretVisible(bool useMargin, bool vert, bool horiz) { } if (xOffset != xOffsetNew) { xOffset = xOffsetNew; + if (xOffsetNew > 0) { + PRectangle rcText = GetTextRectangle(); + if (horizontalScrollBarVisible == true && + rcText.Width() + xOffset > scrollWidth) { + scrollWidth = xOffset + rcText.Width(); + SetScrollBars(); + } + } SetHorizontalScrollPos(); Redraw(); } @@ -1249,7 +1314,7 @@ bool Editor::WrapLines() { if (wrapState == eWrapNone) { if (wrapWidth != LineLayout::wrapWidthInfinite) { wrapWidth = LineLayout::wrapWidthInfinite; - for (int lineDoc=0; lineDocLinesTotal(); lineDoc++) { + for (int lineDoc = 0; lineDoc < pdoc->LinesTotal(); lineDoc++) { cs.SetHeight(lineDoc, 1); } wrapOccurred = true; @@ -1265,18 +1330,17 @@ bool Editor::WrapLines() { wrapWidth = rcTextArea.Width(); // Ensure all of the document is styled. pdoc->EnsureStyledTo(pdoc->Length()); - AutoSurface surface(IsUnicodeMode()); + AutoSurface surface(this); if (surface) { int lastLineToWrap = pdoc->LinesTotal(); while (docLineLastWrapped <= lastLineToWrap) { docLineLastWrapped++; - LineLayout *ll = RetrieveLineLayout(docLineLastWrapped); + AutoLineLayout ll(llc, RetrieveLineLayout(docLineLastWrapped)); int linesWrapped = 1; if (ll) { LayoutLine(docLineLastWrapped, surface, vs, ll, wrapWidth); linesWrapped = ll->lines; } - llc.Dispose(ll); if (cs.SetHeight(docLineLastWrapped, linesWrapped)) { wrapOccurred = true; } @@ -1299,6 +1363,63 @@ bool Editor::WrapLines() { return wrapOccurred; } +void Editor::LinesJoin() { + if (!RangeContainsProtected(targetStart, targetEnd)) { + pdoc->BeginUndoAction(); + bool prevNonWS = true; + for (int pos = targetStart; pos < targetEnd; pos++) { + if (IsEOLChar(pdoc->CharAt(pos))) { + targetEnd -= pdoc->LenChar(pos); + pdoc->DelChar(pos); + if (prevNonWS) { + // Ensure at least one space separating previous lines + pdoc->InsertChar(pos, ' '); + } + } else { + prevNonWS = pdoc->CharAt(pos) != ' '; + } + } + pdoc->EndUndoAction(); + } +} + +const char *StringFromEOLMode(int eolMode) { + if (eolMode == SC_EOL_CRLF) { + return "\r\n"; + } else if (eolMode == SC_EOL_CR) { + return "\r"; + } else { + return "\n"; + } +} + +void Editor::LinesSplit(int pixelWidth) { + if (!RangeContainsProtected(targetStart, targetEnd)) { + if (pixelWidth == 0) { + PRectangle rcText = GetTextRectangle(); + pixelWidth = rcText.Width(); + } + int lineStart = pdoc->LineFromPosition(targetStart); + int lineEnd = pdoc->LineFromPosition(targetEnd); + const char *eol = StringFromEOLMode(pdoc->eolMode); + pdoc->BeginUndoAction(); + for (int line = lineStart; line <= lineEnd; line++) { + AutoSurface surface(this); + AutoLineLayout ll(llc, RetrieveLineLayout(line)); + if (surface && ll) { + unsigned int posLineStart = pdoc->LineStart(line); + LayoutLine(line, surface, vs, ll, pixelWidth); + for (int subLine = 1; subLine < ll->lines; subLine++) { + pdoc->InsertString(posLineStart + (subLine - 1) * strlen(eol) + + ll->LineStart(subLine), eol); + targetEnd += strlen(eol); + } + } + } + pdoc->EndUndoAction(); + } +} + int Editor::SubstituteMarkerIfEmpty(int markerCheck, int markerDefault) { if (vs.markers[markerCheck].markType == SC_MARK_EMPTY) return markerDefault; @@ -1371,9 +1492,9 @@ void Editor::PaintSelMargin(Surface *surfWindow, PRectangle &rc) { // Old code does not know about new markers needed to distinguish all cases int folderOpenMid = SubstituteMarkerIfEmpty(SC_MARKNUM_FOLDEROPENMID, - SC_MARKNUM_FOLDEROPEN); + SC_MARKNUM_FOLDEROPEN); int folderEnd = SubstituteMarkerIfEmpty(SC_MARKNUM_FOLDEREND, - SC_MARKNUM_FOLDER); + SC_MARKNUM_FOLDER); while ((visibleLine < cs.LinesDisplayed()) && yposScreen < rcMargin.bottom) { @@ -1385,7 +1506,7 @@ void Editor::PaintSelMargin(Surface *surfWindow, PRectangle &rc) { // Decide which fold indicator should be displayed level = pdoc->GetLevel(lineDoc); - int levelNext = pdoc->GetLevel(lineDoc+1); + int levelNext = pdoc->GetLevel(lineDoc + 1); int marks = pdoc->GetMark(lineDoc); if (!firstSubLine) marks = 0; @@ -1455,7 +1576,7 @@ void Editor::PaintSelMargin(Surface *surfWindow, PRectangle &rc) { number[0] = '\0'; if (firstSubLine) sprintf(number, "%d", lineDoc + 1); - if (foldFlags & 64) + if (foldFlags & SC_FOLDFLAG_LEVELNUMBERS) sprintf(number, "%X", pdoc->GetLevel(lineDoc)); PRectangle rcNumber = rcMarker; // Right justify @@ -1463,9 +1584,9 @@ void Editor::PaintSelMargin(Surface *surfWindow, PRectangle &rc) { int xpos = rcNumber.right - width - 3; rcNumber.left = xpos; surface->DrawTextNoClip(rcNumber, vs.styles[STYLE_LINENUMBER].font, - rcNumber.top + vs.maxAscent, number, strlen(number), - vs.styles[STYLE_LINENUMBER].fore.allocated, - vs.styles[STYLE_LINENUMBER].back.allocated); + rcNumber.top + vs.maxAscent, number, strlen(number), + vs.styles[STYLE_LINENUMBER].fore.allocated, + vs.styles[STYLE_LINENUMBER].back.allocated); } if (marks) { @@ -1518,8 +1639,8 @@ LineLayout *Editor::RetrieveLineLayout(int lineNumber) { int posLineEnd = pdoc->LineStart(lineNumber + 1); int lineCaret = pdoc->LineFromPosition(currentPos); return llc.Retrieve(lineNumber, lineCaret, - posLineEnd - posLineStart, pdoc->GetStyleClock(), - LinesOnScreen() + 1, pdoc->LinesTotal()); + posLineEnd - posLineStart, pdoc->GetStyleClock(), + LinesOnScreen() + 1, pdoc->LinesTotal()); } /** @@ -1540,7 +1661,7 @@ void Editor::LayoutLine(int line, Surface *surface, ViewStyle &vstyle, LineLayou int lineLength = 0; for (int cid = posLineStart; cid < posLineEnd; cid++) { char chDoc = pdoc->CharAt(cid); - if (vstyle.viewEOL || ((chDoc != '\r') && (chDoc != '\n'))) { + if (vstyle.viewEOL || (!IsEOLChar(chDoc))) { lineLength++; } } @@ -1554,20 +1675,20 @@ void Editor::LayoutLine(int line, Surface *surface, ViewStyle &vstyle, LineLayou for (int charInDoc = posLineStart; allSame && (charInDoc < posLineEnd); charInDoc++) { char chDoc = pdoc->CharAt(charInDoc); styleByte = pdoc->StyleAt(charInDoc); - if (vstyle.viewEOL || ((chDoc != '\r') && (chDoc != '\n'))) { - allSame = allSame && - (ll->styles[numCharsInLine] == static_cast(styleByte & styleMask)); - allSame = allSame && - (ll->indicators[numCharsInLine] == static_cast(styleByte & ~styleMask)); + if (vstyle.viewEOL || (!IsEOLChar(chDoc != '\r'))) { + allSame = allSame && + (ll->styles[numCharsInLine] == static_cast(styleByte & styleMask)); + allSame = allSame && + (ll->indicators[numCharsInLine] == static_cast(styleByte & ~styleMask)); if (vstyle.styles[ll->styles[numCharsInLine]].caseForce == Style::caseUpper) - allSame = allSame && - (ll->chars[numCharsInLine] == static_cast(toupper(chDoc))); + allSame = allSame && + (ll->chars[numCharsInLine] == static_cast(toupper(chDoc))); else if (vstyle.styles[ll->styles[numCharsInLine]].caseForce == Style::caseLower) - allSame = allSame && - (ll->chars[numCharsInLine] == static_cast(tolower(chDoc))); + allSame = allSame && + (ll->chars[numCharsInLine] == static_cast(tolower(chDoc))); else allSame = allSame && - (ll->chars[numCharsInLine] == chDoc); + (ll->chars[numCharsInLine] == chDoc); numCharsInLine++; } } @@ -1599,7 +1720,7 @@ void Editor::LayoutLine(int line, Surface *surface, ViewStyle &vstyle, LineLayou for (int charInDoc = posLineStart; charInDoc < posLineEnd; charInDoc++) { char chDoc = pdoc->CharAt(charInDoc); styleByte = pdoc->StyleAt(charInDoc); - if (vstyle.viewEOL || ((chDoc != '\r') && (chDoc != '\n'))) { + if (vstyle.viewEOL || (!IsEOLChar(chDoc))) { ll->chars[numCharsInLine] = chDoc; ll->styles[numCharsInLine] = static_cast(styleByte & styleMask); ll->indicators[numCharsInLine] = static_cast(styleByte & ~styleMask); @@ -1630,13 +1751,13 @@ void Editor::LayoutLine(int line, Surface *surface, ViewStyle &vstyle, LineLayou bool isControl = isControlNext; isControlNext = IsControlCharacter(ll->chars[charInLine + 1]); if ((ll->styles[charInLine] != ll->styles[charInLine + 1]) || - isControl || isControlNext) { + isControl || isControlNext) { ll->positions[startseg] = 0; if (vstyle.styles[ll->styles[charInLine]].visible) { if (isControl) { if (ll->chars[charInLine] == '\t') { ll->positions[charInLine + 1] = ((((startsegx + 2) / - tabWidth) + 1) * tabWidth) - startsegx; + tabWidth) + 1) * tabWidth) - startsegx; } else if (controlCharSymbol < 32) { const char *ctrlChar = ControlCharacterString(ll->chars[charInLine]); // +3 For a blank on front and rounded edge each side: @@ -1644,7 +1765,7 @@ void Editor::LayoutLine(int line, Surface *surface, ViewStyle &vstyle, LineLayou } else { char cc[2] = { static_cast(controlCharSymbol), '\0' }; surface->MeasureWidths(ctrlCharsFont, cc, 1, - ll->positions + startseg + 1); + ll->positions + startseg + 1); } lastSegItalics = false; } else { // Regular character @@ -1656,7 +1777,7 @@ void Editor::LayoutLine(int line, Surface *surface, ViewStyle &vstyle, LineLayou } else { lastSegItalics = vstyle.styles[ll->styles[charInLine]].italic; surface->MeasureWidths(vstyle.styles[ll->styles[charInLine]].font, ll->chars + startseg, - lenSeg, ll->positions + startseg + 1); + lenSeg, ll->positions + startseg + 1); } } } else { // invisible @@ -1697,19 +1818,19 @@ void Editor::LayoutLine(int line, Surface *surface, ViewStyle &vstyle, LineLayou int lastGoodBreak = 0; int lastLineStart = 0; int startOffset = 0; - int p=0; + int p = 0; while (p < ll->numCharsInLine) { - if ((ll->positions[p+1] - startOffset) >= width) { + if ((ll->positions[p + 1] - startOffset) >= width) { if (lastGoodBreak == lastLineStart) { // Try moving to start of last character if (p > 0) { lastGoodBreak = pdoc->MovePositionOutsideChar(p + posLineStart, -1) - - posLineStart; + - posLineStart; } if (lastGoodBreak == lastLineStart) { // Ensure at least one character on line. - lastGoodBreak = pdoc->MovePositionOutsideChar(lastGoodBreak + posLineStart +1, 1) - - posLineStart; + lastGoodBreak = pdoc->MovePositionOutsideChar(lastGoodBreak + posLineStart + 1, 1) + - posLineStart; } } lastLineStart = lastGoodBreak; @@ -1720,9 +1841,9 @@ void Editor::LayoutLine(int line, Surface *surface, ViewStyle &vstyle, LineLayou continue; } if (p > 0) { - if (ll->styles[p] != ll->styles[p-1]) { + if (ll->styles[p] != ll->styles[p - 1]) { lastGoodBreak = p; - } else if (IsSpaceOrTab(ll->chars[p-1]) && !IsSpaceOrTab(ll->chars[p])) { + } else if (IsSpaceOrTab(ll->chars[p - 1]) && !IsSpaceOrTab(ll->chars[p])) { lastGoodBreak = p; } } @@ -1734,6 +1855,71 @@ void Editor::LayoutLine(int line, Surface *surface, ViewStyle &vstyle, LineLayou } } +ColourAllocated Editor::TextBackground(ViewStyle &vsDraw, bool overrideBackground, + ColourAllocated background, bool inSelection, bool inHotspot, int styleMain, int i, LineLayout *ll) { + if (inSelection) { + if (vsDraw.selbackset) { + if (primarySelection) + return vsDraw.selbackground.allocated; + else + return vsDraw.selbackground2.allocated; + } + } else { + if ((vsDraw.edgeState == EDGE_BACKGROUND) && + (i >= ll->edgeColumn) && + !IsEOLChar(ll->chars[i])) + return vsDraw.edgecolour.allocated; + if (inHotspot) + return vsDraw.hotspotBackground.allocated; + if (overrideBackground) + return background; + } + return vsDraw.styles[styleMain].back.allocated; +} + +void Editor::DrawIndentGuide(Surface *surface, int lineVisible, int lineHeight, int start, PRectangle rcSegment, bool highlight) { + Point from(0, ((lineVisible & 1) && (lineHeight & 1)) ? 1 : 0); + PRectangle rcCopyArea(start + 1, rcSegment.top, start + 2, rcSegment.bottom); + surface->Copy(rcCopyArea, from, + highlight ? *pixmapIndentGuideHighlight : *pixmapIndentGuide); +} + +void Editor::DrawEOL(Surface *surface, ViewStyle &vsDraw, PRectangle rcLine, LineLayout *ll, + int line, int lineEnd, int xStart, int subLine, int subLineStart, + bool overrideBackground, ColourAllocated background) { + + int styleMask = pdoc->stylingBitsMask; + PRectangle rcSegment = rcLine; + + // Fill in a PRectangle representing the end of line characters + int xEol = ll->positions[lineEnd] - subLineStart; + rcSegment.left = xEol + xStart; + rcSegment.right = xEol + vsDraw.aveCharWidth + xStart; + int posLineEnd = pdoc->LineStart(line + 1); + bool eolInSelection = (subLine == (ll->lines - 1)) && + (posLineEnd > ll->selStart) && (posLineEnd <= ll->selEnd) && (ll->selStart != ll->selEnd); + if (eolInSelection && vsDraw.selbackset && (line < pdoc->LinesTotal() - 1)) { + if (primarySelection) + surface->FillRectangle(rcSegment, vsDraw.selbackground.allocated); + else + surface->FillRectangle(rcSegment, vsDraw.selbackground2.allocated); + } else if (overrideBackground) { + surface->FillRectangle(rcSegment, background); + } else { + surface->FillRectangle(rcSegment, vsDraw.styles[ll->styles[ll->numCharsInLine] & styleMask].back.allocated); + } + + rcSegment.left = xEol + vsDraw.aveCharWidth + xStart; + rcSegment.right = rcLine.right; + if (overrideBackground) { + surface->FillRectangle(rcSegment, background); + } else if (vsDraw.styles[ll->styles[ll->numCharsInLine] & styleMask].eolFilled) { + surface->FillRectangle(rcSegment, vsDraw.styles[ll->styles[ll->numCharsInLine] & styleMask].back.allocated); + } else { + surface->FillRectangle(rcSegment, vsDraw.styles[STYLE_DEFAULT].back.allocated); + } +} + void Editor::DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int lineVisible, int xStart, PRectangle rcLine, LineLayout *ll, int subLine) { @@ -1780,29 +1966,33 @@ void Editor::DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int lineVis } } + bool drawWhitespaceBackground = (vsDraw.viewWhitespace != wsInvisible) && + (!overrideBackground) && (vsDraw.whitespaceBackgroundSet); + bool inIndentation = subLine == 0; // Do not handle indentation except on first subline. int indentWidth = pdoc->indentInChars * vsDraw.spaceWidth; if (indentWidth == 0) indentWidth = pdoc->tabInChars * vsDraw.spaceWidth; int posLineStart = pdoc->LineStart(line); - int posLineEnd = pdoc->LineStart(line + 1); - int styleMask = pdoc->stylingBitsMask; int startseg = ll->LineStart(subLine); int subLineStart = ll->positions[startseg]; int lineStart = 0; int lineEnd = 0; if (subLine < ll->lines) { lineStart = ll->LineStart(subLine); - lineEnd = ll->LineStart(subLine+1); + lineEnd = ll->LineStart(subLine + 1); } - for (int i = lineStart; i < lineEnd; i++) { + int i; + + // Background drawing loop + for (i = lineStart; twoPhaseDraw && (i < lineEnd); i++) { int iDoc = i + posLineStart; // If there is the end of a style run for any reason if ((ll->styles[i] != ll->styles[i + 1]) || - i == (lineEnd-1) || + i == (lineEnd - 1) || IsControlCharacter(ll->chars[i]) || IsControlCharacter(ll->chars[i + 1]) || ((ll->selStart != ll->selEnd) && ((iDoc + 1 == ll->selStart) || (iDoc + 1 == ll->selEnd))) || (i == (ll->edgeColumn - 1))) { @@ -1812,30 +2002,87 @@ void Editor::DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int lineVis // draw strings that are completely past the right side of the window. if ((rcSegment.left <= rcLine.right) && (rcSegment.right >= rcLine.left)) { int styleMain = ll->styles[i]; - ColourAllocated textBack = vsDraw.styles[styleMain].back.allocated; - ColourAllocated textFore = vsDraw.styles[styleMain].fore.allocated; - Font &textFont = vsDraw.styles[styleMain].font; bool inSelection = (iDoc >= ll->selStart) && (iDoc < ll->selEnd) && (ll->selStart != ll->selEnd); - if (inSelection) { - if (vsDraw.selbackset) { - if (primarySelection) - textBack = vsDraw.selbackground.allocated; - else - textBack = vsDraw.selbackground2.allocated; - } - if (vsDraw.selforeset) - textFore = vsDraw.selforeground.allocated; - } else { - if (overrideBackground) - textBack = background; - if ((vsDraw.edgeState == EDGE_BACKGROUND) && (i >= ll->edgeColumn) && (ll->chars[i] != '\n') && (ll->chars[i] != '\r')) - textBack = vsDraw.edgecolour.allocated; - } + bool inHotspot = (ll->hsStart != -1) && (iDoc >= ll->hsStart) && (iDoc < ll->hsEnd); + ColourAllocated textBack = TextBackground(vsDraw, overrideBackground, background, inSelection, inHotspot, styleMain, i, ll); if (ll->chars[i] == '\t') { - // Manage tab display - if (!overrideBackground && vsDraw.whitespaceBackgroundSet && (vsDraw.viewWhitespace != wsInvisible) && (!inIndentation || vsDraw.viewWhitespace == wsVisibleAlways)) + // Tab display + if (drawWhitespaceBackground && + (!inIndentation || vsDraw.viewWhitespace == wsVisibleAlways)) textBack = vsDraw.whitespaceBackground.allocated; surface->FillRectangle(rcSegment, textBack); + } else if (IsControlCharacter(ll->chars[i])) { + // Control character display + inIndentation = false; + surface->FillRectangle(rcSegment, textBack); + } else { + // Normal text display + surface->FillRectangle(rcSegment, textBack); + if (vsDraw.viewWhitespace != wsInvisible || + (inIndentation && vsDraw.viewIndentationGuides)) { + for (int cpos = 0; cpos <= i - startseg; cpos++) { + if (ll->chars[cpos + startseg] == ' ') { + if (drawWhitespaceBackground && + (!inIndentation || vsDraw.viewWhitespace == wsVisibleAlways)) { + PRectangle rcSpace(ll->positions[cpos + startseg] + xStart, rcSegment.top, + ll->positions[cpos + startseg + 1] + xStart, rcSegment.bottom); + surface->FillRectangle(rcSpace, vsDraw.whitespaceBackground.allocated); + } + } else { + inIndentation = false; + } + } + } + } + } + startseg = i + 1; + } + } + + if (twoPhaseDraw) { + DrawEOL(surface, vsDraw, rcLine, ll, line, lineEnd, + xStart, subLine, subLineStart, overrideBackground, background); + } + + inIndentation = subLine == 0; // Do not handle indentation except on first subline. + startseg = ll->LineStart(subLine); + // Foreground drawing loop + for (i = lineStart; i < lineEnd; i++) { + + int iDoc = i + posLineStart; + // If there is the end of a style run for any reason + if ((ll->styles[i] != ll->styles[i + 1]) || + i == (lineEnd - 1) || + IsControlCharacter(ll->chars[i]) || IsControlCharacter(ll->chars[i + 1]) || + ((ll->selStart != ll->selEnd) && ((iDoc + 1 == ll->selStart) || (iDoc + 1 == ll->selEnd))) || + (i == (ll->edgeColumn - 1))) { + rcSegment.left = ll->positions[startseg] + xStart - subLineStart; + rcSegment.right = ll->positions[i + 1] + xStart - subLineStart; + // Only try to draw if really visible - enhances performance by not calling environment to + // draw strings that are completely past the right side of the window. + if ((rcSegment.left <= rcLine.right) && (rcSegment.right >= rcLine.left)) { + int styleMain = ll->styles[i]; + ColourAllocated textFore = vsDraw.styles[styleMain].fore.allocated; + Font &textFont = vsDraw.styles[styleMain].font; + //hotspot foreground + if (ll->hsStart != -1 && iDoc >= ll->hsStart && iDoc < hsEnd) { + if (vsDraw.hotspotForegroundSet) + textFore = vsDraw.hotspotForeground.allocated; + } + bool inSelection = (iDoc >= ll->selStart) && (iDoc < ll->selEnd) && (ll->selStart != ll->selEnd); + if (inSelection && (vsDraw.selforeset)) { + textFore = vsDraw.selforeground.allocated; + } + bool inHotspot = (ll->hsStart != -1) && (iDoc >= ll->hsStart) && (iDoc < ll->hsEnd); + ColourAllocated textBack = TextBackground(vsDraw, overrideBackground, background, inSelection, inHotspot, styleMain, i, ll); + if (ll->chars[i] == '\t') { + // Tab display + if (!twoPhaseDraw) { + if (drawWhitespaceBackground && + (!inIndentation || vsDraw.viewWhitespace == wsVisibleAlways)) + textBack = vsDraw.whitespaceBackground.allocated; + surface->FillRectangle(rcSegment, textBack); + } if ((vsDraw.viewWhitespace != wsInvisible) || ((inIndentation && vsDraw.viewIndentationGuides))) { if (vsDraw.whitespaceForegroundSet) textFore = vsDraw.whitespaceForeground.allocated; @@ -1844,29 +2091,29 @@ void Editor::DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int lineVis if (inIndentation && vsDraw.viewIndentationGuides) { for (int xIG = ll->positions[i] / indentWidth * indentWidth; xIG < ll->positions[i + 1]; xIG += indentWidth) { if (xIG >= ll->positions[i] && xIG > 0) { - Point from(0, ((lineVisible & 1) && (vsDraw.lineHeight & 1)) ? 1 : 0); - PRectangle rcCopyArea(xIG + xStart + 1, rcSegment.top, xIG + xStart + 2, rcSegment.bottom); - surface->Copy(rcCopyArea, from, (ll->xHighlightGuide == xIG) ? - *pixmapIndentGuideHighlight : *pixmapIndentGuide); + DrawIndentGuide(surface, lineVisible, vsDraw.lineHeight, xIG + xStart, rcSegment, + (ll->xHighlightGuide == xIG)); } } } if (vsDraw.viewWhitespace != wsInvisible) { if (!inIndentation || vsDraw.viewWhitespace == wsVisibleAlways) { PRectangle rcTab(rcSegment.left + 1, rcSegment.top + 4, - rcSegment.right - 1, rcSegment.bottom - vsDraw.maxDescent); + rcSegment.right - 1, rcSegment.bottom - vsDraw.maxDescent); DrawTabArrow(surface, rcTab, rcSegment.top + vsDraw.lineHeight / 2); } } } else if (IsControlCharacter(ll->chars[i])) { - // Manage control character display + // Control character display inIndentation = false; if (controlCharSymbol < 32) { // Draw the character const char *ctrlChar = ControlCharacterString(ll->chars[i]); - surface->FillRectangle(rcSegment, textBack); + if (!twoPhaseDraw) { + surface->FillRectangle(rcSegment, textBack); + } int normalCharHeight = surface->Ascent(ctrlCharsFont) - - surface->InternalLeading(ctrlCharsFont); + surface->InternalLeading(ctrlCharsFont); PRectangle rcCChar = rcSegment; rcCChar.left = rcCChar.left + 1; rcCChar.top = rcSegment.top + vsDraw.maxAscent - normalCharHeight; @@ -1879,19 +2126,27 @@ void Editor::DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int lineVis rcChar.left++; rcChar.right--; surface->DrawTextClipped(rcChar, ctrlCharsFont, - rcSegment.top + vsDraw.maxAscent, ctrlChar, strlen(ctrlChar), - textBack, textFore); + rcSegment.top + vsDraw.maxAscent, ctrlChar, strlen(ctrlChar), + textBack, textFore); } else { char cc[2] = { static_cast(controlCharSymbol), '\0' }; surface->DrawTextNoClip(rcSegment, ctrlCharsFont, - rcSegment.top + vsDraw.maxAscent, - cc, 1, textBack, textFore); + rcSegment.top + vsDraw.maxAscent, + cc, 1, textBack, textFore); } } else { - // Manage normal display - surface->DrawTextNoClip(rcSegment, textFont, - rcSegment.top + vsDraw.maxAscent, ll->chars + startseg, - i - startseg + 1, textFore, textBack); + // Normal text display + if (vsDraw.styles[styleMain].visible) { + if (twoPhaseDraw) { + surface->DrawTextTransparent(rcSegment, textFont, + rcSegment.top + vsDraw.maxAscent, ll->chars + startseg, + i - startseg + 1, textFore); + } else { + surface->DrawTextNoClip(rcSegment, textFont, + rcSegment.top + vsDraw.maxAscent, ll->chars + startseg, + i - startseg + 1, textFore, textBack); + } + } if (vsDraw.viewWhitespace != wsInvisible || (inIndentation && vsDraw.viewIndentationGuides)) { for (int cpos = 0; cpos <= i - startseg; cpos++) { @@ -1901,12 +2156,13 @@ void Editor::DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int lineVis textFore = vsDraw.whitespaceForeground.allocated; if (!inIndentation || vsDraw.viewWhitespace == wsVisibleAlways) { int xmid = (ll->positions[cpos + startseg] + ll->positions[cpos + startseg + 1]) / 2; - if (!overrideBackground && vsDraw.whitespaceBackgroundSet) { + if (!twoPhaseDraw && drawWhitespaceBackground && + (!inIndentation || vsDraw.viewWhitespace == wsVisibleAlways)) { textBack = vsDraw.whitespaceBackground.allocated; PRectangle rcSpace(ll->positions[cpos + startseg] + xStart, rcSegment.top, ll->positions[cpos + startseg + 1] + xStart, rcSegment.bottom); surface->FillRectangle(rcSpace, textBack); } - PRectangle rcDot(xmid + xStart - subLineStart, rcSegment.top + vsDraw.lineHeight / 2, 0, 0); + PRectangle rcDot(xmid + xStart - subLineStart, rcSegment.top + vsDraw.lineHeight / 2, 0, 0); rcDot.right = rcDot.left + 1; rcDot.bottom = rcDot.top + 1; surface->FillRectangle(rcDot, textFore); @@ -1915,10 +2171,8 @@ void Editor::DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int lineVis if (inIndentation && vsDraw.viewIndentationGuides) { int startSpace = ll->positions[cpos + startseg]; if (startSpace > 0 && (startSpace % indentWidth == 0)) { - Point from(0, ((lineVisible & 1) && (vsDraw.lineHeight & 1)) ? 1 : 0); - PRectangle rcCopyArea(startSpace + xStart + 1, rcSegment.top, startSpace + xStart + 2, rcSegment.bottom); - surface->Copy(rcCopyArea, from, (ll->xHighlightGuide == ll->positions[cpos + startseg]) ? - *pixmapIndentGuideHighlight : *pixmapIndentGuide); + DrawIndentGuide(surface, lineVisible, vsDraw.lineHeight, startSpace + xStart, rcSegment, + (ll->xHighlightGuide == ll->positions[cpos + startseg])); } } } else { @@ -1927,7 +2181,15 @@ void Editor::DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int lineVis } } } - if (vsDraw.styles[styleMain].underline) { + if (ll->hsStart != -1 && vsDraw.hotspotUnderline && iDoc >= ll->hsStart && iDoc < ll->hsEnd ) { + PRectangle rcUL = rcSegment; + rcUL.top = rcUL.top + vsDraw.maxAscent + 1; + rcUL.bottom = rcUL.top + 1; + if (vsDraw.hotspotForegroundSet) + surface->FillRectangle(rcUL, vsDraw.hotspotForeground.allocated); + else + surface->FillRectangle(rcUL, textFore); + } else if (vsDraw.styles[styleMain].underline) { PRectangle rcUL = rcSegment; rcUL.top = rcUL.top + vsDraw.maxAscent + 1; rcUL.bottom = rcUL.top + 1; @@ -1964,31 +2226,9 @@ void Editor::DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int lineVis } // End of the drawing of the current line - // Fill in a PRectangle representing the end of line characters - int xEol = ll->positions[lineEnd] - subLineStart; - rcSegment.left = xEol + xStart; - rcSegment.right = xEol + vsDraw.aveCharWidth + xStart; - bool eolInSelection = (subLine == (ll->lines-1)) && - (posLineEnd > ll->selStart) && (posLineEnd <= ll->selEnd) && (ll->selStart != ll->selEnd); - if (eolInSelection && vsDraw.selbackset && (line < pdoc->LinesTotal() - 1)) { - if (primarySelection) - surface->FillRectangle(rcSegment, vsDraw.selbackground.allocated); - else - surface->FillRectangle(rcSegment, vsDraw.selbackground2.allocated); - } else if (overrideBackground) { - surface->FillRectangle(rcSegment, background); - } else { - surface->FillRectangle(rcSegment, vsDraw.styles[ll->styles[ll->numCharsInLine] & styleMask].back.allocated); - } - - rcSegment.left = xEol + vsDraw.aveCharWidth + xStart; - rcSegment.right = rcLine.right; - if (overrideBackground) { - surface->FillRectangle(rcSegment, background); - } else if (vsDraw.styles[ll->styles[ll->numCharsInLine] & styleMask].eolFilled) { - surface->FillRectangle(rcSegment, vsDraw.styles[ll->styles[ll->numCharsInLine] & styleMask].back.allocated); - } else { - surface->FillRectangle(rcSegment, vsDraw.styles[STYLE_DEFAULT].back.allocated); + if (!twoPhaseDraw) { + DrawEOL(surface, vsDraw, rcLine, ll, line, lineEnd, + xStart, subLine, subLineStart, overrideBackground, background); } if (vsDraw.edgeState == EDGE_LINE) { @@ -1999,47 +2239,48 @@ void Editor::DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int lineVis } } -void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { - //Platform::DebugPrintf("Paint:%1d (%3d,%3d) ... (%3d,%3d)\n", - // paintingAllText, rcArea.left, rcArea.top, rcArea.right, rcArea.bottom); - - RefreshStyleData(); - - PRectangle rcClient = GetClientRectangle(); - //Platform::DebugPrintf("Client: (%3d,%3d) ... (%3d,%3d) %d\n", - // rcClient.left, rcClient.top, rcClient.right, rcClient.bottom); - - if (WrapLines()) { - // The wrapping process has changed the height of some lines so abandon this - // paint for a complete repaint. - if (AbandonPaint()) { - return; - } - } - +void Editor::RefreshPixMaps(Surface *surfaceWindow) { if (!pixmapSelPattern->Initialised()) { - pixmapSelPattern->InitPixMap(8, 8, surfaceWindow); - // This complex procedure is to reproduce the checker board dithered pattern used by windows + const int patternSize = 8; + pixmapSelPattern->InitPixMap(patternSize, patternSize, surfaceWindow, wMain.GetID()); + // This complex procedure is to reproduce the checkerboard dithered pattern used by windows // for scroll bars and Visual Studio for its selection margin. The colour of this pattern is half // way between the chrome colour and the chrome highlight colour making a nice transition // between the window chrome and the content area. And it works in low colour depths. - PRectangle rcPattern(0, 0, 8, 8); - if (vs.selbarlight.desired == ColourDesired(0xff, 0xff, 0xff)) { - pixmapSelPattern->FillRectangle(rcPattern, vs.selbar.allocated); - pixmapSelPattern->PenColour(vs.selbarlight.allocated); - for (int stripe = 0; stripe < 8; stripe++) { - pixmapSelPattern->MoveTo(0, stripe * 2); - pixmapSelPattern->LineTo(8, stripe * 2 - 8); - } - } else { + PRectangle rcPattern(0, 0, patternSize, patternSize); + + // Initialize default colours based on the chrome colour scheme. Typically the highlight is white. + ColourAllocated colourFMFill = vs.selbar.allocated; + ColourAllocated colourFMStripes = vs.selbarlight.allocated; + + if (!(vs.selbarlight.desired == ColourDesired(0xff, 0xff, 0xff))) { // User has chosen an unusual chrome colour scheme so just use the highlight edge colour. - pixmapSelPattern->FillRectangle(rcPattern, vs.selbarlight.allocated); + // (Typically, the highlight colour is white.) + colourFMFill = vs.selbarlight.allocated; + } + + if (vs.foldmarginColourSet) { + // override default fold margin colour + colourFMFill = vs.foldmarginColour.allocated; + } + if (vs.foldmarginHighlightColourSet) { + // override default fold margin highlight colour + colourFMStripes = vs.foldmarginHighlightColour.allocated; + } + + pixmapSelPattern->FillRectangle(rcPattern, colourFMFill); + pixmapSelPattern->PenColour(colourFMStripes); + for (int stripe = 0; stripe < patternSize; stripe++) { + // Alternating 1 pixel stripes is same as checkerboard. + pixmapSelPattern->MoveTo(0, stripe * 2); + pixmapSelPattern->LineTo(patternSize, stripe * 2 - patternSize); } } + if (!pixmapIndentGuide->Initialised()) { // 1 extra pixel in height so can handle odd/even positions and so produce a continuous line - pixmapIndentGuide->InitPixMap(1, vs.lineHeight + 1, surfaceWindow); - pixmapIndentGuideHighlight->InitPixMap(1, vs.lineHeight + 1, surfaceWindow); + pixmapIndentGuide->InitPixMap(1, vs.lineHeight + 1, surfaceWindow, wMain.GetID()); + pixmapIndentGuideHighlight->InitPixMap(1, vs.lineHeight + 1, surfaceWindow, wMain.GetID()); PRectangle rcIG(0, 0, 1, vs.lineHeight); pixmapIndentGuide->FillRectangle(rcIG, vs.styles[STYLE_INDENTGUIDE].back.allocated); pixmapIndentGuide->PenColour(vs.styles[STYLE_INDENTGUIDE].fore.allocated); @@ -2055,12 +2296,26 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { if (bufferedDraw) { if (!pixmapLine->Initialised()) { + PRectangle rcClient = GetClientRectangle(); pixmapLine->InitPixMap(rcClient.Width(), rcClient.Height(), - surfaceWindow); + surfaceWindow, wMain.GetID()); pixmapSelMargin->InitPixMap(vs.fixedColumnWidth, - rcClient.Height(), surfaceWindow); + rcClient.Height(), surfaceWindow, wMain.GetID()); } } +} + +void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { + //Platform::DebugPrintf("Paint:%1d (%3d,%3d) ... (%3d,%3d)\n", + // paintingAllText, rcArea.left, rcArea.top, rcArea.right, rcArea.bottom); + + RefreshStyleData(); + + RefreshPixMaps(surfaceWindow); + + PRectangle rcClient = GetClientRectangle(); + //Platform::DebugPrintf("Client: (%3d,%3d) ... (%3d,%3d) %d\n", + // rcClient.left, rcClient.top, rcClient.right, rcClient.bottom); surfaceWindow->SetPalette(&palette, true); pixmapLine->SetPalette(&palette, !hasFocus); @@ -2090,6 +2345,14 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { PaintSelMargin(surfaceWindow, rcArea); + if (WrapLines()) { + // The wrapping process has changed the height of some lines so abandon this + // paint for a complete repaint. + if (AbandonPaint()) { + return; + } + } + PRectangle rcRightMargin = rcClient; rcRightMargin.left = rcRightMargin.right - vs.rightMarginWidth; if (rcArea.Intersects(rcRightMargin)) { @@ -2119,6 +2382,7 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { surface = pixmapLine; } surface->SetUnicodeMode(IsUnicodeMode()); + surface->SetDBCSMode(CodePage()); int visibleLine = topLine + screenLinePaintFirst; @@ -2140,7 +2404,7 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { //double durCopy = 0.0; //ElapsedTime etWhole; int lineDocPrevious = -1; // Used to avoid laying out one document line multiple times - LineLayout *ll = 0; + AutoLineLayout ll(llc, 0); while (visibleLine < cs.LinesDisplayed() && yposScreen < rcArea.bottom) { int lineDoc = cs.DocFromDisplay(visibleLine); @@ -2153,8 +2417,7 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { // and determine the x position at which each character starts. //ElapsedTime et; if (lineDoc != lineDocPrevious) { - llc.Dispose(ll); - ll = RetrieveLineLayout(lineDoc); + ll.Set(RetrieveLineLayout(lineDoc)); LayoutLine(lineDoc, surface, vs, ll, wrapWidth); lineDocPrevious = lineDoc; } @@ -2170,6 +2433,8 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { ll->containsCaret = false; } + GetHotSpotRange(ll->hsStart, ll->hsEnd); + PRectangle rcLine = rcClient; rcLine.top = ypos; rcLine.bottom = ypos + vs.lineHeight; @@ -2177,7 +2442,7 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { Range rangeLine(pdoc->LineStart(lineDoc), pdoc->LineStart(lineDoc + 1)); // Highlight the current braces if any ll->SetBracesHighlight(rangeLine, braces, static_cast(bracesMatchStyle), - highlightGuideColumn * vs.spaceWidth); + highlightGuideColumn * vs.spaceWidth); // Draw the line DrawLine(surface, vs, lineDoc, visibleLine, xStart, rcLine, ll, subLine); @@ -2187,26 +2452,68 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { ll->RestoreBracesHighlight(rangeLine, braces); bool expanded = cs.GetExpanded(lineDoc); - if ( (expanded && (foldFlags & 2)) || (!expanded && (foldFlags & 4)) ) { - if (pdoc->GetLevel(lineDoc) & SC_FOLDLEVELHEADERFLAG) { + if ((foldFlags & SC_FOLDFLAG_BOX) == 0) { + // Paint the line above the fold + if ((expanded && (foldFlags & SC_FOLDFLAG_LINEBEFORE_EXPANDED)) + || + (!expanded && (foldFlags & SC_FOLDFLAG_LINEBEFORE_CONTRACTED))) { + if (pdoc->GetLevel(lineDoc) & SC_FOLDLEVELHEADERFLAG) { + PRectangle rcFoldLine = rcLine; + rcFoldLine.bottom = rcFoldLine.top + 1; + surface->FillRectangle(rcFoldLine, vs.styles[STYLE_DEFAULT].fore.allocated); + } + } + // Paint the line below the fold + if ((expanded && (foldFlags & SC_FOLDFLAG_LINEAFTER_EXPANDED)) + || + (!expanded && (foldFlags & SC_FOLDFLAG_LINEAFTER_CONTRACTED))) { + if (pdoc->GetLevel(lineDoc) & SC_FOLDLEVELHEADERFLAG) { + PRectangle rcFoldLine = rcLine; + rcFoldLine.top = rcFoldLine.bottom - 1; + surface->FillRectangle(rcFoldLine, vs.styles[STYLE_DEFAULT].fore.allocated); + } + } + } else { + int FoldLevelCurr = (pdoc->GetLevel(lineDoc) & SC_FOLDLEVELNUMBERMASK) - SC_FOLDLEVELBASE; + int FoldLevelPrev = (pdoc->GetLevel(lineDoc - 1) & SC_FOLDLEVELNUMBERMASK) - SC_FOLDLEVELBASE; + int FoldLevelFlags = (pdoc->GetLevel(lineDoc) & ~SC_FOLDLEVELNUMBERMASK); + int indentationStep = (pdoc->indentInChars ? pdoc->indentInChars : pdoc->tabInChars); + // Draw line above fold + if ((FoldLevelPrev < FoldLevelCurr) + || + (FoldLevelFlags & SC_FOLDLEVELBOXHEADERFLAG + && + (pdoc->GetLevel(lineDoc - 1) & SC_FOLDLEVELBOXFOOTERFLAG) == 0)) { PRectangle rcFoldLine = rcLine; rcFoldLine.bottom = rcFoldLine.top + 1; + rcFoldLine.left += xStart + FoldLevelCurr * vs.spaceWidth * indentationStep - 1; surface->FillRectangle(rcFoldLine, vs.styles[STYLE_DEFAULT].fore.allocated); } - } - if ( (expanded && (foldFlags & 8)) || (!expanded && (foldFlags & 16)) ) { - if (pdoc->GetLevel(lineDoc) & SC_FOLDLEVELHEADERFLAG) { + + // Line below the fold (or below a contracted fold) + if (FoldLevelFlags & SC_FOLDLEVELBOXFOOTERFLAG + || + (!expanded && (foldFlags & SC_FOLDFLAG_LINEAFTER_CONTRACTED))) { PRectangle rcFoldLine = rcLine; rcFoldLine.top = rcFoldLine.bottom - 1; + rcFoldLine.left += xStart + (FoldLevelCurr) * vs.spaceWidth * indentationStep - 1; surface->FillRectangle(rcFoldLine, vs.styles[STYLE_DEFAULT].fore.allocated); } + + PRectangle rcBoxLine = rcLine; + // Draw vertical line for every fold level + for (int i = 0; i <= FoldLevelCurr; i++) { + rcBoxLine.left = xStart + i * vs.spaceWidth * indentationStep - 1; + rcBoxLine.right = rcBoxLine.left + 1; + surface->FillRectangle(rcBoxLine, vs.styles[STYLE_DEFAULT].fore.allocated); + } } // Draw the Caret if (lineDoc == lineCaret) { int offset = Platform::Minimum(posCaret - rangeLine.start, ll->maxLineLength); if ((offset >= ll->LineStart(subLine)) && - ((offset < ll->LineStart(subLine+1)) || offset == ll->numCharsInLine)) { + ((offset < ll->LineStart(subLine + 1)) || offset == ll->numCharsInLine)) { int xposCaret = ll->positions[offset] - ll->positions[ll->LineStart(subLine)] + xStart; int widthOverstrikeCaret; if (posCaret == pdoc->Length()) { // At end of document @@ -2244,7 +2551,7 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { if (bufferedDraw) { Point from(vs.fixedColumnWidth, 0); PRectangle rcCopyArea(vs.fixedColumnWidth, yposScreen, - rcClient.right, yposScreen + vs.lineHeight); + rcClient.right, yposScreen + vs.lineHeight); surfaceWindow->Copy(rcCopyArea, from, *pixmapLine); } //durCopy += et.Duration(true); @@ -2258,7 +2565,6 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { visibleLine++; //gdk_flush(); } - llc.Dispose(ll); //if (durPaint < 0.00000001) // durPaint = 0.00000001; @@ -2307,10 +2613,10 @@ long Editor::FormatRange(bool draw, RangeToFormat *pfr) { if (!pfr) return 0; - AutoSurface surface(pfr->hdc, IsUnicodeMode()); + AutoSurface surface(pfr->hdc, this); if (!surface) return 0; - AutoSurface surfaceMeasure(pfr->hdcTarget, IsUnicodeMode()); + AutoSurface surfaceMeasure(pfr->hdcTarget, this); if (!surfaceMeasure) { return 0; } @@ -2364,8 +2670,8 @@ long Editor::FormatRange(bool draw, RangeToFormat *pfr) { // Determining width must hapen after fonts have been realised in Refresh int lineNumberWidth = 0; if (lineNumberIndex >= 0) { - lineNumberWidth = surface->WidthText(vsPrint.styles[STYLE_LINENUMBER].font, - "99999" lineNumberPrintSpace, 5 + strlen(lineNumberPrintSpace)); + lineNumberWidth = surfaceMeasure->WidthText(vsPrint.styles[STYLE_LINENUMBER].font, + "99999" lineNumberPrintSpace, 5 + strlen(lineNumberPrintSpace)); vsPrint.ms[lineNumberIndex].width = lineNumberWidth; } @@ -2373,12 +2679,12 @@ long Editor::FormatRange(bool draw, RangeToFormat *pfr) { int linePrintLast = linePrintStart + (pfr->rc.bottom - pfr->rc.top) / vsPrint.lineHeight - 1; if (linePrintLast < linePrintStart) linePrintLast = linePrintStart; - int linePrintMax = pdoc->LineFromPosition(pfr->chrg.cpMax - 1); + int linePrintMax = pdoc->LineFromPosition(pfr->chrg.cpMax); if (linePrintLast > linePrintMax) linePrintLast = linePrintMax; //Platform::DebugPrintf("Formatting lines=[%0d,%0d,%0d] top=%0d bottom=%0d line=%0d %0d\n", - // linePrintStart, linePrintLast, linePrintMax, pfr->rc.top, pfr->rc.bottom, vsPrint.lineHeight, - // surfaceMeasure->Height(vsPrint.styles[STYLE_LINENUMBER].font)); + // linePrintStart, linePrintLast, linePrintMax, pfr->rc.top, pfr->rc.bottom, vsPrint.lineHeight, + // surfaceMeasure->Height(vsPrint.styles[STYLE_LINENUMBER].font)); int endPosPrint = pdoc->Length(); if (linePrintLast < pdoc->LinesTotal()) endPosPrint = pdoc->LineStart(linePrintLast + 1); @@ -2388,61 +2694,101 @@ long Editor::FormatRange(bool draw, RangeToFormat *pfr) { int xStart = vsPrint.fixedColumnWidth + pfr->rc.left + lineNumberWidth; int ypos = pfr->rc.top; - int line = linePrintStart; - if (draw) { // Otherwise just measuring + int lineDoc = linePrintStart; - while (line <= linePrintLast && ypos < pfr->rc.bottom) { + int nPrintPos = pfr->chrg.cpMin; + int visibleLine = 0; + int widthPrint = pfr->rc.Width() - lineNumberWidth; + if (printWrapState == eWrapNone) + widthPrint = LineLayout::wrapWidthInfinite; - // When printing, the hdc and hdcTarget may be the same, so - // changing the state of surfaceMeasure may change the underlying - // state of surface. Therefore, any cached state is discarded before - // using each surface. - surfaceMeasure->FlushCachedState(); + while (lineDoc <= linePrintLast && ypos < pfr->rc.bottom) { - // Copy this line and its styles from the document into local arrays - // and determine the x position at which each character starts. - LineLayout ll(8000); - LayoutLine(line, surfaceMeasure, vsPrint, &ll); - ll.selStart = -1; - ll.selEnd = -1; - ll.containsCaret = false; + // When printing, the hdc and hdcTarget may be the same, so + // changing the state of surfaceMeasure may change the underlying + // state of surface. Therefore, any cached state is discarded before + // using each surface. + surfaceMeasure->FlushCachedState(); - PRectangle rcLine; - rcLine.left = pfr->rc.left + lineNumberWidth; - rcLine.top = ypos; - rcLine.right = pfr->rc.right; - rcLine.bottom = ypos + vsPrint.lineHeight; + // Copy this line and its styles from the document into local arrays + // and determine the x position at which each character starts. + LineLayout ll(8000); + LayoutLine(lineDoc, surfaceMeasure, vsPrint, &ll, widthPrint); - if (lineNumberWidth) { - char number[100]; - sprintf(number, "%d" lineNumberPrintSpace, line + 1); - PRectangle rcNumber = rcLine; - rcNumber.right = rcNumber.left + lineNumberWidth; - // Right justify - rcNumber.left -= - surface->WidthText(vsPrint.styles[STYLE_LINENUMBER].font, number, strlen(number)); - surface->DrawTextNoClip(rcNumber, vsPrint.styles[STYLE_LINENUMBER].font, - ypos + vsPrint.maxAscent, number, strlen(number), - vsPrint.styles[STYLE_LINENUMBER].fore.allocated, - vsPrint.styles[STYLE_LINENUMBER].back.allocated); + ll.selStart = -1; + ll.selEnd = -1; + ll.containsCaret = false; + + PRectangle rcLine; + rcLine.left = pfr->rc.left + lineNumberWidth; + rcLine.top = ypos; + rcLine.right = pfr->rc.right - 1; + rcLine.bottom = ypos + vsPrint.lineHeight; + + // When document line is wrapped over multiple display lines, find where + // to start printing from to ensure a particular position is on the first + // line of the page. + if (visibleLine == 0) { + int startWithinLine = nPrintPos - pdoc->LineStart(lineDoc); + for (int iwl = 0; iwl < ll.lines - 1; iwl++) { + if (ll.LineStart(iwl) <= startWithinLine && ll.LineStart(iwl + 1) >= startWithinLine) { + visibleLine = -iwl; + } } - // Draw the line - surface->FlushCachedState(); - DrawLine(surface, vsPrint, line, line, xStart, rcLine, &ll); - - ypos += vsPrint.lineHeight; - line++; + if (ll.lines > 1 && startWithinLine >= ll.LineStart(ll.lines - 1)) { + visibleLine = -(ll.lines - 1); + } } + + if (draw && lineNumberWidth && + (ypos + vsPrint.lineHeight <= pfr->rc.bottom) && + (visibleLine >= 0)) { + char number[100]; + sprintf(number, "%d" lineNumberPrintSpace, lineDoc + 1); + PRectangle rcNumber = rcLine; + rcNumber.right = rcNumber.left + lineNumberWidth; + // Right justify + rcNumber.left -= surfaceMeasure->WidthText( + vsPrint.styles[STYLE_LINENUMBER].font, number, strlen(number)); + surface->FlushCachedState(); + surface->DrawTextNoClip(rcNumber, vsPrint.styles[STYLE_LINENUMBER].font, + ypos + vsPrint.maxAscent, number, strlen(number), + vsPrint.styles[STYLE_LINENUMBER].fore.allocated, + vsPrint.styles[STYLE_LINENUMBER].back.allocated); + } + + // Draw the line + surface->FlushCachedState(); + + for (int iwl = 0; iwl < ll.lines; iwl++) { + if (ypos + vsPrint.lineHeight <= pfr->rc.bottom) { + if (visibleLine >= 0) { + if (draw) { + rcLine.top = ypos; + rcLine.bottom = ypos + vsPrint.lineHeight; + DrawLine(surface, vsPrint, lineDoc, visibleLine, xStart, rcLine, &ll, iwl); + } + ypos += vsPrint.lineHeight; + } + visibleLine++; + if (iwl == ll.lines - 1) + nPrintPos = pdoc->LineStart(lineDoc + 1); + else + nPrintPos += ll.LineStart(iwl + 1) - ll.LineStart(iwl); + } + } + + ++lineDoc; } - return endPosPrint; + return nPrintPos; } int Editor::TextWidth(int style, const char *text) { RefreshStyleData(); - AutoSurface surface(IsUnicodeMode()); + AutoSurface surface(this); if (surface) { return surface->WidthText(vs.styles[style].font, text, strlen(text)); } else { @@ -2451,8 +2797,7 @@ int Editor::TextWidth(int style, const char *text) { } // Empty method is overridden on GTK+ to show / hide scrollbars -void Editor::ReconfigureScrollBars() { -} +void Editor::ReconfigureScrollBars() {} void Editor::SetScrollBars() { RefreshStyleData(); @@ -2499,9 +2844,9 @@ void Editor::AddChar(char ch) { void Editor::AddCharUTF(char *s, unsigned int len, bool treatAsDBCS) { bool wasSelection = currentPos != anchor; ClearSelection(); - if (inOverstrike && !wasSelection) { - if (currentPos < (pdoc->Length() - 1)) { - if ((pdoc->CharAt(currentPos) != '\r') && (pdoc->CharAt(currentPos) != '\n')) { + if (inOverstrike && !wasSelection && !RangeContainsProtected(currentPos, currentPos + 1)) { + if (currentPos < (pdoc->Length())) { + if (!IsEOLChar(pdoc->CharAt(currentPos))) { pdoc->DelChar(currentPos); } } @@ -2516,7 +2861,7 @@ void Editor::AddCharUTF(char *s, unsigned int len, bool treatAsDBCS) { if (treatAsDBCS) { NotifyChar((static_cast(s[0]) << 8) | - static_cast(s[1])); + static_cast(s[1])); } else { int byte = static_cast(s[0]); if ((byte < 0xC0) || (1 == len)) { @@ -2542,7 +2887,7 @@ void Editor::AddCharUTF(char *s, unsigned int len, bool treatAsDBCS) { if (((byte2 & 0xC0) == 0x80) && ((byte3 & 0xC0) == 0x80)) { // Three-byte-character lead byte followed by two trail bytes. byte = (((byte & 0x0F) << 12) | ((byte2 & 0x3F) << 6) | - (byte3 & 0x3F)); + (byte3 & 0x3F)); } // A three-byte-character lead-byte not followed by two trail-bytes // represents itself. @@ -2553,29 +2898,31 @@ void Editor::AddCharUTF(char *s, unsigned int len, bool treatAsDBCS) { } void Editor::ClearSelection() { - if (selType == selRectangle) { - pdoc->BeginUndoAction(); - int lineStart = pdoc->LineFromPosition(SelectionStart()); - int lineEnd = pdoc->LineFromPosition(SelectionEnd()); - int startPos = SelectionStart(); - for (int line = lineEnd; line >= lineStart; line--) { - startPos = SelectionStart(line); - unsigned int chars = SelectionEnd(line) - startPos; - if (0 != chars) { - pdoc->DeleteChars(startPos, chars); - } - } - SetEmptySelection(startPos); - pdoc->EndUndoAction(); - selType = selStream; - } else { - int startPos = SelectionStart(); - unsigned int chars = SelectionEnd() - startPos; - SetEmptySelection(startPos); - if (0 != chars) { + if (!SelectionContainsProtected()) { + if (selType == selRectangle) { pdoc->BeginUndoAction(); - pdoc->DeleteChars(startPos, chars); + int lineStart = pdoc->LineFromPosition(SelectionStart()); + int lineEnd = pdoc->LineFromPosition(SelectionEnd()); + int startPos = SelectionStart(); + for (int line = lineEnd; line >= lineStart; line--) { + startPos = SelectionStart(line); + unsigned int chars = SelectionEnd(line) - startPos; + if (0 != chars) { + pdoc->DeleteChars(startPos, chars); + } + } + SetEmptySelection(startPos); pdoc->EndUndoAction(); + selType = selStream; + } else { + int startPos = SelectionStart(); + unsigned int chars = SelectionEnd() - startPos; + SetEmptySelection(startPos); + if (0 != chars) { + pdoc->BeginUndoAction(); + pdoc->DeleteChars(startPos, chars); + pdoc->EndUndoAction(); + } } } } @@ -2603,14 +2950,14 @@ void Editor::ClearDocumentStyle() { } void Editor::Cut() { - if (!pdoc->IsReadOnly()) { + if (!pdoc->IsReadOnly() && !SelectionContainsProtected()) { Copy(); ClearSelection(); } } void Editor::PasteRectangular(int pos, const char *ptr, int len) { - if (pdoc->IsReadOnly()) { + if (pdoc->IsReadOnly() || SelectionContainsProtected()) { return; } currentPos = pos; @@ -2619,7 +2966,7 @@ void Editor::PasteRectangular(int pos, const char *ptr, int len) { bool prevCr = false; pdoc->BeginUndoAction(); for (int i = 0; i < len; i++) { - if ((ptr[i] == '\r') || (ptr[i] == '\n')) { + if (IsEOLChar(ptr[i])) { if ((ptr[i] == '\r') || (!prevCr)) line++; if (line >= pdoc->LinesTotal()) { @@ -2648,12 +2995,14 @@ void Editor::PasteRectangular(int pos, const char *ptr, int len) { } bool Editor::CanPaste() { - return !pdoc->IsReadOnly(); + return !pdoc->IsReadOnly() && !SelectionContainsProtected(); } void Editor::Clear() { if (currentPos == anchor) { - DelChar(); + if (!RangeContainsProtected(currentPos, currentPos + 1)) { + DelChar(); + } } else { ClearSelection(); } @@ -2683,29 +3032,33 @@ void Editor::Redo() { } void Editor::DelChar() { - pdoc->DelChar(currentPos); + if (!RangeContainsProtected(currentPos, currentPos + 1)) { + pdoc->DelChar(currentPos); + } // Avoid blinking during rapid typing: ShowCaretAtCurrentPosition(); } void Editor::DelCharBack(bool allowLineStartDeletion) { if (currentPos == anchor) { - int lineCurrentPos = pdoc->LineFromPosition(currentPos); - if (allowLineStartDeletion || (pdoc->LineStart(lineCurrentPos) != currentPos)) { - if (pdoc->GetColumn(currentPos) <= pdoc->GetLineIndentation(lineCurrentPos) && - pdoc->GetColumn(currentPos) > 0 && pdoc->backspaceUnindents) { - pdoc->BeginUndoAction(); - int indentation = pdoc->GetLineIndentation(lineCurrentPos); - int indentationStep = (pdoc->indentInChars ? pdoc->indentInChars : pdoc->tabInChars); - if (indentation % indentationStep == 0) { - pdoc->SetLineIndentation(lineCurrentPos, indentation - indentationStep); + if (!RangeContainsProtected(currentPos - 1, currentPos)) { + int lineCurrentPos = pdoc->LineFromPosition(currentPos); + if (allowLineStartDeletion || (pdoc->LineStart(lineCurrentPos) != currentPos)) { + if (pdoc->GetColumn(currentPos) <= pdoc->GetLineIndentation(lineCurrentPos) && + pdoc->GetColumn(currentPos) > 0 && pdoc->backspaceUnindents) { + pdoc->BeginUndoAction(); + int indentation = pdoc->GetLineIndentation(lineCurrentPos); + int indentationStep = (pdoc->indentInChars ? pdoc->indentInChars : pdoc->tabInChars); + if (indentation % indentationStep == 0) { + pdoc->SetLineIndentation(lineCurrentPos, indentation - indentationStep); + } else { + pdoc->SetLineIndentation(lineCurrentPos, indentation - (indentation % indentationStep)); + } + SetEmptySelection(pdoc->GetLineIndentPosition(lineCurrentPos)); + pdoc->EndUndoAction(); } else { - pdoc->SetLineIndentation(lineCurrentPos, indentation - (indentation % indentationStep)); + pdoc->DelCharBack(currentPos); } - SetEmptySelection(pdoc->GetLineIndentPosition(lineCurrentPos)); - pdoc->EndUndoAction(); - } else { - pdoc->DelCharBack(currentPos); } } } else { @@ -2764,6 +3117,24 @@ void Editor::NotifyDoubleClick(Point, bool) { NotifyParent(scn); } +void Editor::NotifyHotSpotDoubleClicked(int position, bool shift, bool ctrl, bool alt) { + SCNotification scn; + scn.nmhdr.code = SCN_HOTSPOTDOUBLECLICK; + scn.position = position; + scn.modifiers = (shift ? SCI_SHIFT : 0) | (ctrl ? SCI_CTRL : 0) | + (alt ? SCI_ALT : 0); + NotifyParent(scn); +} + +void Editor::NotifyHotSpotClicked(int position, bool shift, bool ctrl, bool alt) { + SCNotification scn; + scn.nmhdr.code = SCN_HOTSPOTCLICK; + scn.position = position; + scn.modifiers = (shift ? SCI_SHIFT : 0) | (ctrl ? SCI_CTRL : 0) | + (alt ? SCI_ALT : 0); + NotifyParent(scn); +} + void Editor::NotifyUpdateUI() { SCNotification scn; scn.nmhdr.code = SCN_UPDATEUI; @@ -2841,23 +3212,22 @@ void Editor::NotifySavePoint(Document*, void *, bool atSavePoint) { void Editor::CheckModificationForWrap(DocModification mh) { if ((mh.modificationType & SC_MOD_INSERTTEXT) || - (mh.modificationType & SC_MOD_DELETETEXT)) { + (mh.modificationType & SC_MOD_DELETETEXT)) { llc.Invalidate(LineLayout::llCheckTextAndStyle); if (wrapState != eWrapNone) { int lineDoc = pdoc->LineFromPosition(mh.position); if (mh.linesAdded == 0) { - AutoSurface surface(IsUnicodeMode()); - LineLayout *ll = RetrieveLineLayout(lineDoc); + AutoSurface surface(this); + AutoLineLayout ll(llc, RetrieveLineLayout(lineDoc)); if (surface && ll) { LayoutLine(lineDoc, surface, vs, ll, wrapWidth); if (cs.GetHeight(lineDoc) != ll->lines) { - NeedWrapping(lineDoc-1); + NeedWrapping(lineDoc - 1); Redraw(); } } else { NeedWrapping(lineDoc); } - llc.Dispose(ll); } else { NeedWrapping(lineDoc); } @@ -3004,6 +3374,7 @@ void Editor::NotifyMacroRecord(unsigned int iMessage, unsigned long wParam, long case SCI_REPLACESEL: case SCI_ADDTEXT: case SCI_INSERTTEXT: + case SCI_APPENDTEXT: case SCI_CLEARALL: case SCI_SELECTALL: case SCI_GOTOLINE: @@ -3013,8 +3384,12 @@ void Editor::NotifyMacroRecord(unsigned int iMessage, unsigned long wParam, long case SCI_SEARCHPREV: case SCI_LINEDOWN: case SCI_LINEDOWNEXTEND: + case SCI_PARADOWN: + case SCI_PARADOWNEXTEND: case SCI_LINEUP: case SCI_LINEUPEXTEND: + case SCI_PARAUP: + case SCI_PARAUPEXTEND: case SCI_CHARLEFT: case SCI_CHARLEFTEXTEND: case SCI_CHARRIGHT: @@ -3031,6 +3406,10 @@ void Editor::NotifyMacroRecord(unsigned int iMessage, unsigned long wParam, long case SCI_HOMEEXTEND: case SCI_LINEEND: case SCI_LINEENDEXTEND: + case SCI_HOMEWRAP: + case SCI_HOMEWRAPEXTEND: + case SCI_LINEENDWRAP: + case SCI_LINEENDWRAPEXTEND: case SCI_DOCUMENTSTART: case SCI_DOCUMENTSTARTEXTEND: case SCI_DOCUMENTEND: @@ -3047,6 +3426,8 @@ void Editor::NotifyMacroRecord(unsigned int iMessage, unsigned long wParam, long case SCI_FORMFEED: case SCI_VCHOME: case SCI_VCHOMEEXTEND: + case SCI_VCHOMEWRAP: + case SCI_VCHOMEWRAPEXTEND: case SCI_DELWORDLEFT: case SCI_DELWORDRIGHT: case SCI_DELLINELEFT: @@ -3054,6 +3435,7 @@ void Editor::NotifyMacroRecord(unsigned int iMessage, unsigned long wParam, long case SCI_LINECUT: case SCI_LINEDELETE: case SCI_LINETRANSPOSE: + case SCI_LINEDUPLICATE: case SCI_LOWERCASE: case SCI_UPPERCASE: case SCI_LINESCROLLDOWN: @@ -3070,7 +3452,7 @@ void Editor::NotifyMacroRecord(unsigned int iMessage, unsigned long wParam, long case SCI_NEWLINE: default: // printf("Filtered out %ld of macro recording\n", iMessage); - return; + return ; } // Send notification @@ -3154,6 +3536,17 @@ void Editor::LineTranspose() { } } +void Editor::LineDuplicate() { + int line = pdoc->LineFromPosition(currentPos); + int start = pdoc->LineStart(line); + int end = pdoc->LineEnd(line); + char *thisLine = CopyRange(start, end); + const char *eol = StringFromEOLMode(pdoc->eolMode); + pdoc->InsertString(end, eol); + pdoc->InsertString(end + strlen(eol), thisLine, end - start); + delete []thisLine; +} + void Editor::CancelModes() {} void Editor::NewLine() { @@ -3178,7 +3571,7 @@ void Editor::NewLine() { void Editor::CursorUpOrDown(int direction, bool extend) { Point pt = LocationFromPosition(currentPos); int posNew = PositionFromLocation( - Point(lastXChosen, pt.y + direction * vs.lineHeight)); + Point(lastXChosen, pt.y + direction * vs.lineHeight)); if (direction < 0) { // Line wrapping may lead to a location on the same line, so // seek back if that is the case. @@ -3196,29 +3589,28 @@ void Editor::CursorUpOrDown(int direction, bool extend) { int Editor::StartEndDisplayLine(int pos, bool start) { RefreshStyleData(); int line = pdoc->LineFromPosition(pos); - AutoSurface surface(IsUnicodeMode()); - LineLayout *ll = RetrieveLineLayout(line); + AutoSurface surface(this); + AutoLineLayout ll(llc, RetrieveLineLayout(line)); int posRet = INVALID_POSITION; if (surface && ll) { unsigned int posLineStart = pdoc->LineStart(line); LayoutLine(line, surface, vs, ll, wrapWidth); int posInLine = pos - posLineStart; if (posInLine <= ll->maxLineLength) { - for (int subLine=0; subLinelines; subLine++) { - if ((posInLine >= ll->LineStart(subLine)) && (posInLine <= ll->LineStart(subLine+1))) { + for (int subLine = 0; subLine < ll->lines; subLine++) { + if ((posInLine >= ll->LineStart(subLine)) && (posInLine <= ll->LineStart(subLine + 1))) { if (start) { posRet = ll->LineStart(subLine) + posLineStart; } else { if (subLine == ll->lines - 1) - posRet = ll->LineStart(subLine+1) + posLineStart; + posRet = ll->LineStart(subLine + 1) + posLineStart; else - posRet = ll->LineStart(subLine+1) + posLineStart - 1; + posRet = ll->LineStart(subLine + 1) + posLineStart - 1; } } } } } - llc.Dispose(ll); if (posRet == INVALID_POSITION) { return pos; } else { @@ -3234,6 +3626,12 @@ int Editor::KeyCommand(unsigned int iMessage) { case SCI_LINEDOWNEXTEND: CursorUpOrDown(1, true); break; + case SCI_PARADOWN: + MovePositionTo(pdoc->ParaDown(currentPos)); + break; + case SCI_PARADOWNEXTEND: + MovePositionTo(pdoc->ParaDown(currentPos), true); + break; case SCI_LINESCROLLDOWN: ScrollTo(topLine + 1); MoveCaretInsideView(false); @@ -3244,6 +3642,12 @@ int Editor::KeyCommand(unsigned int iMessage) { case SCI_LINEUPEXTEND: CursorUpOrDown(-1, true); break; + case SCI_PARAUP: + MovePositionTo(pdoc->ParaUp(currentPos)); + break; + case SCI_PARAUPEXTEND: + MovePositionTo(pdoc->ParaUp(currentPos), true); + break; case SCI_LINESCROLLUP: ScrollTo(topLine - 1); MoveCaretInsideView(false); @@ -3304,6 +3708,38 @@ int Editor::KeyCommand(unsigned int iMessage) { MovePositionTo(pdoc->LineEndPosition(currentPos), true); SetLastXChosen(); break; + case SCI_HOMEWRAP: { + int homePos = MovePositionSoVisible(StartEndDisplayLine(currentPos, true), -1); + if (currentPos <= homePos) + homePos = pdoc->LineStart(pdoc->LineFromPosition(currentPos)); + MovePositionTo(homePos); + SetLastXChosen(); + } + break; + case SCI_HOMEWRAPEXTEND: { + int homePos = MovePositionSoVisible(StartEndDisplayLine(currentPos, true), -1); + if (currentPos <= homePos) + homePos = pdoc->LineStart(pdoc->LineFromPosition(currentPos)); + MovePositionTo(homePos, true); + SetLastXChosen(); + } + break; + case SCI_LINEENDWRAP: { + int endPos = MovePositionSoVisible(StartEndDisplayLine(currentPos, false), 1); + if (currentPos >= endPos) + endPos = pdoc->LineEndPosition(currentPos); + MovePositionTo(endPos); + SetLastXChosen(); + } + break; + case SCI_LINEENDWRAPEXTEND: { + int endPos = MovePositionSoVisible(StartEndDisplayLine(currentPos, false), 1); + if (currentPos >= endPos) + endPos = pdoc->LineEndPosition(currentPos); + MovePositionTo(endPos, true); + SetLastXChosen(); + } + break; case SCI_DOCUMENTSTART: MovePositionTo(0); SetLastXChosen(); @@ -3321,10 +3757,10 @@ int Editor::KeyCommand(unsigned int iMessage) { SetLastXChosen(); break; case SCI_PAGEUP: - PageMove( -1); + PageMove(-1); break; case SCI_PAGEUPEXTEND: - PageMove( -1, true); + PageMove(-1, true); break; case SCI_PAGEDOWN: PageMove(1); @@ -3338,7 +3774,7 @@ int Editor::KeyCommand(unsigned int iMessage) { ShowCaretAtCurrentPosition(); NotifyUpdateUI(); break; - case SCI_CANCEL: // Cancel any modes - handled in subclass + case SCI_CANCEL: // Cancel any modes - handled in subclass // Also unselect text CancelModes(); break; @@ -3376,6 +3812,26 @@ int Editor::KeyCommand(unsigned int iMessage) { MovePositionTo(pdoc->VCHomePosition(currentPos), true); SetLastXChosen(); break; + case SCI_VCHOMEWRAP: { + int homePos = pdoc->VCHomePosition(currentPos); + int viewLineStart = MovePositionSoVisible(StartEndDisplayLine(currentPos, true), -1); + if ((viewLineStart < currentPos) && (viewLineStart > homePos)) + homePos = viewLineStart; + + MovePositionTo(homePos); + SetLastXChosen(); + } + break; + case SCI_VCHOMEWRAPEXTEND: { + int homePos = pdoc->VCHomePosition(currentPos); + int viewLineStart = MovePositionSoVisible(StartEndDisplayLine(currentPos, true), -1); + if ((viewLineStart < currentPos) && (viewLineStart > homePos)) + homePos = viewLineStart; + + MovePositionTo(homePos, true); + SetLastXChosen(); + } + break; case SCI_ZOOMIN: if (vs.zoomLevel < 20) { vs.zoomLevel++; @@ -3438,6 +3894,9 @@ int Editor::KeyCommand(unsigned int iMessage) { case SCI_LINETRANSPOSE: LineTranspose(); break; + case SCI_LINEDUPLICATE: + LineDuplicate(); + break; case SCI_LOWERCASE: ChangeCaseOfSelection(false); break; @@ -3462,22 +3921,22 @@ int Editor::KeyCommand(unsigned int iMessage) { break; case SCI_HOMEDISPLAY: MovePositionTo(MovePositionSoVisible( - StartEndDisplayLine(currentPos, true), -1)); + StartEndDisplayLine(currentPos, true), -1)); SetLastXChosen(); break; case SCI_HOMEDISPLAYEXTEND: MovePositionTo(MovePositionSoVisible( - StartEndDisplayLine(currentPos, true), -1), true); + StartEndDisplayLine(currentPos, true), -1), true); SetLastXChosen(); break; case SCI_LINEENDDISPLAY: MovePositionTo(MovePositionSoVisible( - StartEndDisplayLine(currentPos, false), 1)); + StartEndDisplayLine(currentPos, false), 1)); SetLastXChosen(); break; case SCI_LINEENDDISPLAYEXTEND: MovePositionTo(MovePositionSoVisible( - StartEndDisplayLine(currentPos, false), 1), true); + StartEndDisplayLine(currentPos, false), 1), true); SetLastXChosen(); break; } @@ -3592,8 +4051,8 @@ void Editor::Indent(bool forwards) { * @return The position of the found text, -1 if not found. */ long Editor::FindText( - uptr_t wParam, ///< Search modes : @c SCFIND_MATCHCASE, @c SCFIND_WHOLEWORD, - ///< @c SCFIND_WORDSTART or @c SCFIND_REGEXP. + uptr_t wParam, ///< Search modes : @c SCFIND_MATCHCASE, @c SCFIND_WHOLEWORD, + ///< @c SCFIND_WORDSTART, @c SCFIND_REGEXP or @c SCFIND_POSIX. sptr_t lParam) { ///< @c TextToFind structure: The text to search for in the given range. TextToFind *ft = reinterpret_cast(lParam); @@ -3603,6 +4062,7 @@ long Editor::FindText( (wParam & SCFIND_WHOLEWORD) != 0, (wParam & SCFIND_WORDSTART) != 0, (wParam & SCFIND_REGEXP) != 0, + (wParam & SCFIND_POSIX) != 0, &lengthFound); if (pos != -1) { ft->chrgText.cpMin = pos; @@ -3632,8 +4092,8 @@ void Editor::SearchAnchor() { * @return The position of the found text, -1 if not found. */ long Editor::SearchText( - unsigned int iMessage, ///< Accepts both @c SCI_SEARCHNEXT and @c SCI_SEARCHPREV. - uptr_t wParam, ///< Search modes : @c SCFIND_MATCHCASE, @c SCFIND_WHOLEWORD, + unsigned int iMessage, ///< Accepts both @c SCI_SEARCHNEXT and @c SCI_SEARCHPREV. + uptr_t wParam, ///< Search modes : @c SCFIND_MATCHCASE, @c SCFIND_WHOLEWORD, ///< @c SCFIND_WORDSTART or @c SCFIND_REGEXP. sptr_t lParam) { ///< The text to search for. @@ -3646,6 +4106,7 @@ long Editor::SearchText( (wParam & SCFIND_WHOLEWORD) != 0, (wParam & SCFIND_WORDSTART) != 0, (wParam & SCFIND_REGEXP) != 0, + (wParam & SCFIND_POSIX) != 0, &lengthFound); } else { pos = pdoc->FindText(searchAnchor, 0, txt, @@ -3653,6 +4114,7 @@ long Editor::SearchText( (wParam & SCFIND_WHOLEWORD) != 0, (wParam & SCFIND_WORDSTART) != 0, (wParam & SCFIND_REGEXP) != 0, + (wParam & SCFIND_POSIX) != 0, &lengthFound); } @@ -3674,6 +4136,7 @@ long Editor::SearchInTarget(const char *text, int length) { (searchFlags & SCFIND_WHOLEWORD) != 0, (searchFlags & SCFIND_WORDSTART) != 0, (searchFlags & SCFIND_REGEXP) != 0, + (searchFlags & SCFIND_POSIX) != 0, &lengthFound); if (pos != -1) { targetStart = pos; @@ -3943,7 +4406,7 @@ void Editor::ButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, b SetEmptySelection(newPos); bool doubleClick = false; // Stop mouse button bounce changing selection type - if (curTime != lastClickTime) { + if (!Platform::MouseButtonBounce() || curTime != lastClickTime) { if (selectionType == selChar) { selectionType = selWord; doubleClick = true; @@ -3967,13 +4430,15 @@ void Editor::ButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, b lineAnchor = LineFromLocation(pt); SetSelection(pdoc->LineStart(lineAnchor + 1), pdoc->LineStart(lineAnchor)); //Platform::DebugPrintf("Triple click: %d - %d\n", anchor, currentPos); - } - else { + } else { SetEmptySelection(currentPos); } //Platform::DebugPrintf("Double click: %d - %d\n", anchor, currentPos); - if (doubleClick) + if (doubleClick) { NotifyDoubleClick(pt, shift); + if (PositionIsHotspot(newPos)) + NotifyHotSpotDoubleClicked(newPos, shift, ctrl, alt); + } } else { // Single click if (inSelMargin) { selType = selStream; @@ -4003,6 +4468,9 @@ void Editor::ButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, b SetMouseCapture(true); selectionType = selLine; } else { + if (PositionIsHotspot(newPos)) { + NotifyHotSpotClicked(newPos, shift, ctrl, alt); + } if (!shift) { inDragDrop = PointInSelection(pt); } @@ -4029,6 +4497,53 @@ void Editor::ButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, b ShowCaretAtCurrentPosition(); } +bool Editor::PositionIsHotspot(int position) { + return vs.styles[pdoc->StyleAt(position)].hotspot; +} + +bool Editor::PointIsHotspot(Point pt) { + int pos = PositionFromLocation(pt); + return PositionIsHotspot(pos); +} + +void Editor::SetHotSpotRange(Point *pt) { + if (pt) { + int pos = PositionFromLocation(*pt); + + // If we don't limit this to word characters then the + // range can encompass more than the run range and then + // the underline will not be drawn properly. + int hsStart_ = pdoc->ExtendStyleRange(pos, -1); + int hsEnd_ = pdoc->ExtendStyleRange(pos, 1); + + // Only invalidate the range if the hotspot range has changed... + if (hsStart_ != hsStart || hsEnd_ != hsEnd) { + if (hsStart != -1) { + InvalidateRange(hsStart, hsEnd); + } + hsStart = hsStart_; + hsEnd = hsEnd_; + InvalidateRange(hsStart, hsEnd); + } + } else { + if (hsStart != -1) { + int hsStart_ = hsStart; + int hsEnd_ = hsEnd; + hsStart = -1; + hsEnd = -1; + InvalidateRange(hsStart_, hsEnd_); + } else { + hsStart = -1; + hsEnd = -1; + } + } +} + +void Editor::GetHotSpotRange(int& hsStart_, int& hsEnd_) { + hsStart_ = hsStart; + hsEnd_ = hsEnd; +} + void Editor::ButtonMove(Point pt) { if ((ptMouseLast.x != pt.x) || (ptMouseLast.y != pt.y)) { DwellEnd(true); @@ -4072,6 +4587,9 @@ void Editor::ButtonMove(Point pt) { PRectangle rcClient = GetClientRectangle(); if (pt.y > rcClient.bottom) { int lineMove = cs.DisplayFromDoc(LineFromLocation(pt)); + if (lineMove < 0) { + lineMove = cs.DisplayFromDoc(pdoc->LinesTotal() - 1); + } ScrollTo(lineMove - LinesOnScreen() + 5); Redraw(); } else if (pt.y < rcClient.top) { @@ -4081,6 +4599,9 @@ void Editor::ButtonMove(Point pt) { } EnsureCaretVisible(false, false, true); + if (hsStart != -1 && !PositionIsHotspot(movePos)) + SetHotSpotRange(NULL); + } else { if (vs.fixedColumnWidth > 0) { // There is a margin if (PointInSelMargin(pt)) { @@ -4089,10 +4610,15 @@ void Editor::ButtonMove(Point pt) { } } // Display regular (drag) cursor over selection - if (PointInSelection(pt)) + if (PointInSelection(pt)) { DisplayCursor(Window::cursorArrow); - else + } else if (PointIsHotspot(pt)) { + DisplayCursor(Window::cursorHand); + SetHotSpotRange(&pt); + } else { DisplayCursor(Window::cursorText); + SetHotSpotRange(NULL); + } } } @@ -4104,6 +4630,7 @@ void Editor::ButtonUp(Point pt, unsigned int curTime, bool ctrl) { DisplayCursor(Window::cursorReverseArrow); } else { DisplayCursor(Window::cursorText); + SetHotSpotRange(NULL); } xEndSelect = pt.x - vs.fixedColumnWidth + xOffset; ptMouseLast = pt; @@ -4117,7 +4644,7 @@ void Editor::ButtonUp(Point pt, unsigned int curTime, bool ctrl) { if (drag.len) { if (ctrl) { if (pdoc->InsertString(newPos, drag.s, drag.len)) { - SetSelection(newPos, newPos + drag.len); + SetSelection(newPos, newPos + drag.len); } } else if (newPos < selStart) { pdoc->DeleteChars(selStart, drag.len); @@ -4169,8 +4696,8 @@ void Editor::Tick() { } } if ((dwellDelay < SC_TIME_FOREVER) && - (ticksToDwell > 0) && - (!HaveMouseCapture())) { + (ticksToDwell > 0) && + (!HaveMouseCapture())) { ticksToDwell -= timer.tickSize; if (ticksToDwell <= 0) { dwelling = true; @@ -4185,6 +4712,7 @@ void Editor::SetFocusState(bool focusState) { if (hasFocus) { ShowCaretAtCurrentPosition(); } else { + CancelModes(); DropCaret(); } } @@ -4329,6 +4857,13 @@ void Editor::SetDocPointer(Document *document) { pdoc = document; } pdoc->AddRef(); + + // Ensure all positions within document + currentPos = 0; + anchor = 0; + targetStart = 0; + targetEnd = 0; + // Reset the contraction state to fully shown. cs.Clear(); cs.InsertLines(0, pdoc->LinesTotal() - 1); @@ -4337,7 +4872,10 @@ void Editor::SetDocPointer(Document *document) { pdoc->AddWatcher(this, 0); Redraw(); - SetScrollBars(); + // Removed because of reentrance problems of GTK+ 2.x + // where changing a scroll bar position causes synchronous + // painting before lexer and styling state is set up. + //SetScrollBars(); } // Recursively expand a fold, making lines visible except where they have an unexpanded parent @@ -4407,7 +4945,7 @@ void Editor::EnsureLineVisible(int lineDoc, bool enforcePolicy) { SetVerticalScrollPos(); Redraw(); } else if ((lineDisplay > topLine + LinesOnScreen() - 1) || - ((visiblePolicy & VISIBLE_STRICT) && (lineDisplay > topLine + LinesOnScreen() - 1 - visibleSlop))) { + ((visiblePolicy & VISIBLE_STRICT) && (lineDisplay > topLine + LinesOnScreen() - 1 - visibleSlop))) { SetTopLine(Platform::Clamp(lineDisplay - LinesOnScreen() + 1 + visibleSlop, 0, MaxScrollPos())); SetVerticalScrollPos(); Redraw(); @@ -4444,6 +4982,13 @@ bool Editor::IsUnicodeMode() const { return pdoc && (SC_CP_UTF8 == pdoc->dbcsCodePage); } +int Editor::CodePage() const { + if (pdoc) + return pdoc->dbcsCodePage; + else + return 0; +} + static bool ValidMargin(unsigned long wParam) { return wParam < ViewStyle::margins; } @@ -4461,8 +5006,7 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { switch (iMessage) { - case SCI_GETTEXT: - { + case SCI_GETTEXT: { if (lParam == 0) return 0; if (wParam == 0) @@ -4475,8 +5019,7 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { return iChar; } - case SCI_SETTEXT: - { + case SCI_SETTEXT: { if (lParam == 0) return 0; pdoc->DeleteChars(0, pdoc->Length()); @@ -4593,7 +5136,7 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { // return -1; return pdoc->LineStart(wParam); - // Replacement of the old Scintilla interpretation of EM_LINELENGTH + // Replacement of the old Scintilla interpretation of EM_LINELENGTH case SCI_LINELENGTH: if ((static_cast(wParam) < 0) || (static_cast(wParam) > pdoc->LineFromPosition(pdoc->Length()))) @@ -4627,6 +5170,16 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { case SCI_GETTARGETEND: return targetEnd; + case SCI_TARGETFROMSELECTION: + if (currentPos < anchor) { + targetStart = currentPos; + targetEnd = anchor; + } else { + targetStart = anchor; + targetEnd = currentPos; + } + break; + case SCI_REPLACETARGET: PLATFORM_ASSERT(lParam); return ReplaceTarget(false, CharPtrFromSPtr(lParam), wParam); @@ -4653,12 +5206,17 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { case SCI_SETXOFFSET: xOffset = wParam; + SetHorizontalScrollPos(); Redraw(); break; case SCI_GETXOFFSET: return xOffset; + case SCI_CHOOSECARETX: + SetLastXChosen(); + break; + case SCI_SCROLLCARET: EnsureCaretVisible(); break; @@ -4763,6 +5321,10 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { return 0; } + case SCI_APPENDTEXT: + pdoc->InsertString(pdoc->Length(), CharPtrFromSPtr(lParam), wParam); + return 0; + case SCI_CLEARALL: ClearAll(); return 0; @@ -4848,6 +5410,13 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { case SCI_GETPRINTCOLOURMODE: return printColourMode; + case SCI_SETPRINTWRAPMODE: + printWrapState = (wParam == SC_WRAP_WORD) ? eWrapWord : eWrapNone; + break; + + case SCI_GETPRINTWRAPMODE: + return printWrapState; + case SCI_GETSTYLEAT: if (static_cast(wParam) >= pdoc->Length()) return 0; @@ -4948,7 +5517,7 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { pdoc->SetStyleFor(wParam, static_cast(lParam)); break; - case SCI_SETSTYLINGEX: // Specify a complete styling buffer + case SCI_SETSTYLINGEX: // Specify a complete styling buffer if (lParam == 0) return 0; pdoc->SetStyles(wParam, CharPtrFromSPtr(lParam)); @@ -4961,6 +5530,14 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { case SCI_GETBUFFEREDDRAW: return bufferedDraw; + case SCI_GETTWOPHASEDRAW: + return twoPhaseDraw; + + case SCI_SETTWOPHASEDRAW: + twoPhaseDraw = wParam != 0; + InvalidateStyleRedraw(); + break; + case SCI_SETTABWIDTH: if (wParam > 0) pdoc->tabInChars = wParam; @@ -5052,8 +5629,16 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { case SCI_GETSCROLLWIDTH: return scrollWidth; + case SCI_LINESJOIN: + LinesJoin(); + break; + + case SCI_LINESSPLIT: + LinesSplit(wParam); + break; + case SCI_TEXTWIDTH: - PLATFORM_ASSERT((wParam >= 0) && (wParam <= STYLE_MAX)); + PLATFORM_ASSERT(wParam <= STYLE_MAX); PLATFORM_ASSERT(lParam); return TextWidth(wParam, CharPtrFromSPtr(lParam)); @@ -5061,7 +5646,7 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { return vs.lineHeight; case SCI_SETENDATLASTLINE: - PLATFORM_ASSERT((wParam == 0) || (wParam ==1)); + PLATFORM_ASSERT((wParam == 0) || (wParam == 1)); if (endAtLastLine != (wParam != 0)) { endAtLastLine = wParam != 0; SetScrollBars(); @@ -5085,6 +5670,17 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { case SCI_GETHSCROLLBAR: return horizontalScrollBarVisible; + case SCI_SETVSCROLLBAR: + if (verticalScrollBarVisible != (wParam != 0)) { + verticalScrollBarVisible = wParam != 0; + SetScrollBars(); + ReconfigureScrollBars(); + } + break; + + case SCI_GETVSCROLLBAR: + return verticalScrollBarVisible; + case SCI_SETINDENTATIONGUIDES: vs.viewIndentationGuides = wParam != 0; Redraw(); @@ -5174,6 +5770,14 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { } return -1; + case SCI_MARKERDEFINEPIXMAP: + if (wParam <= MARKER_MAX) { + vs.markers[wParam].SetXPM(CharPtrFromSPtr(lParam)); + }; + InvalidateStyleData(); + RedrawSelMargin(); + break; + case SCI_SETMARGINTYPEN: if (ValidMargin(wParam)) { vs.ms[wParam].symbol = (lParam == SC_MARGIN_SYMBOL); @@ -5305,6 +5909,12 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { InvalidateStyleRedraw(); } break; + case SCI_STYLESETHOTSPOT: + if (wParam <= STYLE_MAX) { + vs.styles[wParam].hotspot = lParam != 0; + InvalidateStyleRedraw(); + } + break; case SCI_STYLERESETDEFAULT: vs.ResetDefaultStyle(); @@ -5412,10 +6022,12 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { case SCI_SEARCHPREV: return SearchText(iMessage, wParam, lParam); - case SCI_SETCARETPOLICY: // Deprecated +#ifdef INCLUDE_DEPRECATED_FEATURES + case SCI_SETCARETPOLICY: // Deprecated caretXPolicy = caretYPolicy = wParam; caretXSlop = caretYSlop = lParam; break; +#endif case SCI_SETXCARETPOLICY: caretXPolicy = wParam; @@ -5468,8 +6080,8 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { return vs.caretcolour.desired.AsLong(); case SCI_SETCARETWIDTH: - if (wParam <= 1) - vs.caretWidth = 1; + if (wParam <= 0) + vs.caretWidth = 0; else if (wParam >= 3) vs.caretWidth = 3; else @@ -5516,8 +6128,12 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { case SCI_LINEDOWN: case SCI_LINEDOWNEXTEND: + case SCI_PARADOWN: + case SCI_PARADOWNEXTEND: case SCI_LINEUP: case SCI_LINEUPEXTEND: + case SCI_PARAUP: + case SCI_PARAUPEXTEND: case SCI_CHARLEFT: case SCI_CHARLEFTEXTEND: case SCI_CHARRIGHT: @@ -5530,6 +6146,10 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { case SCI_HOMEEXTEND: case SCI_LINEEND: case SCI_LINEENDEXTEND: + case SCI_HOMEWRAP: + case SCI_HOMEWRAPEXTEND: + case SCI_LINEENDWRAP: + case SCI_LINEENDWRAPEXTEND: case SCI_DOCUMENTSTART: case SCI_DOCUMENTSTARTEXTEND: case SCI_DOCUMENTEND: @@ -5547,6 +6167,8 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { case SCI_FORMFEED: case SCI_VCHOME: case SCI_VCHOMEEXTEND: + case SCI_VCHOMEWRAP: + case SCI_VCHOMEWRAPEXTEND: case SCI_ZOOMIN: case SCI_ZOOMOUT: case SCI_DELWORDLEFT: @@ -5556,6 +6178,7 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { case SCI_LINECUT: case SCI_LINEDELETE: case SCI_LINETRANSPOSE: + case SCI_LINEDUPLICATE: case SCI_LOWERCASE: case SCI_UPPERCASE: case SCI_LINESCROLLDOWN: @@ -5629,12 +6252,15 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { return reinterpret_cast(pdoc); case SCI_SETDOCPOINTER: + CancelModes(); SetDocPointer(reinterpret_cast(lParam)); return 0; case SCI_CREATEDOCUMENT: { Document *doc = new Document(); - doc->AddRef(); + if (doc) { + doc->AddRef(); + } return reinterpret_cast(doc); } @@ -5716,6 +6342,35 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { MoveCaretInsideView(); break; + case SCI_SETFOLDMARGINCOLOUR: + vs.foldmarginColourSet = wParam != 0; + vs.foldmarginColour.desired = ColourDesired(lParam); + InvalidateStyleRedraw(); + break; + + case SCI_SETFOLDMARGINHICOLOUR: + vs.foldmarginHighlightColourSet = wParam != 0; + vs.foldmarginHighlightColour.desired = ColourDesired(lParam); + InvalidateStyleRedraw(); + break; + + case SCI_SETHOTSPOTACTIVEFORE: + vs.hotspotForegroundSet = wParam != 0; + vs.hotspotForeground.desired = ColourDesired(lParam); + InvalidateStyleRedraw(); + break; + + case SCI_SETHOTSPOTACTIVEBACK: + vs.hotspotBackgroundSet = wParam != 0; + vs.hotspotBackground.desired = ColourDesired(lParam); + InvalidateStyleRedraw(); + break; + + case SCI_SETHOTSPOTACTIVEUNDERLINE: + vs.hotspotUnderline = wParam != 0; + InvalidateStyleRedraw(); + break; + default: return DefWndProc(iMessage, wParam, lParam); } diff --git a/contrib/src/stc/scintilla/src/Editor.h b/contrib/src/stc/scintilla/src/Editor.h index 800630bbb0..2cc7930c47 100644 --- a/contrib/src/stc/scintilla/src/Editor.h +++ b/contrib/src/stc/scintilla/src/Editor.h @@ -2,7 +2,7 @@ /** @file Editor.h ** Defines the main editor class. **/ -// Copyright 1998-2002 by Neil Hodgson +// Copyright 1998-2003 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef EDITOR_H @@ -58,6 +58,10 @@ public: int *positions; char bracePreviousStyles[2]; + // Hotspot support + int hsStart; + int hsEnd; + // Wrapped line support int widthLine; int lines; @@ -131,38 +135,6 @@ public: } }; -/** - * A smart pointer class to ensure Surfaces are set up and deleted correctly. - */ -class AutoSurface { -private: - Surface *surf; -public: - AutoSurface(bool unicodeMode) { - surf = Surface::Allocate(); - if (surf) { - surf->Init(); - surf->SetUnicodeMode(unicodeMode); - } - } - AutoSurface(SurfaceID sid, bool unicodeMode) { - surf = Surface::Allocate(); - if (surf) { - surf->Init(sid); - surf->SetUnicodeMode(unicodeMode); - } - } - ~AutoSurface() { - delete surf; - } - Surface *operator->() const { - return surf; - } - operator Surface *() const { - return surf; - } -}; - /** */ class Editor : public DocWatcher { @@ -184,6 +156,7 @@ protected: // ScintillaBase subclass needs access to much of Editor int printMagnification; int printColourMode; + int printWrapState; int cursorMode; int controlCharSymbol; @@ -196,11 +169,15 @@ protected: // ScintillaBase subclass needs access to much of Editor /** In bufferedDraw mode, graphics operations are drawn to a pixmap and then copied to * the screen. This avoids flashing but is about 30% slower. */ bool bufferedDraw; + /** In twoPhaseDraw mode, drawing is performed in two phases, first the background + * and then the foreground. This avoids chopping off characters that overlap the next run. */ + bool twoPhaseDraw; int xOffset; ///< Horizontal scrolled amount in pixels int xCaretMargin; ///< Ensure this many pixels visible on both sides of caret bool horizontalScrollBarVisible; int scrollWidth; + bool verticalScrollBarVisible; bool endAtLastLine; Surface *pixmapLine; @@ -275,6 +252,10 @@ protected: // ScintillaBase subclass needs access to much of Editor int foldFlags; ContractionState cs; + // Hotspot support + int hsStart; + int hsEnd; + // Wrapping support enum { eWrapNone, eWrapWord } wrapState; int wrapWidth; @@ -321,12 +302,14 @@ protected: // ScintillaBase subclass needs access to much of Editor void SetSelection(int currentPos_, int anchor_); void SetSelection(int currentPos_); void SetEmptySelection(int currentPos_); + bool RangeContainsProtected(int start, int end) const; + bool SelectionContainsProtected() const; int MovePositionOutsideChar(int pos, int moveDir, bool checkLineEnd=true); int MovePositionTo(int newPos, bool extend=false, bool ensureVisible=true); int MovePositionSoVisible(int pos, int moveDir); void SetLastXChosen(); - void ScrollTo(int line); + void ScrollTo(int line, bool moveThumb=true); virtual void ScrollText(int linesToMove); void HorizontalScrollTo(int xPos); void MoveCaretInsideView(bool ensureVisible=true); @@ -338,14 +321,22 @@ protected: // ScintillaBase subclass needs access to much of Editor void NeedWrapping(int docLineStartWrapping=0); bool WrapLines(); + void LinesJoin(); + void LinesSplit(int pixelWidth); int SubstituteMarkerIfEmpty(int markerCheck, int markerDefault); void PaintSelMargin(Surface *surface, PRectangle &rc); LineLayout *RetrieveLineLayout(int lineNumber); void LayoutLine(int line, Surface *surface, ViewStyle &vstyle, LineLayout *ll, int width=LineLayout::wrapWidthInfinite); + ColourAllocated TextBackground(ViewStyle &vsDraw, bool overrideBackground, ColourAllocated background, bool inSelection, bool inHotspot, int styleMain, int i, LineLayout *ll); + void DrawIndentGuide(Surface *surface, int lineVisible, int lineHeight, int start, PRectangle rcSegment, bool highlight); + void DrawEOL(Surface *surface, ViewStyle &vsDraw, PRectangle rcLine, LineLayout *ll, + int line, int lineEnd, int xStart, int subLine, int subLineStart, + bool overrideBackground, ColourAllocated background); void DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int lineVisible, int xStart, PRectangle rcLine, LineLayout *ll, int subLine=0); + void RefreshPixMaps(Surface *surfaceWindow); void Paint(Surface *surfaceWindow, PRectangle rcArea); long FormatRange(bool draw, RangeToFormat *pfr); int TextWidth(int style, const char *text); @@ -385,6 +376,8 @@ protected: // ScintillaBase subclass needs access to much of Editor void NotifySavePoint(bool isSavePoint); void NotifyModifyAttempt(); virtual void NotifyDoubleClick(Point pt, bool shift); + void NotifyHotSpotClicked(int position, bool shift, bool ctrl, bool alt); + void NotifyHotSpotDoubleClicked(int position, bool shift, bool ctrl, bool alt); void NotifyUpdateUI(); void NotifyPainted(); bool NotifyMarginClick(Point pt, bool shift, bool ctrl, bool alt); @@ -403,6 +396,7 @@ protected: // ScintillaBase subclass needs access to much of Editor void PageMove(int direction, bool extend=false); void ChangeCaseOfSelection(bool makeUpperCase); void LineTranspose(); + void LineDuplicate(); virtual void CancelModes(); void NewLine(); void CursorUpOrDown(int direction, bool extend=false); @@ -456,6 +450,13 @@ protected: // ScintillaBase subclass needs access to much of Editor void EnsureLineVisible(int lineDoc, bool enforcePolicy); int ReplaceTarget(bool replacePatterns, const char *text, int length=-1); + bool PositionIsHotspot(int position); + bool PointIsHotspot(Point pt); + void SetHotSpotRange(Point *pt); + void GetHotSpotRange(int& hsStart, int& hsEnd); + + int CodePage() const; + virtual sptr_t DefWndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) = 0; public: @@ -465,6 +466,45 @@ public: virtual sptr_t WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam); // Public so scintilla_set_id can use it. int ctrlID; + friend class AutoSurface; +}; + +/** + * A smart pointer class to ensure Surfaces are set up and deleted correctly. + */ +class AutoSurface { +private: + Surface *surf; +public: + AutoSurface(Editor *ed) : surf(0) { + if (ed->wMain.GetID()) { + surf = Surface::Allocate(); + if (surf) { + surf->Init(ed->wMain.GetID()); + surf->SetUnicodeMode(SC_CP_UTF8 == ed->CodePage()); + surf->SetDBCSMode(ed->CodePage()); + } + } + } + AutoSurface(SurfaceID sid, Editor *ed) : surf(0) { + if (ed->wMain.GetID()) { + surf = Surface::Allocate(); + if (surf) { + surf->Init(sid, ed->wMain.GetID()); + surf->SetUnicodeMode(SC_CP_UTF8 == ed->CodePage()); + surf->SetDBCSMode(ed->CodePage()); + } + } + } + ~AutoSurface() { + delete surf; + } + Surface *operator->() const { + return surf; + } + operator Surface *() const { + return surf; + } }; #endif diff --git a/contrib/src/stc/scintilla/src/KeyMap.cxx b/contrib/src/stc/scintilla/src/KeyMap.cxx index c91e6c6ccc..12249e5f3c 100644 --- a/contrib/src/stc/scintilla/src/KeyMap.cxx +++ b/contrib/src/stc/scintilla/src/KeyMap.cxx @@ -1,5 +1,5 @@ // Scintilla source code edit control -/** @file KeyMap.cxx +/** @file KeyMap.cxx ** Defines a mapping between keystrokes and commands. **/ // Copyright 1998-2001 by Neil Hodgson @@ -13,7 +13,7 @@ KeyMap::KeyMap() : kmap(0), len(0), alloc(0) { for (int i = 0; MapDefault[i].key; i++) { - AssignCmdKey(MapDefault[i].key, + AssignCmdKey(MapDefault[i].key, MapDefault[i].modifiers, MapDefault[i].msg); } @@ -66,9 +66,13 @@ const KeyToCommand KeyMap::MapDefault[] = { {SCK_DOWN, SCI_NORM, SCI_LINEDOWN}, {SCK_DOWN, SCI_SHIFT, SCI_LINEDOWNEXTEND}, {SCK_DOWN, SCI_CTRL, SCI_LINESCROLLDOWN}, + {SCK_DOWN, SCI_ALT, SCI_PARADOWN}, + {SCK_DOWN, SCI_ASHIFT, SCI_PARADOWNEXTEND}, {SCK_UP, SCI_NORM, SCI_LINEUP}, {SCK_UP, SCI_SHIFT, SCI_LINEUPEXTEND}, {SCK_UP, SCI_CTRL, SCI_LINESCROLLUP}, + {SCK_UP, SCI_ALT, SCI_PARAUP}, + {SCK_UP, SCI_ASHIFT, SCI_PARAUPEXTEND}, {SCK_LEFT, SCI_NORM, SCI_CHARLEFT}, {SCK_LEFT, SCI_SHIFT, SCI_CHARLEFTEXTEND}, {SCK_LEFT, SCI_CTRL, SCI_WORDLEFT}, @@ -109,7 +113,7 @@ const KeyToCommand KeyMap::MapDefault[] = { {SCK_BACK, SCI_SHIFT, SCI_DELETEBACK}, {SCK_BACK, SCI_CTRL, SCI_DELWORDLEFT}, {SCK_BACK, SCI_ALT, SCI_UNDO}, - {SCK_BACK, SCI_CSHIFT, SCI_DELLINELEFT}, + {SCK_BACK, SCI_CSHIFT, SCI_DELLINELEFT}, {'Z', SCI_CTRL, SCI_UNDO}, {'Y', SCI_CTRL, SCI_REDO}, {'X', SCI_CTRL, SCI_CUT}, @@ -127,6 +131,7 @@ const KeyToCommand KeyMap::MapDefault[] = { {'L', SCI_CTRL, SCI_LINECUT}, {'L', SCI_CSHIFT, SCI_LINEDELETE}, {'T', SCI_CTRL, SCI_LINETRANSPOSE}, + {'D', SCI_CTRL, SCI_LINEDUPLICATE}, {'U', SCI_CTRL, SCI_LOWERCASE}, {'U', SCI_CSHIFT, SCI_UPPERCASE}, {0,0,0}, diff --git a/contrib/src/stc/scintilla/src/KeyWords.cxx b/contrib/src/stc/scintilla/src/KeyWords.cxx index 8a03aa8ac4..73ecddf50d 100644 --- a/contrib/src/stc/scintilla/src/KeyWords.cxx +++ b/contrib/src/stc/scintilla/src/KeyWords.cxx @@ -25,10 +25,10 @@ int LexerModule::nextLanguage = SCLEX_AUTOMATIC+1; LexerModule::LexerModule(int language_, LexerFunction fnLexer_, const char *languageName_, LexerFunction fnFolder_, const char * const wordListDescriptions_[]) : - language(language_), - fnLexer(fnLexer_), - fnFolder(fnFolder_), - wordListDescriptions(wordListDescriptions_), + language(language_), + fnLexer(fnLexer_), + fnFolder(fnFolder_), + wordListDescriptions(wordListDescriptions_), languageName(languageName_) { next = base; base = this; @@ -62,7 +62,7 @@ const char * LexerModule::GetWordListDescription(int index) const { return wordListDescriptions[index]; } } - + const LexerModule *LexerModule::Find(int language) { const LexerModule *lm = base; while (lm) { @@ -142,15 +142,20 @@ int Scintilla_LinkLexers() { //++Autogenerated -- run src/LexGen.py to regenerate //**\(\tLINK_LEXER(\*);\n\) LINK_LEXER(lmAda); + LINK_LEXER(lmAsm); LINK_LEXER(lmAVE); LINK_LEXER(lmBaan); LINK_LEXER(lmBullant); LINK_LEXER(lmConf); LINK_LEXER(lmCPP); + LINK_LEXER(lmCPPNoCase); LINK_LEXER(lmTCL); LINK_LEXER(lmNncrontab); + LINK_LEXER(lmCss); LINK_LEXER(lmEiffel); LINK_LEXER(lmEiffelkw); + LINK_LEXER(lmFortran); + LINK_LEXER(lmF77); LINK_LEXER(lmHTML); LINK_LEXER(lmXML); LINK_LEXER(lmASP); @@ -166,6 +171,7 @@ int Scintilla_LinkLexers() { LINK_LEXER(lmLatex); LINK_LEXER(lmPascal); LINK_LEXER(lmPerl); + LINK_LEXER(lmPOV); LINK_LEXER(lmPython); LINK_LEXER(lmRuby); LINK_LEXER(lmSQL); diff --git a/contrib/src/stc/scintilla/src/LexAVE.cxx b/contrib/src/stc/scintilla/src/LexAVE.cxx index dfd15f02f1..900aea317c 100644 --- a/contrib/src/stc/scintilla/src/LexAVE.cxx +++ b/contrib/src/stc/scintilla/src/LexAVE.cxx @@ -1,188 +1,224 @@ // SciTE - Scintilla based Text Editor /** @file LexAVE.cxx ** Lexer for Avenue. + ** + ** Written by Alexey Yutkin . **/ -// Copyright 1998-2001 by Neil Hodgson +// Copyright 1998-2002 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include #include #include -#include #include +#include +#include #include "Platform.h" #include "PropSet.h" #include "Accessor.h" +#include "StyleContext.h" #include "KeyWords.h" #include "Scintilla.h" #include "SciLexer.h" -static void ColouriseAveDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[], + + +static inline bool IsAWordChar(const int ch) { + return (ch < 0x80) && (isalnum(ch) || ch == '.' || ch == '_'); +} +static inline bool IsEnumChar(const int ch) { + return (ch < 0x80) && (isalnum(ch)|| ch == '_'); +} +static inline bool IsANumberChar(const int ch) { + return (ch < 0x80) && (isalnum(ch) || ch == '.' ); +} + +inline bool IsAWordStart(const int ch) { + return (ch < 0x80) && (isalnum(ch) || ch == '_'); +} + +inline bool isAveOperator(char ch) { + if (isalnum(ch)) + return false; + // '.' left out as it is used to make up numbers + if (ch == '*' || ch == '/' || ch == '-' || ch == '+' || + ch == '(' || ch == ')' || ch == '=' || + ch == '{' || ch == '}' || + ch == '[' || ch == ']' || ch == ';' || + ch == '<' || ch == '>' || ch == ',' || + ch == '.' ) + return true; + return false; +} + +static void ColouriseAveDoc( + unsigned int startPos, + int length, + int initStyle, + WordList *keywordlists[], Accessor &styler) { WordList &keywords = *keywordlists[0]; + WordList &keywords2 = *keywordlists[1]; + WordList &keywords3 = *keywordlists[2]; + WordList &keywords4 = *keywordlists[3]; + WordList &keywords5 = *keywordlists[4]; + WordList &keywords6 = *keywordlists[5]; - styler.StartAt(startPos); + // Do not leak onto next line + if (initStyle == SCE_AVE_STRINGEOL) { + initStyle = SCE_AVE_DEFAULT; + } - bool fold = styler.GetPropertyInt("fold") != 0; + StyleContext sc(startPos, length, initStyle, styler); + + for (; sc.More(); sc.Forward()) { + if (sc.atLineEnd) { + // Update the line state, so it can be seen by next line + int currentLine = styler.GetLine(sc.currentPos); + styler.SetLineState(currentLine, 0); + } + if (sc.atLineStart && (sc.state == SCE_AVE_STRING)) { + // Prevent SCE_AVE_STRINGEOL from leaking back to previous line + sc.SetState(SCE_AVE_STRING); + } + + + // Determine if the current state should terminate. + if (sc.state == SCE_AVE_OPERATOR) { + sc.SetState(SCE_AVE_DEFAULT); + } else if (sc.state == SCE_AVE_NUMBER) { + if (!IsANumberChar(sc.ch)) { + sc.SetState(SCE_AVE_DEFAULT); + } + } else if (sc.state == SCE_AVE_ENUM) { + if (!IsEnumChar(sc.ch)) { + sc.SetState(SCE_AVE_DEFAULT); + } + } else if (sc.state == SCE_AVE_IDENTIFIER) { + if (!IsAWordChar(sc.ch) || (sc.ch == '.')) { + char s[100]; + //sc.GetCurrent(s, sizeof(s)); + sc.GetCurrentLowered(s, sizeof(s)); + if (keywords.InList(s)) { + sc.ChangeState(SCE_AVE_WORD); + } else if (keywords2.InList(s)) { + sc.ChangeState(SCE_AVE_WORD2); + } else if (keywords3.InList(s)) { + sc.ChangeState(SCE_AVE_WORD3); + } else if (keywords4.InList(s)) { + sc.ChangeState(SCE_AVE_WORD4); + } else if (keywords5.InList(s)) { + sc.ChangeState(SCE_AVE_WORD5); + } else if (keywords6.InList(s)) { + sc.ChangeState(SCE_AVE_WORD6); + } + sc.SetState(SCE_AVE_DEFAULT); + } + } else if (sc.state == SCE_AVE_COMMENT) { + if (sc.atLineEnd) { + sc.SetState(SCE_AVE_DEFAULT); + } + } else if (sc.state == SCE_AVE_STRING) { + if (sc.ch == '\"') { + sc.ForwardSetState(SCE_AVE_DEFAULT); + } else if (sc.atLineEnd) { + sc.ChangeState(SCE_AVE_STRINGEOL); + sc.ForwardSetState(SCE_AVE_DEFAULT); + } + } + + // Determine if a new state should be entered. + if (sc.state == SCE_AVE_DEFAULT) { + if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) { + sc.SetState(SCE_AVE_NUMBER); + } else if (IsAWordStart(sc.ch)) { + sc.SetState(SCE_AVE_IDENTIFIER); + } else if (sc.Match('\"')) { + sc.SetState(SCE_AVE_STRING); + } else if (sc.Match('\'')) { + sc.SetState(SCE_AVE_COMMENT); + sc.Forward(); + } else if (isAveOperator(static_cast(sc.ch))) { + sc.SetState(SCE_AVE_OPERATOR); + } else if (sc.Match('#')) { + sc.SetState(SCE_AVE_ENUM); + sc.Forward(); + } + } + } + sc.Complete(); +} + +static void FoldAveDoc(unsigned int startPos, int length, int /* initStyle */, WordList *[], + Accessor &styler) { + unsigned int lengthDoc = startPos + length; + int visibleChars = 0; int lineCurrent = styler.GetLine(startPos); int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK; int levelCurrent = levelPrev; - - int state = initStyle; - if (state == SCE_AVE_STRINGEOL) // Does not leak onto next line - state = SCE_AVE_DEFAULT; - char chNext = styler[startPos]; - unsigned int lengthDoc = startPos + length; - int visibleChars = 0; - styler.StartSegment(startPos); + char chNext = static_cast(tolower(styler[startPos])); + bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0; + int styleNext = styler.StyleAt(startPos); + char s[10]; for (unsigned int i = startPos; i < lengthDoc; i++) { - char ch = chNext; - chNext = styler.SafeGetCharAt(i + 1); - if ((ch == '\r' && chNext != '\n') || (ch == '\n')) { - // Trigger on CR only (Mac style) or either on LF from CR+LF (Dos/Win) or on LF alone (Unix) - // Avoid triggering two times on Dos/Win - // End of line - if (state == SCE_AVE_STRINGEOL) { - styler.ColourTo(i, state); - state = SCE_AVE_DEFAULT; + char ch = static_cast(tolower(chNext)); + chNext = static_cast(tolower(styler.SafeGetCharAt(i + 1))); + int style = styleNext; + styleNext = styler.StyleAt(i + 1); + bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); + if (style == SCE_AVE_WORD) { + if (ch == 't' || ch == 'f' || ch == 'w' || ch == 'e') { + for (unsigned int j = 0; j < 6; j++) { + if (!iswordchar(styler[i + j])) { + break; + } + s[j] = static_cast(tolower(styler[i + j])); + s[j + 1] = '\0'; + } + + if ((strcmp(s, "then") == 0) || (strcmp(s, "for") == 0) || (strcmp(s, "while") == 0)) { + levelCurrent++; + } + if ((strcmp(s, "end") == 0)) { + levelCurrent--; + } } - if (fold) { - int lev = levelPrev; - if (visibleChars == 0) - lev |= SC_FOLDLEVELWHITEFLAG; - if ((levelCurrent > levelPrev) && (visibleChars > 0)) - lev |= SC_FOLDLEVELHEADERFLAG; + } else if (style == SCE_AVE_OPERATOR) { + if (ch == '{' || ch == '(') { + levelCurrent++; + } else if (ch == '}' || ch == ')') { + levelCurrent--; + } + } + + if (atEOL) { + int lev = levelPrev; + if (visibleChars == 0 && foldCompact) { + lev |= SC_FOLDLEVELWHITEFLAG; + } + if ((levelCurrent > levelPrev) && (visibleChars > 0)) { + lev |= SC_FOLDLEVELHEADERFLAG; + } + if (lev != styler.LevelAt(lineCurrent)) { styler.SetLevel(lineCurrent, lev); - lineCurrent++; - levelPrev = levelCurrent; } + lineCurrent++; + levelPrev = levelCurrent; visibleChars = 0; } - if (!isspace(ch)) + if (!isspacechar(ch)) { visibleChars++; - if (styler.IsLeadByte(ch)) { - chNext = styler.SafeGetCharAt(i + 2); - i += 1; - continue; } - - if (state == SCE_AVE_DEFAULT) { - if (iswordstart(ch) || (ch == '.') ) { - styler.ColourTo(i-1, state); - state = SCE_AVE_IDENTIFIER; - } else if (ch == '\'') { - styler.ColourTo(i-1, state); - state = SCE_AVE_COMMENT; - } else if (ch == '\"') { - styler.ColourTo(i-1, state); - state = SCE_AVE_STRING; - } else if (ch == '#') { - styler.ColourTo(i-1, state); - state = SCE_AVE_ENUM; - } else if (isoperator(ch) ) { - styler.ColourTo(i-1, state); - styler.ColourTo(i, SCE_AVE_OPERATOR); - } - } - else if (state == SCE_AVE_COMMENT) { - if (ch == '\r' || ch == '\n') { - styler.ColourTo(i-1, state); - state = SCE_AVE_DEFAULT; - } - } - else if (state == SCE_AVE_ENUM) { - if (isoperator(ch) || ch == ' ' || ch == '\'' || ch == '\r' || ch == '\n') { - styler.ColourTo(i-1, state); - state = SCE_AVE_DEFAULT; - } - } - else if (state == SCE_AVE_STRING) { - if (ch == '\"') { - if (chNext == '\"') { - i++; - ch = chNext; - chNext = styler.SafeGetCharAt(i + 1); - } else - { - styler.ColourTo(i, state); - state = SCE_AVE_DEFAULT; - } - } else if (chNext == '\r' || chNext == '\n') { - styler.ColourTo(i-1, SCE_AVE_STRINGEOL); - state = SCE_AVE_STRINGEOL; - } - } - if ((state == SCE_AVE_IDENTIFIER)) { - if (!iswordchar(ch) || ch == '.' ) { - char s[100]; - unsigned int start = styler.GetStartSegment(); - unsigned int end = i - 1; - for (unsigned int ii = 0; ii < end - start + 1 && ii < 30; ii++) { - s[ii] = static_cast(tolower(styler[start + ii])); - s[ii + 1] = '\0'; - } - - char chAttr = SCE_AVE_IDENTIFIER; - - if (isdigit(s[0])) - chAttr = SCE_AVE_NUMBER; - else { - if ((strcmp(s, "for") == 0) || (strcmp(s, "if") == 0) || (strcmp(s, "while") == 0)) - { - levelCurrent +=1; - chAttr = SCE_AVE_STATEMENT; - } - - if (strcmp(s, "end") == 0) - { - levelCurrent -=1; - chAttr = SCE_AVE_STATEMENT; - } - - if ( (strcmp(s, "then") == 0) || (strcmp(s, "else") == 0) || (strcmp(s, "break") == 0) || - (strcmp(s, "each") == 0) || - (strcmp(s, "exit") == 0) || (strcmp(s, "continue") == 0) || (strcmp(s, "return") == 0) || - (strcmp(s, "by") == 0) || (strcmp(s, "in") == 0) || (strcmp(s, "elseif") == 0)) - { - chAttr = SCE_AVE_STATEMENT; - } - - if ((strcmp(s, "av") == 0) || (strcmp(s, "self") == 0)) - { - chAttr = SCE_AVE_KEYWORD; - } - - if (keywords.InList(s)) - { - chAttr = SCE_AVE_WORD; - } - } - styler.ColourTo(end, chAttr); - state = SCE_AVE_DEFAULT; - - if (ch == '\'') { - state = SCE_AVE_COMMENT; - } else if (ch == '\"') { - state = SCE_AVE_STRING; - } else if (isoperator(ch)) { - styler.ColourTo(i, SCE_AVE_OPERATOR); - } - } - } - } - styler.ColourTo(lengthDoc - 1, state); - // Fill in the real level of the next line, keeping the current flags as they will be filled in later - if (fold) { - int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK; - styler.SetLevel(lineCurrent, levelPrev | flagsNext); - } + int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK; + styler.SetLevel(lineCurrent, levelPrev | flagsNext); } -LexerModule lmAVE(SCLEX_AVE, ColouriseAveDoc, "ave"); +LexerModule lmAVE(SCLEX_AVE, ColouriseAveDoc, "ave", FoldAveDoc); + diff --git a/contrib/src/stc/scintilla/src/LexAda.cxx b/contrib/src/stc/scintilla/src/LexAda.cxx index 0d8fb9d5dd..263f7da456 100644 --- a/contrib/src/stc/scintilla/src/LexAda.cxx +++ b/contrib/src/stc/scintilla/src/LexAda.cxx @@ -1,198 +1,520 @@ -// SciTE - Scintilla based Text Editor -// LexAda.cxx - lexer for Ada95 -// by Tahir Karaca +// Scintilla source code edit control +/** @file LexAda.cxx + ** Lexer for Ada 95 + **/ +// Copyright 2002 by Sergey Koshcheyev // The License.txt file describes the conditions under which this software may be distributed. -#include -#include -#include -#include -#include +#include +#include +#include +#include #include "Platform.h" -#include "PropSet.h" #include "Accessor.h" +#include "StyleContext.h" +#include "PropSet.h" #include "KeyWords.h" -#include "Scintilla.h" #include "SciLexer.h" +#include "SString.h" -inline void classifyWordAda(unsigned int start, unsigned int end, - WordList &keywords, Accessor &styler) { +/* + * Interface + */ - static const unsigned KEWORD_LEN_MAX = 30; +static void ColouriseDocument( + unsigned int startPos, + int length, + int initStyle, + WordList *keywordlists[], + Accessor &styler); - char wordLower[KEWORD_LEN_MAX + 1]; - unsigned i; - for(i = 0; ( i < KEWORD_LEN_MAX ) && ( i < end - start + 1 ); i++) { - wordLower[i] = static_cast(tolower(styler[start + i])); - } - wordLower[i] = '\0'; - -// int levelChange = 0; - char chAttr = SCE_ADA_IDENTIFIER; - if (keywords.InList(wordLower)) { - chAttr = SCE_ADA_WORD; +static const char * const adaWordListDesc[] = { + "Keywords", + 0 +}; -// Folding doesn't work this way since the semantics of some keywords depends -// on the current context. -// E.g. - "cond1 and THEN cond2" <-> "if ... THEN ..." -// - "procedure X IS ... end X;" <-> "procedure X IS new Y;" -// if (strcmp(wordLower, "is") == 0 || strcmp(wordLower, "then") == 0) -// levelChange=1; -// else if (strcmp(wordLower, "end") == 0) -// levelChange=-1; - } - styler.ColourTo(end, chAttr); - -// return levelChange; +LexerModule lmAda(SCLEX_ADA, ColouriseDocument, "ada", NULL, adaWordListDesc); + +/* + * Implementation + */ + +// Functions that have apostropheStartsAttribute as a parameter set it according to whether +// an apostrophe encountered after processing the current token will start an attribute or +// a character literal. +static void ColouriseCharacter(StyleContext& sc, bool& apostropheStartsAttribute); +static void ColouriseComment(StyleContext& sc, bool& apostropheStartsAttribute); +static void ColouriseContext(StyleContext& sc, char chEnd, int stateEOL); +static void ColouriseDelimiter(StyleContext& sc, bool& apostropheStartsAttribute); +static void ColouriseLabel(StyleContext& sc, WordList& keywords, bool& apostropheStartsAttribute); +static void ColouriseNumber(StyleContext& sc, bool& apostropheStartsAttribute); +static void ColouriseString(StyleContext& sc, bool& apostropheStartsAttribute); +static void ColouriseWhiteSpace(StyleContext& sc, bool& apostropheStartsAttribute); +static void ColouriseWord(StyleContext& sc, WordList& keywords, bool& apostropheStartsAttribute); + +static inline bool IsDelimiterCharacter(int ch); +static inline bool IsNumberStartCharacter(int ch); +static inline bool IsNumberCharacter(int ch); +static inline bool IsSeparatorOrDelimiterCharacter(int ch); +static bool IsValidIdentifier(const SString& identifier); +static bool IsValidNumber(const SString& number); +static inline bool IsWordStartCharacter(int ch); +static inline bool IsWordCharacter(int ch); + +static void ColouriseCharacter(StyleContext& sc, bool& apostropheStartsAttribute) { + apostropheStartsAttribute = true; + + sc.SetState(SCE_ADA_CHARACTER); + + // Skip the apostrophe and one more character (so that '' is shown as non-terminated and ''' + // is handled correctly) + sc.Forward(); + sc.Forward(); + + ColouriseContext(sc, '\'', SCE_ADA_CHARACTEREOL); } +static void ColouriseContext(StyleContext& sc, char chEnd, int stateEOL) { + while (!sc.atLineEnd && !sc.Match(chEnd)) { + sc.Forward(); + } -static inline bool isAdaOperator(char ch) { - - if (ch == '&' || ch == '\'' || ch == '(' || ch == ')' || - ch == '*' || ch == '+' || ch == ',' || ch == '-' || - ch == '.' || ch == '/' || ch == ':' || ch == ';' || - ch == '<' || ch == '=' || ch == '>') - return true; - return false; -} - - -inline void styleTokenBegin(char beginChar, unsigned int pos, int &state, - Accessor &styler) { - - if (isalpha(beginChar)) { - styler.ColourTo(pos-1, state); - state = SCE_ADA_IDENTIFIER; - } else if (isdigit(beginChar)) { - styler.ColourTo(pos-1, state); - state = SCE_ADA_NUMBER; - } else if (beginChar == '-' && styler.SafeGetCharAt(pos + 1) == '-') { - styler.ColourTo(pos-1, state); - state = SCE_ADA_COMMENT; - } else if (beginChar == '\"') { - styler.ColourTo(pos-1, state); - state = SCE_ADA_STRING; - } else if (beginChar == '\'' && styler.SafeGetCharAt(pos + 2) == '\'') { - styler.ColourTo(pos-1, state); - state = SCE_ADA_CHARACTER; - } else if (isAdaOperator(beginChar)) { - styler.ColourTo(pos-1, state); - styler.ColourTo(pos, SCE_ADA_OPERATOR); + if (!sc.atLineEnd) { + sc.ForwardSetState(SCE_ADA_DEFAULT); + } else { + sc.ChangeState(stateEOL); } } +static void ColouriseComment(StyleContext& sc, bool& /*apostropheStartsAttribute*/) { + // Apostrophe meaning is not changed, but the parameter is present for uniformity -static void ColouriseAdaDoc(unsigned int startPos, int length, int initStyle, - WordList *keywordlists[], Accessor &styler) { - + sc.SetState(SCE_ADA_COMMENTLINE); + + while (!sc.atLineEnd) { + sc.Forward(); + } +} + +static void ColouriseDelimiter(StyleContext& sc, bool& apostropheStartsAttribute) { + apostropheStartsAttribute = sc.Match (')'); + sc.SetState(SCE_ADA_DELIMITER); + sc.ForwardSetState(SCE_ADA_DEFAULT); +} + +static void ColouriseLabel(StyleContext& sc, WordList& keywords, bool& apostropheStartsAttribute) { + apostropheStartsAttribute = false; + + sc.SetState(SCE_ADA_LABEL); + + // Skip "<<" + sc.Forward(); + sc.Forward(); + + SString identifier; + + while (!sc.atLineEnd && !IsSeparatorOrDelimiterCharacter(sc.ch)) { + identifier += static_cast(tolower(sc.ch)); + sc.Forward(); + } + + // Skip ">>" + if (sc.Match('>', '>')) { + sc.Forward(); + sc.Forward(); + } else { + sc.ChangeState(SCE_ADA_ILLEGAL); + } + + // If the name is an invalid identifier or a keyword, then make it invalid label + if (!IsValidIdentifier(identifier) || keywords.InList(identifier.c_str())) { + sc.ChangeState(SCE_ADA_ILLEGAL); + } + + sc.SetState(SCE_ADA_DEFAULT); + +} + +static void ColouriseNumber(StyleContext& sc, bool& apostropheStartsAttribute) { + apostropheStartsAttribute = true; + + SString number; + sc.SetState(SCE_ADA_NUMBER); + + // Get all characters up to a delimiter or a separator, including points, but excluding + // double points (ranges). + while (!IsSeparatorOrDelimiterCharacter(sc.ch) || (sc.ch == '.' && sc.chNext != '.')) { + number += static_cast(sc.ch); + sc.Forward(); + } + + // Special case: exponent with sign + if ((sc.chPrev == 'e' || sc.chPrev == 'E') && + (sc.ch == '+' || sc.ch == '-')) { + number += static_cast(sc.ch); + sc.Forward (); + + while (!IsSeparatorOrDelimiterCharacter(sc.ch)) { + number += static_cast(sc.ch); + sc.Forward(); + } + } + + if (!IsValidNumber(number)) { + sc.ChangeState(SCE_ADA_ILLEGAL); + } + + sc.SetState(SCE_ADA_DEFAULT); +} + +static void ColouriseString(StyleContext& sc, bool& apostropheStartsAttribute) { + apostropheStartsAttribute = true; + + sc.SetState(SCE_ADA_STRING); + sc.Forward(); + + ColouriseContext(sc, '"', SCE_ADA_STRINGEOL); +} + +static void ColouriseWhiteSpace(StyleContext& sc, bool& /*apostropheStartsAttribute*/) { + // Apostrophe meaning is not changed, but the parameter is present for uniformity + sc.SetState(SCE_ADA_DEFAULT); + sc.ForwardSetState(SCE_ADA_DEFAULT); +} + +static void ColouriseWord(StyleContext& sc, WordList& keywords, bool& apostropheStartsAttribute) { + apostropheStartsAttribute = true; + sc.SetState(SCE_ADA_IDENTIFIER); + + SString word; + + while (!sc.atLineEnd && !IsSeparatorOrDelimiterCharacter(sc.ch)) { + word += static_cast(tolower(sc.ch)); + sc.Forward(); + } + + if (!IsValidIdentifier(word)) { + sc.ChangeState(SCE_ADA_ILLEGAL); + + } else if (keywords.InList(word.c_str())) { + sc.ChangeState(SCE_ADA_WORD); + + if (word != "all") { + apostropheStartsAttribute = false; + } + } + + sc.SetState(SCE_ADA_DEFAULT); +} + +// +// ColouriseDocument +// + +static void ColouriseDocument( + unsigned int startPos, + int length, + int initStyle, + WordList *keywordlists[], + Accessor &styler) { WordList &keywords = *keywordlists[0]; - - styler.StartAt(startPos); - -// bool fold = styler.GetPropertyInt("fold"); -// int lineCurrent = styler.GetLine(startPos); -// int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK; -// int levelCurrent = levelPrev; - int state = initStyle; - if (state == SCE_ADA_STRINGEOL) // Does not leak onto next line - state = SCE_ADA_DEFAULT; - char chNext = styler[startPos]; - const unsigned int lengthDoc = startPos + length; - //int visibleChars = 0; - styler.StartSegment(startPos); - for (unsigned int i = startPos; i < lengthDoc; i++) { - char ch = chNext; - chNext = styler.SafeGetCharAt(i + 1); + StyleContext sc(startPos, length, initStyle, styler); - if ((ch == '\r' && chNext != '\n') || (ch == '\n')) { - // Trigger on CR only (Mac style) or either on LF from CR+LF (Dos/Win) or on LF alone (Unix) - // Avoid triggering two times on Dos/Win - if (state == SCE_ADA_STRINGEOL) { - styler.ColourTo(i, state); - state = SCE_ADA_DEFAULT; - } -// if (fold) { -// int lev = levelPrev; -// if (visibleChars == 0) -// lev |= SC_FOLDLEVELWHITEFLAG; -// if ((levelCurrent > levelPrev) && (visibleChars > 0)) -// lev |= SC_FOLDLEVELHEADERFLAG; -// styler.SetLevel(lineCurrent, lev); -// lineCurrent++; -// levelPrev = levelCurrent; -// } - //visibleChars = 0; - } - //if (!isspacechar(ch)) - // visibleChars++; + int lineCurrent = styler.GetLine(startPos); + bool apostropheStartsAttribute = (styler.GetLineState(lineCurrent) & 1) != 0; - if (styler.IsLeadByte(ch)) { - chNext = styler.SafeGetCharAt(i + 2); - i += 1; - continue; + while (sc.More()) { + if (sc.atLineEnd) { + // Go to the next line + sc.Forward(); + lineCurrent++; + + // Remember the line state for future incremental lexing + styler.SetLineState(lineCurrent, apostropheStartsAttribute); + + // Don't continue any styles on the next line + sc.SetState(SCE_ADA_DEFAULT); } - if (state == SCE_ADA_DEFAULT) { - styleTokenBegin(ch, i, state, styler); - } else if (state == SCE_ADA_IDENTIFIER) { - if (!iswordchar(ch)) { - classifyWordAda(styler.GetStartSegment(), - i - 1, - keywords, - styler); - state = SCE_ADA_DEFAULT; - styleTokenBegin(ch, i, state, styler); - } - } else if (state == SCE_ADA_COMMENT) { - if (ch == '\r' || ch == '\n') { - styler.ColourTo(i-1, state); - state = SCE_ADA_DEFAULT; - } - } else if (state == SCE_ADA_STRING) { - if (ch == '"' ) { - if( chNext == '"' ) { - i++; - chNext = styler.SafeGetCharAt(i + 1); - } else { - styler.ColourTo(i, state); - state = SCE_ADA_DEFAULT; - } - } else if (chNext == '\r' || chNext == '\n') { - styler.ColourTo(i-1, SCE_ADA_STRINGEOL); - state = SCE_ADA_STRINGEOL; - } - } else if (state == SCE_ADA_CHARACTER) { - if (ch == '\r' || ch == '\n') { - styler.ColourTo(i-1, SCE_ADA_STRINGEOL); - state = SCE_ADA_STRINGEOL; - } else if (ch == '\'' && styler.SafeGetCharAt(i - 2) == '\'') { - styler.ColourTo(i, state); - state = SCE_ADA_DEFAULT; - } - } else if (state == SCE_ADA_NUMBER) { - if ( !( isdigit(ch) || ch == '.' || ch == '_' || ch == '#' - || ch == 'A' || ch == 'B' || ch == 'C' || ch == 'D' - || ch == 'E' || ch == 'F' - || ch == 'a' || ch == 'b' || ch == 'c' || ch == 'd' - || ch == 'e' || ch == 'f' ) ) { - styler.ColourTo(i-1, SCE_ADA_NUMBER); - state = SCE_ADA_DEFAULT; - styleTokenBegin(ch, i, state, styler); - } - } + // Comments + if (sc.Match('-', '-')) { + ColouriseComment(sc, apostropheStartsAttribute); + // Strings + } else if (sc.Match('"')) { + ColouriseString(sc, apostropheStartsAttribute); + + // Characters + } else if (sc.Match('\'') && !apostropheStartsAttribute) { + ColouriseCharacter(sc, apostropheStartsAttribute); + + // Labels + } else if (sc.Match('<', '<')) { + ColouriseLabel(sc, keywords, apostropheStartsAttribute); + + // Whitespace + } else if (isspace(sc.ch)) { + ColouriseWhiteSpace(sc, apostropheStartsAttribute); + + // Delimiters + } else if (IsDelimiterCharacter(sc.ch)) { + ColouriseDelimiter(sc, apostropheStartsAttribute); + + // Numbers + } else if (isdigit(sc.ch) || sc.ch == '#') { + ColouriseNumber(sc, apostropheStartsAttribute); + + // Keywords or identifiers + } else { + ColouriseWord(sc, keywords, apostropheStartsAttribute); + } } - styler.ColourTo(lengthDoc - 1, state); -// // Fill in the real level of the next line, keeping the current flags as they will be filled in later -// if (fold) { -// int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK; -// styler.SetLevel(lineCurrent, levelPrev | flagsNext); -// } + sc.Complete(); } -LexerModule lmAda(SCLEX_ADA, ColouriseAdaDoc, "ada"); +static inline bool IsDelimiterCharacter(int ch) { + switch (ch) { + case '&': + case '\'': + case '(': + case ')': + case '*': + case '+': + case ',': + case '-': + case '.': + case '/': + case ':': + case ';': + case '<': + case '=': + case '>': + case '|': + return true; + default: + return false; + } +} + +static inline bool IsNumberCharacter(int ch) { + return IsNumberStartCharacter(ch) || + ch == '_' || + ch == '.' || + ch == '#' || + (ch >= 'a' && ch <= 'f') || + (ch >= 'A' && ch <= 'F'); +} + +static inline bool IsNumberStartCharacter(int ch) { + return isdigit(ch) != 0; +} + +static inline bool IsSeparatorOrDelimiterCharacter(int ch) { + return isspace(ch) || IsDelimiterCharacter(ch); +} + +static bool IsValidIdentifier(const SString& identifier) { + // First character can't be '_', so initialize the flag to true + bool lastWasUnderscore = true; + + int length = identifier.length(); + + // Zero-length identifiers are not valid (these can occur inside labels) + if (length == 0) { + return false; + } + + // Check for valid character at the start + if (!IsWordStartCharacter(identifier[0])) { + return false; + } + + // Check for only valid characters and no double underscores + for (int i = 0; i < length; i++) { + if (!IsWordCharacter(identifier[i]) || + (identifier[i] == '_' && lastWasUnderscore)) { + return false; + } + lastWasUnderscore = identifier[i] == '_'; + } + + // Check for underscore at the end + if (lastWasUnderscore == true) { + return false; + } + + // All checks passed + return true; +} + +static bool IsValidNumber(const SString& number) { + int hashPos = number.search("#"); + bool seenDot = false; + + int i = 0; + int length = number.length(); + + if (length == 0) + return false; // Just in case + + // Decimal number + if (hashPos == -1) { + bool canBeSpecial = false; + + for (; i < length; i++) { + if (number[i] == '_') { + if (!canBeSpecial) { + return false; + } + canBeSpecial = false; + } else if (number[i] == '.') { + if (!canBeSpecial || seenDot) { + return false; + } + canBeSpecial = false; + seenDot = true; + } else if (isdigit(number[i])) { + canBeSpecial = true; + } else { + break; + } + } + + if (!canBeSpecial) + return false; + } else { + // Based number + bool canBeSpecial = false; + int base = 0; + + // Parse base + for (; i < length; i++) { + int ch = number[i]; + if (ch == '_') { + if (!canBeSpecial) + return false; + canBeSpecial = false; + } else if (isdigit (ch)) { + base = base * 10 + (ch - '0'); + if (base > 16) + return false; + canBeSpecial = true; + } else if (ch == '#' && canBeSpecial) { + break; + } else { + return false; + } + } + + if (base < 2) + return false; + if (i == length) + return false; + + i++; // Skip over '#' + + // Parse number + canBeSpecial = false; + + for (; i < length; i++) { + int ch = tolower(number[i]); + + if (ch == '_') { + if (!canBeSpecial) { + return false; + } + canBeSpecial = false; + + } else if (ch == '.') { + if (!canBeSpecial || seenDot) { + return false; + } + canBeSpecial = false; + seenDot = true; + + } else if (isdigit (ch)) { + if (ch - '0' >= base) { + return false; + } + canBeSpecial = true; + + } else if (ch >= 'a' && ch <= 'f') { + if (ch - 'a' + 10 >= base) { + return false; + } + canBeSpecial = true; + + } else if (ch == '#' && canBeSpecial) { + break; + + } else { + return false; + } + } + + if (i == length) { + return false; + } + + i++; + } + + // Exponent (optional) + if (i < length) { + if (number[i] != 'e' && number[i] != 'E') + return false; + + i++; // Move past 'E' + + if (i == length) { + return false; + } + + if (number[i] == '+') + i++; + else if (number[i] == '-') { + if (seenDot) { + i++; + } else { + return false; // Integer literals should not have negative exponents + } + } + + if (i == length) { + return false; + } + + bool canBeSpecial = false; + + for (; i < length; i++) { + if (number[i] == '_') { + if (!canBeSpecial) { + return false; + } + canBeSpecial = false; + } else if (isdigit(number[i])) { + canBeSpecial = true; + } else { + return false; + } + } + + if (!canBeSpecial) + return false; + } + + // if i == length, number was parsed successfully. + return i == length; +} + +static inline bool IsWordCharacter(int ch) { + return IsWordStartCharacter(ch) || isdigit(ch); +} + +static inline bool IsWordStartCharacter(int ch) { + return isalpha(ch) || ch == '_'; +} diff --git a/contrib/src/stc/scintilla/src/LexAsm.cxx b/contrib/src/stc/scintilla/src/LexAsm.cxx new file mode 100644 index 0000000000..1eecf9b31a --- /dev/null +++ b/contrib/src/stc/scintilla/src/LexAsm.cxx @@ -0,0 +1,142 @@ +// Scintilla source code edit control +/** @file LexAsm.cxx + ** Lexer for Assembler, just for the Masm Syntax + ** Written by The Black Horus + **/ +// Copyright 1998-2002 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + + + +static inline bool IsAWordChar(const int ch) { + return (ch < 0x80) && (isalnum(ch) || ch == '.' || ch == '_' || ch =='\\'); +} + +static inline bool IsAWordStart(const int ch) { + return (ch < 0x80) && (isalnum(ch) || ch == '_' || ch == '.'); +} + +inline bool isAsmOperator(char ch) { + if (isalnum(ch)) + return false; + // '.' left out as it is used to make up numbers + if (ch == '*' || ch == '/' || ch == '-' || ch == '+' || + ch == '(' || ch == ')' || ch == '=' || + ch == '[' || ch == ']' || ch == '<' || + ch == '>' || ch == ',' || + ch == '.' || ch == '%' || ch == ':') + return true; + return false; +} + +static void ColouriseAsmDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[], + Accessor &styler) { + + WordList &cpuInstruction = *keywordlists[0]; + WordList &mathInstruction = *keywordlists[1]; + WordList ®isters = *keywordlists[2]; + WordList &directive = *keywordlists[3]; + WordList &directiveOperand = *keywordlists[4]; + + StyleContext sc(startPos, length, initStyle, styler); + + for (; sc.More(); sc.Forward()) + { + // Handle line continuation generically. + if (sc.ch == '\\') { + if (sc.Match("\\\n")) { + sc.Forward(); + continue; + } + if (sc.Match("\\\r\n")) { + sc.Forward(); + sc.Forward(); + continue; + } + } + + // Determine if the current state should terminate. + if (sc.state == SCE_ASM_OPERATOR) { + sc.SetState(SCE_ASM_DEFAULT); + }else if (sc.state == SCE_ASM_NUMBER) { + if (!IsAWordChar(sc.ch)) { + sc.SetState(SCE_ASM_DEFAULT); + } + } else if (sc.state == SCE_ASM_IDENTIFIER) { + if (!IsAWordChar(sc.ch) ) { + char s[100]; + sc.GetCurrentLowered(s, sizeof(s)); + + if (cpuInstruction.InList(s)) { + sc.ChangeState(SCE_ASM_CPUINSTRUCTION); + } else if (mathInstruction.InList(s)) { + sc.ChangeState(SCE_ASM_MATHINSTRUCTION); + } else if (registers.InList(s)) { + sc.ChangeState(SCE_ASM_REGISTER); + } else if (directive.InList(s)) { + sc.ChangeState(SCE_ASM_DIRECTIVE); + } else if (directiveOperand.InList(s)) { + sc.ChangeState(SCE_ASM_DIRECTIVEOPERAND); + } + sc.SetState(SCE_ASM_DEFAULT); + } + } + else if (sc.state == SCE_ASM_COMMENT ) { + if (sc.atLineEnd) { + sc.SetState(SCE_ASM_DEFAULT); + } + } else if (sc.state == SCE_ASM_STRING) { + if (sc.ch == '\\') { + if (sc.chNext == '\"' || sc.chNext == '\'' || sc.chNext == '\\') { + sc.Forward(); + } + } else if (sc.ch == '\"') { + sc.ForwardSetState(SCE_ASM_DEFAULT); + } else if (sc.atLineEnd) { + sc.ForwardSetState(SCE_ASM_DEFAULT); + } + } + + // Determine if a new state should be entered. + else if (sc.state == SCE_ASM_DEFAULT) { + if (sc.ch == ';'){ + sc.SetState(SCE_ASM_COMMENT); + } else if (isdigit(sc.ch) || (sc.ch == '.' && isdigit(sc.chNext))) { + sc.SetState(SCE_ASM_NUMBER); + } else if (IsAWordStart(sc.ch)) { + sc.SetState(SCE_ASM_IDENTIFIER); + } else if (sc.Match('\"')) { + sc.SetState(SCE_ASM_STRING); + } + } + + } + sc.Complete(); +} + +static const char * const asmWordListDesc[] = { + "CPU instructions", + "FPU instructions", + "Registers", + "Directives", + "Directive operands", + 0 +}; + +LexerModule lmAsm(SCLEX_ASM, ColouriseAsmDoc, "asm", 0, asmWordListDesc); + diff --git a/contrib/src/stc/scintilla/src/LexBullant.cxx b/contrib/src/stc/scintilla/src/LexBullant.cxx index 1f76ffcf00..902f89c1e4 100644 --- a/contrib/src/stc/scintilla/src/LexBullant.cxx +++ b/contrib/src/stc/scintilla/src/LexBullant.cxx @@ -30,18 +30,6 @@ static int classifyWordBullant(unsigned int start, unsigned int end, WordList &k else { if (keywords.InList(s)) { chAttr = SCE_C_WORD; -/* if (strcmp(s, "end method") == 0 || - strcmp(s, "end case") == 0 || - strcmp(s, "end class") == 0 || - strcmp(s, "end debug") == 0 || - strcmp(s, "end test") == 0 || - strcmp(s, "end if") == 0 || - strcmp(s, "end lock") == 0 || - strcmp(s, "end transaction") == 0 || - strcmp(s, "end trap") == 0 || - strcmp(s, "end until") == 0 || - strcmp(s, "end while") == 0) - lev = -1;*/ if (strcmp(s, "end") == 0) lev = -1; else if (strcmp(s, "method") == 0 || @@ -80,7 +68,6 @@ static void ColouriseBullantDoc(unsigned int startPos, int length, int initStyle char chNext = styler[startPos]; unsigned int lengthDoc = startPos + length; int visibleChars = 0; - // int blockChange = 0; styler.StartSegment(startPos); int endFoundThisLine = 0; for (unsigned int i = startPos; i < lengthDoc; i++) { @@ -230,4 +217,9 @@ static void ColouriseBullantDoc(unsigned int startPos, int length, int initStyle } } -LexerModule lmBullant(SCLEX_BULLANT, ColouriseBullantDoc, "bullant"); +static const char * const bullantWordListDesc[] = { + "Keywords", + 0 +}; + +LexerModule lmBullant(SCLEX_BULLANT, ColouriseBullantDoc, "bullant", 0, bullantWordListDesc); diff --git a/contrib/src/stc/scintilla/src/LexCPP.cxx b/contrib/src/stc/scintilla/src/LexCPP.cxx index 39f458da73..661b968cd7 100644 --- a/contrib/src/stc/scintilla/src/LexCPP.cxx +++ b/contrib/src/stc/scintilla/src/LexCPP.cxx @@ -20,6 +20,9 @@ #include "Scintilla.h" #include "SciLexer.h" +#define KEYWORD_BOXHEADER 1 +#define KEYWORD_FOLDCONTRACTED 2 + static bool IsOKBeforeRE(const int ch) { return (ch == '(') || (ch == '=') || (ch == ','); } @@ -34,17 +37,17 @@ static inline bool IsAWordStart(const int ch) { static inline bool IsADoxygenChar(const int ch) { return (islower(ch) || ch == '$' || ch == '@' || - ch == '\\' || ch == '&' || ch == '<' || - ch == '>' || ch == '#' || ch == '{' || - ch == '}' || ch == '[' || ch == ']'); + ch == '\\' || ch == '&' || ch == '<' || + ch == '>' || ch == '#' || ch == '{' || + ch == '}' || ch == '[' || ch == ']'); } static inline bool IsStateComment(const int state) { return ((state == SCE_C_COMMENT) || - (state == SCE_C_COMMENTLINE) || - (state == SCE_C_COMMENTDOC) || - (state == SCE_C_COMMENTDOCKEYWORD) || - (state == SCE_C_COMMENTDOCKEYWORDERROR)); + (state == SCE_C_COMMENTLINE) || + (state == SCE_C_COMMENTDOC) || + (state == SCE_C_COMMENTDOCKEYWORD) || + (state == SCE_C_COMMENTDOCKEYWORDERROR)); } static inline bool IsStateString(const int state) { @@ -52,7 +55,7 @@ static inline bool IsStateString(const int state) { } static void ColouriseCppDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[], - Accessor &styler) { + Accessor &styler, bool caseSensitive) { WordList &keywords = *keywordlists[0]; WordList &keywords2 = *keywordlists[1]; @@ -71,7 +74,7 @@ static void ColouriseCppDoc(unsigned int startPos, int length, int initStyle, Wo StyleContext sc(startPos, length, initStyle, styler); for (; sc.More(); sc.Forward()) { - + if (sc.atLineStart && (sc.state == SCE_C_STRING)) { // Prevent SCE_C_STRINGEOL from leaking back to previous line sc.SetState(SCE_C_STRING); @@ -98,7 +101,11 @@ static void ColouriseCppDoc(unsigned int startPos, int length, int initStyle, Wo } else if (sc.state == SCE_C_IDENTIFIER) { if (!IsAWordChar(sc.ch) || (sc.ch == '.')) { char s[100]; - sc.GetCurrent(s, sizeof(s)); + if (caseSensitive) { + sc.GetCurrent(s, sizeof(s)); + } else { + sc.GetCurrentLowered(s, sizeof(s)); + } if (keywords.InList(s)) { lastWordWasUUID = strcmp(s, "uuid") == 0; sc.ChangeState(SCE_C_WORD); @@ -141,8 +148,12 @@ static void ColouriseCppDoc(unsigned int startPos, int length, int initStyle, Wo sc.ForwardSetState(SCE_C_DEFAULT); } else if (!IsADoxygenChar(sc.ch)) { char s[100]; - sc.GetCurrent(s, sizeof(s)); - if (!isspace(sc.ch) || !keywords3.InList(s+1)) { + if (caseSensitive) { + sc.GetCurrent(s, sizeof(s)); + } else { + sc.GetCurrentLowered(s, sizeof(s)); + } + if (!isspace(sc.ch) || !keywords3.InList(s + 1)) { sc.ChangeState(SCE_C_COMMENTDOCKEYWORDERROR); } sc.SetState(SCE_C_COMMENTDOC); @@ -237,7 +248,7 @@ static void ColouriseCppDoc(unsigned int startPos, int length, int initStyle, Wo // Skip whitespace between # and preprocessor word do { sc.Forward(); - } while ((sc.ch == ' ') && (sc.ch == '\t') && sc.More()); + } while ((sc.ch == ' ' || sc.ch == '\t') && sc.More()); if (sc.atLineEnd) { sc.SetState(SCE_C_DEFAULT); } @@ -245,9 +256,9 @@ static void ColouriseCppDoc(unsigned int startPos, int length, int initStyle, Wo sc.SetState(SCE_C_OPERATOR); } } - + if (sc.atLineEnd) { - // Reset states to begining of colourise so no surprises + // Reset states to begining of colourise so no surprises // if different sets of lines lexed. chPrevNonWhite = ' '; visibleChars = 0; @@ -262,13 +273,234 @@ static void ColouriseCppDoc(unsigned int startPos, int length, int initStyle, Wo } static bool IsStreamCommentStyle(int style) { - return style == SCE_C_COMMENT || - style == SCE_C_COMMENTDOC || - style == SCE_C_COMMENTDOCKEYWORD || - style == SCE_C_COMMENTDOCKEYWORDERROR; + return style == SCE_C_COMMENT || + style == SCE_C_COMMENTDOC || + style == SCE_C_COMMENTDOCKEYWORD || + style == SCE_C_COMMENTDOCKEYWORDERROR; } -static void FoldCppDoc(unsigned int startPos, int length, int initStyle, WordList *[], +static bool matchKeyword(unsigned int start, WordList &keywords, Accessor &styler, int keywordtype) { + bool FoundKeyword = false; + + for (unsigned int i = 0; + strlen(keywords[i]) > 0 && !FoundKeyword; + i++) { + if (atoi(keywords[i]) == keywordtype) { + FoundKeyword = styler.Match(start, ((char *)keywords[i]) + 2); + } + } + return FoundKeyword; +} + +static bool IsCommentLine(int line, Accessor &styler) { + unsigned int Pos = styler.LineStart(line); + while (styler.GetLine(Pos) == line) { + int PosStyle = styler.StyleAt(Pos); + + if ( !IsStreamCommentStyle(PosStyle) + && + PosStyle != SCE_C_COMMENTLINEDOC + && + PosStyle != SCE_C_COMMENTLINE + && + !IsASpace(styler.SafeGetCharAt(Pos)) + ) + return false; + Pos++; + } + + return true; +} + +static void FoldBoxCppDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[], + Accessor &styler) { + + WordList &keywords4 = *keywordlists[3]; + + bool foldComment = styler.GetPropertyInt("fold.comment") != 0; + bool foldPreprocessor = styler.GetPropertyInt("fold.preprocessor") != 0; + bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0; + bool firstLine = true; + unsigned int endPos = startPos + length; + int visibleChars = 0; + int lineCurrent = styler.GetLine(startPos); + int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK; + int levelCurrent = levelPrev; + int levelPrevPrev; + int levelFlags = 0; + int levelUnindent = 0; + char chNext = styler[startPos]; + int styleNext = styler.StyleAt(startPos); + int style = initStyle; + + if (lineCurrent == 0) { + levelPrevPrev = levelPrev; + } else { + levelPrevPrev = styler.LevelAt(lineCurrent - 1) & SC_FOLDLEVELNUMBERMASK; + } + + for (unsigned int i = startPos; i < endPos; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + int stylePrev = style; + style = styleNext; + styleNext = styler.StyleAt(i + 1); + + bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); + + if (foldComment && IsStreamCommentStyle(style)) { + if (!IsStreamCommentStyle(stylePrev)) { + levelCurrent++; + } else if (!IsStreamCommentStyle(styleNext) && !atEOL) { + // Comments don't end at end of line and the next character may be unstyled. + levelCurrent--; + } + } + + if (foldComment && (style == SCE_C_COMMENTLINE)) { + if ((ch == '/') && (chNext == '/')) { + char chNext2 = styler.SafeGetCharAt(i + 2); + if (chNext2 == '{') { + levelCurrent++; + } else if (chNext2 == '}') { + levelCurrent--; + } + } + } + + if (foldPreprocessor && (style == SCE_C_PREPROCESSOR)) { + if (ch == '#') { + unsigned int j = i + 1; + while ((j < endPos) && IsASpaceOrTab(styler.SafeGetCharAt(j))) { + j++; + } + + if (styler.Match(j, "region") || styler.Match(j, "if")) { + levelCurrent++; + } else if (styler.Match(j, "end")) { + levelCurrent--; + } + } + } + + if (style == SCE_C_OPERATOR + || + style == SCE_C_COMMENT + || + style == SCE_C_COMMENTLINE) { + + if (ch == '{') { + levelCurrent++; + // Special handling if line has closing brace followed by opening brace. + if (levelCurrent == levelPrev) { + if (firstLine) + levelUnindent = 1; + else + levelUnindent = -1; + } + } else if (ch == '}') { + levelCurrent--; + } + } + + /* Check for fold header keyword at beginning of word */ + if ((style == SCE_C_WORD || style == SCE_C_COMMENT || style == SCE_C_COMMENTLINE) + && + (style != stylePrev)) { + if (matchKeyword(i, keywords4, styler, KEYWORD_BOXHEADER)) { + int line; + /* Loop backwards all empty or comment lines */ + for (line = lineCurrent - 1; + line >= 0 + && + levelCurrent == (styler.LevelAt(line) & SC_FOLDLEVELNUMBERMASK) + && + (styler.LevelAt(line) & SC_FOLDLEVELBOXFOOTERFLAG) == 0 + && + IsCommentLine(line, styler); + line--) { + /* just loop backwards */; + } + + line++; + /* Set Box header flag (if the previous line has no footer line) */ + if ((styler.LevelAt(line) & SC_FOLDLEVELBOXFOOTERFLAG) == 0) { + if (line == lineCurrent) { + /* in current line */ + levelFlags |= SC_FOLDLEVELBOXHEADERFLAG; + } else { + /* at top of all preceding comment lines */ + styler.SetLevel(line, styler.LevelAt(line) + | SC_FOLDLEVELBOXHEADERFLAG); + } + } + } + } + + if (matchKeyword(i, keywords4, styler, KEYWORD_FOLDCONTRACTED)) { + levelFlags |= SC_FOLDLEVELCONTRACTED; + } + + if (atEOL) { + int lev; + // Compute level correction for special case: '} else {' + if (levelUnindent < 0) { + levelPrev += levelUnindent; + } else { + levelCurrent += levelUnindent; + } + + lev = levelPrev; + if (visibleChars == 0 && foldCompact) + lev |= SC_FOLDLEVELWHITEFLAG; + // Produce additional footer line (e.g. after closed if) + if (visibleChars == 0 + && + (levelPrev < levelPrevPrev)) + lev |= SC_FOLDLEVELBOXFOOTERFLAG; + // Produce footer line at line before (special handling for '} else {' + if (levelPrev < levelPrevPrev) { + styler.SetLevel(lineCurrent - 1, + styler.LevelAt(lineCurrent - 1) | SC_FOLDLEVELBOXFOOTERFLAG); + } + // Mark the fold header (the line that is always visible) + if ((levelCurrent > levelPrev) && (visibleChars > 0)) + lev |= SC_FOLDLEVELHEADERFLAG; + // Show a footer line at end of fold + if (levelCurrent < levelPrev) + lev |= SC_FOLDLEVELBOXFOOTERFLAG; + /* Show a footer line at the end of each procedure (level == SC_FOLDLEVELBASE) */ + if ((levelPrev == SC_FOLDLEVELBASE) + && + (levelPrevPrev > SC_FOLDLEVELBASE) + && + (visibleChars == 0)) { + lev |= SC_FOLDLEVELBOXFOOTERFLAG; + } + + lev |= levelFlags; + if (lev != styler.LevelAt(lineCurrent)) { + styler.SetLevel(lineCurrent, lev); + } + + lineCurrent++; + levelPrevPrev = levelPrev; + levelPrev = levelCurrent; + levelUnindent = 0; + visibleChars = 0; + levelFlags = 0; + firstLine = false; + } + + if (!isspacechar(ch)) + visibleChars++; + } + // Fill in the real level of the next line, keeping the current flags as they will be filled in later + int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK; + styler.SetLevel(lineCurrent, levelPrev | flagsNext); +} + +static void FoldNoBoxCppDoc(unsigned int startPos, int length, int initStyle, Accessor &styler) { bool foldComment = styler.GetPropertyInt("fold.comment") != 0; bool foldPreprocessor = styler.GetPropertyInt("fold.preprocessor") != 0; @@ -308,8 +540,8 @@ static void FoldCppDoc(unsigned int startPos, int length, int initStyle, WordLis } if (foldPreprocessor && (style == SCE_C_PREPROCESSOR)) { if (ch == '#') { - unsigned int j=i+1; - while ((j +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +static inline bool IsAWordChar(const unsigned int ch) { + return (isalnum(ch) || ch == '-' || ch == '_' || ch >= 161); // _ is not in fact correct CSS word-character +} + +inline bool IsCssOperator(const char ch) { + if (!isalnum(ch) && (ch == '{' || ch == '}' || ch == ':' || ch == ',' || ch == ';' || ch == '.' || ch == '#' || ch == '!' || ch == '@')) + return true; + return false; +} + +static void ColouriseCssDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[], Accessor &styler) { + WordList &keywords = *keywordlists[0]; + WordList &pseudoClasses = *keywordlists[1]; + + StyleContext sc(startPos, length, initStyle, styler); + + int lastState = -1; // before operator + int lastStateC = -1; // before comment + int op = ' '; // last operator + + for (; sc.More(); sc.Forward()) { + if (sc.state == SCE_CSS_COMMENT && sc.Match('*', '/')) { + if (lastStateC == -1) { + // backtrack to get last state + unsigned int i = startPos; + for (; i > 0; i--) { + if ((lastStateC = styler.StyleAt(i-1)) != SCE_CSS_COMMENT) { + if (lastStateC == SCE_CSS_OPERATOR) { + op = styler.SafeGetCharAt(i-1); + while (--i) { + lastState = styler.StyleAt(i-1); + if (lastState != SCE_CSS_OPERATOR && lastState != SCE_CSS_COMMENT) + break; + } + if (i == 0) + lastState = SCE_CSS_DEFAULT; + } + break; + } + } + if (i == 0) + lastStateC = SCE_CSS_DEFAULT; + } + sc.Forward(); + sc.ForwardSetState(lastStateC); + } + + if (sc.state == SCE_CSS_COMMENT) + continue; + + if (sc.state == SCE_CSS_DOUBLESTRING || sc.state == SCE_CSS_SINGLESTRING) { + if (sc.ch != (sc.state == SCE_CSS_DOUBLESTRING ? '\"' : '\'')) + continue; + unsigned int i = sc.currentPos; + while (i && styler[i-1] == '\\') + i--; + if ((sc.currentPos - i) % 2 == 1) + continue; + sc.ForwardSetState(SCE_CSS_VALUE); + } + + if (sc.state == SCE_CSS_OPERATOR) { + if (op == ' ') { + unsigned int i = startPos; + op = styler.SafeGetCharAt(i-1); + while (--i) { + lastState = styler.StyleAt(i-1); + if (lastState != SCE_CSS_OPERATOR && lastState != SCE_CSS_COMMENT) + break; + } + } + switch (op) { + case '@': + if (lastState == SCE_CSS_DEFAULT) + sc.SetState(SCE_CSS_DIRECTIVE); + break; + case '{': + if (lastState == SCE_CSS_DIRECTIVE) + sc.SetState(SCE_CSS_DEFAULT); + else if (lastState == SCE_CSS_TAG) + sc.SetState(SCE_CSS_IDENTIFIER); + break; + case '}': + if (lastState == SCE_CSS_DEFAULT || lastState == SCE_CSS_VALUE || lastState == SCE_CSS_IMPORTANT || lastState == SCE_CSS_IDENTIFIER) + sc.SetState(SCE_CSS_DEFAULT); + break; + case ':': + if (lastState == SCE_CSS_TAG || lastState == SCE_CSS_PSEUDOCLASS || lastState == SCE_CSS_DEFAULT || lastState == SCE_CSS_CLASS || lastState == SCE_CSS_ID) + sc.SetState(SCE_CSS_PSEUDOCLASS); + else if (lastState == SCE_CSS_IDENTIFIER || lastState == SCE_CSS_UNKNOWN_IDENTIFIER) + sc.SetState(SCE_CSS_VALUE); + break; + case '.': + if (lastState == SCE_CSS_TAG || lastState == SCE_CSS_DEFAULT) + sc.SetState(SCE_CSS_CLASS); + break; + case '#': + if (lastState == SCE_CSS_TAG || lastState == SCE_CSS_DEFAULT) + sc.SetState(SCE_CSS_ID); + break; + case ',': + if (lastState == SCE_CSS_TAG) + sc.SetState(SCE_CSS_DEFAULT); + break; + case ';': + if (lastState == SCE_CSS_DIRECTIVE) + sc.SetState(SCE_CSS_DEFAULT); + else if (lastState == SCE_CSS_VALUE || lastState == SCE_CSS_IMPORTANT) + sc.SetState(SCE_CSS_IDENTIFIER); + break; + case '!': + if (lastState == SCE_CSS_VALUE) + sc.SetState(SCE_CSS_IMPORTANT); + break; + } + } + + if (IsAWordChar(sc.ch)) { + if (sc.state == SCE_CSS_DEFAULT) + sc.SetState(SCE_CSS_TAG); + continue; + } + + if (IsAWordChar(sc.chPrev) && ( + sc.state == SCE_CSS_IDENTIFIER || sc.state == SCE_CSS_UNKNOWN_IDENTIFIER + || sc.state == SCE_CSS_PSEUDOCLASS || sc.state == SCE_CSS_UNKNOWN_PSEUDOCLASS + || sc.state == SCE_CSS_IMPORTANT + )) { + char s[100]; + sc.GetCurrentLowered(s, sizeof(s)); + char *s2 = s; + while (*s2 && !IsAWordChar(*s2)) + s2++; + switch (sc.state) { + case SCE_CSS_IDENTIFIER: + if (!keywords.InList(s2)) + sc.ChangeState(SCE_CSS_UNKNOWN_IDENTIFIER); + break; + case SCE_CSS_UNKNOWN_IDENTIFIER: + if (keywords.InList(s2)) + sc.ChangeState(SCE_CSS_IDENTIFIER); + break; + case SCE_CSS_PSEUDOCLASS: + if (!pseudoClasses.InList(s2)) + sc.ChangeState(SCE_CSS_UNKNOWN_PSEUDOCLASS); + break; + case SCE_CSS_UNKNOWN_PSEUDOCLASS: + if (pseudoClasses.InList(s2)) + sc.ChangeState(SCE_CSS_PSEUDOCLASS); + break; + case SCE_CSS_IMPORTANT: + if (strcmp(s2, "important") != 0) + sc.ChangeState(SCE_CSS_VALUE); + break; + } + } + + if (sc.ch != '.' && sc.ch != ':' && sc.ch != '#' && (sc.state == SCE_CSS_CLASS || sc.state == SCE_CSS_PSEUDOCLASS || sc.state == SCE_CSS_UNKNOWN_PSEUDOCLASS || sc.state == SCE_CSS_ID)) + sc.SetState(SCE_CSS_TAG); + + if (sc.Match('/', '*')) { + lastStateC = sc.state; + sc.SetState(SCE_CSS_COMMENT); + sc.Forward(); + } else if (sc.state == SCE_CSS_VALUE && (sc.ch == '\"' || sc.ch == '\'')) { + sc.SetState((sc.ch == '\"' ? SCE_CSS_DOUBLESTRING : SCE_CSS_SINGLESTRING)); + } else if (IsCssOperator(static_cast(sc.ch)) + && (sc.state != SCE_CSS_VALUE || sc.ch == ';' || sc.ch == '}' || sc.ch == '!') + && (sc.state != SCE_CSS_DIRECTIVE || sc.ch == ';' || sc.ch == '{') + ) { + if (sc.state != SCE_CSS_OPERATOR) + lastState = sc.state; + sc.SetState(SCE_CSS_OPERATOR); + op = sc.ch; + } + } + + sc.Complete(); +} + +static void FoldCSSDoc(unsigned int startPos, int length, int, WordList *[], Accessor &styler) { + bool foldComment = styler.GetPropertyInt("fold.comment") != 0; + bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0; + unsigned int endPos = startPos + length; + int visibleChars = 0; + int lineCurrent = styler.GetLine(startPos); + int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK; + int levelCurrent = levelPrev; + char chNext = styler[startPos]; + bool inComment = (styler.StyleAt(startPos-1) == SCE_CSS_COMMENT); + for (unsigned int i = startPos; i < endPos; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + int style = styler.StyleAt(i); + bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); + if (foldComment) { + if (!inComment && (style == SCE_CSS_COMMENT)) + levelCurrent++; + else if (inComment && (style != SCE_CSS_COMMENT)) + levelCurrent--; + inComment = (style == SCE_CSS_COMMENT); + } + if (style == SCE_CSS_OPERATOR) { + if (ch == '{') { + levelCurrent++; + } else if (ch == '}') { + levelCurrent--; + } + } + if (atEOL) { + int lev = levelPrev; + if (visibleChars == 0 && foldCompact) + lev |= SC_FOLDLEVELWHITEFLAG; + if ((levelCurrent > levelPrev) && (visibleChars > 0)) + lev |= SC_FOLDLEVELHEADERFLAG; + if (lev != styler.LevelAt(lineCurrent)) { + styler.SetLevel(lineCurrent, lev); + } + lineCurrent++; + levelPrev = levelCurrent; + visibleChars = 0; + } + if (!isspacechar(ch)) + visibleChars++; + } + // Fill in the real level of the next line, keeping the current flags as they will be filled in later + int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK; + styler.SetLevel(lineCurrent, levelPrev | flagsNext); +} + +static const char * const cssWordListDesc[] = { + "Keywords", + "Pseudo classes", + 0 +}; + +LexerModule lmCss(SCLEX_CSS, ColouriseCssDoc, "css", FoldCSSDoc, cssWordListDesc); diff --git a/contrib/src/stc/scintilla/src/LexConf.cxx b/contrib/src/stc/scintilla/src/LexConf.cxx index c8441f41ec..c33cdb5ce6 100644 --- a/contrib/src/stc/scintilla/src/LexConf.cxx +++ b/contrib/src/stc/scintilla/src/LexConf.cxx @@ -175,4 +175,10 @@ static void ColouriseConfDoc(unsigned int startPos, int length, int, WordList *k delete []buffer; } -LexerModule lmConf(SCLEX_CONF, ColouriseConfDoc, "conf"); +static const char * const confWordListDesc[] = { + "Directives", + "Parameters", + 0 +}; + +LexerModule lmConf(SCLEX_CONF, ColouriseConfDoc, "conf", 0, confWordListDesc); diff --git a/contrib/src/stc/scintilla/src/LexCrontab.cxx b/contrib/src/stc/scintilla/src/LexCrontab.cxx index 37729cbfdd..d139bb4f14 100644 --- a/contrib/src/stc/scintilla/src/LexCrontab.cxx +++ b/contrib/src/stc/scintilla/src/LexCrontab.cxx @@ -62,7 +62,7 @@ static void ColouriseNncrontabDoc(unsigned int startPos, int length, int, WordLi state = SCE_NNCRONTAB_TASK; styler.ColourTo(i,SCE_NNCRONTAB_TASK); } - else if( ch == '\\' && (styler.SafeGetCharAt(i+1) == ' ' || + else if( ch == '\\' && (styler.SafeGetCharAt(i+1) == ' ' || styler.SafeGetCharAt(i+1) == '\t')) { // signals the start of an extended comment... state = SCE_NNCRONTAB_COMMENT; @@ -208,4 +208,11 @@ static void ColouriseNncrontabDoc(unsigned int startPos, int length, int, WordLi delete []buffer; } -LexerModule lmNncrontab(SCLEX_NNCRONTAB, ColouriseNncrontabDoc, "nncrontab"); +static const char * const cronWordListDesc[] = { + "Section keywords and Forth words", + "nnCrontab keywords", + "Modifiers", + 0 +}; + +LexerModule lmNncrontab(SCLEX_NNCRONTAB, ColouriseNncrontabDoc, "nncrontab", 0, cronWordListDesc); diff --git a/contrib/src/stc/scintilla/src/LexEiffel.cxx b/contrib/src/stc/scintilla/src/LexEiffel.cxx index a0bf26a5ea..974efd9a72 100644 --- a/contrib/src/stc/scintilla/src/LexEiffel.cxx +++ b/contrib/src/stc/scintilla/src/LexEiffel.cxx @@ -28,7 +28,7 @@ static inline bool isEiffelOperator(unsigned int ch) { ch == '{' || ch == '}' || ch == '~' || ch == '[' || ch == ']' || ch == ';' || ch == '<' || ch == '>' || ch == ',' || - ch == '.' || ch == '^' || ch == '%' || ch == ':' || + ch == '.' || ch == '^' || ch == '%' || ch == ':' || ch == '!' || ch == '@' || ch == '?'; } @@ -187,19 +187,19 @@ static void FoldEiffelDocKeyWords(unsigned int startPos, int length, int /* init s[j] = '\0'; if ( - (strcmp(s, "check") == 0) || - (strcmp(s, "debug") == 0) || - (strcmp(s, "deferred") == 0) || - (strcmp(s, "do") == 0) || + (strcmp(s, "check") == 0) || + (strcmp(s, "debug") == 0) || + (strcmp(s, "deferred") == 0) || + (strcmp(s, "do") == 0) || (strcmp(s, "from") == 0) || (strcmp(s, "if") == 0) || - (strcmp(s, "inspect") == 0) || + (strcmp(s, "inspect") == 0) || (strcmp(s, "once") == 0) ) levelCurrent++; if (!lastDeferred && (strcmp(s, "class") == 0)) levelCurrent++; - if (strcmp(s, "end") == 0) + if (strcmp(s, "end") == 0) levelCurrent--; lastDeferred = strcmp(s, "deferred") == 0; } @@ -226,5 +226,10 @@ static void FoldEiffelDocKeyWords(unsigned int startPos, int length, int /* init styler.SetLevel(lineCurrent, levelPrev | flagsNext); } -LexerModule lmEiffel(SCLEX_EIFFEL, ColouriseEiffelDoc, "eiffel", FoldEiffelDocIndent); -LexerModule lmEiffelkw(SCLEX_EIFFELKW, ColouriseEiffelDoc, "eiffelkw", FoldEiffelDocKeyWords); +static const char * const eiffelWordListDesc[] = { + "Keywords", + 0 +}; + +LexerModule lmEiffel(SCLEX_EIFFEL, ColouriseEiffelDoc, "eiffel", FoldEiffelDocIndent, eiffelWordListDesc); +LexerModule lmEiffelkw(SCLEX_EIFFELKW, ColouriseEiffelDoc, "eiffelkw", FoldEiffelDocKeyWords, eiffelWordListDesc); diff --git a/contrib/src/stc/scintilla/src/LexFortran.cxx b/contrib/src/stc/scintilla/src/LexFortran.cxx new file mode 100644 index 0000000000..e2109a0ab5 --- /dev/null +++ b/contrib/src/stc/scintilla/src/LexFortran.cxx @@ -0,0 +1,310 @@ +// Scintilla source code edit control +/** @file LexFortran.cxx + ** Lexer for Fortran. + ** Writen by Chuan-jian Shen, Last changed Nov. 2002 + **/ +// Copyright 1998-2001 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +static inline bool IsAWordChar(const int ch) { + return (ch < 0x80) && (isalnum(ch) || ch == '_' || ch == '%'); +} + +static inline bool IsAWordStart(const int ch) { + return (ch < 0x80) && (isalnum(ch)); +} + +inline bool IsABlank(unsigned int ch) { + return (ch == ' ') || (ch == 0x09) || (ch == 0x0b) ; +} +static void ColouriseFortranDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[], + Accessor &styler, bool isFixFormat) { + + WordList &keywords = *keywordlists[0]; + WordList &keywords2 = *keywordlists[1]; + WordList &keywords3 = *keywordlists[2]; + + int posLineStart = 0, prevState = 0; + int endPos = startPos + length; + + // backtrack to the beginning of the document, this may be slow for big documents. + // initStyle = SCE_F_DEFAULT; + // StyleContext sc(0, startPos+length, initStyle, styler); + + // backtrack to the nearest keyword + while ((startPos > 1) && (styler.StyleAt(startPos) != SCE_F_WORD)) { + startPos--; + } + startPos = styler.LineStart(styler.GetLine(startPos)); + initStyle = styler.StyleAt(startPos - 1); + StyleContext sc(startPos, endPos-startPos, initStyle, styler); + + for (; sc.More(); sc.Forward()) { + + // remember the position of the line + if (sc.atLineStart) { + posLineStart = sc.currentPos; + sc.SetState(SCE_F_DEFAULT); + } + + // Handle line continuation generically. + if (sc.ch == '&') { + char chTemp = ' '; + int j = 1; + while (IsABlank(chTemp) && j<132) { + chTemp = static_cast(sc.GetRelative(j)); + j ++; + } + if (chTemp == '!') { + sc.SetState(SCE_F_CONTINUATION); + if (sc.chNext == '!') sc.ForwardSetState(SCE_F_COMMENT); + } else if (chTemp == '\r' || chTemp == '\n') { + int currentState = sc.state; + sc.SetState(SCE_F_CONTINUATION); + if (currentState == SCE_F_STRING1 || currentState == SCE_F_STRING2) { + sc.ForwardSetState(SCE_F_DEFAULT); + while (IsASpace(sc.ch) && sc.More()) sc.Forward(); + if (sc.ch == '&') { + sc.SetState(SCE_F_CONTINUATION); + sc.Forward(); + } + sc.SetState(currentState); + } + } + continue; + } + + // Determine if the current state should terminate. + if (sc.state == SCE_F_OPERATOR) { + sc.SetState(SCE_F_DEFAULT); + } else if (sc.state == SCE_F_NUMBER) { + if (!IsAWordChar(sc.ch)) { + sc.SetState(SCE_F_DEFAULT); + } + } else if (sc.state == SCE_F_IDENTIFIER) { + if (!IsAWordChar(sc.ch) || (sc.ch == '%')) { + char s[100]; + sc.GetCurrentLowered(s, sizeof(s)); + if (keywords.InList(s)) { + sc.ChangeState(SCE_F_WORD); + } else if (keywords2.InList(s)) { + sc.ChangeState(SCE_F_WORD2); + } else if (keywords3.InList(s)) { + sc.ChangeState(SCE_F_WORD3); + } + sc.SetState(SCE_F_DEFAULT); + } + } else if (sc.state == SCE_F_COMMENT) { + if (sc.ch == '\r' || sc.ch == '\n') { + sc.SetState(SCE_F_DEFAULT); + } + } else if (sc.state == SCE_F_STRING1) { + prevState = sc.state; + if (sc.ch == '\'') { + if (sc.chNext == '\'') { + sc.Forward(); + } else { + sc.ForwardSetState(SCE_F_DEFAULT); + prevState = SCE_F_DEFAULT; + } + } else if (sc.atLineEnd) { + if (isFixFormat) { + sc.ForwardSetState(SCE_F_DEFAULT); + posLineStart = sc.currentPos; + } else { + sc.ChangeState(SCE_F_STRINGEOL); + sc.ForwardSetState(SCE_F_DEFAULT); + } + } + } else if (sc.state == SCE_F_STRING2) { + prevState = sc.state; + if (sc.atLineEnd) { + if (isFixFormat) { + sc.ForwardSetState(SCE_F_DEFAULT); + posLineStart = sc.currentPos; + } else { + sc.ChangeState(SCE_F_STRINGEOL); + sc.ForwardSetState(SCE_F_DEFAULT); + } + } else if (sc.ch == '\"') { + if (sc.chNext == '\"') { + sc.Forward(); + } else { + sc.ForwardSetState(SCE_F_DEFAULT); + prevState = SCE_F_DEFAULT; + } + } + } else if (sc.state == SCE_F_OPERATOR2) { + if (sc.ch == '.') { + sc.ForwardSetState(SCE_F_DEFAULT); + } + } else if (sc.state == SCE_F_CONTINUATION) { + sc.SetState(SCE_F_DEFAULT); + } else if (sc.state == SCE_F_LABEL) { + if (sc.currentPos >= static_cast(posLineStart+5)) { + sc.SetState(SCE_F_DEFAULT); + } + } + + // Determine if a new state should be entered. + if (sc.state == SCE_F_DEFAULT) { + int toLineStart = sc.currentPos - posLineStart; + if (isFixFormat && (toLineStart < 6 || toLineStart > 72)) { + if (sc.atLineStart && (tolower(sc.ch) == 'c' || sc.ch == '*') || sc.ch == '!') { + sc.SetState(SCE_F_COMMENT); + } else if (toLineStart > 72) { + sc.SetState(SCE_F_COMMENT); + } else if (toLineStart < 5 && !IsASpace(sc.ch)) { + sc.SetState(SCE_F_LABEL); + } else if (toLineStart == 5 && (!IsASpace(sc.ch) && sc.ch != '0')) { + sc.SetState(SCE_F_CONTINUATION); + sc.ForwardSetState(prevState); + } + } else if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) { + sc.SetState(SCE_F_NUMBER); + } else if (sc.ch == '.' && isalpha(sc.chNext)) { + sc.SetState(SCE_F_OPERATOR2); + } else if (IsAWordStart(sc.ch)) { + sc.SetState(SCE_F_IDENTIFIER); + } else if (sc.ch == '!') { + sc.SetState(SCE_F_COMMENT); + } else if (sc.ch == '\"') { + sc.SetState(SCE_F_STRING2); + } else if (sc.ch == '\'') { + sc.SetState(SCE_F_STRING1); + } else if (isoperator(static_cast(sc.ch))) { + sc.SetState(SCE_F_OPERATOR); + } + } + } + sc.Complete(); +} + +// The folding depends on the mercy of the programer. +static int classifyFoldPointFortran(const char* s, const char* prevWord) { + int lev = 0; + if (strcmp(prevWord, "end") == 0) return lev; + if ((strcmp(prevWord, "else") == 0 && strcmp(s, "if") == 0) || strcmp(s, "elseif") == 0) + return -1; + if (strcmp(s, "associate") == 0 || strcmp(s, "block") == 0 + || strcmp(s, "blockdata") == 0 || strcmp(s, "select") == 0 + || strcmp(s, "do") == 0 || strcmp(s, "enum") ==0 + || strcmp(s, "forall") == 0 || strcmp(s, "function") == 0 + || strcmp(s, "interface") == 0 || strcmp(s, "module") == 0 + || strcmp(s, "program") == 0 || strcmp(s, "subroutine") == 0 + || strcmp(s, "then") == 0 || strcmp(s, "where") == 0) { + lev = 1; + } else if (strcmp(s, "end") == 0 || strcmp(s, "continue") == 0 + || strcmp(s, "endassociate") == 0 || strcmp(s, "endblock") == 0 + || strcmp(s, "endblockdata") == 0 || strcmp(s, "endselect") == 0 + || strcmp(s, "enddo") == 0 || strcmp(s, "endenum") ==0 + || strcmp(s, "endif") == 0 + || strcmp(s, "endforall") == 0 || strcmp(s, "endfunction") == 0 + || strcmp(s, "endinterface") == 0 || strcmp(s, "endmodule") == 0 + || strcmp(s, "endprogram") == 0 || strcmp(s, "endsubroutine") == 0 + || strcmp(s, "endwhere") == 0 || strcmp(s, "procedure") == 0 ) { + lev = -1; + } + return lev; +} +static void FoldFortranDoc(unsigned int startPos, int length, int initStyle, WordList *[], Accessor &styler) { + //~ bool foldComment = styler.GetPropertyInt("fold.comment") != 0; + // Do not know how to fold the comment at the moment. + bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0; + unsigned int endPos = startPos + length; + int visibleChars = 0; + int lineCurrent = styler.GetLine(startPos); + int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK; + int levelCurrent = levelPrev; + char chNext = styler[startPos]; + int styleNext = styler.StyleAt(startPos); + int style = initStyle; + + int lastStart = 0; + char prevWord[32] = ""; + + for (unsigned int i = startPos; i < endPos; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + int stylePrev = style; + style = styleNext; + styleNext = styler.StyleAt(i + 1); + bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); + + if (stylePrev == SCE_F_DEFAULT && style == SCE_F_WORD) + { + // Store last word start point. + lastStart = i; + } + + if (style == SCE_F_WORD) { + if(iswordchar(ch) && !iswordchar(chNext)) { + char s[32]; + unsigned int j; + for(j = 0; ( j < 31 ) && ( j < i-lastStart+1 ); j++) { + s[j] = static_cast(tolower(styler[lastStart + j])); + } + s[j] = '\0'; + levelCurrent += classifyFoldPointFortran(s, prevWord); + strcpy(prevWord, s); + } + } + if (atEOL) { + int lev = levelPrev; + if (visibleChars == 0 && foldCompact) + lev |= SC_FOLDLEVELWHITEFLAG; + if ((levelCurrent > levelPrev) && (visibleChars > 0)) + lev |= SC_FOLDLEVELHEADERFLAG; + if (lev != styler.LevelAt(lineCurrent)) { + styler.SetLevel(lineCurrent, lev); + } + lineCurrent++; + levelPrev = levelCurrent; + visibleChars = 0; + strcpy(prevWord, ""); + } + + if (!isspacechar(ch)) + visibleChars++; + } + + // Fill in the real level of the next line, keeping the current flags as they will be filled in later + int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK; + styler.SetLevel(lineCurrent, levelPrev | flagsNext); +} + +static const char * const FortranWordLists[] = { + "Primary keywords and identifiers", + "Intrinsic functions", + "Extended and user defined functions", + 0, +}; + +static void ColouriseFortranDocFreeFormat(unsigned int startPos, int length, int initStyle, WordList *keywordlists[], + Accessor &styler) { + ColouriseFortranDoc(startPos, length, initStyle, keywordlists, styler, false); +} + +static void ColouriseFortranDocFixFormat(unsigned int startPos, int length, int initStyle, WordList *keywordlists[], + Accessor &styler) { + ColouriseFortranDoc(startPos, length, initStyle, keywordlists, styler, true); +} + + +LexerModule lmFortran(SCLEX_FORTRAN, ColouriseFortranDocFreeFormat, "fortran", FoldFortranDoc, FortranWordLists); +LexerModule lmF77(SCLEX_F77, ColouriseFortranDocFixFormat, "f77", FoldFortranDoc, FortranWordLists); diff --git a/contrib/src/stc/scintilla/src/LexHTML.cxx b/contrib/src/stc/scintilla/src/LexHTML.cxx index 545bbfd553..345b15edcb 100644 --- a/contrib/src/stc/scintilla/src/LexHTML.cxx +++ b/contrib/src/stc/scintilla/src/LexHTML.cxx @@ -2,7 +2,7 @@ /** @file LexHTML.cxx ** Lexer for HTML. **/ -// Copyright 1998-2002 by Neil Hodgson +// Copyright 1998-2003 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include @@ -197,16 +197,30 @@ static void classifyAttribHTML(unsigned int start, unsigned int end, WordList &k } static int classifyTagHTML(unsigned int start, unsigned int end, - WordList &keywords, Accessor &styler) { - char s[30 + 1]; + WordList &keywords, Accessor &styler, bool &tagDontFold, + bool caseSensitive) { + char s[30 + 2]; // Copy after the '<' unsigned int i = 0; for (unsigned int cPos = start; cPos <= end && i < 30; cPos++) { char ch = styler[cPos]; - if ((ch != '<') && (ch != '/')) - s[i++] = static_cast(tolower(ch)); + if ((ch != '<') && (ch != '/')) { + s[i++] = caseSensitive ? ch : static_cast(tolower(ch)); + } } + + //The following is only a quick hack, to see if this whole thing would work + //we first need the tagname with a trailing space... + s[i] = ' '; + s[i+1] = '\0'; + + //...to find it in the list of no-container-tags + // (There are many more. We will need a keywordlist in the property file for this) + tagDontFold = (NULL != strstr("meta link img area br hr input ",s)); + + //now we can remove the trailing space s[i] = '\0'; + bool isScript = false; char chAttr = SCE_H_TAGUNKNOWN; if (s[0] == '!') { @@ -368,6 +382,14 @@ static inline bool issgmlwordchar(char ch) { return isalnum(ch) || ch == '.' || ch == '_' || ch == ':' || ch == '!' || ch == '#' || ch == '['; } +static inline bool IsPhpWordStart(const unsigned char ch) { + return isalpha(ch) || (ch == '_') || (ch >= 0x7f); +} + +static inline bool IsPhpWordChar(char ch) { + return isdigit(ch) || IsPhpWordStart(ch); +} + static bool InTagState(int state) { return state == SCE_H_TAG || state == SCE_H_TAGUNKNOWN || state == SCE_H_SCRIPT || @@ -433,6 +455,7 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty script_mode inScriptType = script_mode((lineState >> 0) & 0x03); // 2 bits of scripting mode bool tagOpened = (lineState >> 2) & 0x01; // 1 bit to know if we are in an opened tag bool tagClosing = (lineState >> 3) & 0x01; // 1 bit to know if we are in a closing tag + bool tagDontFold = false; //some HTML tags should not be folded script_type aspScript = script_type((lineState >> 4) & 0x0F); // 4 bits of script name script_type clientScript = script_type((lineState >> 8) & 0x0F); // 4 bits of script name int beforePreProc = (lineState >> 12) & 0xFF; // 8 bits of state @@ -440,8 +463,10 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty script_type scriptLanguage = ScriptOfState(state); const bool foldHTML = styler.GetPropertyInt("fold.html", 0) != 0; - const bool fold = foldHTML && styler.GetPropertyInt("fold"); + const bool fold = foldHTML && styler.GetPropertyInt("fold", 0); + const bool foldHTMLPreprocessor = foldHTML && styler.GetPropertyInt("fold.html.preprocessor", 1); const bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0; + const bool caseSensitive = styler.GetPropertyInt("html.tags.case.sensitive", 0) != 0; int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK; int levelCurrent = levelPrev; @@ -481,7 +506,9 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty case eScriptPHP: //not currently supported case eScriptVBS: - if ((state != SCE_HPHP_COMMENT) && (state != SCE_HPHP_COMMENTLINE) && (state != SCE_HJ_COMMENT) && (state != SCE_HJ_COMMENTLINE) && (state != SCE_HJ_COMMENTDOC)) { + if ((state != SCE_HPHP_COMMENT) && (state != SCE_HPHP_COMMENTLINE) && (state != SCE_HJ_COMMENT) && (state != SCE_HJ_COMMENTLINE) && (state != SCE_HJ_COMMENTDOC) && (!isStringState(state))) { + //Platform::DebugPrintf("state=%d, StateToPrint=%d, initStyle=%d\n", state, StateToPrint, initStyle); + //if ((state == SCE_HPHP_OPERATOR) || (state == SCE_HPHP_DEFAULT) || (state == SCE_HJ_SYMBOLS) || (state == SCE_HJ_START) || (state == SCE_HJ_DEFAULT)) { if ((ch == '{') || (ch == '}')) { levelCurrent += (ch == '{') ? 1 : -1; } @@ -600,9 +627,11 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty else inScriptType = eNonHtmlPreProc; // fold whole script - levelCurrent++; - if (scriptLanguage == eScriptXML) - levelCurrent--; // no folding of the XML first tag (all XML-like tags in this case) + if (foldHTMLPreprocessor){ + levelCurrent++; + if (scriptLanguage == eScriptXML) + levelCurrent--; // no folding of the XML first tag (all XML-like tags in this case) + } // should be better ch = styler.SafeGetCharAt(i); continue; @@ -640,7 +669,8 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty scriptLanguage = eScriptVBS; styler.ColourTo(i, SCE_H_ASP); // fold whole script - levelCurrent++; + if (foldHTMLPreprocessor) + levelCurrent++; // should be better ch = styler.SafeGetCharAt(i); continue; @@ -665,8 +695,8 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty state = SCE_H_SGML_COMMAND; // wait for a pending command } // fold whole tag (-- when closing the tag) - - levelCurrent++; + if (foldHTMLPreprocessor) + levelCurrent++; continue; } @@ -723,7 +753,8 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty inScriptType = eHtml; scriptLanguage = eScriptNone; // unfold all scripting languages - levelCurrent--; + if (foldHTMLPreprocessor) + levelCurrent--; continue; } ///////////////////////////////////// @@ -904,7 +935,8 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty break; case SCE_H_TAGUNKNOWN: if (!ishtmlwordchar(ch) && !((ch == '/') && (chPrev == '<')) && ch != '[') { - int eClass = classifyTagHTML(styler.GetStartSegment(), i - 1, keywords, styler); + int eClass = classifyTagHTML(styler.GetStartSegment(), + i - 1, keywords, styler, tagDontFold, caseSensitive); if (eClass == SCE_H_SCRIPT) { if (!tagClosing) { inScriptType = eNonHtmlScript; @@ -923,10 +955,12 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty state = SCE_H_DEFAULT; } tagOpened = false; - if (tagClosing) { - levelCurrent--; - } else { - levelCurrent++; + if (!tagDontFold){ + if (tagClosing) { + levelCurrent--; + } else { + levelCurrent++; + } } tagClosing = false; } else if (ch == '/' && chNext == '>') { @@ -969,10 +1003,13 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty state = SCE_H_DEFAULT; } tagOpened = false; - if (tagClosing) - levelCurrent--; - else - levelCurrent++; + if (!tagDontFold){ + if (tagClosing){ + levelCurrent--; + } else { + levelCurrent++; + } + } tagClosing = false; } else if (ch == '=') { styler.ColourTo(i, SCE_H_OTHER); @@ -992,10 +1029,13 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty state = SCE_H_DEFAULT; } tagOpened = false; - if (tagClosing) - levelCurrent--; - else - levelCurrent++; + if (!tagDontFold){ + if (tagClosing){ + levelCurrent--; + } else { + levelCurrent++; + } + } tagClosing = false; } else if (ch == '\"') { styler.ColourTo(i - 1, StateToPrint); @@ -1044,10 +1084,10 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty break; case SCE_H_VALUE: if (!ishtmlwordchar(ch)) { - if (ch == '\"') { + if (ch == '\"' && chPrev == '=') { // Should really test for being first character state = SCE_H_DOUBLESTRING; - } else if (ch == '\'') { + } else if (ch == '\'' && chPrev == '=') { state = SCE_H_SINGLESTRING; } else { if (IsNumber(styler.GetStartSegment(), styler)) { @@ -1063,10 +1103,13 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty state = SCE_H_DEFAULT; } tagOpened = false; - if (tagClosing) - levelCurrent--; - else - levelCurrent++; + if (!tagDontFold){ + if (tagClosing){ + levelCurrent--; + } else { + levelCurrent++; + } + } tagClosing = false; } else { state = SCE_H_OTHER; @@ -1397,7 +1440,7 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty break; ///////////// start - PHP state handling case SCE_HPHP_WORD: - if (!iswordstart(ch)) { + if (!iswordchar(ch)) { classifyWordHTPHP(styler.GetStartSegment(), i - 1, keywords5, styler); if (ch == '/' && chNext == '*') { i++; @@ -1411,7 +1454,7 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty state = SCE_HPHP_HSTRING; } else if (ch == '\'') { state = SCE_HPHP_SIMPLESTRING; - } else if (ch == '$') { + } else if (ch == '$' && IsPhpWordStart(chNext)) { state = SCE_HPHP_VARIABLE; } else if (isoperator(ch)) { state = SCE_HPHP_OPERATOR; @@ -1430,7 +1473,7 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty } break; case SCE_HPHP_VARIABLE: - if (!iswordstart(ch)) { + if (!IsPhpWordChar(ch)) { styler.ColourTo(i - 1, SCE_HPHP_VARIABLE); if (isoperator(ch)) state = SCE_HPHP_OPERATOR; @@ -1454,7 +1497,7 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty if (ch == '\\') { // skip the next char i++; - } else if (ch == '$') { + } else if (ch == '$' && IsPhpWordStart(chNext)) { styler.ColourTo(i - 1, StateToPrint); state = SCE_HPHP_HSTRING_VARIABLE; } else if (ch == '\"') { @@ -1472,7 +1515,7 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty } break; case SCE_HPHP_HSTRING_VARIABLE: - if (!iswordstart(ch)) { + if (!IsPhpWordChar(ch)) { styler.ColourTo(i - 1, StateToPrint); i--; // strange but it works state = SCE_HPHP_HSTRING; @@ -1497,7 +1540,7 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty state = SCE_HPHP_HSTRING; } else if (ch == '\'') { state = SCE_HPHP_SIMPLESTRING; - } else if (ch == '$') { + } else if (ch == '$' && IsPhpWordStart(chNext)) { state = SCE_HPHP_VARIABLE; } else if (isoperator(ch)) { state = SCE_HPHP_OPERATOR; @@ -1553,7 +1596,7 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty } StateToPrint = statePrintForState(state, inScriptType); - styler.ColourTo(lengthDoc - 1, StateToPrint); + styler.ColourTo(lengthDoc - 1, StateToPrint); // Fill in the real level of the next line, keeping the current flags as they will be filled in later if (fold) { @@ -1701,9 +1744,9 @@ static void ColouriseHTMLPiece(StyleContext &sc, WordList *keywordlists[]) { sc.SetState(SCE_H_ENTITY); } } else if ((sc.state == SCE_H_OTHER) || (sc.state == SCE_H_VALUE)) { - if (sc.ch == '\"') { + if (sc.ch == '\"' && sc.chPrev == '=') { sc.SetState(SCE_H_DOUBLESTRING); - } else if (sc.ch == '\'') { + } else if (sc.ch == '\'' && sc.chPrev == '=') { sc.SetState(SCE_H_SINGLESTRING); } else if (IsADigit(sc.ch)) { sc.SetState(SCE_H_NUMBER); @@ -1780,7 +1823,7 @@ static void ColourisePHPPiece(StyleContext &sc, WordList *keywordlists[]) { // Handle some PHP script if (sc.state == SCE_HPHP_WORD) { - if (!IsAWordStart(sc.ch)) { + if (!IsPhpWordChar(static_cast(sc.ch))) { sc.SetState(SCE_HPHP_DEFAULT); } } else if (sc.state == SCE_HPHP_COMMENTLINE) { @@ -1802,7 +1845,7 @@ static void ColourisePHPPiece(StyleContext &sc, WordList *keywordlists[]) { sc.ForwardSetState(SCE_HPHP_DEFAULT); } } else if (sc.state == SCE_HPHP_VARIABLE) { - if (!IsAWordStart(sc.ch)) { + if (!IsPhpWordChar(static_cast(sc.ch))) { sc.SetState(SCE_HPHP_DEFAULT); } } else if (sc.state == SCE_HPHP_OPERATOR) { @@ -1822,7 +1865,7 @@ static void ColourisePHPPiece(StyleContext &sc, WordList *keywordlists[]) { } } if (sc.state == SCE_HPHP_DEFAULT) { - if (IsAWordStart(sc.ch)) { + if (IsPhpWordStart(static_cast(sc.ch))) { sc.SetState(SCE_HPHP_WORD); } else if (sc.ch == '#') { sc.SetState(SCE_HPHP_COMMENTLINE); @@ -1836,7 +1879,7 @@ static void ColourisePHPPiece(StyleContext &sc, WordList *keywordlists[]) { sc.SetState(SCE_HPHP_HSTRING); } else if (sc.ch == '\'') { sc.SetState(SCE_HPHP_SIMPLESTRING); - } else if (sc.ch == '$') { + } else if (sc.ch == '$' && IsPhpWordStart(static_cast(sc.chNext))) { sc.SetState(SCE_HPHP_VARIABLE); } else if (isoperator(static_cast(sc.ch))) { sc.SetState(SCE_HPHP_OPERATOR); diff --git a/contrib/src/stc/scintilla/src/LexLisp.cxx b/contrib/src/stc/scintilla/src/LexLisp.cxx index cb150ff76d..9cd5433c89 100644 --- a/contrib/src/stc/scintilla/src/LexLisp.cxx +++ b/contrib/src/stc/scintilla/src/LexLisp.cxx @@ -98,7 +98,7 @@ static void ColouriseLispDoc(unsigned int startPos, int length, int initStyle, W if (isLispwordstart(ch)) { styler.ColourTo(i - 1, state); state = SCE_LISP_IDENTIFIER; - } + } else if (ch == ';') { styler.ColourTo(i - 1, state); state = SCE_LISP_COMMENT; @@ -107,7 +107,7 @@ static void ColouriseLispDoc(unsigned int startPos, int length, int initStyle, W styler.ColourTo(i - 1, state); styler.ColourTo(i, SCE_LISP_OPERATOR); } - + else if (ch == '\"') { state = SCE_LISP_STRING; } @@ -115,12 +115,12 @@ static void ColouriseLispDoc(unsigned int startPos, int length, int initStyle, W if (!isLispwordstart(ch)) { classifyWordLisp(styler.GetStartSegment(), i - 1, keywords, styler); state = SCE_LISP_DEFAULT; - } /*else*/ + } /*else*/ if (isLispoperator(ch) || ch=='\'') { styler.ColourTo(i - 1, state); styler.ColourTo(i, SCE_LISP_OPERATOR); } - + } else { if (state == SCE_LISP_COMMENT) { if (atEOL) { @@ -192,4 +192,9 @@ static void FoldLispDoc(unsigned int startPos, int length, int /* initStyle */, styler.SetLevel(lineCurrent, levelPrev | flagsNext); } -LexerModule lmLISP(SCLEX_LISP, ColouriseLispDoc, "lisp", FoldLispDoc); +static const char * const lispWordListDesc[] = { + "Keywords", + 0 +}; + +LexerModule lmLISP(SCLEX_LISP, ColouriseLispDoc, "lisp", FoldLispDoc, lispWordListDesc); diff --git a/contrib/src/stc/scintilla/src/LexLua.cxx b/contrib/src/stc/scintilla/src/LexLua.cxx index fc9607e25d..159bc1585d 100644 --- a/contrib/src/stc/scintilla/src/LexLua.cxx +++ b/contrib/src/stc/scintilla/src/LexLua.cxx @@ -23,8 +23,6 @@ #include "Scintilla.h" #include "SciLexer.h" -#define SCE_LUA_LAST_STYLE SCE_LUA_WORD6 - static inline bool IsAWordChar(const int ch) { return (ch < 0x80) && (isalnum(ch) || ch == '.' || ch == '_'); } @@ -61,14 +59,16 @@ static void ColouriseLuaDoc( WordList &keywords5 = *keywordlists[4]; WordList &keywords6 = *keywordlists[5]; - // Must initialize the literal string nesting level, if we are inside such a string. + int currentLine = styler.GetLine(startPos); + // Initialize the literal string [[ ... ]] nesting level, if we are inside such a string. int literalStringLevel = 0; if (initStyle == SCE_LUA_LITERALSTRING) { - literalStringLevel = 1; + literalStringLevel = styler.GetLineState(currentLine - 1); } - // We use states above the last one to indicate nesting level of literal strings - if (initStyle > SCE_LUA_LAST_STYLE) { - literalStringLevel = initStyle - SCE_LUA_LAST_STYLE + 1; + // Initialize the block comment --[[ ... ]] nesting level, if we are inside such a comment + int blockCommentLevel = 0; + if (initStyle == SCE_LUA_COMMENT) { + blockCommentLevel = styler.GetLineState(currentLine - 1); } // Do not leak onto next line @@ -78,9 +78,28 @@ static void ColouriseLuaDoc( StyleContext sc(startPos, length, initStyle, styler); if (startPos == 0 && sc.ch == '#') { + // shbang line: # is a comment only if first char of the script sc.SetState(SCE_LUA_COMMENTLINE); } for (; sc.More(); sc.Forward()) { + if (sc.atLineEnd) { + // Update the line state, so it can be seen by next line + currentLine = styler.GetLine(sc.currentPos); + switch (sc.state) { + case SCE_LUA_LITERALSTRING: + // Inside a literal string, we set the line state + styler.SetLineState(currentLine, literalStringLevel); + break; + case SCE_LUA_COMMENT: // Block comment + // Inside a block comment, we set the line state + styler.SetLineState(currentLine, blockCommentLevel); + break; + default: + // Reset the line state + styler.SetLineState(currentLine, 0); + break; + } + } if (sc.atLineStart && (sc.state == SCE_LUA_STRING)) { // Prevent SCE_LUA_STRINGEOL from leaking back to previous line sc.SetState(SCE_LUA_STRING); @@ -88,7 +107,7 @@ static void ColouriseLuaDoc( // Handle string line continuation if ((sc.state == SCE_LUA_STRING || sc.state == SCE_LUA_CHARACTER) && - sc.ch == '\\') { + sc.ch == '\\') { if (sc.chNext == '\n' || sc.chNext == '\r') { sc.Forward(); if (sc.ch == '\r' && sc.chNext == '\n') { @@ -154,22 +173,31 @@ static void ColouriseLuaDoc( sc.ChangeState(SCE_LUA_STRINGEOL); sc.ForwardSetState(SCE_LUA_DEFAULT); } - } else if (sc.state == SCE_LUA_LITERALSTRING || sc.state > SCE_LUA_LAST_STYLE) { + } else if (sc.state == SCE_LUA_LITERALSTRING) { if (sc.Match('[', '[')) { literalStringLevel++; - sc.SetState(SCE_LUA_LAST_STYLE + literalStringLevel - 1); + sc.Forward(); + sc.SetState(SCE_LUA_LITERALSTRING); } else if (sc.Match(']', ']') && literalStringLevel > 0) { literalStringLevel--; sc.Forward(); if (literalStringLevel == 0) { sc.ForwardSetState(SCE_LUA_DEFAULT); - } else if (literalStringLevel == 1) { - sc.ForwardSetState(SCE_LUA_LITERALSTRING); - } else { - sc.ForwardSetState(SCE_LUA_LAST_STYLE + literalStringLevel - 1); + } + } + } else if (sc.state == SCE_LUA_COMMENT) { // Lua 5.0's block comment + if (sc.Match('[', '[')) { + blockCommentLevel++; + sc.Forward(); + } else if (sc.Match(']', ']') && blockCommentLevel > 0) { + blockCommentLevel--; + sc.Forward(); + if (blockCommentLevel == 0) { + sc.ForwardSetState(SCE_LUA_DEFAULT); } } } + // Determine if a new state should be entered. if (sc.state == SCE_LUA_DEFAULT) { if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) { @@ -184,12 +212,16 @@ static void ColouriseLuaDoc( literalStringLevel = 1; sc.SetState(SCE_LUA_LITERALSTRING); sc.Forward(); + } else if (sc.Match("--[[")) { // Lua 5.0's block comment + blockCommentLevel = 1; + sc.SetState(SCE_LUA_COMMENT); + sc.Forward(3); } else if (sc.Match('-', '-')) { sc.SetState(SCE_LUA_COMMENTLINE); sc.Forward(); - } else if (sc.Match('$') && sc.atLineStart) { + } else if (sc.atLineStart && sc.Match('$')) { sc.SetState(SCE_LUA_PREPROCESSOR); // Obsolete since Lua 4.0, but still in old code - } else if (isLuaOperator(static_cast(sc.ch))) { + } else if (isLuaOperator(static_cast(sc.ch))) { sc.SetState(SCE_LUA_OPERATOR); } } @@ -197,7 +229,6 @@ static void ColouriseLuaDoc( sc.Complete(); } - static void FoldLuaDoc(unsigned int startPos, int length, int /* initStyle */, WordList *[], Accessor &styler) { unsigned int lengthDoc = startPos + length; @@ -266,4 +297,14 @@ static void FoldLuaDoc(unsigned int startPos, int length, int /* initStyle */, W styler.SetLevel(lineCurrent, levelPrev | flagsNext); } -LexerModule lmLua(SCLEX_LUA, ColouriseLuaDoc, "lua", FoldLuaDoc); +static const char * const luaWordListDesc[] = { + "Keywords", + "Basic functions", + "String & math functions", + "I/O & system facilities", + "XXX", + "XXX", + 0 +}; + +LexerModule lmLua(SCLEX_LUA, ColouriseLuaDoc, "lua", FoldLuaDoc, luaWordListDesc); diff --git a/contrib/src/stc/scintilla/src/LexMatlab.cxx b/contrib/src/stc/scintilla/src/LexMatlab.cxx index f75d15c7ab..5f4dff3b8e 100644 --- a/contrib/src/stc/scintilla/src/LexMatlab.cxx +++ b/contrib/src/stc/scintilla/src/LexMatlab.cxx @@ -2,7 +2,7 @@ /** @file LexMatlab.cxx ** Lexer for Matlab. ** Written by José Fonseca - **/ + **/ // Copyright 1998-2001 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. @@ -165,4 +165,9 @@ static void FoldMatlabDoc(unsigned int startPos, int length, int, } } -LexerModule lmMatlab(SCLEX_MATLAB, ColouriseMatlabDoc, "matlab", FoldMatlabDoc); +static const char * const matlabWordListDesc[] = { + "Keywords", + 0 +}; + +LexerModule lmMatlab(SCLEX_MATLAB, ColouriseMatlabDoc, "matlab", FoldMatlabDoc, matlabWordListDesc); diff --git a/contrib/src/stc/scintilla/src/LexOthers.cxx b/contrib/src/stc/scintilla/src/LexOthers.cxx index babb3a0d37..6d537c9b6c 100644 --- a/contrib/src/stc/scintilla/src/LexOthers.cxx +++ b/contrib/src/stc/scintilla/src/LexOthers.cxx @@ -20,6 +20,14 @@ #include "Scintilla.h" #include "SciLexer.h" +static bool Is0To9(char ch) { + return (ch >= '0') && (ch <= '9'); +} + +static bool Is1To9(char ch) { + return (ch >= '1') && (ch <= '9'); +} + static inline bool AtEOL(Accessor &styler, unsigned int i) { return (styler[i] == '\n') || ((styler[i] == '\r') && (styler.SafeGetCharAt(i + 1) != '\n')); @@ -85,7 +93,7 @@ static void ColouriseBatchLine( while (offset < lengthLine) { if (state == SCE_BAT_DEFAULT && lineBuffer[offset] == '%') { styler.ColourTo(startLine + offset - 1, state); - if (isdigit(lineBuffer[offset + 1])) { + if (Is0To9(lineBuffer[offset + 1])) { styler.ColourTo(startLine + offset + 1, SCE_BAT_IDENTIFIER); offset += 2; } else if (lineBuffer[offset + 1] == '%' && @@ -164,13 +172,17 @@ static void ColouriseDiffLine(char *lineBuffer, int endLine, Accessor &styler) { styler.ColourTo(endLine, SCE_DIFF_HEADER); } else if (0 == strncmp(lineBuffer, "+++ ", 3)) { styler.ColourTo(endLine, SCE_DIFF_HEADER); - } else if (0 == strncmp(lineBuffer, "***", 3)) { + } else if (0 == strncmp(lineBuffer, "====", 4)) { // For p4's diff + styler.ColourTo(endLine, SCE_DIFF_HEADER); + } else if (0 == strncmp(lineBuffer, "***", 3)) { + styler.ColourTo(endLine, SCE_DIFF_HEADER); + } else if (0 == strncmp(lineBuffer, "? ", 2)) { // For difflib styler.ColourTo(endLine, SCE_DIFF_HEADER); } else if (lineBuffer[0] == '@') { styler.ColourTo(endLine, SCE_DIFF_POSITION); - } else if (lineBuffer[0] == '-') { + } else if (lineBuffer[0] == '-' || lineBuffer[0] == '<') { styler.ColourTo(endLine, SCE_DIFF_DELETED); - } else if (lineBuffer[0] == '+') { + } else if (lineBuffer[0] == '+' || lineBuffer[0] == '>') { styler.ColourTo(endLine, SCE_DIFF_ADDED); } else if (lineBuffer[0] != ' ') { styler.ColourTo(endLine, SCE_DIFF_COMMENT); @@ -264,7 +276,7 @@ static void ColouriseMakeLine( Accessor &styler) { unsigned int i = 0; - unsigned int lastNonSpace = 0; + int lastNonSpace = -1; unsigned int state = SCE_MAKE_DEFAULT; bool bSpecial = false; // Skip initial spaces @@ -291,13 +303,15 @@ static void ColouriseMakeLine( if (lineBuffer[i] == ':') { // We should check that no colouring was made since the beginning of the line, // to avoid colouring stuff like /OUT:file - styler.ColourTo(startLine + lastNonSpace, SCE_MAKE_TARGET); + if (lastNonSpace >= 0) + styler.ColourTo(startLine + lastNonSpace, SCE_MAKE_TARGET); styler.ColourTo(startLine + i - 1, SCE_MAKE_DEFAULT); styler.ColourTo(startLine + i, SCE_MAKE_OPERATOR); bSpecial = true; // Only react to the first ':' of the line state = SCE_MAKE_DEFAULT; } else if (lineBuffer[i] == '=') { - styler.ColourTo(startLine + lastNonSpace, SCE_MAKE_IDENTIFIER); + if (lastNonSpace >= 0) + styler.ColourTo(startLine + lastNonSpace, SCE_MAKE_IDENTIFIER); styler.ColourTo(startLine + i - 1, SCE_MAKE_DEFAULT); styler.ColourTo(startLine + i, SCE_MAKE_OPERATOR); bSpecial = true; // Only react to the first '=' of the line @@ -337,12 +351,17 @@ static void ColouriseMakeDoc(unsigned int startPos, int length, int, WordList *[ } } +static bool strstart(char *haystack, char *needle) { + return strncmp(haystack, needle, strlen(needle)) == 0; +} + static void ColouriseErrorListLine( char *lineBuffer, unsigned int lengthLine, // unsigned int startLine, unsigned int endPos, Accessor &styler) { + const int unRecognized = 99; if (lineBuffer[0] == '>') { // Command or return status styler.ColourTo(endPos, SCE_ERR_CMD); @@ -359,10 +378,19 @@ static void ColouriseErrorListLine( styler.ColourTo(endPos, SCE_ERR_DIFF_DELETION); } else if (strstr(lineBuffer, "File \"") && strstr(lineBuffer, ", line ")) { styler.ColourTo(endPos, SCE_ERR_PYTHON); - } else if (0 == strncmp(lineBuffer, "Error ", strlen("Error "))) { + } else if (strstr(lineBuffer, " in ") && strstr(lineBuffer, " on line ")) { + styler.ColourTo(endPos, SCE_ERR_PHP); + } else if ((strstart(lineBuffer, "Error ") || + strstart(lineBuffer, "Warning ")) && + strstr(lineBuffer, " at (") && + strstr(lineBuffer, ") : ") && + (strstr(lineBuffer, " at (") < strstr(lineBuffer, ") : "))) { + // Intel Fortran Compiler error/warning message + styler.ColourTo(endPos, SCE_ERR_IFC); + } else if (strstart(lineBuffer, "Error ")) { // Borland error message styler.ColourTo(endPos, SCE_ERR_BORLAND); - } else if (0 == strncmp(lineBuffer, "Warning ", strlen("Warning "))) { + } else if (strstart(lineBuffer, "Warning ")) { // Borland warning message styler.ColourTo(endPos, SCE_ERR_BORLAND); } else if (strstr(lineBuffer, "at line " ) && @@ -374,54 +402,87 @@ static void ColouriseErrorListLine( } else if (strstr(lineBuffer, " at " ) && (strstr(lineBuffer, " at " ) < (lineBuffer + lengthLine)) && strstr(lineBuffer, " line ") && - (strstr(lineBuffer, " line ") < (lineBuffer + lengthLine))) { + (strstr(lineBuffer, " line ") < (lineBuffer + lengthLine)) && + (strstr(lineBuffer, " at " ) < (strstr(lineBuffer, " line ")))) { // perl error message styler.ColourTo(endPos, SCE_ERR_PERL); } else if ((memcmp(lineBuffer, " at ", 6) == 0) && strstr(lineBuffer, ":line ")) { // A .NET traceback styler.ColourTo(endPos, SCE_ERR_NET); + } else if (strstart(lineBuffer, "Line ") && + strstr(lineBuffer, ", file ")) { + // Essential Lahey Fortran error message + styler.ColourTo(endPos, SCE_ERR_ELF); } else { - // Look for ::message - // Look for (line)message - // Look for (line,pos)message + // Look for GCC ::message + // Look for Microsoft (line) :message + // Look for Microsoft (line,pos)message + // Look for CTags \tmessage int state = 0; for (unsigned int i = 0; i < lengthLine; i++) { - if ((state == 0) && (lineBuffer[i] == ':') && isdigit(lineBuffer[i + 1])) { - state = 1; - } else if ((state == 0) && (lineBuffer[i] == '(')) { - state = 10; - } else if ((state == 0) && (lineBuffer[i] == '\t')) { - state = 20; - } else if ((state == 1) && isdigit(lineBuffer[i])) { - state = 2; - } else if ((state == 2) && (lineBuffer[i] == ':')) { - state = 3; - break; - } else if ((state == 2) && !isdigit(lineBuffer[i])) { - state = 99; - } else if ((state == 10) && isdigit(lineBuffer[i])) { - state = 11; - } else if ((state == 11) && (lineBuffer[i] == ',')) { - state = 14; - } else if ((state == 11) && (lineBuffer[i] == ')')) { - state = 12; - } else if ((state == 12) && (lineBuffer[i] == ':')) { - state = 13; - } else if ((state == 14) && (lineBuffer[i] == ')')) { - state = 15; - break; - } else if (((state == 11) || (state == 14)) && !((lineBuffer[i] == ' ') || isdigit(lineBuffer[i]))) { - state = 99; - } else if ((state == 20) && (lineBuffer[i-1] == '\t') && - ((lineBuffer[i] == '/' && lineBuffer[i+1] == '^') || isdigit(lineBuffer[i]))) { - state = 24; - break; - } else if ((state == 20) && ((lineBuffer[i] == '/') && (lineBuffer[i+1] == '^'))) { - state = 21; + char ch = lineBuffer[i]; + char chNext = ' '; + if ((i+1) < lengthLine) + chNext = lineBuffer[i+1]; + if (state == 0) { + if (ch == ':') { + // May be GCC + if ((chNext != '\\') && (chNext != '/')) { + // This check is not completely accurate as may be on + // GTK+ with a file name that includes ':'. + state = 1; + } + } else if ((ch == '(') && Is1To9(chNext)) { + // May be Microsoft + // Check againt '0' often removes phone numbers + state = 10; + } else if (ch == '\t') { + // May be CTags + state = 20; + } + } else if (state == 1) { + state = Is1To9(ch) ? 2 : unRecognized; + } else if (state == 2) { + if (ch == ':') { + state = 3; // :9.*: is GCC + break; + } else if (!Is0To9(ch)) { + state = unRecognized; + } + } else if (state == 10) { + state = Is0To9(ch) ? 11 : unRecognized; + } else if (state == 11) { + if (ch == ',') { + state = 14; + } else if (ch == ')') { + state = 12; + } else if ((ch != ' ') && !Is0To9(ch)) { + state = unRecognized; + } + } else if (state == 12) { + if ((ch == ' ') && (chNext == ':')) + state = 13; + else + state = unRecognized; + } else if (state == 14) { + if (ch == ')') { + state = 15; + break; + } else if ((ch != ' ') && !Is0To9(ch)) { + state = unRecognized; + } + } else if (state == 20) { + if ((lineBuffer[i-1] == '\t') && + ((ch == '/' && lineBuffer[i+1] == '^') || Is0To9(ch))) { + state = 24; + break; + } else if ((ch == '/') && (lineBuffer[i+1] == '^')) { + state = 21; + } } else if ((state == 21) && ((lineBuffer[i] == '$') && (lineBuffer[i+1] == '/'))) { state = 22; - break; + break; } } if (state == 3) { @@ -429,7 +490,7 @@ static void ColouriseErrorListLine( } else if ((state == 13) || (state == 14) || (state == 15)) { styler.ColourTo(endPos, SCE_ERR_MS); } else if (((state == 22) || (state == 24)) && (lineBuffer[0] != '\t')) { - styler.ColourTo(endPos, SCE_ERR_CTAG); + styler.ColourTo(endPos, SCE_ERR_CTAG); } else { styler.ColourTo(endPos, SCE_ERR_DEFAULT); } @@ -553,12 +614,21 @@ static void ColouriseLatexDoc(unsigned int startPos, int length, int initStyle, } } } - styler.ColourTo(lengthDoc, state); + styler.ColourTo(lengthDoc-1, state); } -LexerModule lmBatch(SCLEX_BATCH, ColouriseBatchDoc, "batch"); -LexerModule lmDiff(SCLEX_DIFF, ColouriseDiffDoc, "diff"); -LexerModule lmProps(SCLEX_PROPERTIES, ColourisePropsDoc, "props"); -LexerModule lmMake(SCLEX_MAKEFILE, ColouriseMakeDoc, "makefile"); -LexerModule lmErrorList(SCLEX_ERRORLIST, ColouriseErrorListDoc, "errorlist"); -LexerModule lmLatex(SCLEX_LATEX, ColouriseLatexDoc, "latex"); +static const char * const batchWordListDesc[] = { + "Keywords", + 0 +}; + +static const char * const emptyWordListDesc[] = { + 0 +}; + +LexerModule lmBatch(SCLEX_BATCH, ColouriseBatchDoc, "batch", 0, batchWordListDesc); +LexerModule lmDiff(SCLEX_DIFF, ColouriseDiffDoc, "diff", 0, emptyWordListDesc); +LexerModule lmProps(SCLEX_PROPERTIES, ColourisePropsDoc, "props", 0, emptyWordListDesc); +LexerModule lmMake(SCLEX_MAKEFILE, ColouriseMakeDoc, "makefile", 0, emptyWordListDesc); +LexerModule lmErrorList(SCLEX_ERRORLIST, ColouriseErrorListDoc, "errorlist", 0, emptyWordListDesc); +LexerModule lmLatex(SCLEX_LATEX, ColouriseLatexDoc, "latex", 0, emptyWordListDesc); diff --git a/contrib/src/stc/scintilla/src/LexPOV.cxx b/contrib/src/stc/scintilla/src/LexPOV.cxx new file mode 100644 index 0000000000..1e44450bbc --- /dev/null +++ b/contrib/src/stc/scintilla/src/LexPOV.cxx @@ -0,0 +1,222 @@ +// Scintilla source code edit control +/** @file LexPOV.cxx + ** Lexer for POV-Ray, based on lexer for C++. + **/ +// Copyright 2003 by Steven te Brinke +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#define KEYWORD_BOXHEADER 1 +#define KEYWORD_FOLDCONTRACTED 2 + +static inline bool IsAWordChar(const int ch) { + return (ch < 0x80) && (isalnum(ch) || ch == '.' || ch == '_'); +} + +static inline bool IsAWordStart(const int ch) { + return (ch < 0x80) && (isalnum(ch) || ch == '_'); +} + +static inline bool IsStateComment(const int state) { + return ((state == SCE_POV_COMMENT) || + (state == SCE_POV_COMMENTLINE) || + (state == SCE_POV_COMMENTDOC)); +} + +static inline bool IsStateString(const int state) { + return ((state == SCE_POV_STRING)); +} + +static void ColourisePOVDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[], + Accessor &styler) { + + WordList &keywords = *keywordlists[0]; + WordList &keywords2 = *keywordlists[1]; + + // Do not leak onto next line + /*if (initStyle == SCE_POV_STRINGEOL) + initStyle = SCE_POV_DEFAULT;*/ + + StyleContext sc(startPos, length, initStyle, styler); + + bool caseSensitive = styler.GetPropertyInt("pov.case.sensitive", 1) != 0; + + for (; sc.More(); sc.Forward()) { + + /*if (sc.atLineStart && (sc.state == SCE_POV_STRING)) { + // Prevent SCE_POV_STRINGEOL from leaking back to previous line + sc.SetState(SCE_POV_STRING); + }*/ + + // Handle line continuation generically. + if (sc.ch == '\\') { + if (sc.chNext == '\n' || sc.chNext == '\r') { + sc.Forward(); + if (sc.ch == '\r' && sc.chNext == '\n') { + sc.Forward(); + } + continue; + } + } + + // Determine if the current state should terminate. + if (sc.state == SCE_POV_OPERATOR || sc.state == SCE_POV_BRACE) { + sc.SetState(SCE_POV_DEFAULT); + } else if (sc.state == SCE_POV_NUMBER) { + if (!IsADigit(sc.ch) || sc.ch != '.') { + sc.SetState(SCE_POV_DEFAULT); + } + } else if (sc.state == SCE_POV_IDENTIFIER) { + if (!IsAWordChar(sc.ch) || (sc.ch == '.')) { + char s[100]; + if (caseSensitive) { + sc.GetCurrent(s, sizeof(s)); + } else { + sc.GetCurrentLowered(s, sizeof(s)); + } + if (keywords.InList(s)) { + sc.ChangeState(SCE_POV_WORD); + } else if (keywords2.InList(s)) { + sc.ChangeState(SCE_POV_WORD2); + } + sc.SetState(SCE_POV_DEFAULT); + } + } else if (sc.state == SCE_POV_COMMENT) { + if (sc.Match('*', '/')) { + sc.Forward(); + sc.ForwardSetState(SCE_POV_DEFAULT); + } + } else if (sc.state == SCE_POV_COMMENTDOC) { + if (sc.Match('*', '/')) { + sc.Forward(); + sc.ForwardSetState(SCE_POV_DEFAULT); + } + } else if (sc.state == SCE_POV_COMMENTLINE) { + if (sc.atLineEnd) { + sc.SetState(SCE_POV_DEFAULT); + } + } else if (sc.state == SCE_POV_STRING) { + if (sc.ch == '\\') { + if (sc.chNext == '\"' || sc.chNext == '\\') { + sc.Forward(); + } + } else if (sc.ch == '\"') { + sc.ForwardSetState(SCE_POV_DEFAULT); + } + } + + // Determine if a new state should be entered. + if (sc.state == SCE_POV_DEFAULT) { + if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) { + sc.SetState(SCE_POV_NUMBER); + } else if (IsAWordStart(sc.ch) || (sc.ch == '#')) { + sc.SetState(SCE_POV_IDENTIFIER); + } else if (sc.Match('/', '*')) { + sc.SetState(SCE_POV_COMMENT); + sc.Forward(); // Eat the * so it isn't used for the end of the comment + } else if (sc.Match('/', '/')) { + sc.SetState(SCE_POV_COMMENTLINE); + } else if (sc.ch == '\"') { + sc.SetState(SCE_POV_STRING); + //} else if (isoperator(static_cast(sc.ch))) { + } else if (sc.ch == '+' || sc.ch == '-' || sc.ch == '*' || sc.ch == '/' || sc.ch == '=' || sc.ch == '<' || sc.ch == '>' || sc.ch == '&' || sc.ch == '|' || sc.ch == '!' || sc.ch == '?' || sc.ch == ':') { + sc.SetState(SCE_POV_OPERATOR); + } else if (sc.ch == '{' || sc.ch == '}') { + sc.SetState(SCE_POV_BRACE); + } + } + + } + sc.Complete(); +} + +static bool IsStreamCommentStyle(int style) { + return style == SCE_POV_COMMENT || + style == SCE_POV_COMMENTDOC; +} + +static void FoldNoBoxPOVDoc(unsigned int startPos, int length, int initStyle, + Accessor &styler) { + bool foldComment = styler.GetPropertyInt("fold.comment", 1) != 0; + bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0; + unsigned int endPos = startPos + length; + int visibleChars = 0; + int lineCurrent = styler.GetLine(startPos); + int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK; + int levelCurrent = levelPrev; + char chNext = styler[startPos]; + int styleNext = styler.StyleAt(startPos); + int style = initStyle; + for (unsigned int i = startPos; i < endPos; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + int stylePrev = style; + style = styleNext; + styleNext = styler.StyleAt(i + 1); + bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); + if (foldComment && IsStreamCommentStyle(style)) { + if (!IsStreamCommentStyle(stylePrev)) { + levelCurrent++; + } else if (!IsStreamCommentStyle(styleNext) && !atEOL) { + // Comments don't end at end of line and the next character may be unstyled. + levelCurrent--; + } + } + if (style == SCE_POV_BRACE) { + if (ch == '{') { + levelCurrent++; + } else if (ch == '}') { + levelCurrent--; + } + } + if (atEOL) { + int lev = levelPrev; + if (visibleChars == 0 && foldCompact) + lev |= SC_FOLDLEVELWHITEFLAG; + if ((levelCurrent > levelPrev) && (visibleChars > 0)) + lev |= SC_FOLDLEVELHEADERFLAG; + if (lev != styler.LevelAt(lineCurrent)) { + styler.SetLevel(lineCurrent, lev); + } + lineCurrent++; + levelPrev = levelCurrent; + visibleChars = 0; + } + if (!isspacechar(ch)) + visibleChars++; + } + // Fill in the real level of the next line, keeping the current flags as they will be filled in later + int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK; + styler.SetLevel(lineCurrent, levelPrev | flagsNext); +} + +static void FoldPOVDoc(unsigned int startPos, int length, int initStyle, WordList *[], Accessor &styler) { + FoldNoBoxPOVDoc(startPos, length, initStyle, styler); +} + +static const char * const POVWordLists[] = { + "Primary keywords and identifiers", + "Secondary keywords and identifiers", + 0, + }; + +static void ColourisePOVDocSensitive(unsigned int startPos, int length, int initStyle, WordList *keywordlists[], + Accessor &styler) { + ColourisePOVDoc(startPos, length, initStyle, keywordlists, styler); +} + +LexerModule lmPOV(SCLEX_POV, ColourisePOVDocSensitive, "pov", FoldPOVDoc, POVWordLists); diff --git a/contrib/src/stc/scintilla/src/LexPascal.cxx b/contrib/src/stc/scintilla/src/LexPascal.cxx index 37e5e995fb..c3bea6773d 100644 --- a/contrib/src/stc/scintilla/src/LexPascal.cxx +++ b/contrib/src/stc/scintilla/src/LexPascal.cxx @@ -34,7 +34,7 @@ static void getRange(unsigned int start, } static bool IsStreamCommentStyle(int style) { - return style == SCE_C_COMMENT || + return style == SCE_C_COMMENT || style == SCE_C_COMMENTDOC || style == SCE_C_COMMENTDOCKEYWORD || style == SCE_C_COMMENTDOCKEYWORDERROR; @@ -50,7 +50,7 @@ static int classifyWordPascal(unsigned int start, unsigned int end, /*WordList & WordList& keywords = *keywordlists[0]; WordList& classwords = *keywordlists[1]; - + char s[100]; getRange(start, end, styler, s, sizeof(s)); @@ -119,7 +119,7 @@ static void ColourisePascalDoc(unsigned int startPos, int length, int initStyle, styler.StartSegment(startPos); for (unsigned int i = startPos; i < lengthDoc; i++) { char ch = chNext; - + chNext = styler.SafeGetCharAt(i + 1); if ((ch == '\r' && chNext != '\n') || (ch == '\n')) { @@ -329,7 +329,7 @@ static void FoldPascalDoc(unsigned int startPos, int length, int initStyle, Word levelPrev = levelCurrent; visibleChars = 0; } - + if (!isspacechar(ch)) visibleChars++; } @@ -339,4 +339,10 @@ static void FoldPascalDoc(unsigned int startPos, int length, int initStyle, Word styler.SetLevel(lineCurrent, levelPrev | flagsNext); } -LexerModule lmPascal(SCLEX_PASCAL, ColourisePascalDoc, "pascal", FoldPascalDoc); +static const char * const pascalWordListDesc[] = { + "Keywords", + "Classwords", + 0 +}; + +LexerModule lmPascal(SCLEX_PASCAL, ColourisePascalDoc, "pascal", FoldPascalDoc, pascalWordListDesc); diff --git a/contrib/src/stc/scintilla/src/LexPerl.cxx b/contrib/src/stc/scintilla/src/LexPerl.cxx index 1715009c9d..211c3b8751 100644 --- a/contrib/src/stc/scintilla/src/LexPerl.cxx +++ b/contrib/src/stc/scintilla/src/LexPerl.cxx @@ -659,9 +659,64 @@ static void ColourisePerlDoc(unsigned int startPos, int length, int initStyle, styler.ColourTo(lengthDoc - 1, state); } +static void FoldPerlDoc(unsigned int startPos, int length, int, WordList *[], + Accessor &styler) { + bool foldComment = styler.GetPropertyInt("fold.comment") != 0; + bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0; + unsigned int endPos = startPos + length; + int visibleChars = 0; + int lineCurrent = styler.GetLine(startPos); + int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK; + int levelCurrent = levelPrev; + char chNext = styler[startPos]; + int styleNext = styler.StyleAt(startPos); + for (unsigned int i = startPos; i < endPos; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + int style = styleNext; + styleNext = styler.StyleAt(i + 1); + bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); + if (foldComment && (style == SCE_PL_COMMENTLINE)) { + if ((ch == '/') && (chNext == '/')) { + char chNext2 = styler.SafeGetCharAt(i + 2); + if (chNext2 == '{') { + levelCurrent++; + } else if (chNext2 == '}') { + levelCurrent--; + } + } + } + if (style == SCE_C_OPERATOR) { + if (ch == '{') { + levelCurrent++; + } else if (ch == '}') { + levelCurrent--; + } + } + if (atEOL) { + int lev = levelPrev; + if (visibleChars == 0 && foldCompact) + lev |= SC_FOLDLEVELWHITEFLAG; + if ((levelCurrent > levelPrev) && (visibleChars > 0)) + lev |= SC_FOLDLEVELHEADERFLAG; + if (lev != styler.LevelAt(lineCurrent)) { + styler.SetLevel(lineCurrent, lev); + } + lineCurrent++; + levelPrev = levelCurrent; + visibleChars = 0; + } + if (!isspacechar(ch)) + visibleChars++; + } + // Fill in the real level of the next line, keeping the current flags as they will be filled in later + int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK; + styler.SetLevel(lineCurrent, levelPrev | flagsNext); +} + static const char * const perlWordListDesc[] = { - "Perl keywords", + "Keywords", 0 }; -LexerModule lmPerl(SCLEX_PERL, ColourisePerlDoc, "perl", 0, perlWordListDesc); +LexerModule lmPerl(SCLEX_PERL, ColourisePerlDoc, "perl", FoldPerlDoc, perlWordListDesc); diff --git a/contrib/src/stc/scintilla/src/LexPython.cxx b/contrib/src/stc/scintilla/src/LexPython.cxx index bfaa08f0e9..47974d1bce 100644 --- a/contrib/src/stc/scintilla/src/LexPython.cxx +++ b/contrib/src/stc/scintilla/src/LexPython.cxx @@ -1,7 +1,7 @@ // Scintilla source code edit control /** @file LexPython.cxx ** Lexer for Python. - **/ + **/ // Copyright 1998-2002 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. @@ -42,7 +42,7 @@ static bool IsPyStringStart(int ch, int chNext, int chNext2) { } /* Return the state to use for the string starting at i; *nextIndex will be set to the first index following the quote(s) */ -static int GetPyStringState(Accessor &styler, int i, int *nextIndex) { +static int GetPyStringState(Accessor &styler, int i, unsigned int *nextIndex) { char ch = styler.SafeGetCharAt(i); char chNext = styler.SafeGetCharAt(i + 1); @@ -99,7 +99,8 @@ static void ColourisePyDoc(unsigned int startPos, int length, int initStyle, int lineCurrent = styler.GetLine(startPos); if (startPos > 0) { if (lineCurrent > 0) { - startPos = styler.LineStart(lineCurrent - 1); + lineCurrent--; + startPos = styler.LineStart(lineCurrent); if (startPos == 0) initStyle = SCE_P_DEFAULT; else @@ -139,6 +140,7 @@ static void ColourisePyDoc(unsigned int startPos, int length, int initStyle, } else if (whingeLevel == 4) { chFlags = (spaceFlags & wsTab) ? chBad : chGood; } + sc.SetState(sc.state); styler.SetFlags(chFlags, static_cast(sc.state)); } @@ -148,7 +150,7 @@ static void ColourisePyDoc(unsigned int startPos, int length, int initStyle, (sc.state == SCE_P_TRIPLEDOUBLE)) { // Perform colourisation of white space and triple quoted strings at end of each line to allow // tab marking to work inside white space and triple quoted strings - sc.ForwardSetState(sc.state); + sc.SetState(sc.state); } lineCurrent++; styler.IndentAmount(lineCurrent, &spaceFlags, IsPyComment); @@ -160,6 +162,8 @@ static void ColourisePyDoc(unsigned int startPos, int length, int initStyle, break; } + bool needEOLCheck = false; + // Check for a state end if (sc.state == SCE_P_OPERATOR) { kwLast = kwOther; @@ -212,8 +216,10 @@ static void ColourisePyDoc(unsigned int startPos, int length, int initStyle, sc.Forward(); } else if ((sc.state == SCE_P_STRING) && (sc.ch == '\"')) { sc.ForwardSetState(SCE_P_DEFAULT); + needEOLCheck = true; } else if ((sc.state == SCE_P_CHARACTER) && (sc.ch == '\'')) { sc.ForwardSetState(SCE_P_DEFAULT); + needEOLCheck = true; } } else if (sc.state == SCE_P_TRIPLE) { if (sc.ch == '\\') { @@ -222,6 +228,7 @@ static void ColourisePyDoc(unsigned int startPos, int length, int initStyle, sc.Forward(); sc.Forward(); sc.ForwardSetState(SCE_P_DEFAULT); + needEOLCheck = true; } } else if (sc.state == SCE_P_TRIPLEDOUBLE) { if (sc.ch == '\\') { @@ -230,9 +237,18 @@ static void ColourisePyDoc(unsigned int startPos, int length, int initStyle, sc.Forward(); sc.Forward(); sc.ForwardSetState(SCE_P_DEFAULT); + needEOLCheck = true; } } + // State exit code may have moved on to end of line + if (needEOLCheck && sc.atLineEnd) { + lineCurrent++; + styler.IndentAmount(lineCurrent, &spaceFlags, IsPyComment); + if (!sc.More()) + break; + } + // Check for a new state starting character if (sc.state == SCE_P_DEFAULT) { if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) { @@ -247,7 +263,7 @@ static void ColourisePyDoc(unsigned int startPos, int length, int initStyle, } else if (sc.ch == '#') { sc.SetState(sc.chNext == '#' ? SCE_P_COMMENTBLOCK : SCE_P_COMMENTLINE); } else if (IsPyStringStart(sc.ch, sc.chNext, sc.GetRelative(2))) { - int nextIndex = 0; + unsigned int nextIndex = 0; sc.SetState(GetPyStringState(styler, sc.currentPos, &nextIndex)); while (nextIndex > (sc.currentPos + 1)) { sc.Forward(); @@ -357,34 +373,40 @@ static void FoldPyDoc(unsigned int startPos, int length, int /*initStyle - unuse lev = lev + 1; } - // Skip past any blank lines for next indent level info; we skip also comments - // starting in column 0 which effectively folds them into surrounding code rather + // Skip past any blank lines for next indent level info; we skip also + // comments (all comments, not just those starting in column 0) + // which effectively folds them into surrounding code rather // than screwing up folding. - const int saveIndentNext = indentNext; + while (!quote && (lineNext < docLines) && ((indentNext & SC_FOLDLEVELWHITEFLAG) || - (lineNext <= docLines && styler[styler.LineStart(lineNext)] == '#'))) { + (lineNext <= docLines && IsCommentLine(lineNext, styler)))) { lineNext++; indentNext = styler.IndentAmount(lineNext, &spaceFlags, NULL); } - // Next compute max indent level of current line and next non-blank line. - // This is the level to which we set all the intervening blank or comment lines. - const int skip_level = Platform::Maximum(indentCurrentLevel, - indentNext & SC_FOLDLEVELNUMBERMASK); + const int levelAfterComments = indentNext & SC_FOLDLEVELNUMBERMASK; + const int levelBeforeComments = Platform::Maximum(indentCurrentLevel,levelAfterComments); // Now set all the indent levels on the lines we skipped - int skipLine = lineCurrent + 1; - int skipIndentNext = saveIndentNext; - while (skipLine < lineNext) { - int skipLineLevel = skip_level; - if (skipIndentNext & SC_FOLDLEVELWHITEFLAG) - skipLineLevel = SC_FOLDLEVELWHITEFLAG | skipLineLevel; - styler.SetLevel(skipLine, skipLineLevel); - skipLine++; - skipIndentNext = styler.IndentAmount(skipLine, &spaceFlags, NULL); + // Do this from end to start. Once we encounter one line + // which is indented more than the line after the end of + // the comment-block, use the level of the block before + + int skipLine = lineNext; + int skipLevel = levelAfterComments; + + while (--skipLine > lineCurrent) { + int skipLineIndent = styler.IndentAmount(skipLine, &spaceFlags, NULL); + + if ((skipLineIndent & SC_FOLDLEVELNUMBERMASK) > levelAfterComments) + skipLevel = levelBeforeComments; + + int whiteFlag = skipLineIndent & SC_FOLDLEVELWHITEFLAG; + + styler.SetLevel(skipLine, skipLevel | whiteFlag); } // Set fold header on non-quote/non-comment line @@ -409,9 +431,9 @@ static void FoldPyDoc(unsigned int startPos, int length, int /*initStyle - unuse } static const char * const pythonWordListDesc[] = { - "Python keywords", + "Keywords", 0 }; -LexerModule lmPython(SCLEX_PYTHON, ColourisePyDoc, "python", FoldPyDoc, +LexerModule lmPython(SCLEX_PYTHON, ColourisePyDoc, "python", FoldPyDoc, pythonWordListDesc); diff --git a/contrib/src/stc/scintilla/src/LexRuby.cxx b/contrib/src/stc/scintilla/src/LexRuby.cxx index 35804e7107..43a874968d 100644 --- a/contrib/src/stc/scintilla/src/LexRuby.cxx +++ b/contrib/src/stc/scintilla/src/LexRuby.cxx @@ -221,7 +221,7 @@ static void ColouriseRbDoc(unsigned int startPos, int length, int initStyle, } else if (isoperator(ch)) { styler.ColourTo(i - 1, state); styler.ColourTo(i, SCE_P_OPERATOR); - } + } } else if (state == SCE_P_WORD) { if (!iswordchar(ch)) { ClassifyWordRb(styler.GetStartSegment(), i - 1, keywords, styler, prevWord); @@ -351,5 +351,10 @@ static void FoldRbDoc(unsigned int startPos, int length, int initStyle, } } } - -LexerModule lmRuby(SCLEX_RUBY, ColouriseRbDoc, "ruby", FoldRbDoc); + +static const char * const rubyWordListDesc[] = { + "Keywords", + 0 +}; + +LexerModule lmRuby(SCLEX_RUBY, ColouriseRbDoc, "ruby", FoldRbDoc, rubyWordListDesc); diff --git a/contrib/src/stc/scintilla/src/LexSQL.cxx b/contrib/src/stc/scintilla/src/LexSQL.cxx index 5af86d9f4a..0520c00ed6 100644 --- a/contrib/src/stc/scintilla/src/LexSQL.cxx +++ b/contrib/src/stc/scintilla/src/LexSQL.cxx @@ -155,4 +155,9 @@ static void ColouriseSQLDoc(unsigned int startPos, int length, styler.ColourTo(lengthDoc - 1, state); } -LexerModule lmSQL(SCLEX_SQL, ColouriseSQLDoc, "sql"); +static const char * const sqlWordListDesc[] = { + "Keywords", + 0 +}; + +LexerModule lmSQL(SCLEX_SQL, ColouriseSQLDoc, "sql", 0, sqlWordListDesc); diff --git a/contrib/src/stc/scintilla/src/LexVB.cxx b/contrib/src/stc/scintilla/src/LexVB.cxx index bd1248e044..72fdb9c3cf 100644 --- a/contrib/src/stc/scintilla/src/LexVB.cxx +++ b/contrib/src/stc/scintilla/src/LexVB.cxx @@ -37,7 +37,7 @@ static inline bool IsAWordStart(const int ch) { } static inline bool IsADateCharacter(const int ch) { - return (ch < 0x80) && + return (ch < 0x80) && (isalnum(ch) || ch == '|' || ch == '-' || ch == '/' || ch == ':' || ch == ' ' || ch == '\t'); } @@ -49,7 +49,7 @@ static void ColouriseVBDoc(unsigned int startPos, int length, int initStyle, styler.StartAt(startPos); int visibleChars = 0; - + StyleContext sc(startPos, length, initStyle, styler); for (; sc.More(); sc.Forward()) { @@ -83,7 +83,7 @@ static void ColouriseVBDoc(unsigned int startPos, int length, int initStyle, sc.SetState(SCE_B_DEFAULT); } } else if (sc.state == SCE_B_STRING) { - // VB doubles quotes to preserve them, so just end this string + // VB doubles quotes to preserve them, so just end this string // state now as a following quote will start again if (sc.ch == '\"') { if (tolower(sc.chNext) == 'c') { @@ -104,7 +104,7 @@ static void ColouriseVBDoc(unsigned int startPos, int length, int initStyle, sc.ForwardSetState(SCE_B_DEFAULT); } } - + if (sc.state == SCE_B_DEFAULT) { if (sc.ch == '\'') { sc.SetState(SCE_B_COMMENT); @@ -116,7 +116,7 @@ static void ColouriseVBDoc(unsigned int startPos, int length, int initStyle, } else if (sc.ch == '#') { int n = 1; int chSeek = ' '; - while (chSeek == ' ' || chSeek == '\t') { + while ((n < 100) && (chSeek == ' ' || chSeek == '\t')) { chSeek = sc.GetRelative(n); n++; } @@ -137,7 +137,7 @@ static void ColouriseVBDoc(unsigned int startPos, int length, int initStyle, sc.SetState(SCE_B_OPERATOR); } } - + if (sc.atLineEnd) { visibleChars = 0; } @@ -200,6 +200,11 @@ static void ColouriseVBScriptDoc(unsigned int startPos, int length, int initStyl ColouriseVBDoc(startPos, length, initStyle, keywordlists, styler, true); } -LexerModule lmVB(SCLEX_VB, ColouriseVBNetDoc, "vb", FoldVBDoc); -LexerModule lmVBScript(SCLEX_VBSCRIPT, ColouriseVBScriptDoc, "vbscript", FoldVBDoc); +static const char * const vbWordListDesc[] = { + "Keywords", + 0 +}; + +LexerModule lmVB(SCLEX_VB, ColouriseVBNetDoc, "vb", FoldVBDoc, vbWordListDesc); +LexerModule lmVBScript(SCLEX_VBSCRIPT, ColouriseVBScriptDoc, "vbscript", FoldVBDoc, vbWordListDesc); diff --git a/contrib/src/stc/scintilla/src/LineMarker.cxx b/contrib/src/stc/scintilla/src/LineMarker.cxx index 009ea4ea50..ec9c86f74f 100644 --- a/contrib/src/stc/scintilla/src/LineMarker.cxx +++ b/contrib/src/stc/scintilla/src/LineMarker.cxx @@ -2,14 +2,37 @@ /** @file LineMarker.cxx ** Defines the look of a line marker in the margin . **/ -// Copyright 1998-2001 by Neil Hodgson +// Copyright 1998-2003 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. +#include + #include "Platform.h" #include "Scintilla.h" +#include "XPM.h" #include "LineMarker.h" +void LineMarker::RefreshColourPalette(Palette &pal, bool want) { + pal.WantFind(fore, want); + pal.WantFind(back, want); + if (pxpm) { + pxpm->RefreshColourPalette(pal, want); + } +} + +void LineMarker::SetXPM(const char *textForm) { + delete pxpm; + pxpm = new XPM(textForm); + markType = SC_MARK_PIXMAP; +} + +void LineMarker::SetXPM(const char * const *linesForm) { + delete pxpm; + pxpm = new XPM(linesForm); + markType = SC_MARK_PIXMAP; +} + static void DrawBox(Surface *surface, int centreX, int centreY, int armSize, ColourAllocated fore, ColourAllocated back) { PRectangle rc; rc.left = centreX - armSize; @@ -41,6 +64,10 @@ static void DrawMinus(Surface *surface, int centreX, int centreY, int armSize, C } void LineMarker::Draw(Surface *surface, PRectangle &rcWhole, Font &fontForCharacter) { + if ((markType == SC_MARK_PIXMAP) && (pxpm)) { + pxpm->Draw(surface, rcWhole); + return; + } // Restrict most shapes a bit PRectangle rc = rcWhole; rc.top++; @@ -122,121 +149,121 @@ void LineMarker::Draw(Surface *surface, PRectangle &rcWhole, Font &fontForCharac rcSmall.right = rc.right - 1; rcSmall.bottom = rc.bottom - 2; surface->RectangleDraw(rcSmall, fore.allocated, back.allocated); - + } else if (markType == SC_MARK_EMPTY || markType == SC_MARK_BACKGROUND) { // An invisible marker so don't draw anything - + } else if (markType == SC_MARK_VLINE) { surface->PenColour(back.allocated); surface->MoveTo(centreX, rcWhole.top); surface->LineTo(centreX, rcWhole.bottom); - + } else if (markType == SC_MARK_LCORNER) { surface->PenColour(back.allocated); surface->MoveTo(centreX, rcWhole.top); surface->LineTo(centreX, rc.top + dimOn2); surface->LineTo(rc.right - 2, rc.top + dimOn2); - + } else if (markType == SC_MARK_TCORNER) { surface->PenColour(back.allocated); surface->MoveTo(centreX, rcWhole.top); surface->LineTo(centreX, rcWhole.bottom); surface->MoveTo(centreX, rc.top + dimOn2); surface->LineTo(rc.right - 2, rc.top + dimOn2); - + } else if (markType == SC_MARK_LCORNERCURVE) { surface->PenColour(back.allocated); surface->MoveTo(centreX, rcWhole.top); surface->LineTo(centreX, rc.top + dimOn2-3); surface->LineTo(centreX+3, rc.top + dimOn2); surface->LineTo(rc.right - 1, rc.top + dimOn2); - + } else if (markType == SC_MARK_TCORNERCURVE) { surface->PenColour(back.allocated); surface->MoveTo(centreX, rcWhole.top); surface->LineTo(centreX, rcWhole.bottom); - + surface->MoveTo(centreX, rc.top + dimOn2-3); surface->LineTo(centreX+3, rc.top + dimOn2); surface->LineTo(rc.right - 1, rc.top + dimOn2); - + } else if (markType == SC_MARK_BOXPLUS) { surface->PenColour(back.allocated); DrawBox(surface, centreX, centreY, blobSize, fore.allocated, back.allocated); DrawPlus(surface, centreX, centreY, blobSize, back.allocated); - + } else if (markType == SC_MARK_BOXPLUSCONNECTED) { surface->PenColour(back.allocated); DrawBox(surface, centreX, centreY, blobSize, fore.allocated, back.allocated); DrawPlus(surface, centreX, centreY, blobSize, back.allocated); - + surface->MoveTo(centreX, centreY + blobSize); surface->LineTo(centreX, rcWhole.bottom); - + surface->MoveTo(centreX, rcWhole.top); surface->LineTo(centreX, centreY - blobSize); - + } else if (markType == SC_MARK_BOXMINUS) { surface->PenColour(back.allocated); DrawBox(surface, centreX, centreY, blobSize, fore.allocated, back.allocated); DrawMinus(surface, centreX, centreY, blobSize, back.allocated); - + surface->MoveTo(centreX, centreY + blobSize); surface->LineTo(centreX, rcWhole.bottom); - + } else if (markType == SC_MARK_BOXMINUSCONNECTED) { surface->PenColour(back.allocated); DrawBox(surface, centreX, centreY, blobSize, fore.allocated, back.allocated); DrawMinus(surface, centreX, centreY, blobSize, back.allocated); - + surface->MoveTo(centreX, centreY + blobSize); surface->LineTo(centreX, rcWhole.bottom); - + surface->MoveTo(centreX, rcWhole.top); surface->LineTo(centreX, centreY - blobSize); - + } else if (markType == SC_MARK_CIRCLEPLUS) { DrawCircle(surface, centreX, centreY, blobSize, fore.allocated, back.allocated); surface->PenColour(back.allocated); DrawPlus(surface, centreX, centreY, blobSize, back.allocated); - + } else if (markType == SC_MARK_CIRCLEPLUSCONNECTED) { DrawCircle(surface, centreX, centreY, blobSize, fore.allocated, back.allocated); surface->PenColour(back.allocated); DrawPlus(surface, centreX, centreY, blobSize, back.allocated); - + surface->MoveTo(centreX, centreY + blobSize); surface->LineTo(centreX, rcWhole.bottom); - + surface->MoveTo(centreX, rcWhole.top); surface->LineTo(centreX, centreY - blobSize); - + } else if (markType == SC_MARK_CIRCLEMINUS) { DrawCircle(surface, centreX, centreY, blobSize, fore.allocated, back.allocated); surface->PenColour(back.allocated); DrawMinus(surface, centreX, centreY, blobSize, back.allocated); - + surface->MoveTo(centreX, centreY + blobSize); surface->LineTo(centreX, rcWhole.bottom); - + } else if (markType == SC_MARK_CIRCLEMINUSCONNECTED) { DrawCircle(surface, centreX, centreY, blobSize, fore.allocated, back.allocated); surface->PenColour(back.allocated); DrawMinus(surface, centreX, centreY, blobSize, back.allocated); - + surface->MoveTo(centreX, centreY + blobSize); surface->LineTo(centreX, rcWhole.bottom); - + surface->MoveTo(centreX, rcWhole.top); surface->LineTo(centreX, centreY - blobSize); - + } else if (markType >= SC_MARK_CHARACTER) { char character[1]; character[0] = static_cast(markType - SC_MARK_CHARACTER); int width = surface->WidthText(fontForCharacter, character, 1); rc.left += (rc.Width() - width) / 2; rc.right = rc.left + width; - surface->DrawTextClipped(rc, fontForCharacter, rc.bottom - 2, + surface->DrawTextClipped(rc, fontForCharacter, rc.bottom - 2, character, 1, fore.allocated, back.allocated); } else if (markType == SC_MARK_DOTDOTDOT) { diff --git a/contrib/src/stc/scintilla/src/LineMarker.h b/contrib/src/stc/scintilla/src/LineMarker.h index 7897aa7759..ef5924f751 100644 --- a/contrib/src/stc/scintilla/src/LineMarker.h +++ b/contrib/src/stc/scintilla/src/LineMarker.h @@ -2,7 +2,7 @@ /** @file LineMarker.h ** Defines the look of a line marker in the margin . **/ -// Copyright 1998-2001 by Neil Hodgson +// Copyright 1998-2003 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #ifndef LINEMARKER_H @@ -15,11 +15,35 @@ public: int markType; ColourPair fore; ColourPair back; + XPM *pxpm; LineMarker() { markType = SC_MARK_CIRCLE; fore = ColourDesired(0,0,0); back = ColourDesired(0xff,0xff,0xff); + pxpm = NULL; } + LineMarker(const LineMarker &) { + // Defined to avoid pxpm being blindly copied, not as real copy constructor + markType = SC_MARK_CIRCLE; + fore = ColourDesired(0,0,0); + back = ColourDesired(0xff,0xff,0xff); + pxpm = NULL; + } + ~LineMarker() { + delete pxpm; + } + LineMarker &operator=(const LineMarker &) { + // Defined to avoid pxpm being blindly copied, not as real assignment operator + markType = SC_MARK_CIRCLE; + fore = ColourDesired(0,0,0); + back = ColourDesired(0xff,0xff,0xff); + delete pxpm; + pxpm = NULL; + return *this; + } + void RefreshColourPalette(Palette &pal, bool want); + void SetXPM(const char *textForm); + void SetXPM(const char * const *linesForm); void Draw(Surface *surface, PRectangle &rc, Font &fontForCharacter); }; diff --git a/contrib/src/stc/scintilla/src/PropSet.cxx b/contrib/src/stc/scintilla/src/PropSet.cxx index b527c385ce..18544aef23 100644 --- a/contrib/src/stc/scintilla/src/PropSet.cxx +++ b/contrib/src/stc/scintilla/src/PropSet.cxx @@ -2,14 +2,14 @@ /** @file PropSet.cxx ** A Java style properties file module. **/ -// Copyright 1998-2002 by Neil Hodgson +// Copyright 1998-2003 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. // Maintain a dictionary of properties #include #include -#include +//#include #include #include "Platform.h" @@ -30,6 +30,10 @@ static inline bool IsLetter(char ch) { return ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z')); } +inline bool IsASpace(unsigned int ch) { + return (ch == ' ') || ((ch >= 0x09) && (ch <= 0x0d)); +} + int CompareCaseInsensitive(const char *a, const char *b) { while (*a && *b) { if (*a != *b) { @@ -98,13 +102,13 @@ void PropSet::Set(const char *key, const char *val, int lenKey, int lenVal) { lenVal = static_cast(strlen(val)); unsigned int hash = HashString(key, lenKey); for (Property *p = props[hash % hashRoots]; p; p = p->next) { - if ((hash == p->hash) && - ((strlen(p->key) == static_cast(lenKey)) && + if ((hash == p->hash) && + ((strlen(p->key) == static_cast(lenKey)) && (0 == strncmp(p->key, key, lenKey)))) { // Replace current value delete [](p->val); p->val = StringDup(val, lenVal); - return ; + return; } } // Not found @@ -119,7 +123,7 @@ void PropSet::Set(const char *key, const char *val, int lenKey, int lenVal) { } void PropSet::Set(const char *keyVal) { - while (isspace(*keyVal)) + while (IsASpace(*keyVal)) keyVal++; const char *endVal = keyVal; while (*endVal && (*endVal != '\n')) @@ -181,7 +185,8 @@ SString PropSet::GetExpanded(const char *key) { SString PropSet::Expand(const char *withVars) { char *base = StringDup(withVars); char *cpvar = strstr(base, "$("); - while (cpvar) { + int maxExpands = 1000; // Avoid infinite expansion of recursive definitions + while (cpvar && (maxExpands > 0)) { char *cpendvar = strchr(cpvar, ')'); if (cpendvar) { int lenvar = cpendvar - cpvar - 2; // Subtract the $() @@ -197,6 +202,7 @@ SString PropSet::Expand(const char *withVars) { base = newbase; } cpvar = strstr(base, "$("); + maxExpands--; } SString sret = base; delete []base; @@ -257,7 +263,7 @@ SString PropSet::GetWild(const char *keybase, const char *filename) { if (keyfile == NULL) keyfile = orgkeyfile; - for (; ; ) { + for (;;) { char *del = strchr(keyfile, ';'); if (del == NULL) del = keyfile + strlen(keyfile); @@ -300,7 +306,8 @@ SString PropSet::GetWild(const char *keybase, const char *filename) { SString PropSet::GetNewExpand(const char *keybase, const char *filename) { char *base = StringDup(GetWild(keybase, filename).c_str()); char *cpvar = strstr(base, "$("); - while (cpvar) { + int maxExpands = 1000; // Avoid infinite expansion of recursive definitions + while (cpvar && (maxExpands > 0)) { char *cpendvar = strchr(cpvar, ')'); if (cpendvar) { int lenvar = cpendvar - cpvar - 2; // Subtract the $() @@ -316,6 +323,7 @@ SString PropSet::GetNewExpand(const char *keybase, const char *filename) { base = newbase; } cpvar = strstr(base, "$("); + maxExpands--; } SString sret = base; delete []base; @@ -328,9 +336,9 @@ void PropSet::Clear() { while (p) { Property *pNext = p->next; p->hash = 0; - delete p->key; + delete []p->key; p->key = 0; - delete p->val; + delete []p->val; p->val = 0; delete p; p = pNext; @@ -626,7 +634,7 @@ static unsigned int LengthWord(const char *word, char otherSeparator) { if (endWord > word) { endWord--; // Back from the '(', ':', or '\0' // Move backwards over any spaces - while ((endWord > word) && (isspace(*endWord))) { + while ((endWord > word) && (IsASpace(*endWord))) { endWord--; } } @@ -669,13 +677,13 @@ char *WordList::GetNearestWords( if (!cond) { // Find first match while ((pivot > start) && - (0 == CompareNCaseInsensitive(wordStart, + (0 == CompareNCaseInsensitive(wordStart, wordsNoCase[pivot-1], searchLen))) { --pivot; } // Grab each match while ((pivot <= end) && - (0 == CompareNCaseInsensitive(wordStart, + (0 == CompareNCaseInsensitive(wordStart, wordsNoCase[pivot], searchLen))) { wordlen = LengthWord(wordsNoCase[pivot], otherSeparator) + 1; wordsNear.append(wordsNoCase[pivot], wordlen, ' '); @@ -695,14 +703,14 @@ char *WordList::GetNearestWords( if (!cond) { // Find first match while ((pivot > start) && - (0 == strncmp(wordStart, - words[pivot-1], searchLen))) { + (0 == strncmp(wordStart, + words[pivot-1], searchLen))) { --pivot; } // Grab each match while ((pivot <= end) && - (0 == strncmp(wordStart, - words[pivot], searchLen))) { + (0 == strncmp(wordStart, + words[pivot], searchLen))) { wordlen = LengthWord(words[pivot], otherSeparator) + 1; wordsNear.append(words[pivot], wordlen, ' '); ++pivot; diff --git a/contrib/src/stc/scintilla/src/RESearch.cxx b/contrib/src/stc/scintilla/src/RESearch.cxx index f176bbf19e..d0f9fa4752 100644 --- a/contrib/src/stc/scintilla/src/RESearch.cxx +++ b/contrib/src/stc/scintilla/src/RESearch.cxx @@ -10,11 +10,11 @@ * Dept. of Computer Science * York University * - * Original code available from http://www.cs.yorku.ca/~oz/ + * Original code available from http://www.cs.yorku.ca/~oz/ * Translation to C++ by Neil Hodgson neilh@scintilla.org * Removed all use of register. * Converted to modern function prototypes. - * Put all global/static variables into an object so this code can be + * Put all global/static variables into an object so this code can be * used from multiple threads etc. * * These routines are the PUBLIC DOMAIN equivalents of regex @@ -30,8 +30,23 @@ * Modification history: * * $Log$ - * Revision 1.5 2002/09/11 00:55:27 RD - * Update to Scintilla 1.48 + * Revision 1.5.2.2 2003/04/19 19:56:40 RD + * Updated Scintilla to 1.52 + * + * Revision 1.9 2003/03/21 10:36:08 nyamatongwe + * Detect patterns too long in regular expression search. + * + * Revision 1.8 2003/03/04 10:53:59 nyamatongwe + * Patch from Jakub to optionally implement more POSIX compatible regular + * expressions. \(..\) changes to (..) + * Fixes problem where find previous would not find earlier matches on same + * line. + * + * Revision 1.8 2003/03/03 20:12:56 vrana + * Added posix syntax. + * + * Revision 1.7 2002/09/28 00:33:28 nyamatongwe + * Fixed problem with character ranges caused by expansion to 8 bits. * * Revision 1.6 2001/04/29 13:32:10 nyamatongwe * Addition of new target methods - versions of ReplaceTarget that take counted @@ -67,17 +82,17 @@ * * Revision 1.2 88/08/28 15:36:04 oz * Use a complement bitmap to represent NCL. - * This removes the need to have seperate - * code in the PMatch case block - it is + * This removes the need to have seperate + * code in the PMatch case block - it is * just CCL code now. - * + * * Use the actual CCL code in the CLO * section of PMatch. No need for a recursive * PMatch call. - * + * * Use a bitmap table to set char bits in an * 8-bit chunk. - * + * * Interfaces: * RESearch::Compile: compile a regular expression into a NFA. * @@ -107,7 +122,7 @@ * void re_fail(msg, op) * char *msg; * char op; - * + * * Regular Expressions: * * [1] char matches itself, unless it is a special @@ -117,20 +132,20 @@ * * [3] \ matches the character following it, except * when followed by a left or right round bracket, - * a digit 1 to 9 or a left or right angle bracket. + * a digit 1 to 9 or a left or right angle bracket. * (see [7], [8] and [9]) - * It is used as an escape character for all + * It is used as an escape character for all * other meta-characters, and itself. When used * in a set ([4]), it is treated as an ordinary * character. * * [4] [set] matches one of the characters in the set. * If the first character in the set is "^", - * it matches a character NOT in the set, i.e. - * complements the set. A shorthand S-E is - * used to specify a set of characters S upto - * E, inclusive. The special characters "]" and - * "-" have no special meaning if they appear + * it matches a character NOT in the set, i.e. + * complements the set. A shorthand S-E is + * used to specify a set of characters S upto + * E, inclusive. The special characters "]" and + * "-" have no special meaning if they appear * as the first chars in the set. * examples: match: * @@ -195,8 +210,8 @@ * Notes: * * This implementation uses a bit-set representation for character - * classes for speed and compactness. Each character is represented - * by one bit in a 128-bit block. Thus, CCL always takes a + * classes for speed and compactness. Each character is represented + * by one bit in a 128-bit block. Thus, CCL always takes a * constant 16 bytes in the internal nfa, and RESearch::Execute does a single * bit comparison to locate the character in the set. * @@ -206,7 +221,7 @@ * compile: CHR f CHR o CLO CHR o END CLO ANY END END * matches: fo foo fooo foobar fobar foxx ... * - * pattern: fo[ob]a[rz] + * pattern: fo[ob]a[rz] * compile: CHR f CHR o CCL bitset CHR a CCL bitset END * matches: fobar fooar fobaz fooaz * @@ -254,7 +269,7 @@ const char bitarr[] = {1,2,4,8,16,32,64,'\200'}; #define badpat(x) (*nfa = END, x) - + RESearch::RESearch() { Init(); } @@ -332,10 +347,11 @@ const char escapeValue(char ch) { return 0; } -const char *RESearch::Compile(const char *pat, int length, bool caseSensitive) { +const char *RESearch::Compile(const char *pat, int length, bool caseSensitive, bool posix) { char *mp=nfa; /* nfa pointer */ char *lp; /* saved pointer.. */ char *sp=nfa; /* another one.. */ + char *mpMax = mp + MAXNFA - BITBLK - 10; int tagi = 0; /* tag stack index */ int tagc = 1; /* actual tag count */ @@ -343,7 +359,7 @@ const char *RESearch::Compile(const char *pat, int length, bool caseSensitive) { int n; char mask; /* xor mask -CCL/NCL */ int c1, c2; - + if (!pat || !length) if (sta) return 0; @@ -353,6 +369,8 @@ const char *RESearch::Compile(const char *pat, int length, bool caseSensitive) { const char *p=pat; /* pattern pointer */ for (int i=0; i mpMax) + return badpat("Pattern too long"); lp = mp; switch(*p) { @@ -383,7 +401,7 @@ const char *RESearch::Compile(const char *pat, int length, bool caseSensitive) { i++; if (*++p == '^') { - mask = '\377'; + mask = '\377'; i++; p++; } else @@ -427,7 +445,7 @@ const char *RESearch::Compile(const char *pat, int length, bool caseSensitive) { for (n = 0; n < BITBLK; bittab[n++] = (char) 0) *mp++ = static_cast(mask ^ bittab[n]); - + break; case '*': /* match 0 or more.. */ @@ -467,25 +485,6 @@ const char *RESearch::Compile(const char *pat, int length, bool caseSensitive) { i++; switch(*++p) { - case '(': - if (tagc < MAXTAG) { - tagstk[++tagi] = tagc; - *mp++ = BOT; - *mp++ = static_cast(tagc++); - } - else - return badpat("Too many \\(\\) pairs"); - break; - case ')': - if (*sp == BOT) - return badpat("Null pattern inside \\(\\)"); - if (tagi > 0) { - *mp++ = static_cast(EOT); - *mp++ = static_cast(tagstk[tagi--]); - } - else - return badpat("Unmatched \\)"); - break; case '<': *mp++ = BOW; break; @@ -524,13 +523,49 @@ const char *RESearch::Compile(const char *pat, int length, bool caseSensitive) { *mp++ = escapeValue(*p); break; default: - *mp++ = CHR; - *mp++ = *p; + if (!posix && *p == '(') { + if (tagc < MAXTAG) { + tagstk[++tagi] = tagc; + *mp++ = BOT; + *mp++ = static_cast(tagc++); + } + else + return badpat("Too many \\(\\) pairs"); + } else if (!posix && *p == ')') { + if (*sp == BOT) + return badpat("Null pattern inside \\(\\)"); + if (tagi > 0) { + *mp++ = static_cast(EOT); + *mp++ = static_cast(tagstk[tagi--]); + } + else + return badpat("Unmatched \\)"); + } else { + *mp++ = CHR; + *mp++ = *p; + } } break; default : /* an ordinary char */ - if (caseSensitive) { + if (posix && *p == '(') { + if (tagc < MAXTAG) { + tagstk[++tagi] = tagc; + *mp++ = BOT; + *mp++ = static_cast(tagc++); + } + else + return badpat("Too many () pairs"); + } else if (posix && *p == ')') { + if (*sp == BOT) + return badpat("Null pattern inside ()"); + if (tagi > 0) { + *mp++ = static_cast(EOT); + *mp++ = static_cast(tagstk[tagi--]); + } + else + return badpat("Unmatched )"); + } else if (caseSensitive) { *mp++ = CHR; *mp++ = *p; } else { @@ -545,7 +580,7 @@ const char *RESearch::Compile(const char *pat, int length, bool caseSensitive) { sp = lp; } if (tagi > 0) - return badpat("Unmatched \\("); + return badpat((posix ? "Unmatched (" : "Unmatched \\(")); *mp = END; sta = OKP; return 0; @@ -555,7 +590,7 @@ const char *RESearch::Compile(const char *pat, int length, bool caseSensitive) { * RESearch::Execute: * execute nfa to find a match. * - * special cases: (nfa[0]) + * special cases: (nfa[0]) * BOL * Match only once, starting from the * beginning. @@ -580,7 +615,7 @@ int RESearch::Execute(CharacterIndexer &ci, int lp, int endp) { bol = lp; failure = 0; - + Clear(); switch(*ap) { @@ -621,7 +656,7 @@ int RESearch::Execute(CharacterIndexer &ci, int lp, int endp) { return 1; } -/* +/* * PMatch: internal routine for the hard part * * This code is partly snarfed from an early grep written by @@ -647,7 +682,7 @@ int RESearch::Execute(CharacterIndexer &ci, int lp, int endp) { * * At the end of a successful match, bopat[n] and eopat[n] * are set to the beginning and end of subpatterns matched - * by tagged expressions (n = 1 to 9). + * by tagged expressions (n = 1 to 9). * */ @@ -658,23 +693,23 @@ extern void re_fail(char *,char); * and EOW. the reason for not using ctype macros is that we can * let the user add into our own table. see RESearch::ModifyWord. This table * is not in the bitset form, since we may wish to extend it in the - * future for other character classifications. + * future for other character classifications. * * TRUE for 0-9 A-Z a-z _ */ static char chrtyp[MAXCHR] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, - 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, + 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 }; @@ -688,7 +723,7 @@ static char chrtyp[MAXCHR] = { #define ANYSKIP 2 /* [CLO] ANY END ... */ #define CHRSKIP 3 /* [CLO] CHR chr END ... */ -#define CCLSKIP 18 /* [CLO] CCL 16bytes END ... */ +#define CCLSKIP 34 /* [CLO] CCL 32bytes END ... */ int RESearch::PMatch(CharacterIndexer &ci, int lp, int endp, char *ap) { int op, c, n; @@ -796,10 +831,10 @@ int RESearch::PMatch(CharacterIndexer &ci, int lp, int endp, char *ap) { * the compact bitset representation for the default table] */ -static char deftab[16] = { - 0, 0, 0, 0, 0, 0, '\377', 003, '\376', '\377', '\377', '\207', - '\376', '\377', '\377', 007 -}; +static char deftab[16] = { + 0, 0, 0, 0, 0, 0, '\377', 003, '\376', '\377', '\377', '\207', + '\376', '\377', '\377', 007 +}; void RESearch::ModifyWord(char *s) { int i; @@ -846,7 +881,7 @@ int RESearch::Substitute(CharacterIndexer &ci, char *src, char *dst) { pin = c - '0'; break; } - + default: *dst++ = c; continue; diff --git a/contrib/src/stc/scintilla/src/RESearch.h b/contrib/src/stc/scintilla/src/RESearch.h index 28238bfb7c..d676e0f318 100644 --- a/contrib/src/stc/scintilla/src/RESearch.h +++ b/contrib/src/stc/scintilla/src/RESearch.h @@ -13,12 +13,12 @@ * The following defines are not meant to be changeable. * They are for readability only. */ -#define MAXCHR 128 +#define MAXCHR 256 #define CHRBIT 8 #define BITBLK MAXCHR/CHRBIT class CharacterIndexer { -public: +public: virtual char CharAt(int index)=0; }; @@ -32,7 +32,7 @@ public: bool GrabMatches(CharacterIndexer &ci); void ChSet(char c); void ChSetWithCase(char c, bool caseSensitive); - const char *Compile(const char *pat, int length, bool caseSensitive); + const char *Compile(const char *pat, int length, bool caseSensitive, bool posix); int Execute(CharacterIndexer &ci, int lp, int endp); void ModifyWord(char *s); int Substitute(CharacterIndexer &ci, char *src, char *dst); diff --git a/contrib/src/stc/scintilla/src/SVector.h b/contrib/src/stc/scintilla/src/SVector.h index c8edb513bc..9c3235d580 100644 --- a/contrib/src/stc/scintilla/src/SVector.h +++ b/contrib/src/stc/scintilla/src/SVector.h @@ -15,18 +15,18 @@ */ class SVector { enum { allocSize = 4000 }; - + int *v; ///< The vector unsigned int size; ///< Number of elements allocated unsigned int len; ///< Number of elements used in vector bool allocFailure; ///< A memory allocation call has failed - + /** Internally allocate more elements than the user wants * to avoid thrashing the memory allocator. */ void SizeTo(int newSize) { if (newSize < allocSize) newSize += allocSize; - else + else newSize = (newSize * 3) / 2; int* newv = new int[newSize]; if (!newv) { @@ -44,7 +44,7 @@ class SVector { delete []v; v = newv; } - + public: SVector() { allocFailure = false; diff --git a/contrib/src/stc/scintilla/src/ScintillaBase.cxx b/contrib/src/stc/scintilla/src/ScintillaBase.cxx index a5e5a065d1..ea2e2d1d6d 100644 --- a/contrib/src/stc/scintilla/src/ScintillaBase.cxx +++ b/contrib/src/stc/scintilla/src/ScintillaBase.cxx @@ -2,7 +2,7 @@ /** @file ScintillaBase.cxx ** An enhanced subclass of Editor with calltips, autocomplete and context menu. **/ -// Copyright 1998-2002 by Neil Hodgson +// Copyright 1998-2003 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include @@ -26,6 +26,7 @@ #include "CallTip.h" #include "KeyMap.h" #include "Indicator.h" +#include "XPM.h" #include "LineMarker.h" #include "Style.h" #include "ViewStyle.h" @@ -70,7 +71,7 @@ void ScintillaBase::AddCharUTF(char *s, unsigned int len, bool treatAsDBCS) { } if (ac.Active()) { AutoCompleteCharacterAdded(s[0]); - // For fill ups add the character after the autocompletion has + // For fill ups add the character after the autocompletion has // triggered so containers see the key so can display a calltip. if (isFillUp) { Editor::AddCharUTF(s, len, treatAsDBCS); @@ -211,7 +212,7 @@ void ScintillaBase::AutoCompleteStart(int lenEntered, const char *list) { return; } } - ac.Start(wMain, idAutoComplete, currentPos, lenEntered); + ac.Start(wMain, idAutoComplete, currentPos, lenEntered, vs.lineHeight, IsUnicodeMode()); PRectangle rcClient = GetClientRectangle(); Point pt = LocationFromPosition(currentPos - lenEntered); @@ -224,7 +225,7 @@ void ScintillaBase::AutoCompleteStart(int lenEntered, const char *list) { pt = LocationFromPosition(currentPos); } PRectangle rcac; - rcac.left = pt.x - 5; + rcac.left = pt.x - ac.lb->CaretFromEdge(); if (pt.y >= rcClient.bottom - heightLB && // Wont fit below. pt.y >= (rcClient.bottom + rcClient.top) / 2) { // and there is more room above. rcac.top = pt.y - heightLB; @@ -237,19 +238,19 @@ void ScintillaBase::AutoCompleteStart(int lenEntered, const char *list) { } rcac.right = rcac.left + widthLB; rcac.bottom = Platform::Minimum(rcac.top + heightLB, rcClient.bottom); - ac.lb.SetPositionRelative(rcac, wMain); - ac.lb.SetFont(vs.styles[STYLE_DEFAULT].font); - ac.lb.SetAverageCharWidth(vs.styles[STYLE_DEFAULT].aveCharWidth); - ac.lb.SetDoubleClickAction(AutoCompleteDoubleClick, this); + ac.lb->SetPositionRelative(rcac, wMain); + ac.lb->SetFont(vs.styles[STYLE_DEFAULT].font); + ac.lb->SetAverageCharWidth(vs.styles[STYLE_DEFAULT].aveCharWidth); + ac.lb->SetDoubleClickAction(AutoCompleteDoubleClick, this); ac.SetList(list); // Fiddle the position of the list so it is right next to the target and wide enough for all its strings - PRectangle rcList = ac.lb.GetDesiredRect(); + PRectangle rcList = ac.lb->GetDesiredRect(); int heightAlloced = rcList.bottom - rcList.top; widthLB = Platform::Maximum(widthLB, rcList.right - rcList.left); // Make an allowance for large strings in list - rcList.left = pt.x - 5; + rcList.left = pt.x - ac.lb->CaretFromEdge(); rcList.right = rcList.left + widthLB; if (((pt.y + vs.lineHeight) >= (rcClient.bottom - heightAlloced)) && // Wont fit below. ((pt.y + vs.lineHeight / 2) >= (rcClient.bottom + rcClient.top) / 2)) { // and there is more room above. @@ -258,7 +259,7 @@ void ScintillaBase::AutoCompleteStart(int lenEntered, const char *list) { rcList.top = pt.y + vs.lineHeight; } rcList.bottom = rcList.top + heightAlloced; - ac.lb.SetPositionRelative(rcList, wMain); + ac.lb->SetPositionRelative(rcList, wMain); ac.Show(); if (lenEntered != 0) { AutoCompleteMoveToCurrentWord(); @@ -304,10 +305,11 @@ void ScintillaBase::AutoCompleteCharacterDeleted() { } void ScintillaBase::AutoCompleteCompleted() { - int item = ac.lb.GetSelection(); + int item = ac.lb->GetSelection(); char selected[1000]; + selected[0] = '\0'; if (item != -1) { - ac.lb.GetValue(item, selected, sizeof(selected)); + ac.lb->GetValue(item, selected, sizeof(selected)); } ac.Cancel(); @@ -317,6 +319,7 @@ void ScintillaBase::AutoCompleteCompleted() { scn.nmhdr.code = SCN_USERLISTSELECTION; scn.message = 0; scn.wParam = listType; + scn.listType = listType; scn.lParam = 0; scn.text = userListSelected.c_str(); NotifyParent(scn); @@ -342,6 +345,36 @@ void ScintillaBase::AutoCompleteCompleted() { pdoc->EndUndoAction(); } +void ScintillaBase::CallTipShow(Point pt, const char *defn) { + AutoCompleteCancel(); + pt.y += vs.lineHeight; + PRectangle rc = ct.CallTipStart(currentPos, pt, + defn, + vs.styles[STYLE_DEFAULT].fontName, + vs.styles[STYLE_DEFAULT].sizeZoomed, + IsUnicodeMode(), + wMain); + // If the call-tip window would be out of the client + // space, adjust so it displays above the text. + PRectangle rcClient = GetClientRectangle(); + if (rc.bottom > rcClient.bottom) { + int offset = vs.lineHeight + rc.Height(); + rc.top -= offset; + rc.bottom -= offset; + } + // Now display the window. + CreateCallTipWindow(rc); + ct.wCallTip.SetPositionRelative(rc, wMain); + ct.wCallTip.Show(); +} + +void ScintillaBase::CallTipClick() { + SCNotification scn; + scn.nmhdr.code = SCN_CALLTIPCLICK; + scn.position = ct.clickPlace; + NotifyParent(scn); +} + void ScintillaBase::ContextMenu(Point pt) { if (displayPopupMenu) { bool writable = !WndProc(SCI_GETREADONLY, 0, 0); @@ -508,30 +541,24 @@ sptr_t ScintillaBase::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lPara case SCI_AUTOCGETDROPRESTOFWORD: return ac.dropRestOfWord; - case SCI_CALLTIPSHOW: { - AutoCompleteCancel(); - if (!ct.wCallTip.Created()) { - Point pt = LocationFromPosition(wParam); - pt.y += vs.lineHeight; - PRectangle rc = ct.CallTipStart(currentPos, pt, - reinterpret_cast(lParam), - vs.styles[STYLE_DEFAULT].fontName, - vs.styles[STYLE_DEFAULT].sizeZoomed, - IsUnicodeMode()); - // If the call-tip window would be out of the client - // space, adjust so it displays above the text. - PRectangle rcClient = GetClientRectangle(); - if (rc.bottom > rcClient.bottom) { - int offset = vs.lineHeight + rc.Height(); - rc.top -= offset; - rc.bottom -= offset; - } - // Now display the window. - CreateCallTipWindow(rc); - ct.wCallTip.SetPositionRelative(rc, wMain); - ct.wCallTip.Show(); - } - } + case SCI_REGISTERIMAGE: + ac.lb->RegisterImage(wParam, reinterpret_cast(lParam)); + break; + + case SCI_CLEARREGISTEREDIMAGES: + ac.lb->ClearRegisteredImages(); + break; + + case SCI_AUTOCSETTYPESEPARATOR: + ac.SetTypesep(static_cast(wParam)); + break; + + case SCI_AUTOCGETTYPESEPARATOR: + return ac.GetTypesep(); + + case SCI_CALLTIPSHOW: + CallTipShow(LocationFromPosition(wParam), + reinterpret_cast(lParam)); break; case SCI_CALLTIPCANCEL: @@ -553,6 +580,16 @@ sptr_t ScintillaBase::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lPara InvalidateStyleRedraw(); break; + case SCI_CALLTIPSETFORE: + ct.colourUnSel = ColourDesired(wParam); + InvalidateStyleRedraw(); + break; + + case SCI_CALLTIPSETFOREHLT: + ct.colourSel = ColourDesired(wParam); + InvalidateStyleRedraw(); + break; + case SCI_USEPOPUP: displayPopupMenu = wParam != 0; break; diff --git a/contrib/src/stc/scintilla/src/ScintillaBase.h b/contrib/src/stc/scintilla/src/ScintillaBase.h index e68aeb6084..bf0b92d57d 100644 --- a/contrib/src/stc/scintilla/src/ScintillaBase.h +++ b/contrib/src/stc/scintilla/src/ScintillaBase.h @@ -43,7 +43,7 @@ protected: int lexLanguage; const LexerModule *lexCurrent; PropSet props; - enum {numWordLists=6}; + enum {numWordLists=9}; WordList *keyWordLists[numWordLists+1]; void SetLexer(uptr_t wParam); void SetLexerLanguage(const char *languageName); @@ -71,6 +71,8 @@ protected: void AutoCompleteMoveToCurrentWord(); static void AutoCompleteDoubleClick(void* p); + void CallTipClick(); + void CallTipShow(Point pt, const char *defn); virtual void CreateCallTipWindow(PRectangle rc) = 0; virtual void AddToPopUp(const char *label, int cmd=0, bool enabled=true) = 0; diff --git a/contrib/src/stc/scintilla/src/Style.cxx b/contrib/src/stc/scintilla/src/Style.cxx index 2ee09f57d2..40a8dba6a4 100644 --- a/contrib/src/stc/scintilla/src/Style.cxx +++ b/contrib/src/stc/scintilla/src/Style.cxx @@ -16,13 +16,13 @@ Style::Style() { aliasOfDefaultFont = true; Clear(ColourDesired(0, 0, 0), ColourDesired(0xff, 0xff, 0xff), Platform::DefaultFontSize(), 0, SC_CHARSET_DEFAULT, - false, false, false, false, caseMixed, true, true); + false, false, false, false, caseMixed, true, true, false); } Style::Style(const Style &source) { Clear(ColourDesired(0, 0, 0), ColourDesired(0xff, 0xff, 0xff), 0, 0, 0, - false, false, false, false, caseMixed, true, true); + false, false, false, false, caseMixed, true, true, false); fore.desired = source.fore.desired; back.desired = source.back.desired; characterSet = source.characterSet; @@ -34,6 +34,7 @@ Style::Style(const Style &source) { caseForce = source.caseForce; visible = source.visible; changeable = source.changeable; + hotspot = source.hotspot; } Style::~Style() { @@ -49,7 +50,7 @@ Style &Style::operator=(const Style &source) { return * this; Clear(ColourDesired(0, 0, 0), ColourDesired(0xff, 0xff, 0xff), 0, 0, SC_CHARSET_DEFAULT, - false, false, false, false, caseMixed, true, true); + false, false, false, false, caseMixed, true, true, false); fore.desired = source.fore.desired; back.desired = source.back.desired; characterSet = source.characterSet; @@ -66,9 +67,9 @@ Style &Style::operator=(const Style &source) { void Style::Clear(ColourDesired fore_, ColourDesired back_, int size_, const char *fontName_, int characterSet_, - bool bold_, bool italic_, bool eolFilled_, - bool underline_, ecaseForced caseForce_, - bool visible_, bool changeable_) { + bool bold_, bool italic_, bool eolFilled_, + bool underline_, ecaseForced caseForce_, + bool visible_, bool changeable_, bool hotspot_) { fore.desired = fore_; back.desired = back_; characterSet = characterSet_; @@ -81,6 +82,7 @@ void Style::Clear(ColourDesired fore_, ColourDesired back_, int size_, caseForce = caseForce_; visible = visible_; changeable = changeable_; + hotspot = hotspot_; if (aliasOfDefaultFont) font.SetID(0); else @@ -100,8 +102,9 @@ void Style::ClearTo(const Style &source) { source.eolFilled, source.underline, source.caseForce, - source.visible, - source.changeable); + source.visible, + source.changeable, + source.hotspot); } bool Style::EquivalentFontTo(const Style *other) const { diff --git a/contrib/src/stc/scintilla/src/Style.h b/contrib/src/stc/scintilla/src/Style.h index 63259b1a93..2f1e575860 100644 --- a/contrib/src/stc/scintilla/src/Style.h +++ b/contrib/src/stc/scintilla/src/Style.h @@ -26,6 +26,7 @@ public: ecaseForced caseForce; bool visible; bool changeable; + bool hotspot; Font font; int sizeZoomed; @@ -43,13 +44,13 @@ public: void Clear(ColourDesired fore_, ColourDesired back_, int size_, const char *fontName_, int characterSet_, - bool bold_, bool italic_, bool eolFilled_, - bool underline_, ecaseForced caseForce_, - bool visible_, bool changeable_); + bool bold_, bool italic_, bool eolFilled_, + bool underline_, ecaseForced caseForce_, + bool visible_, bool changeable_, bool hotspot_); void ClearTo(const Style &source); bool EquivalentFontTo(const Style *other) const; void Realise(Surface &surface, int zoomLevel, Style *defaultStyle = 0); - bool IsProtected() { return !(changeable && visible);} ; + bool IsProtected() const { return !(changeable && visible);}; }; #endif diff --git a/contrib/src/stc/scintilla/src/StyleContext.cxx b/contrib/src/stc/scintilla/src/StyleContext.cxx index bdae28196f..64fc7a048e 100644 --- a/contrib/src/stc/scintilla/src/StyleContext.cxx +++ b/contrib/src/stc/scintilla/src/StyleContext.cxx @@ -29,7 +29,7 @@ static void getRange(unsigned int start, s[i] = '\0'; } -void StyleContext::GetCurrent(char *s, int len) { +void StyleContext::GetCurrent(char *s, unsigned int len) { getRange(styler.GetStartSegment(), currentPos - 1, styler, s, len); } @@ -46,6 +46,6 @@ static void getRangeLowered(unsigned int start, s[i] = '\0'; } -void StyleContext::GetCurrentLowered(char *s, int len) { +void StyleContext::GetCurrentLowered(char *s, unsigned int len) { getRangeLowered(styler.GetStartSegment(), currentPos - 1, styler, s, len); } diff --git a/contrib/src/stc/scintilla/src/StyleContext.h b/contrib/src/stc/scintilla/src/StyleContext.h index 4c9352916d..f2f8305c94 100644 --- a/contrib/src/stc/scintilla/src/StyleContext.h +++ b/contrib/src/stc/scintilla/src/StyleContext.h @@ -2,21 +2,35 @@ /** @file StyleContext.cxx ** Lexer infrastructure. **/ -// Copyright 1998-2001 by Neil Hodgson +// Copyright 1998-2002 by Neil Hodgson // This file is in the public domain. // All languages handled so far can treat all characters >= 0x80 as one class // which just continues the current token or starts an identifier if in default. -// DBCS treated specially as the second character can be < 0x80 and hence +// DBCS treated specially as the second character can be < 0x80 and hence // syntactically significant. UTF-8 avoids this as all trail bytes are >= 0x80 class StyleContext { Accessor &styler; - int endPos; + unsigned int endPos; StyleContext& operator=(const StyleContext&) { return *this; } + void GetNextChar(unsigned int pos) { + chNext = static_cast(styler.SafeGetCharAt(pos+1)); + if (styler.IsLeadByte(static_cast(chNext))) { + chNext = chNext << 8; + chNext |= static_cast(styler.SafeGetCharAt(pos+2)); + } + // End of line? + // Trigger on CR only (Mac style) or either on LF from CR+LF (Dos/Win) + // or on LF alone (Unix). Avoid triggering two times on Dos/Win. + atLineEnd = (ch == '\r' && chNext != '\n') || + (ch == '\n') || + (currentPos >= endPos); + } + public: - int currentPos; + unsigned int currentPos; bool atLineStart; bool atLineEnd; int state; @@ -24,32 +38,27 @@ public: int ch; int chNext; - StyleContext(unsigned int startPos, int length, - int initStyle, Accessor &styler_, char chMask=31) : + StyleContext(unsigned int startPos, unsigned int length, + int initStyle, Accessor &styler_, char chMask=31) : styler(styler_), endPos(startPos + length), - currentPos(startPos), + currentPos(startPos), atLineStart(true), atLineEnd(false), - state(initStyle), + state(initStyle), chPrev(0), - ch(0), + ch(0), chNext(0) { styler.StartAt(startPos, chMask); styler.StartSegment(startPos); - int pos = currentPos; + unsigned int pos = currentPos; ch = static_cast(styler.SafeGetCharAt(pos)); if (styler.IsLeadByte(static_cast(ch))) { pos++; ch = ch << 8; ch |= static_cast(styler.SafeGetCharAt(pos)); } - chNext = static_cast(styler.SafeGetCharAt(pos+1)); - if (styler.IsLeadByte(static_cast(chNext))) { - chNext = chNext << 8; - chNext |= static_cast(styler.SafeGetCharAt(pos+2)); - } - atLineEnd = (ch == '\r' && chNext != '\n') || (ch == '\n') || (currentPos >= endPos); + GetNextChar(pos); } void Complete() { styler.ColourTo(currentPos - 1, state); @@ -60,21 +69,12 @@ public: void Forward() { if (currentPos < endPos) { atLineStart = atLineEnd; - // A lot of this is repeated from the constructor - TODO: merge code chPrev = ch; currentPos++; if (ch >= 0x100) currentPos++; ch = chNext; - chNext = static_cast(styler.SafeGetCharAt(currentPos+1)); - if (styler.IsLeadByte(static_cast(chNext))) { - chNext = chNext << 8; - chNext |= static_cast(styler.SafeGetCharAt(currentPos + 2)); - } - // Trigger on CR only (Mac style) or either on LF from CR+LF (Dos/Win) or on LF alone (Unix) - // Avoid triggering two times on Dos/Win - // End of line - atLineEnd = (ch == '\r' && chNext != '\n') || (ch == '\n') || (currentPos >= endPos); + GetNextChar(currentPos + ((ch >= 0x100) ? 1 : 0)); } else { atLineStart = false; chPrev = ' '; @@ -83,6 +83,11 @@ public: atLineEnd = true; } } + void Forward(int nb) { + for (int i = 0; i < nb; i++) { + Forward(); + } + } void ChangeState(int state_) { state = state_; } @@ -136,8 +141,8 @@ public: return true; } // Non-inline - void GetCurrent(char *s, int len); - void GetCurrentLowered(char *s, int len); + void GetCurrent(char *s, unsigned int len); + void GetCurrentLowered(char *s, unsigned int len); }; inline bool IsASpace(unsigned int ch) { diff --git a/contrib/src/stc/scintilla/src/ViewStyle.cxx b/contrib/src/stc/scintilla/src/ViewStyle.cxx index 12e1406aa4..eb8e54f2f8 100644 --- a/contrib/src/stc/scintilla/src/ViewStyle.cxx +++ b/contrib/src/stc/scintilla/src/ViewStyle.cxx @@ -2,7 +2,7 @@ /** @file ViewStyle.cxx ** Store information on how the document is to be viewed. **/ -// Copyright 1998-2001 by Neil Hodgson +// Copyright 1998-2003 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. #include @@ -11,6 +11,7 @@ #include "Scintilla.h" #include "Indicator.h" +#include "XPM.h" #include "LineMarker.h" #include "Style.h" #include "ViewStyle.h" @@ -72,6 +73,18 @@ ViewStyle::ViewStyle(const ViewStyle &source) { selbackset = source.selbackset; selbackground.desired = source.selbackground.desired; selbackground2.desired = source.selbackground2.desired; + + foldmarginColourSet = source.foldmarginColourSet; + foldmarginColour.desired = source.foldmarginColour.desired; + foldmarginHighlightColourSet = source.foldmarginHighlightColourSet; + foldmarginHighlightColour.desired = source.foldmarginHighlightColour.desired; + + hotspotForegroundSet = source.hotspotForegroundSet; + hotspotForeground.desired = source.hotspotForeground.desired; + hotspotBackgroundSet = source.hotspotBackgroundSet; + hotspotBackground.desired = source.hotspotBackground.desired; + hotspotUnderline = source.hotspotUnderline; + whitespaceForegroundSet = source.whitespaceForegroundSet; whitespaceForeground.desired = source.whitespaceForeground.desired; whitespaceBackgroundSet = source.whitespaceBackgroundSet; @@ -124,6 +137,12 @@ void ViewStyle::Init() { selbackset = true; selbackground.desired = ColourDesired(0xc0, 0xc0, 0xc0); selbackground2.desired = ColourDesired(0xb0, 0xb0, 0xb0); + + foldmarginColourSet = false; + foldmarginColour.desired = ColourDesired(0xff, 0, 0); + foldmarginHighlightColourSet = false; + foldmarginHighlightColour.desired = ColourDesired(0xc0, 0xc0, 0xc0); + whitespaceForegroundSet = false; whitespaceForeground.desired = ColourDesired(0, 0, 0); whitespaceBackgroundSet = false; @@ -138,6 +157,13 @@ void ViewStyle::Init() { edgecolour.desired = ColourDesired(0xc0, 0xc0, 0xc0); edgeState = EDGE_NONE; caretWidth = 1; + someStylesProtected = false; + + hotspotForegroundSet = false; + hotspotForeground.desired = ColourDesired(0, 0, 0xff); + hotspotBackgroundSet = false; + hotspotBackground.desired = ColourDesired(0xff, 0xff, 0xff); + hotspotUnderline = true; leftMarginWidth = 1; rightMarginWidth = 1; @@ -148,9 +174,7 @@ void ViewStyle::Init() { ms[1].width = 16; ms[1].mask = ~SC_MASK_FOLDERS; ms[2].symbol = true; - ms[2].width = 14; // Nice width for arrows - ms[2].mask = SC_MASK_FOLDERS; - ms[2].width = 0; // Nice width for arrows + ms[2].width = 0; ms[2].mask = 0; fixedColumnWidth = leftMarginWidth; symbolMargin = false; @@ -178,12 +202,15 @@ void ViewStyle::RefreshColourPalette(Palette &pal, bool want) { pal.WantFind(indicators[i].fore, want); } for (i=0;i<(sizeof(markers)/sizeof(markers[0]));i++) { - pal.WantFind(markers[i].fore, want); - pal.WantFind(markers[i].back, want); + markers[i].RefreshColourPalette(pal, want); } pal.WantFind(selforeground, want); pal.WantFind(selbackground, want); pal.WantFind(selbackground2, want); + + pal.WantFind(foldmarginColour, want); + pal.WantFind(foldmarginHighlightColour, want); + pal.WantFind(whitespaceForeground, want); pal.WantFind(whitespaceBackground, want); pal.WantFind(selbar, want); @@ -191,6 +218,8 @@ void ViewStyle::RefreshColourPalette(Palette &pal, bool want) { pal.WantFind(caretcolour, want); pal.WantFind(caretLineBackground, want); pal.WantFind(edgecolour, want); + pal.WantFind(hotspotForeground, want); + pal.WantFind(hotspotBackground, want); } void ViewStyle::Refresh(Surface &surface) { @@ -199,6 +228,7 @@ void ViewStyle::Refresh(Surface &surface) { styles[STYLE_DEFAULT].Realise(surface, zoomLevel); maxAscent = styles[STYLE_DEFAULT].ascent; maxDescent = styles[STYLE_DEFAULT].descent; + someStylesProtected = false; for (unsigned int i=0;i<(sizeof(styles)/sizeof(styles[0]));i++) { if (i != STYLE_DEFAULT) { styles[i].Realise(surface, zoomLevel, &styles[STYLE_DEFAULT]); @@ -207,6 +237,9 @@ void ViewStyle::Refresh(Surface &surface) { if (maxDescent < styles[i].descent) maxDescent = styles[i].descent; } + if (styles[i].IsProtected()) { + someStylesProtected = true; + } } lineHeight = maxAscent + maxDescent; @@ -225,11 +258,11 @@ void ViewStyle::Refresh(Surface &surface) { } void ViewStyle::ResetDefaultStyle() { - styles[STYLE_DEFAULT].Clear(ColourDesired(0,0,0), + styles[STYLE_DEFAULT].Clear(ColourDesired(0,0,0), ColourDesired(0xff,0xff,0xff), Platform::DefaultFontSize(), fontNames.Save(Platform::DefaultFont()), SC_CHARSET_DEFAULT, - false, false, false, false, Style::caseMixed, true, true); + false, false, false, false, Style::caseMixed, true, true, false); } void ViewStyle::ClearStyles() { @@ -245,3 +278,7 @@ void ViewStyle::ClearStyles() { void ViewStyle::SetStyleFontName(int styleIndex, const char *name) { styles[styleIndex].fontName = fontNames.Save(name); } + +bool ViewStyle::ProtectionActive() const { + return someStylesProtected; +} diff --git a/contrib/src/stc/scintilla/src/ViewStyle.h b/contrib/src/stc/scintilla/src/ViewStyle.h index 887170eaac..ff38efef2e 100644 --- a/contrib/src/stc/scintilla/src/ViewStyle.h +++ b/contrib/src/stc/scintilla/src/ViewStyle.h @@ -59,6 +59,15 @@ public: ColourPair whitespaceBackground; ColourPair selbar; ColourPair selbarlight; + bool foldmarginColourSet; + ColourPair foldmarginColour; + bool foldmarginHighlightColourSet; + ColourPair foldmarginHighlightColour; + bool hotspotForegroundSet; + ColourPair hotspotForeground; + bool hotspotBackgroundSet; + ColourPair hotspotBackground; + bool hotspotUnderline; /// Margins are ordered: Line Numbers, Selection Margin, Spacing Margin enum { margins=3 }; int leftMarginWidth; ///< Spacing margin on left of text @@ -78,7 +87,8 @@ public: ColourPair edgecolour; int edgeState; int caretWidth; - + bool someStylesProtected; + ViewStyle(); ViewStyle(const ViewStyle &source); ~ViewStyle(); @@ -88,6 +98,7 @@ public: void ResetDefaultStyle(); void ClearStyles(); void SetStyleFontName(int styleIndex, const char *name); + bool ProtectionActive() const; }; #endif diff --git a/contrib/src/stc/scintilla/src/WindowAccessor.cxx b/contrib/src/stc/scintilla/src/WindowAccessor.cxx index ce42534e7b..d70ddf5c34 100644 --- a/contrib/src/stc/scintilla/src/WindowAccessor.cxx +++ b/contrib/src/stc/scintilla/src/WindowAccessor.cxx @@ -7,7 +7,7 @@ #include #include -#include +#include #include #include "Platform.h" @@ -24,7 +24,7 @@ bool WindowAccessor::InternalIsLeadByte(char ch) { if (SC_CP_UTF8 == codePage) // For lexing, all characters >= 0x80 are treated the // same so none is considered a lead byte. - return false; + return false; else return Platform::IsDBCSLeadByte(codePage, ch); } @@ -71,10 +71,10 @@ int WindowAccessor::LevelAt(int line) { return Platform::SendScintilla(id, SCI_GETFOLDLEVEL, line, 0); } -int WindowAccessor::Length() { - if (lenDoc == -1) +int WindowAccessor::Length() { + if (lenDoc == -1) lenDoc = Platform::SendScintilla(id, SCI_GETTEXTLENGTH, 0, 0); - return lenDoc; + return lenDoc; } int WindowAccessor::GetLineState(int line) { @@ -125,7 +125,7 @@ void WindowAccessor::Flush() { startPos = extremePosition; lenDoc = -1; if (validLen > 0) { - Platform::SendScintillaPointer(id, SCI_SETSTYLINGEX, validLen, + Platform::SendScintillaPointer(id, SCI_SETSTYLINGEX, validLen, styleBuf); validLen = 0; } @@ -134,12 +134,12 @@ void WindowAccessor::Flush() { int WindowAccessor::IndentAmount(int line, int *flags, PFNIsCommentLeader pfnIsCommentLeader) { int end = Length(); int spaceFlags = 0; - - // Determines the indentation level of the current line and also checks for consistent + + // Determines the indentation level of the current line and also checks for consistent // indentation compared to the previous line. - // Indentation is judged consistent when the indentation whitespace of each line lines + // Indentation is judged consistent when the indentation whitespace of each line lines // the same or the indentation of one line is a prefix of the other. - + int pos = LineStart(line); char ch = (*this)[pos]; int indent = 0; @@ -166,7 +166,7 @@ int WindowAccessor::IndentAmount(int line, int *flags, PFNIsCommentLeader pfnIsC } ch = (*this)[++pos]; } - + *flags = spaceFlags; indent += SC_FOLDLEVELBASE; // if completely empty line or the start of a comment... diff --git a/contrib/src/stc/scintilla/src/XPM.cxx b/contrib/src/stc/scintilla/src/XPM.cxx new file mode 100644 index 0000000000..c4e4f888ef --- /dev/null +++ b/contrib/src/stc/scintilla/src/XPM.cxx @@ -0,0 +1,297 @@ +// Scintilla source code edit control +/** @file XPM.cxx + ** Define a class that holds data in the X Pixmap (XPM) format, + **/ +// Copyright 1998-2003 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include + +#include "Platform.h" + +#include "XPM.h" + +static const char *NextField(const char *s) { + while (*s && *s != ' ') { + s++; + } + while (*s && *s == ' ') { + s++; + } + return s; +} + +// Data lines in XPM can be terminated either with NUL or " +static size_t MeasureLength(const char *s) { + size_t i = 0; + while (s[i] && (s[i] != '\"')) + i++; + return i; +} + +ColourAllocated XPM::ColourFromCode(int ch) { + return colourCodeTable[ch]->allocated; +#ifdef SLOW + for (int i=0;iFillRectangle(rc, ColourFromCode(code)); + } +} + +XPM::XPM(const char *textForm) : + data(0), codes(0), colours(0), lines(0) { + Init(textForm); +} + +XPM::XPM(const char * const *linesForm) : + data(0), codes(0), colours(0), lines(0) { + Init(linesForm); +} + +XPM::~XPM() { + Clear(); +} + +void XPM::Init(const char *textForm) { + Clear(); + // Test done is two parts to avoid possibility of overstepping the memory + // if memcmp implemented strangely. Must be 4 bytes at least at destination. + if ((0 == memcmp(textForm, "/* X", 4)) && (0 == memcmp(textForm, "/* XPM */", 9))) { + // Build the lines form out of the text form + const char **linesForm = LinesFormFromTextForm(textForm); + Init(linesForm); + delete []linesForm; + } else { + // It is really in line form + Init(reinterpret_cast(textForm)); + } +} + +void XPM::Init(const char * const *linesForm) { + Clear(); + height = 1; + width = 1; + nColours = 1; + data = NULL; + codeTransparent = ' '; + codes = NULL; + colours = NULL; + lines = NULL; + if (!linesForm) + return; + + const char *line0 = linesForm[0]; + width = atoi(line0); + line0 = NextField(line0); + height = atoi(line0); + line0 = NextField(line0); + nColours = atoi(line0); + codes = new char[nColours]; + colours = new ColourPair[nColours]; + + int strings = 1+height+nColours; + lines = new char *[strings]; + int allocation = 0; + for (int i=0; i(codes[c])] = &(colours[c]); + } +} + +void XPM::Clear() { + delete []data; + data = 0; + delete []codes; + codes = 0; + delete []colours; + colours = 0; + delete []lines; + lines = 0; +} + +void XPM::RefreshColourPalette(Palette &pal, bool want) { + if (!data || !codes || !colours || !lines) { + return; + } + for (int i=0;iGetId() == id) { + set[i]->Init(textForm); + return; + } + } + + // No present, so add to end + XPM *pxpm = new XPM(textForm); + if (pxpm) { + pxpm->SetId(id); + pxpm->CopyDesiredColours(); + if (len == maximum) { + int lenNew = len + 100; + XPM **setNew = new XPM *[lenNew]; + for (int i=0; iGetId() == id) { + return set[i]; + } + } + return 0; +} + +int XPMSet::GetHeight() { + if (height < 0) { + for (int i=0; iGetHeight()) { + height = set[i]->GetHeight(); + } + } + } + return (height > 0) ? height : 0; +} + +int XPMSet::GetWidth() { + if (width < 0) { + for (int i=0; iGetWidth()) { + width = set[i]->GetWidth(); + } + } + } + return (width > 0) ? width : 0; +} diff --git a/contrib/src/stc/scintilla/src/XPM.h b/contrib/src/stc/scintilla/src/XPM.h new file mode 100644 index 0000000000..948e557a92 --- /dev/null +++ b/contrib/src/stc/scintilla/src/XPM.h @@ -0,0 +1,67 @@ +// Scintilla source code edit control +/** @file XPM.h + ** Define a class that holds data in the X Pixmap (XPM) format, + **/ +// Copyright 1998-2003 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#ifndef XPM_H +#define XPM_H + +/** + * Hold a pixmap in XPM format. + */ +class XPM { + int id; // Assigned by container + int height; + int width; + int nColours; + char *data; + char codeTransparent; + char *codes; + ColourPair *colours; + ColourAllocated ColourFromCode(int ch); + void FillRun(Surface *surface, int code, int startX, int y, int x); + char **lines; + ColourPair *colourCodeTable[256]; +public: + XPM(const char *textForm); + XPM(const char * const *linesForm); + ~XPM(); + void Init(const char *textForm); + void Init(const char * const *linesForm); + void Clear(); + // Similar to same named method in ViewStyle: + void RefreshColourPalette(Palette &pal, bool want); + // No palette used, so just copy the desired colours to the allocated colours: + void CopyDesiredColours(); + // Decompose image into runs and use FillRectangle for each run: + void Draw(Surface *surface, PRectangle &rc); + char **InLinesForm() { return lines; } + void SetId(int id_) { id = id_; } + int GetId() { return id; } + int GetHeight() { return height; } + int GetWidth() { return width; } + static const char **LinesFormFromTextForm(const char *textForm); +}; + +/** + * A collection of pixmaps indexed by integer id. + */ +class XPMSet { + XPM **set; + int len; + int maximum; + int height; + int width; +public: + XPMSet(); + ~XPMSet(); + void Clear(); + void Add(int id, const char *textForm); + XPM *Get(int id); + int GetHeight(); + int GetWidth(); +}; + +#endif diff --git a/contrib/src/stc/stc.cpp b/contrib/src/stc/stc.cpp index d675e8da9d..17e9958b6a 100644 --- a/contrib/src/stc/stc.cpp +++ b/contrib/src/stc/stc.cpp @@ -20,7 +20,11 @@ #include "wx/stc/stc.h" #include "ScintillaWX.h" +#include #include +#include +#include +#include //---------------------------------------------------------------------- @@ -82,6 +86,10 @@ DEFINE_EVENT_TYPE( wxEVT_STC_START_DRAG ) DEFINE_EVENT_TYPE( wxEVT_STC_DRAG_OVER ) DEFINE_EVENT_TYPE( wxEVT_STC_DO_DROP ) DEFINE_EVENT_TYPE( wxEVT_STC_ZOOM ) +DEFINE_EVENT_TYPE( wxEVT_STC_HOTSPOT_CLICK ) +DEFINE_EVENT_TYPE( wxEVT_STC_HOTSPOT_DCLICK ) +DEFINE_EVENT_TYPE( wxEVT_STC_CALLTIP_CLICK ) + BEGIN_EVENT_TABLE(wxStyledTextCtrl, wxControl) @@ -90,10 +98,8 @@ BEGIN_EVENT_TABLE(wxStyledTextCtrl, wxControl) EVT_SCROLL (wxStyledTextCtrl::OnScroll) EVT_SIZE (wxStyledTextCtrl::OnSize) EVT_LEFT_DOWN (wxStyledTextCtrl::OnMouseLeftDown) -#if defined(__WXMSW__) || defined(__WXMAC__) // Let Scintilla see the double click as a second click EVT_LEFT_DCLICK (wxStyledTextCtrl::OnMouseLeftDown) -#endif EVT_MOTION (wxStyledTextCtrl::OnMouseMove) EVT_LEFT_UP (wxStyledTextCtrl::OnMouseLeftUp) #if defined(__WXGTK__) || defined(__WXMAC__) @@ -102,6 +108,7 @@ BEGIN_EVENT_TABLE(wxStyledTextCtrl, wxControl) EVT_CONTEXT_MENU (wxStyledTextCtrl::OnContextMenu) #endif EVT_MOUSEWHEEL (wxStyledTextCtrl::OnMouseWheel) + EVT_MIDDLE_UP (wxStyledTextCtrl::OnMouseMiddleUp) EVT_CHAR (wxStyledTextCtrl::OnChar) EVT_KEY_DOWN (wxStyledTextCtrl::OnKeyDown) EVT_KILL_FOCUS (wxStyledTextCtrl::OnLoseFocus) @@ -202,7 +209,7 @@ int wxStyledTextCtrl::GetLength() { // Returns the character byte at the position. int wxStyledTextCtrl::GetCharAt(int pos) { - return (unsigned char)SendMsg(2007, pos, 0); + return (unsigned char)SendMsg(2007, pos, 0); } // Returns the position of the caret. @@ -217,7 +224,7 @@ int wxStyledTextCtrl::GetAnchor() { // Returns the style byte at the position. int wxStyledTextCtrl::GetStyleAt(int pos) { - return (unsigned char)SendMsg(2010, pos, 0); + return (unsigned char)SendMsg(2010, pos, 0); } // Redoes the next action on the undo history. @@ -244,21 +251,21 @@ void wxStyledTextCtrl::SetSavePoint() { // Retrieve a buffer of cells. wxMemoryBuffer wxStyledTextCtrl::GetStyledText(int startPos, int endPos) { - wxMemoryBuffer buf; - if (endPos < startPos) { - int temp = startPos; - startPos = endPos; - endPos = temp; - } - int len = endPos - startPos; - if (!len) return buf; - TextRange tr; - tr.lpstrText = (char*)buf.GetWriteBuf(len*2+1); - tr.chrg.cpMin = startPos; - tr.chrg.cpMax = endPos; - len = SendMsg(2015, 0, (long)&tr); - buf.UngetWriteBuf(len); - return buf; + wxMemoryBuffer buf; + if (endPos < startPos) { + int temp = startPos; + startPos = endPos; + endPos = temp; + } + int len = endPos - startPos; + if (!len) return buf; + TextRange tr; + tr.lpstrText = (char*)buf.GetWriteBuf(len*2+1); + tr.chrg.cpMin = startPos; + tr.chrg.cpMax = endPos; + len = SendMsg(2015, 0, (long)&tr); + buf.UngetWriteBuf(len); + return buf; } // Are there any redoable actions in the undo history? @@ -294,7 +301,7 @@ void wxStyledTextCtrl::SetViewWhiteSpace(int viewWS) { // Find the position from a point within the window. int wxStyledTextCtrl::PositionFromPoint(wxPoint pt) { - return SendMsg(2022, pt.x, pt.y); + return SendMsg(2022, pt.x, pt.y); } // Find the position from a point within the window but return @@ -322,20 +329,20 @@ void wxStyledTextCtrl::SetAnchor(int posAnchor) { // Retrieve the text of the line containing the caret. // Returns the index of the caret on the line. wxString wxStyledTextCtrl::GetCurLine(int* linePos) { - int len = LineLength(GetCurrentLine()); - if (!len) { - if (linePos) *linePos = 0; - return wxEmptyString; - } + int len = LineLength(GetCurrentLine()); + if (!len) { + if (linePos) *linePos = 0; + return wxEmptyString; + } - wxMemoryBuffer mbuf(len+1); - char* buf = (char*)mbuf.GetWriteBuf(len+1); + wxMemoryBuffer mbuf(len+1); + char* buf = (char*)mbuf.GetWriteBuf(len+1); - int pos = SendMsg(2027, len+1, (long)buf); - mbuf.UngetWriteBuf(len); - mbuf.AppendByte(0); - if (linePos) *linePos = pos; - return stc2wx(buf); + int pos = SendMsg(2027, len+1, (long)buf); + mbuf.UngetWriteBuf(len); + mbuf.AppendByte(0); + if (linePos) *linePos = pos; + return stc2wx(buf); } // Retrieve the position of the last correctly styled character. @@ -400,20 +407,20 @@ void wxStyledTextCtrl::SetCodePage(int codePage) { wxASSERT_MSG(codePage != wxSTC_CP_UTF8, wxT("wxSTC_CP_UTF8 may not be used when wxUSE_UNICODE is off.")); #endif - SendMsg(2037, codePage); + SendMsg(2037, codePage); } // Set the symbol used for a particular marker number, // and optionally the fore and background colours. void wxStyledTextCtrl::MarkerDefine(int markerNumber, int markerSymbol, - const wxColour& foreground, - const wxColour& background) { + const wxColour& foreground, + const wxColour& background) { - SendMsg(2040, markerNumber, markerSymbol); - if (foreground.Ok()) - MarkerSetForeground(markerNumber, foreground); - if (background.Ok()) - MarkerSetBackground(markerNumber, background); + SendMsg(2040, markerNumber, markerSymbol); + if (foreground.Ok()) + MarkerSetForeground(markerNumber, foreground); + if (background.Ok()) + MarkerSetBackground(markerNumber, background); } // Set the foreground colour used for a particular marker number. @@ -456,6 +463,21 @@ int wxStyledTextCtrl::MarkerPrevious(int lineStart, int markerMask) { return SendMsg(2048, lineStart, markerMask); } +// Define a marker from a bitmap +void wxStyledTextCtrl::MarkerDefineBitmap(int markerNumber, const wxBitmap& bmp) { + // convert bmp to a xpm in a string + wxMemoryOutputStream strm; + wxImage img = bmp.ConvertToImage(); + img.SaveFile(strm, wxBITMAP_TYPE_XPM); + size_t len = strm.GetSize(); + char* buff = new char[len+1]; + strm.CopyTo(buff, len); + buff[len] = 0; + SendMsg(2049, markerNumber, (long)buff); + delete [] buff; + +} + // Set a margin to be either numeric or symbolic. void wxStyledTextCtrl::SetMarginType(int margin, int marginType) { SendMsg(2240, margin, marginType); @@ -556,6 +578,11 @@ void wxStyledTextCtrl::StyleSetCharacterSet(int style, int characterSet) { SendMsg(2066, style, characterSet); } +// Set a style to be a hotspot or not. +void wxStyledTextCtrl::StyleSetHotSpot(int style, bool hotspot) { + SendMsg(2409, style, hotspot); +} + // Set the foreground colour of the selection and whether to use this setting. void wxStyledTextCtrl::SetSelForeground(bool useSetting, const wxColour& fore) { SendMsg(2067, useSetting, wxColourAsLong(fore)); @@ -573,12 +600,12 @@ void wxStyledTextCtrl::SetCaretForeground(const wxColour& fore) { // When key+modifier combination km is pressed perform msg. void wxStyledTextCtrl::CmdKeyAssign(int key, int modifiers, int cmd) { - SendMsg(2070, MAKELONG(key, modifiers), cmd); + SendMsg(2070, MAKELONG(key, modifiers), cmd); } // When key+modifier combination km do nothing. void wxStyledTextCtrl::CmdKeyClear(int key, int modifiers) { - SendMsg(2071, MAKELONG(key, modifiers)); + SendMsg(2071, MAKELONG(key, modifiers)); } // Drop all key mappings. @@ -588,7 +615,7 @@ void wxStyledTextCtrl::CmdKeyClearAll() { // Set the styles for a segment of the document. void wxStyledTextCtrl::SetStyleBytes(int length, char* styleBytes) { - SendMsg(2073, length, (long)styleBytes); + SendMsg(2073, length, (long)styleBytes); } // Set a style to be visible or not. @@ -819,6 +846,37 @@ bool wxStyledTextCtrl::AutoCompGetDropRestOfWord() { return SendMsg(2271, 0, 0) != 0; } +// Register an image for use in autocompletion lists. +void wxStyledTextCtrl::RegisterImage(int type, const wxBitmap& bmp) { + // convert bmp to a xpm in a string + wxMemoryOutputStream strm; + wxImage img = bmp.ConvertToImage(); + img.SaveFile(strm, wxBITMAP_TYPE_XPM); + size_t len = strm.GetSize(); + char* buff = new char[len+1]; + strm.CopyTo(buff, len); + buff[len] = 0; + SendMsg(2405, type, (long)buff); + delete [] buff; + +} + +// Clear all the registered images. +void wxStyledTextCtrl::ClearRegisteredImages() { + SendMsg(2408, 0, 0); +} + +// Retrieve the auto-completion list type-separator character. +int wxStyledTextCtrl::AutoCompGetTypeSeparator() { + return SendMsg(2285, 0, 0); +} + +// Change the type-separator character in the string setting up an auto-completion list. +// Default is '?' but can be changed if items contain '?'. +void wxStyledTextCtrl::AutoCompSetTypeSeparator(int separatorCharacter) { + SendMsg(2286, separatorCharacter, 0); +} + // Set the number of spaces used for one level of indentation. void wxStyledTextCtrl::SetIndent(int indentSize) { SendMsg(2122, indentSize, 0); @@ -959,64 +1017,64 @@ int wxStyledTextCtrl::GetPrintColourMode() { // Find some text in the document. int wxStyledTextCtrl::FindText(int minPos, int maxPos, - const wxString& text, - int flags) { - TextToFind ft; - ft.chrg.cpMin = minPos; - ft.chrg.cpMax = maxPos; - wxWX2MBbuf buf = (wxWX2MBbuf)wx2stc(text); - ft.lpstrText = (char*)(const char*)buf; + const wxString& text, + int flags) { + TextToFind ft; + ft.chrg.cpMin = minPos; + ft.chrg.cpMax = maxPos; + wxWX2MBbuf buf = (wxWX2MBbuf)wx2stc(text); + ft.lpstrText = (char*)(const char*)buf; - return SendMsg(2150, flags, (long)&ft); + return SendMsg(2150, flags, (long)&ft); } // On Windows, will draw the document into a display context such as a printer. int wxStyledTextCtrl::FormatRange(bool doDraw, - int startPos, - int endPos, - wxDC* draw, - wxDC* target, // Why does it use two? Can they be the same? - wxRect renderRect, - wxRect pageRect) { - RangeToFormat fr; + int startPos, + int endPos, + wxDC* draw, + wxDC* target, // Why does it use two? Can they be the same? + wxRect renderRect, + wxRect pageRect) { + RangeToFormat fr; - if (endPos < startPos) { - int temp = startPos; - startPos = endPos; - endPos = temp; - } - fr.hdc = draw; - fr.hdcTarget = target; - fr.rc.top = renderRect.GetTop(); - fr.rc.left = renderRect.GetLeft(); - fr.rc.right = renderRect.GetRight(); - fr.rc.bottom = renderRect.GetBottom(); - fr.rcPage.top = pageRect.GetTop(); - fr.rcPage.left = pageRect.GetLeft(); - fr.rcPage.right = pageRect.GetRight(); - fr.rcPage.bottom = pageRect.GetBottom(); - fr.chrg.cpMin = startPos; - fr.chrg.cpMax = endPos; + if (endPos < startPos) { + int temp = startPos; + startPos = endPos; + endPos = temp; + } + fr.hdc = draw; + fr.hdcTarget = target; + fr.rc.top = renderRect.GetTop(); + fr.rc.left = renderRect.GetLeft(); + fr.rc.right = renderRect.GetRight(); + fr.rc.bottom = renderRect.GetBottom(); + fr.rcPage.top = pageRect.GetTop(); + fr.rcPage.left = pageRect.GetLeft(); + fr.rcPage.right = pageRect.GetRight(); + fr.rcPage.bottom = pageRect.GetBottom(); + fr.chrg.cpMin = startPos; + fr.chrg.cpMax = endPos; - return SendMsg(2151, doDraw, (long)&fr); + return SendMsg(2151, doDraw, (long)&fr); } -// Retrieve the line at the top of the display. +// Retrieve the display line at the top of the display. int wxStyledTextCtrl::GetFirstVisibleLine() { return SendMsg(2152, 0, 0); } // Retrieve the contents of a line. wxString wxStyledTextCtrl::GetLine(int line) { - int len = LineLength(line); - if (!len) return wxEmptyString; + int len = LineLength(line); + if (!len) return wxEmptyString; - wxMemoryBuffer mbuf(len+1); - char* buf = (char*)mbuf.GetWriteBuf(len+1); - SendMsg(2153, line, (long)buf); - mbuf.UngetWriteBuf(len); - mbuf.AppendByte(0); - return stc2wx(buf); + wxMemoryBuffer mbuf(len+1); + char* buf = (char*)mbuf.GetWriteBuf(len+1); + SendMsg(2153, line, (long)buf); + mbuf.UngetWriteBuf(len); + mbuf.AppendByte(0); + return stc2wx(buf); } // Returns the number of lines in the document. There is always at least one. @@ -1056,40 +1114,40 @@ void wxStyledTextCtrl::SetSelection(int start, int end) { // Retrieve the selected text. wxString wxStyledTextCtrl::GetSelectedText() { - int start; - int end; + int start; + int end; - GetSelection(&start, &end); - int len = end - start; - if (!len) return wxEmptyString; + GetSelection(&start, &end); + int len = end - start; + if (!len) return wxEmptyString; - wxMemoryBuffer mbuf(len+1); - char* buf = (char*)mbuf.GetWriteBuf(len+1); - SendMsg(2161, 0, (long)buf); - mbuf.UngetWriteBuf(len); - mbuf.AppendByte(0); - return stc2wx(buf); + wxMemoryBuffer mbuf(len+1); + char* buf = (char*)mbuf.GetWriteBuf(len+1); + SendMsg(2161, 0, (long)buf); + mbuf.UngetWriteBuf(len); + mbuf.AppendByte(0); + return stc2wx(buf); } // Retrieve a range of text. wxString wxStyledTextCtrl::GetTextRange(int startPos, int endPos) { - if (endPos < startPos) { - int temp = startPos; - startPos = endPos; - endPos = temp; - } - int len = endPos - startPos; - if (!len) return wxEmptyString; - wxMemoryBuffer mbuf(len+1); - char* buf = (char*)mbuf.GetWriteBuf(len); - TextRange tr; - tr.lpstrText = buf; - tr.chrg.cpMin = startPos; - tr.chrg.cpMax = endPos; - SendMsg(2162, 0, (long)&tr); - mbuf.UngetWriteBuf(len); - mbuf.AppendByte(0); - return stc2wx(buf); + if (endPos < startPos) { + int temp = startPos; + startPos = endPos; + endPos = temp; + } + int len = endPos - startPos; + if (!len) return wxEmptyString; + wxMemoryBuffer mbuf(len+1); + char* buf = (char*)mbuf.GetWriteBuf(len); + TextRange tr; + tr.lpstrText = buf; + tr.chrg.cpMin = startPos; + tr.chrg.cpMax = endPos; + SendMsg(2162, 0, (long)&tr); + mbuf.UngetWriteBuf(len); + mbuf.AppendByte(0); + return stc2wx(buf); } // Draw the selection in normal style or with selection highlighted. @@ -1174,13 +1232,13 @@ void wxStyledTextCtrl::SetText(const wxString& text) { // Retrieve all the text in the document. wxString wxStyledTextCtrl::GetText() { - int len = GetTextLength(); - wxMemoryBuffer mbuf(len+1); // leave room for the null... - char* buf = (char*)mbuf.GetWriteBuf(len+1); - SendMsg(2182, len+1, (long)buf); - mbuf.UngetWriteBuf(len); - mbuf.AppendByte(0); - return stc2wx(buf); + int len = GetTextLength(); + wxMemoryBuffer mbuf(len+1); // leave room for the null... + char* buf = (char*)mbuf.GetWriteBuf(len+1); + SendMsg(2182, len+1, (long)buf); + mbuf.UngetWriteBuf(len); + mbuf.AppendByte(0); + return stc2wx(buf); } // Retrieve the number of characters in the document. @@ -1234,9 +1292,9 @@ int wxStyledTextCtrl::GetTargetEnd() { // Text is counted so it can contain nulls. // Returns the length of the replacement text. - int wxStyledTextCtrl::ReplaceTarget(const wxString& text) { - wxWX2MBbuf buf = (wxWX2MBbuf)wx2stc(text); - return SendMsg(2194, strlen(buf), (long)(const char*)buf); + int wxStyledTextCtrl::ReplaceTarget(const wxString& text) { + wxWX2MBbuf buf = (wxWX2MBbuf)wx2stc(text); + return SendMsg(2194, strlen(buf), (long)(const char*)buf); } // Replace the target text with the argument text after \d processing. @@ -1246,18 +1304,18 @@ int wxStyledTextCtrl::GetTargetEnd() { // Returns the length of the replacement text including any change // caused by processing the \d patterns. - int wxStyledTextCtrl::ReplaceTargetRE(const wxString& text) { - wxWX2MBbuf buf = (wxWX2MBbuf)wx2stc(text); - return SendMsg(2195, strlen(buf), (long)(const char*)buf); + int wxStyledTextCtrl::ReplaceTargetRE(const wxString& text) { + wxWX2MBbuf buf = (wxWX2MBbuf)wx2stc(text); + return SendMsg(2195, strlen(buf), (long)(const char*)buf); } // Search for a counted string in the target and set the target to the found // range. Text is counted so it can contain nulls. // Returns length of range or -1 for failure in which case target is not moved. - int wxStyledTextCtrl::SearchInTarget(const wxString& text) { - wxWX2MBbuf buf = (wxWX2MBbuf)wx2stc(text); - return SendMsg(2197, strlen(buf), (long)(const char*)buf); + int wxStyledTextCtrl::SearchInTarget(const wxString& text) { + wxWX2MBbuf buf = (wxWX2MBbuf)wx2stc(text); + return SendMsg(2197, strlen(buf), (long)(const char*)buf); } // Set the search flags used by SearchInTarget. @@ -1300,6 +1358,16 @@ void wxStyledTextCtrl::CallTipSetBackground(const wxColour& back) { SendMsg(2205, wxColourAsLong(back), 0); } +// Set the foreground colour for the call tip. +void wxStyledTextCtrl::CallTipSetForeground(const wxColour& fore) { + SendMsg(2206, wxColourAsLong(fore), 0); +} + +// Set the foreground colour for the highlighted part of the call tip. +void wxStyledTextCtrl::CallTipSetForegroundHighlight(const wxColour& fore) { + SendMsg(2207, wxColourAsLong(fore), 0); +} + // Find the display line of a document line taking hidden lines into account. int wxStyledTextCtrl::VisibleFromDocLine(int line) { return SendMsg(2220, line, 0); @@ -1367,7 +1435,7 @@ void wxStyledTextCtrl::EnsureVisible(int line) { SendMsg(2232, line, 0); } -// Set some debugging options for folding. +// Set some style options for folding. void wxStyledTextCtrl::SetFoldFlags(int flags) { SendMsg(2233, flags, 0); } @@ -1473,12 +1541,67 @@ int wxStyledTextCtrl::TextHeight(int line) { return SendMsg(2279, line, 0); } +// Show or hide the vertical scroll bar. +void wxStyledTextCtrl::SetUseVerticalScrollBar(bool show) { + SendMsg(2280, show, 0); +} + +// Is the vertical scroll bar visible? +bool wxStyledTextCtrl::GetUseVerticalScrollBar() { + return SendMsg(2281, 0, 0) != 0; +} + +// Append a string to the end of the document without changing the selection. +void wxStyledTextCtrl::AppendText(int length, const wxString& text) { + SendMsg(2282, length, (long)(const char*)wx2stc(text)); +} + +// Is drawing done in two phases with backgrounds drawn before foregrounds? +bool wxStyledTextCtrl::GetTwoPhaseDraw() { + return SendMsg(2283, 0, 0) != 0; +} + +// In twoPhaseDraw mode, drawing is performed in two phases, first the background +// and then the foreground. This avoids chopping off characters that overlap the next run. +void wxStyledTextCtrl::SetTwoPhaseDraw(bool twoPhase) { + SendMsg(2284, twoPhase, 0); +} + +// Make the target range start and end be the same as the selection range start and end. +void wxStyledTextCtrl::TargetFromSelection() { + SendMsg(2287, 0, 0); +} + +// Join the lines in the target. +void wxStyledTextCtrl::LinesJoin() { + SendMsg(2288, 0, 0); +} + +// Split the lines in the target into lines that are less wide than pixelWidth +// where possible. +void wxStyledTextCtrl::LinesSplit(int pixelWidth) { + SendMsg(2289, pixelWidth, 0); +} + +// Set the colours used as a chequerboard pattern in the fold margin +void wxStyledTextCtrl::SetFoldMarginColour(bool useSetting, const wxColour& back) { + SendMsg(2290, useSetting, wxColourAsLong(back)); +} +void wxStyledTextCtrl::SetFoldMarginHiColour(bool useSetting, const wxColour& fore) { + SendMsg(2291, useSetting, wxColourAsLong(fore)); +} + +// Duplicate the current line. +void wxStyledTextCtrl::LineDuplicate() { + SendMsg(2404, 0, 0); +} + // Move caret to first position on display line. void wxStyledTextCtrl::HomeDisplay() { SendMsg(2345, 0, 0); } -// Move caret to first position on display line extending selection to +// Move caret to first position on display line extending selection to // new caret position. void wxStyledTextCtrl::HomeDisplayExtend() { SendMsg(2346, 0, 0); @@ -1489,7 +1612,7 @@ void wxStyledTextCtrl::LineEndDisplay() { SendMsg(2347, 0, 0); } -// Move caret to last position on display line extending selection to new +// Move caret to last position on display line extending selection to new // caret position. void wxStyledTextCtrl::LineEndDisplayExtend() { SendMsg(2348, 0, 0); @@ -1532,12 +1655,12 @@ void wxStyledTextCtrl::SetViewEOL(bool visible) { // Retrieve a pointer to the document object. void* wxStyledTextCtrl::GetDocPointer() { - return (void*)SendMsg(2357); + return (void*)SendMsg(2357); } // Change the document object used. void wxStyledTextCtrl::SetDocPointer(void* docPointer) { - SendMsg(2358, 0, (long)docPointer); + SendMsg(2358, 0, (long)docPointer); } // Set which document modification events are sent to the container. @@ -1625,17 +1748,17 @@ int wxStyledTextCtrl::GetZoom() { // Create a new document object. // Starts with reference count of 1 and not selected into editor. void* wxStyledTextCtrl::CreateDocument() { - return (void*)SendMsg(2375); + return (void*)SendMsg(2375); } // Extend life of document. void wxStyledTextCtrl::AddRefDocument(void* docPointer) { - SendMsg(2376, 0, (long)docPointer); + SendMsg(2376, 0, (long)docPointer); } // Release a reference to the document, deleting document if it fades to black. void wxStyledTextCtrl::ReleaseDocument(void* docPointer) { - SendMsg(2377, 0, (long)docPointer); + SendMsg(2377, 0, (long)docPointer); } // Get which document modification events are sent to the container. @@ -1740,6 +1863,11 @@ int wxStyledTextCtrl::GetXOffset() { return SendMsg(2398, 0, 0); } +// Set the last x chosen value to be the caret x position +void wxStyledTextCtrl::ChooseCaretX() { + SendMsg(2399, 0, 0); +} + // Set the way the caret is kept visible when going sideway. // The exclusion zone is given in pixels. void wxStyledTextCtrl::SetXCaretPolicy(int caretPolicy, int caretSlop) { @@ -1752,6 +1880,31 @@ void wxStyledTextCtrl::SetYCaretPolicy(int caretPolicy, int caretSlop) { SendMsg(2403, caretPolicy, caretSlop); } +// Set printing to line wrapped (SC_WRAP_WORD) or not line wrapped (SC_WRAP_NONE). +void wxStyledTextCtrl::SetPrintWrapMode(int mode) { + SendMsg(2406, mode, 0); +} + +// Is printing line wrapped. +int wxStyledTextCtrl::GetPrintWrapMode() { + return SendMsg(2407, 0, 0); +} + +// Set a fore colour for active hotspots. +void wxStyledTextCtrl::SetHotspotActiveForeground(bool useSetting, const wxColour& fore) { + SendMsg(2410, useSetting, wxColourAsLong(fore)); +} + +// Set a back colour for active hotspots. +void wxStyledTextCtrl::SetHotspotActiveBackground(bool useSetting, const wxColour& back) { + SendMsg(2411, useSetting, wxColourAsLong(back)); +} + +// Enable / Disable underlining active hotspots. +void wxStyledTextCtrl::SetHotspotActiveUnderline(bool underline) { + SendMsg(2412, underline, 0); +} + // Start notifying the container of all key presses and commands. void wxStyledTextCtrl::StartRecord() { SendMsg(3001, 0, 0); @@ -1923,15 +2076,52 @@ void wxStyledTextCtrl::ScrollToColumn(int column) { } +bool wxStyledTextCtrl::SaveFile(const wxString& filename) +{ + wxFile file(filename, wxFile::write); + + if (!file.IsOpened()) + return FALSE; + + bool success = file.Write(GetText()); + + if (success) + SetSavePoint(); + + return success; +} + +bool wxStyledTextCtrl::LoadFile(const wxString& filename) +{ + wxFile file(filename, wxFile::read); + + if (!file.IsOpened()) + return FALSE; + + wxString contents; + off_t len = file.Length(); + + wxChar *buf = contents.GetWriteBuf(len); + bool success = (file.Read(buf, len) == len); + contents.UngetWriteBuf(); + + if (success) + { + SetText(contents); + EmptyUndoBuffer(); + SetSavePoint(); + } + + return success; +} + //---------------------------------------------------------------------- // Event handlers void wxStyledTextCtrl::OnPaint(wxPaintEvent& evt) { wxPaintDC dc(this); - wxRegion region = GetUpdateRegion(); - - m_swx->DoPaint(&dc, region.GetBox()); + m_swx->DoPaint(&dc, GetUpdateRegion().GetBox()); } void wxStyledTextCtrl::OnScrollWin(wxScrollWinEvent& evt) { @@ -1959,18 +2149,18 @@ void wxStyledTextCtrl::OnSize(wxSizeEvent& evt) { void wxStyledTextCtrl::OnMouseLeftDown(wxMouseEvent& evt) { SetFocus(); wxPoint pt = evt.GetPosition(); - m_swx->DoButtonDown(Point(pt.x, pt.y), m_stopWatch.Time(), + m_swx->DoLeftButtonDown(Point(pt.x, pt.y), m_stopWatch.Time(), evt.ShiftDown(), evt.ControlDown(), evt.AltDown()); } void wxStyledTextCtrl::OnMouseMove(wxMouseEvent& evt) { wxPoint pt = evt.GetPosition(); - m_swx->DoButtonMove(Point(pt.x, pt.y)); + m_swx->DoLeftButtonMove(Point(pt.x, pt.y)); } void wxStyledTextCtrl::OnMouseLeftUp(wxMouseEvent& evt) { wxPoint pt = evt.GetPosition(); - m_swx->DoButtonUp(Point(pt.x, pt.y), m_stopWatch.Time(), + m_swx->DoLeftButtonUp(Point(pt.x, pt.y), m_stopWatch.Time(), evt.ControlDown()); } @@ -1981,6 +2171,11 @@ void wxStyledTextCtrl::OnMouseRightUp(wxMouseEvent& evt) { } +void wxStyledTextCtrl::OnMouseMiddleUp(wxMouseEvent& evt) { + wxPoint pt = evt.GetPosition(); + m_swx->DoMiddleButtonUp(Point(pt.x, pt.y)); +} + void wxStyledTextCtrl::OnContextMenu(wxContextMenuEvent& evt) { wxPoint pt = evt.GetPosition(); ScreenToClient(&pt.x, &pt.y); @@ -1998,8 +2193,6 @@ void wxStyledTextCtrl::OnMouseWheel(wxMouseEvent& evt) { void wxStyledTextCtrl::OnChar(wxKeyEvent& evt) { - int key = evt.GetKeyCode(); - // On (some?) non-US keyboards the AltGr key is required to enter some // common characters. It comes to us as both Alt and Ctrl down so we need // to let the char through in that case, otherwise if only ctrl or only @@ -2008,10 +2201,13 @@ void wxStyledTextCtrl::OnChar(wxKeyEvent& evt) { bool alt = evt.AltDown(); bool skip = ((ctrl || alt) && ! (ctrl && alt)); + int key = evt.GetKeyCode(); + // printf("OnChar key:%d consumed:%d ctrl:%d alt:%d skip:%d\n", // key, m_lastKeyDownConsumed, ctrl, alt, skip); - if (key <= WXK_START && /*key >= 32 &&*/ !m_lastKeyDownConsumed && !skip) { + if ( (key <= WXK_START || key > WXK_NUMPAD_DIVIDE) && + !m_lastKeyDownConsumed && !skip) { m_swx->DoAddChar(key); return; } @@ -2076,6 +2272,20 @@ void wxStyledTextCtrl::NotifyChange() { GetEventHandler()->ProcessEvent(evt); } + +static void SetEventText(wxStyledTextEvent& evt, const char* text, + size_t length) { + if(!text) return; + + // The unicode conversion MUST have a null byte to terminate the + // string so move it into a buffer first and give it one. + wxMemoryBuffer buf(length+1); + buf.AppendData((void*)text, length); + buf.AppendByte(0); + evt.SetText(stc2wx(buf)); +} + + void wxStyledTextCtrl::NotifyParent(SCNotification* _scn) { SCNotification& scn = *_scn; wxStyledTextEvent evt(0, GetId()); @@ -2121,14 +2331,7 @@ void wxStyledTextCtrl::NotifyParent(SCNotification* _scn) { case SCN_MODIFIED: evt.SetEventType(wxEVT_STC_MODIFIED); evt.SetModificationType(scn.modificationType); - if (scn.text) { - // The unicode conversion MUST have a null byte to terminate the - // string so move it into a buffer first and give it one. - wxMemoryBuffer buf(scn.length+1); - buf.AppendData((void*)scn.text, scn.length); - buf.AppendByte(0); - evt.SetText(stc2wx(buf)); - } + SetEventText(evt, scn.text, scn.length); evt.SetLength(scn.length); evt.SetLinesAdded(scn.linesAdded); evt.SetLine(scn.line); @@ -2160,12 +2363,12 @@ void wxStyledTextCtrl::NotifyParent(SCNotification* _scn) { case SCN_USERLISTSELECTION: evt.SetEventType(wxEVT_STC_USERLISTSELECTION); evt.SetListType(scn.listType); - evt.SetText(scn.text); + SetEventText(evt, scn.text, strlen(scn.text)); break; case SCN_URIDROPPED: evt.SetEventType(wxEVT_STC_URIDROPPED); - evt.SetText(scn.text); + SetEventText(evt, scn.text, strlen(scn.text)); break; case SCN_DWELLSTART: @@ -2184,6 +2387,18 @@ void wxStyledTextCtrl::NotifyParent(SCNotification* _scn) { evt.SetEventType(wxEVT_STC_ZOOM); break; + case SCN_HOTSPOTCLICK: + evt.SetEventType(wxEVT_STC_HOTSPOT_CLICK); + break; + + case SCN_HOTSPOTDOUBLECLICK: + evt.SetEventType(wxEVT_STC_HOTSPOT_DCLICK); + break; + + case SCN_CALLTIPCLICK: + evt.SetEventType(wxEVT_STC_CALLTIP_CLICK); + break; + default: return; } diff --git a/contrib/src/stc/stc.cpp.in b/contrib/src/stc/stc.cpp.in index 3e1b761faf..8952840b6c 100644 --- a/contrib/src/stc/stc.cpp.in +++ b/contrib/src/stc/stc.cpp.in @@ -20,7 +20,11 @@ #include "wx/stc/stc.h" #include "ScintillaWX.h" +#include #include +#include +#include +#include //---------------------------------------------------------------------- @@ -82,6 +86,10 @@ DEFINE_EVENT_TYPE( wxEVT_STC_START_DRAG ) DEFINE_EVENT_TYPE( wxEVT_STC_DRAG_OVER ) DEFINE_EVENT_TYPE( wxEVT_STC_DO_DROP ) DEFINE_EVENT_TYPE( wxEVT_STC_ZOOM ) +DEFINE_EVENT_TYPE( wxEVT_STC_HOTSPOT_CLICK ) +DEFINE_EVENT_TYPE( wxEVT_STC_HOTSPOT_DCLICK ) +DEFINE_EVENT_TYPE( wxEVT_STC_CALLTIP_CLICK ) + BEGIN_EVENT_TABLE(wxStyledTextCtrl, wxControl) @@ -90,10 +98,8 @@ BEGIN_EVENT_TABLE(wxStyledTextCtrl, wxControl) EVT_SCROLL (wxStyledTextCtrl::OnScroll) EVT_SIZE (wxStyledTextCtrl::OnSize) EVT_LEFT_DOWN (wxStyledTextCtrl::OnMouseLeftDown) -#if defined(__WXMSW__) || defined(__WXMAC__) // Let Scintilla see the double click as a second click EVT_LEFT_DCLICK (wxStyledTextCtrl::OnMouseLeftDown) -#endif EVT_MOTION (wxStyledTextCtrl::OnMouseMove) EVT_LEFT_UP (wxStyledTextCtrl::OnMouseLeftUp) #if defined(__WXGTK__) || defined(__WXMAC__) @@ -102,6 +108,7 @@ BEGIN_EVENT_TABLE(wxStyledTextCtrl, wxControl) EVT_CONTEXT_MENU (wxStyledTextCtrl::OnContextMenu) #endif EVT_MOUSEWHEEL (wxStyledTextCtrl::OnMouseWheel) + EVT_MIDDLE_UP (wxStyledTextCtrl::OnMouseMiddleUp) EVT_CHAR (wxStyledTextCtrl::OnChar) EVT_KEY_DOWN (wxStyledTextCtrl::OnKeyDown) EVT_KILL_FOCUS (wxStyledTextCtrl::OnLoseFocus) @@ -301,15 +308,52 @@ void wxStyledTextCtrl::ScrollToColumn(int column) { } +bool wxStyledTextCtrl::SaveFile(const wxString& filename) +{ + wxFile file(filename, wxFile::write); + + if (!file.IsOpened()) + return FALSE; + + bool success = file.Write(GetText()); + + if (success) + SetSavePoint(); + + return success; +} + +bool wxStyledTextCtrl::LoadFile(const wxString& filename) +{ + wxFile file(filename, wxFile::read); + + if (!file.IsOpened()) + return FALSE; + + wxString contents; + off_t len = file.Length(); + + wxChar *buf = contents.GetWriteBuf(len); + bool success = (file.Read(buf, len) == len); + contents.UngetWriteBuf(); + + if (success) + { + SetText(contents); + EmptyUndoBuffer(); + SetSavePoint(); + } + + return success; +} + //---------------------------------------------------------------------- // Event handlers void wxStyledTextCtrl::OnPaint(wxPaintEvent& evt) { wxPaintDC dc(this); - wxRegion region = GetUpdateRegion(); - - m_swx->DoPaint(&dc, region.GetBox()); + m_swx->DoPaint(&dc, GetUpdateRegion().GetBox()); } void wxStyledTextCtrl::OnScrollWin(wxScrollWinEvent& evt) { @@ -337,18 +381,18 @@ void wxStyledTextCtrl::OnSize(wxSizeEvent& evt) { void wxStyledTextCtrl::OnMouseLeftDown(wxMouseEvent& evt) { SetFocus(); wxPoint pt = evt.GetPosition(); - m_swx->DoButtonDown(Point(pt.x, pt.y), m_stopWatch.Time(), + m_swx->DoLeftButtonDown(Point(pt.x, pt.y), m_stopWatch.Time(), evt.ShiftDown(), evt.ControlDown(), evt.AltDown()); } void wxStyledTextCtrl::OnMouseMove(wxMouseEvent& evt) { wxPoint pt = evt.GetPosition(); - m_swx->DoButtonMove(Point(pt.x, pt.y)); + m_swx->DoLeftButtonMove(Point(pt.x, pt.y)); } void wxStyledTextCtrl::OnMouseLeftUp(wxMouseEvent& evt) { wxPoint pt = evt.GetPosition(); - m_swx->DoButtonUp(Point(pt.x, pt.y), m_stopWatch.Time(), + m_swx->DoLeftButtonUp(Point(pt.x, pt.y), m_stopWatch.Time(), evt.ControlDown()); } @@ -359,6 +403,11 @@ void wxStyledTextCtrl::OnMouseRightUp(wxMouseEvent& evt) { } +void wxStyledTextCtrl::OnMouseMiddleUp(wxMouseEvent& evt) { + wxPoint pt = evt.GetPosition(); + m_swx->DoMiddleButtonUp(Point(pt.x, pt.y)); +} + void wxStyledTextCtrl::OnContextMenu(wxContextMenuEvent& evt) { wxPoint pt = evt.GetPosition(); ScreenToClient(&pt.x, &pt.y); @@ -376,8 +425,6 @@ void wxStyledTextCtrl::OnMouseWheel(wxMouseEvent& evt) { void wxStyledTextCtrl::OnChar(wxKeyEvent& evt) { - int key = evt.GetKeyCode(); - // On (some?) non-US keyboards the AltGr key is required to enter some // common characters. It comes to us as both Alt and Ctrl down so we need // to let the char through in that case, otherwise if only ctrl or only @@ -386,10 +433,13 @@ void wxStyledTextCtrl::OnChar(wxKeyEvent& evt) { bool alt = evt.AltDown(); bool skip = ((ctrl || alt) && ! (ctrl && alt)); + int key = evt.GetKeyCode(); + // printf("OnChar key:%%d consumed:%%d ctrl:%%d alt:%%d skip:%%d\n", // key, m_lastKeyDownConsumed, ctrl, alt, skip); - if (key <= WXK_START && /*key >= 32 &&*/ !m_lastKeyDownConsumed && !skip) { + if ( (key <= WXK_START || key > WXK_NUMPAD_DIVIDE) && + !m_lastKeyDownConsumed && !skip) { m_swx->DoAddChar(key); return; } @@ -454,6 +504,20 @@ void wxStyledTextCtrl::NotifyChange() { GetEventHandler()->ProcessEvent(evt); } + +static void SetEventText(wxStyledTextEvent& evt, const char* text, + size_t length) { + if(!text) return; + + // The unicode conversion MUST have a null byte to terminate the + // string so move it into a buffer first and give it one. + wxMemoryBuffer buf(length+1); + buf.AppendData((void*)text, length); + buf.AppendByte(0); + evt.SetText(stc2wx(buf)); +} + + void wxStyledTextCtrl::NotifyParent(SCNotification* _scn) { SCNotification& scn = *_scn; wxStyledTextEvent evt(0, GetId()); @@ -499,14 +563,7 @@ void wxStyledTextCtrl::NotifyParent(SCNotification* _scn) { case SCN_MODIFIED: evt.SetEventType(wxEVT_STC_MODIFIED); evt.SetModificationType(scn.modificationType); - if (scn.text) { - // The unicode conversion MUST have a null byte to terminate the - // string so move it into a buffer first and give it one. - wxMemoryBuffer buf(scn.length+1); - buf.AppendData((void*)scn.text, scn.length); - buf.AppendByte(0); - evt.SetText(stc2wx(buf)); - } + SetEventText(evt, scn.text, scn.length); evt.SetLength(scn.length); evt.SetLinesAdded(scn.linesAdded); evt.SetLine(scn.line); @@ -538,12 +595,12 @@ void wxStyledTextCtrl::NotifyParent(SCNotification* _scn) { case SCN_USERLISTSELECTION: evt.SetEventType(wxEVT_STC_USERLISTSELECTION); evt.SetListType(scn.listType); - evt.SetText(scn.text); + SetEventText(evt, scn.text, strlen(scn.text)); break; case SCN_URIDROPPED: evt.SetEventType(wxEVT_STC_URIDROPPED); - evt.SetText(scn.text); + SetEventText(evt, scn.text, strlen(scn.text)); break; case SCN_DWELLSTART: @@ -562,6 +619,18 @@ void wxStyledTextCtrl::NotifyParent(SCNotification* _scn) { evt.SetEventType(wxEVT_STC_ZOOM); break; + case SCN_HOTSPOTCLICK: + evt.SetEventType(wxEVT_STC_HOTSPOT_CLICK); + break; + + case SCN_HOTSPOTDOUBLECLICK: + evt.SetEventType(wxEVT_STC_HOTSPOT_DCLICK); + break; + + case SCN_CALLTIPCLICK: + evt.SetEventType(wxEVT_STC_CALLTIP_CLICK); + break; + default: return; } diff --git a/contrib/src/stc/stc.h.in b/contrib/src/stc/stc.h.in index 157a7bfc23..70addc7abb 100644 --- a/contrib/src/stc/stc.h.in +++ b/contrib/src/stc/stc.h.in @@ -24,6 +24,30 @@ #include #include +#ifndef SWIG +/* + * If we're using wx in Dynamic Library format do we + * want wxStyledTextCtrl to be in DLL form as well? + */ +#if defined(WXUSINGDLL) && \ + (defined(WXMAKING_STC_DLL) || defined(WXUSING_STC_DLL)) + +#if defined(WXMAKING_STC_DLL) + // When building the DLL WXSTC_DECLSPEC exports classes +# define WXSTC_DECLSPEC WXEXPORT +#elif defined(WXUSING_STC_DLL) + // When using the DLL WXSTC_DECLSPEC imports classes +# define WXSTC_DECLSPEC WXIMPORT +#endif // defined(WXBUILD_STC_DLL) + +#else +// When building the static library nullify the effect of WXSTC_DECLSPEC +#define WXSTC_DECLSPEC +#endif // WXUSINGDLL && (WXMAKING_STC_DLL || WXUSING_STC_DLL) + +#endif // SWIG + + //---------------------------------------------------------------------- // Should a wxPopupWindow be used for the call tips and autocomplete windows? @@ -38,6 +62,12 @@ %(VALUES)s + +//----------------------------------------- +// Commands that can be bound to keystrokes +%(CMDS)s + + // END of generated section //---------------------------------------------------------------------- @@ -45,8 +75,11 @@ class ScintillaWX; // forward declare class WordList; struct SCNotification; - -extern const wxChar* wxSTCNameStr; +#ifndef SWIG +extern WXSTC_DECLSPEC const wxChar* wxSTCNameStr; +class WXSTC_DECLSPEC wxStyledTextCtrl; +class WXSTC_DECLSPEC wxStyledTextEvent; +#endif //---------------------------------------------------------------------- @@ -160,6 +193,12 @@ public: bool GetLastKeydownProcessed() { return m_lastKeyDownConsumed; } void SetLastKeydownProcessed(bool val) { m_lastKeyDownConsumed = val; } + // Write the contents of the editor to filename + bool SaveFile(const wxString& filename); + + // Load the contents of filename into the editor + bool LoadFile(const wxString& filename); + //---------------------------------------------------------------------- @@ -175,6 +214,7 @@ private: void OnMouseMove(wxMouseEvent& evt); void OnMouseLeftUp(wxMouseEvent& evt); void OnMouseRightUp(wxMouseEvent& evt); + void OnMouseMiddleUp(wxMouseEvent& evt); void OnContextMenu(wxContextMenuEvent& evt); void OnMouseWheel(wxMouseEvent& evt); void OnChar(wxKeyEvent& evt); @@ -191,11 +231,11 @@ private: void NotifyChange(); void NotifyParent(SCNotification* scn); - -private: DECLARE_EVENT_TABLE() DECLARE_CLASS(wxStyledTextCtrl) +protected: + ScintillaWX* m_swx; wxStopWatch m_stopWatch; wxScrollBar* m_vScrollBar; @@ -210,7 +250,7 @@ private: //---------------------------------------------------------------------- -// SWIG can't handle "#if" type of conditionals, onlu "#ifdef" +// SWIG can't handle "#if" type of conditionals, only "#ifdef" #ifdef SWIG #define STC_USE_DND 1 #else @@ -314,6 +354,8 @@ private: #endif }; + + #ifndef SWIG BEGIN_DECLARE_EVENT_TYPES() DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_CHANGE, 1650) @@ -339,6 +381,9 @@ BEGIN_DECLARE_EVENT_TYPES() DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_DRAG_OVER, 1670) DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_DO_DROP, 1671) DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_ZOOM, 1672) + DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_HOTSPOT_CLICK, 1673) + DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_HOTSPOT_DCLICK, 1674) + DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_CALLTIP_CLICK, 1675) END_DECLARE_EVENT_TYPES() #else enum { @@ -365,6 +410,9 @@ END_DECLARE_EVENT_TYPES() wxEVT_STC_DRAG_OVER, wxEVT_STC_DO_DROP, wxEVT_STC_ZOOM, + wxEVT_STC_HOTSPOT_CLICK, + wxEVT_STC_HOTSPOT_DCLICK, + wxEVT_STC_CALLTIP_CLICK }; #endif @@ -396,6 +444,10 @@ typedef void (wxEvtHandler::*wxStyledTextEventFunction)(wxStyledTextEvent&); #define EVT_STC_DRAG_OVER(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DRAG_OVER, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ), #define EVT_STC_DO_DROP(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DO_DROP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ), #define EVT_STC_ZOOM(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_ZOOM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ), +#define EVT_STC_HOTSPOT_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_HOTSPOT_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ), +#define EVT_STC_HOTSPOT_DCLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_HOTSPOT_DCLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ), +#define EVT_STC_CALLTIP_CLICK(id, fn)) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CALLTIP_CLICK id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ), + #endif //---------------------------------------------------------------------- diff --git a/contrib/src/svg/Makefile.in b/contrib/src/svg/Makefile.in index 9f1f1e253b..904597247e 100644 --- a/contrib/src/svg/Makefile.in +++ b/contrib/src/svg/Makefile.in @@ -4,14 +4,14 @@ top_srcdir = @top_srcdir@/.. top_builddir = ../../.. libsrc_dir = contrib/src/svg -TARGET_LIBNAME=libwx_dcsvg +TARGET_LIBNAME=lib@WX_LIBRARY_BASENAME@_dcsvg-@WX_RELEASE@ -LIBVERSION_CURRENT=1 -LIBVERSION_REVISION=0 -LIBVERSION_AGE=0 +LIBVERSION_CURRENT=@WX_CURRENT@ +LIBVERSION_REVISION=@WX_REVISION@ +LIBVERSION_AGE=@WX_AGE@ HEADER_PATH=$(top_srcdir)/contrib/include/wx -HEADER_SUBDIR=dcsvg +HEADER_SUBDIR=svg HEADERS=dcsvg.h diff --git a/contrib/src/svg/makefile.wat b/contrib/src/svg/makefile.wat new file mode 100644 index 0000000000..956ce53c83 --- /dev/null +++ b/contrib/src/svg/makefile.wat @@ -0,0 +1,13 @@ +# SVG src makefile for Watcom C++ + +WXDIR = ..\..\.. +EXTRACPPFLAGS = -I$(WXDIR)\contrib\include + +LIBTARGET = $(WXDIR)\lib\svg_w.lib + +OBJECTS = & + $(OUTPUTDIR)\dcsvg.obj & + +!include $(WXDIR)\src\makelib.wat + + diff --git a/contrib/src/xrc/Makefile.in b/contrib/src/xrc/Makefile.in index f645274010..25eccb7df1 100644 --- a/contrib/src/xrc/Makefile.in +++ b/contrib/src/xrc/Makefile.in @@ -7,11 +7,11 @@ expat_dir = $(top_srcdir)/contrib/src/xrc/expat libsrc_dir = contrib/src/xrc@PATH_IFS@$(expat_dir)/xmlparse@PATH_IFS@$(expat_dir)/xmltok -TARGET_LIBNAME=libwxxrc +TARGET_LIBNAME=lib@WX_LIBRARY_BASENAME@_xrc-@WX_RELEASE@ -LIBVERSION_CURRENT=0 -LIBVERSION_REVISION=1 -LIBVERSION_AGE=0 +LIBVERSION_CURRENT=@WX_CURRENT@ +LIBVERSION_REVISION=@WX_REVISION@ +LIBVERSION_AGE=@WX_AGE@ HEADER_PATH=$(top_srcdir)/contrib/include/wx HEADER_SUBDIR=xrc @@ -22,9 +22,9 @@ EXPAT_OBJECTS=xmltok.o xmlrole.o xmlparse.o HEADERS=xh_all.h xh_bttn.h xh_chckb.h xh_chckl.h xh_choic.h xh_combo.h \ xh_dlg.h xh_gauge.h xh_html.h xh_menu.h xh_notbk.h xh_panel.h \ xh_radbt.h xh_radbx.h xh_sizer.h xh_slidr.h xh_spin.h xh_stbmp.h \ - xh_sttxt.h xh_text.h xh_listb.h xml.h xmlio.h xmlres.h xh_toolb.h \ + xh_sttxt.h xh_text.h xh_listb.h xml.h xmlres.h xh_toolb.h \ xh_bmpbt.h xh_cald.h xh_listc.h xh_scrol.h xh_stbox.h xh_tree.h \ - xh_stlin.h xh_bmp.h xh_unkwn.h xh_frame.h xh_gdctl.h + xh_stlin.h xh_bmp.h xh_unkwn.h xh_frame.h xh_gdctl.h xh_scwin.h xh_split.h xh_wizrd.h OBJECTS=$(EXPAT_OBJECTS) \ xml.o xmlres.o xmlrsall.o \ @@ -33,7 +33,7 @@ OBJECTS=$(EXPAT_OBJECTS) \ xh_radbx.o xh_sizer.o xh_slidr.o xh_spin.o xh_stbmp.o xh_sttxt.o \ xh_text.o xh_listb.o xh_toolb.o xh_stlin.o xh_bmp.o xh_unkwn.o \ xh_bmpbt.o xh_cald.o xh_listc.o xh_scrol.o xh_stbox.o xh_tree.o \ - xh_frame.o xh_gdctl.o + xh_frame.o xh_gdctl.o xh_scwin.o xh_split.o xh_wizrd.o DEPFILES=$(OBJECTS:.o=.d) APPEXTRADEFS=-I$(top_srcdir)/contrib/include $(EXPAT_DEFS) diff --git a/contrib/src/xrc/XrcVC.dsp b/contrib/src/xrc/XrcVC.dsp index 44c9ba9a78..d4244579cd 100644 --- a/contrib/src/xrc/XrcVC.dsp +++ b/contrib/src/xrc/XrcVC.dsp @@ -4,7 +4,7 @@ # TARGTYPE "Win32 (x86) Static Library" 0x0104 -CFG=XrcVC - Win32 Debug +CFG=XrcVC - Win32 Debug DLL !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE @@ -13,12 +13,14 @@ CFG=XrcVC - Win32 Debug !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE -!MESSAGE NMAKE /f "XrcVC.mak" CFG="XrcVC - Win32 Debug" +!MESSAGE NMAKE /f "XrcVC.mak" CFG="XrcVC - Win32 Debug DLL" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "XrcVC - Win32 Release" (based on "Win32 (x86) Static Library") !MESSAGE "XrcVC - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "XrcVC - Win32 Debug DLL" (based on "Win32 (x86) Static Library") +!MESSAGE "XrcVC - Win32 Release DLL" (based on "Win32 (x86) Static Library") !MESSAGE # Begin Project @@ -41,7 +43,7 @@ RSC=rc.exe # PROP Intermediate_Dir "Release" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../lib/msw" /I "../../../include" /I "../../include" /I "expat/xmlparse" /I "expat/xmltok" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# ADD CPP /nologo /MD /W3 /GX- /O2 /Ob1 /I "../../../lib/msw" /I "../../../include" /I "../../include" /I "expat/xmlparse" /I "expat/xmltok" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x809 # ADD RSC /l 0x809 @@ -65,7 +67,7 @@ LIB32=link.exe -lib # PROP Intermediate_Dir "Debug" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c -# ADD CPP /nologo /MDd /W3 /GX /Z7 /Od /I "../../../lib/mswd" /I "../../../include" /I "../../include" /I "expat/xmlparse" /I "expat/xmltok" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# ADD CPP /nologo /MDd /W3 /GX- /Zi /Od /I "../../../lib/mswd" /I "../../../include" /I "../../include" /I "expat/xmlparse" /I "expat/xmltok" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x809 # ADD RSC /l 0x809 @@ -76,12 +78,64 @@ LIB32=link.exe -lib # ADD BASE LIB32 /nologo # ADD LIB32 /nologo /out:"..\..\..\lib\wxxrcd.lib" +!ELSEIF "$(CFG)" == "XrcVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "XrcVC___Win32_Debug_DLL" +# PROP BASE Intermediate_Dir "XrcVC___Win32_Debug_DLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "XrcVC___Win32_Debug_DLL" +# PROP Intermediate_Dir "XrcVC___Win32_Debug_DLL" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /GX- /Zi /Od /I "../../../lib/mswd" /I "../../../include" /I "../../include" /I "expat/xmlparse" /I "expat/xmltok" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT BASE CPP /YX +# ADD CPP /nologo /MDd /W3 /GX- /Zi /Od /I "../../../lib/mswdlld" /I "../../../include" /I "../../include" /I "expat/xmlparse" /I "expat/xmltok" /D "_MT" /D "WXUSINGDLL" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\lib\wxxrcd.lib" +# ADD LIB32 /nologo /out:"..\..\..\lib\wxxrcd.lib" + +!ELSEIF "$(CFG)" == "XrcVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "XrcVC___Win32_Release_DLL" +# PROP BASE Intermediate_Dir "XrcVC___Win32_Release_DLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "XrcVC___Win32_Release_DLL" +# PROP Intermediate_Dir "XrcVC___Win32_Release_DLL" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX- /O2 /Ob1 /I "../../../lib/msw" /I "../../../include" /I "../../include" /I "expat/xmlparse" /I "expat/xmltok" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT BASE CPP /YX +# ADD CPP /nologo /MD /W3 /GX- /O2 /Ob1 /I "../../../lib/mswdll" /I "../../../include" /I "../../include" /I "expat/xmlparse" /I "expat/xmltok" /D "_MT" /D "WXUSINGDLL" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"..\..\..\lib\wxxrc.lib" +# ADD LIB32 /nologo /out:"..\..\..\lib\wxxrc.lib" + !ENDIF # Begin Target # Name "XrcVC - Win32 Release" # Name "XrcVC - Win32 Debug" +# Name "XrcVC - Win32 Debug DLL" +# Name "XrcVC - Win32 Release DLL" # Begin Group "Expat" # PROP Default_Filter "" @@ -184,6 +238,10 @@ SOURCE=.\xh_scrol.cpp # End Source File # Begin Source File +SOURCE=.\xh_scwin.cpp +# End Source File +# Begin Source File + SOURCE=.\xh_sizer.cpp # End Source File # Begin Source File @@ -196,6 +254,10 @@ SOURCE=.\xh_spin.cpp # End Source File # Begin Source File +SOURCE=.\xh_split.cpp +# End Source File +# Begin Source File + SOURCE=.\xh_stbmp.cpp # End Source File # Begin Source File @@ -228,6 +290,10 @@ SOURCE=.\xh_unkwn.cpp # End Source File # Begin Source File +SOURCE=.\xh_wizrd.cpp +# End Source File +# Begin Source File + SOURCE=.\xml.cpp # End Source File # Begin Source File diff --git a/contrib/src/xrc/makefile.b32 b/contrib/src/xrc/makefile.b32 index dc7d4fa68a..ea4476f53f 100644 --- a/contrib/src/xrc/makefile.b32 +++ b/contrib/src/xrc/makefile.b32 @@ -13,7 +13,7 @@ expat_dir = $(WXDIR)\contrib\src\xrc\expat XMLPARSEDIR = $(expat_dir)\xmlparse XMLTOKDIR = $(expat_dir)\xmltok -EXPAT_DEFS=-I$(expat_dir)\xmlparse -I$(expat_dir)\xmltok +EXPAT_DEFS=-I$(expat_dir)\xmlparse -I$(expat_dir)\xmltok -I$(BCCDIR)\include EXPAT_OBJECTS=xmltok.obj xmlrole.obj xmlparse.obj EXTRACPPFLAGS=$(wxLIBXMLDIR) $(EXPAT_DEFS) @@ -27,7 +27,7 @@ OBJECTS=$(EXPAT_OBJECTS) \ xh_radbx.obj xh_sizer.obj xh_slidr.obj xh_spin.obj xh_stbmp.obj xh_sttxt.obj \ xh_text.obj xh_listb.obj xh_toolb.obj xh_stlin.obj xh_bmp.obj \ xh_bmpbt.obj xh_cald.obj xh_listc.obj xh_scrol.obj xh_stbox.obj \ - xh_tree.obj xh_unkwn.obj xh_frame.obj xh_gdctl.obj + xh_tree.obj xh_unkwn.obj xh_frame.obj xh_gdctl.obj xh_scwin.obj xh_split.obj xh_wizrd.obj !include $(WXDIR)\src\makelib.b32 diff --git a/contrib/src/xrc/makefile.g95 b/contrib/src/xrc/makefile.g95 index 8a4bfb322f..a3e9d80636 100644 --- a/contrib/src/xrc/makefile.g95 +++ b/contrib/src/xrc/makefile.g95 @@ -28,7 +28,7 @@ OBJECTS= $(XMLPARSEDIR_OBJECTS) $(XMLTOKDIR_OBJECTS) \ xh_radbx.o xh_sizer.o xh_slidr.o xh_spin.o xh_stbmp.o xh_sttxt.o \ xh_text.o xh_listb.o xh_toolb.o xh_stlin.o xh_bmp.o xh_unkwn.o \ xh_bmpbt.o xh_cald.o xh_listc.o xh_scrol.o xh_stbox.o xh_tree.o \ - xh_frame.o xh_gdctl.o + xh_frame.o xh_gdctl.o xh_scwin.o xh_split.o xh_wizrd.o include $(WXDIR)/src/makelib.g95 diff --git a/contrib/src/xrc/makefile.vc b/contrib/src/xrc/makefile.vc index 51bf90f9b4..ee9600bae4 100644 --- a/contrib/src/xrc/makefile.vc +++ b/contrib/src/xrc/makefile.vc @@ -47,7 +47,7 @@ LIBTARGET=$(WXDIR)\lib\wxxrc$(LIBEXT).lib EXTRATARGETS=$(D) OBJECTS=$(EXPAT_OBJS) \ - $(D)\xml.obj xmlres.obj \ + $(D)\xml.obj $(D)\xmlres.obj \ $(D)\xmlrsall.obj $(D)\xh_bttn.obj $(D)\xh_chckb.obj $(D)\xh_chckl.obj \ $(D)\xh_choic.obj $(D)\xh_combo.obj $(D)\xh_dlg.obj \ $(D)\xh_frame.obj $(D)\xh_gauge.obj $(D)\xh_html.obj $(D)\xh_menu.obj \ @@ -57,7 +57,7 @@ OBJECTS=$(EXPAT_OBJS) \ $(D)\xh_text.obj $(D)\xh_listb.obj $(D)\xh_toolb.obj \ $(D)\xh_bmpbt.obj $(D)\xh_cald.obj $(D)\xh_listc.obj $(D)\xh_scrol.obj \ $(D)\xh_stbox.obj $(D)\xh_tree.obj $(D)\xh_stlin.obj $(D)\xh_bmp.obj \ - $(D)\xh_unkwn.obj $(D)\xh_gdctl.obj + $(D)\xh_unkwn.obj $(D)\xh_gdctl.obj $(D)\xh_scwin.obj $(D)\xh_split.obj $(D)\xh_wizrd.obj !include $(WXDIR)\src\makelib.vc diff --git a/contrib/src/xrc/makefile.wat b/contrib/src/xrc/makefile.wat index 43cfc46647..a128327d0a 100644 --- a/contrib/src/xrc/makefile.wat +++ b/contrib/src/xrc/makefile.wat @@ -2,30 +2,52 @@ WXDIR = ..\..\.. -EXTRACPPFLAGS=/Id:\libxml\libxml2-2.1.1 +#XMLDIR= +!error modify makefile.wat to include the path to the XML library + +EXTRACPPFLAGS = -I$(WXDIR)\contrib\include;-I$(XMLDIR)\libxml2-2.1.1 !include $(WXDIR)\src\makewat.env -WXXMLLIB = $(WXDIR)\lib\wxxrc.lib -THISDIR = $(WXDIR)\contrib\src\xrc +LIBTARGET = $(WXDIR)\lib\wxxrc_w.lib -NAME = wxxrc -LNK = $(name).lnk - -OBJECTS=xml.obj xmlres.obj xmlrsall.obj & - xh_bttn.obj xh_chckb.obj xh_chckl.obj xh_choic.obj xh_combo.obj xh_dlg.obj & - xh_gauge.obj xh_html.obj xh_menu.obj xh_notbk.obj xh_panel.obj xh_radbt.obj & - xh_radbx.obj xh_sizer.obj xh_slidr.obj xh_spin.obj xh_stbmp.obj xh_sttxt.obj & - xh_text.obj xh_listb.obj xh_toolb.obj xh_stlin.obj xh_bmp.obj & - xh_bmpbt.obj xh_cald.obj xh_listc.obj xh_scrol.obj xh_stbox.obj & - xh_tree.obj xh_unkwn.obj xh_frame.obj - - -all: $(WXXMLLIB) - -$(WXXMLLIB): $(OBJECTS) - *wlib /b /c /n /P=256 $(WXXMLLIB) $(OBJECTS) - -clean: .SYMBOLIC - -erase *.obj *.bak *.err *.pch $(WXXMLLIB) *.lbc +OBJECTS=& + $(OUTPUTDIR)\xml.obj & + $(OUTPUTDIR)\xmlres.obj & + $(OUTPUTDIR)\xmlrsall.obj & + $(OUTPUTDIR)\xh_bttn.obj & + $(OUTPUTDIR)\xh_chckb.obj & + $(OUTPUTDIR)\xh_chckl.obj & + $(OUTPUTDIR)\xh_choic.obj & + $(OUTPUTDIR)\xh_combo.obj & + $(OUTPUTDIR)\xh_dlg.obj & + $(OUTPUTDIR)\xh_gauge.obj & + $(OUTPUTDIR)\xh_html.obj & + $(OUTPUTDIR)\xh_menu.obj & + $(OUTPUTDIR)\xh_notbk.obj & + $(OUTPUTDIR)\xh_panel.obj & + $(OUTPUTDIR)\xh_radbt.obj & + $(OUTPUTDIR)\xh_radbx.obj & + $(OUTPUTDIR)\xh_sizer.obj & + $(OUTPUTDIR)\xh_slidr.obj & + $(OUTPUTDIR)\xh_spin.obj & + $(OUTPUTDIR)\xh_stbmp.obj & + $(OUTPUTDIR)\xh_sttxt.obj & + $(OUTPUTDIR)\xh_text.obj & + $(OUTPUTDIR)\xh_listb.obj& + $(OUTPUTDIR)\xh_toolb.obj & + $(OUTPUTDIR)\xh_stlin.obj & + $(OUTPUTDIR)\xh_bmp.obj & + $(OUTPUTDIR)\xh_bmpbt.obj & + $(OUTPUTDIR)\xh_cald.obj & + $(OUTPUTDIR)\xh_listc.obj & + $(OUTPUTDIR)\xh_scrol.obj & + $(OUTPUTDIR)\xh_stbox.obj & + $(OUTPUTDIR)\xh_tree.obj & + $(OUTPUTDIR)\xh_unkwn.obj & + $(OUTPUTDIR)\xh_frame.obj & + $(OUTPUTDIR)\xh_scwin.obj & + $(OUTPUTDIR)\xh_split.obj & + $(OUTPUTDIR)\xh_wizrd.obj +!include $(WXDIR)\src\makelib.wat diff --git a/contrib/src/xrc/xh_chckl.cpp b/contrib/src/xrc/xh_chckl.cpp index 408c02570d..bac03e2823 100644 --- a/contrib/src/xrc/xh_chckl.cpp +++ b/contrib/src/xrc/xh_chckl.cpp @@ -19,6 +19,8 @@ #pragma hdrstop #endif +#if wxUSE_OWNER_DRAWN || !defined(__WXMSW__) + #include "wx/xrc/xh_chckl.h" #include "wx/checklst.h" #include "wx/intl.h" @@ -105,4 +107,4 @@ bool wxCheckListXmlHandler::CanHandle(wxXmlNode *node) (m_insideBox && node->GetName() == wxT("item"))); } - +#endif \ No newline at end of file diff --git a/contrib/src/xrc/xh_dlg.cpp b/contrib/src/xrc/xh_dlg.cpp index d44ad16a91..3c916a9e1d 100644 --- a/contrib/src/xrc/xh_dlg.cpp +++ b/contrib/src/xrc/xh_dlg.cpp @@ -41,6 +41,8 @@ wxDialogXmlHandler::wxDialogXmlHandler() : wxXmlResourceHandler() XRC_ADD_STYLE(wxTAB_TRAVERSAL); XRC_ADD_STYLE(wxWS_EX_VALIDATE_RECURSIVELY); XRC_ADD_STYLE(wxCLIP_CHILDREN); + XRC_ADD_STYLE(wxMAXIMIZE_BOX); + XRC_ADD_STYLE(wxMINIMIZE_BOX); AddWindowStyles(); } diff --git a/contrib/src/xrc/xh_gdctl.cpp b/contrib/src/xrc/xh_gdctl.cpp index 9252d60f91..afd71480e9 100644 --- a/contrib/src/xrc/xh_gdctl.cpp +++ b/contrib/src/xrc/xh_gdctl.cpp @@ -29,10 +29,10 @@ wxGenericDirCtrlXmlHandler::wxGenericDirCtrlXmlHandler() : wxXmlResourceHandler() { - ADD_STYLE(wxDIRCTRL_DIR_ONLY); - ADD_STYLE(wxDIRCTRL_3D_INTERNAL); - ADD_STYLE(wxDIRCTRL_SELECT_FIRST); - ADD_STYLE(wxDIRCTRL_SHOW_FILTERS); + XRC_ADD_STYLE(wxDIRCTRL_DIR_ONLY); + XRC_ADD_STYLE(wxDIRCTRL_3D_INTERNAL); + XRC_ADD_STYLE(wxDIRCTRL_SELECT_FIRST); + XRC_ADD_STYLE(wxDIRCTRL_SHOW_FILTERS); AddWindowStyles(); } diff --git a/contrib/src/xrc/xh_menu.cpp b/contrib/src/xrc/xh_menu.cpp index 08d5dc4d21..80a992acfa 100644 --- a/contrib/src/xrc/xh_menu.cpp +++ b/contrib/src/xrc/xh_menu.cpp @@ -85,7 +85,7 @@ wxObject *wxMenuXmlHandler::DoCreateResource() wxMenuItem *mitem = new wxMenuItem(p_menu, id, fullLabel, GetText(wxT("help")), kind); -#if wxCHECK_VERSION(2,3,0) || defined(__WXMSW__) +#if wxCHECK_VERSION(2,3,0) || (defined(__WXMSW__) && wxUSE_OWNER_DRAWN) if (HasParam(wxT("bitmap"))) mitem->SetBitmap(GetBitmap(wxT("bitmap"), wxART_MENU)); #endif diff --git a/contrib/src/xrc/xh_scwin.cpp b/contrib/src/xrc/xh_scwin.cpp new file mode 100644 index 0000000000..9aedfefe57 --- /dev/null +++ b/contrib/src/xrc/xh_scwin.cpp @@ -0,0 +1,52 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: xh_scwin.cpp +// Purpose: XRC resource for wxScrolledWindow +// Author: Vaclav Slavik +// Created: 2002/10/18 +// RCS-ID: $Id$ +// Copyright: (c) 2002 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifdef __GNUG__ +#pragma implementation "xh_scwin.h" +#endif + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#include "wx/xrc/xh_scwin.h" +#include "wx/scrolwin.h" + + +wxScrolledWindowXmlHandler::wxScrolledWindowXmlHandler() +: wxXmlResourceHandler() +{ + XRC_ADD_STYLE(wxHSCROLL); + XRC_ADD_STYLE(wxVSCROLL); + AddWindowStyles(); +} + +wxObject *wxScrolledWindowXmlHandler::DoCreateResource() +{ + XRC_MAKE_INSTANCE(control, wxScrolledWindow) + + control->Create(m_parentAsWindow, + GetID(), + GetPosition(), GetSize(), + GetStyle(wxT("style"), wxHSCROLL | wxVSCROLL), + GetName()); + + SetupWindow(control); + + return control; +} + +bool wxScrolledWindowXmlHandler::CanHandle(wxXmlNode *node) +{ + return IsOfClass(node, wxT("wxScrolledWindow")); +} diff --git a/contrib/src/xrc/xh_sizer.cpp b/contrib/src/xrc/xh_sizer.cpp index 278cc09631..7cf5e4fec0 100644 --- a/contrib/src/xrc/xh_sizer.cpp +++ b/contrib/src/xrc/xh_sizer.cpp @@ -139,6 +139,8 @@ wxObject *wxSizerXmlHandler::DoCreateResource() wxCHECK_MSG(m_parentSizer != NULL || ((IsOfClass(parentNode, wxT("wxPanel")) || + IsOfClass(parentNode, wxT("wxWizardPage")) || + IsOfClass(parentNode, wxT("wxWizardPageSimple")) || IsOfClass(parentNode, wxT("wxFrame")) || IsOfClass(parentNode, wxT("wxDialog"))) && parentNode->GetType() == wxXML_ELEMENT_NODE), NULL, @@ -150,7 +152,12 @@ wxObject *wxSizerXmlHandler::DoCreateResource() else if (m_class == wxT("wxStaticBoxSizer")) { sizer = new wxStaticBoxSizer( - new wxStaticBox(m_parentAsWindow, -1, GetText(wxT("label"))), + new wxStaticBox(m_parentAsWindow, + GetID(), + GetText(wxT("label")), + wxDefaultPosition, wxDefaultSize, + 0/*style*/, + GetName()), GetStyle(wxT("orient"), wxHORIZONTAL)); } diff --git a/contrib/src/xrc/xh_split.cpp b/contrib/src/xrc/xh_split.cpp new file mode 100644 index 0000000000..4b23f9ff60 --- /dev/null +++ b/contrib/src/xrc/xh_split.cpp @@ -0,0 +1,103 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: xh_split.cpp +// Purpose: XRC resource for wxSplitterWindow +// Author: panga@freemail.hu, Vaclav Slavik +// Created: 2003/01/26 +// RCS-ID: $Id$ +// Copyright: (c) 2003 panga@freemail.hu, Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifdef __GNUG__ +#pragma implementation "xh_split.h" +#endif + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#include "wx/xrc/xh_split.h" +#include "wx/splitter.h" +#include "wx/log.h" + +wxSplitterWindowXmlHandler::wxSplitterWindowXmlHandler() : wxXmlResourceHandler() +{ + XRC_ADD_STYLE(wxSP_3D); + XRC_ADD_STYLE(wxSP_3DSASH); + XRC_ADD_STYLE(wxSP_3DBORDER); + XRC_ADD_STYLE(wxSP_FULLSASH); + XRC_ADD_STYLE(wxSP_BORDER); + XRC_ADD_STYLE(wxSP_NOBORDER); + XRC_ADD_STYLE(wxSP_PERMIT_UNSPLIT); + XRC_ADD_STYLE(wxSP_LIVE_UPDATE); + AddWindowStyles(); +} + +wxObject *wxSplitterWindowXmlHandler::DoCreateResource() +{ + XRC_MAKE_INSTANCE(splitter, wxSplitterWindow); + + splitter->Create(m_parentAsWindow, + GetID(), + GetPosition(), GetSize(), + GetStyle(wxT("style"), wxSP_3D), + GetName()); + + SetupWindow(splitter); + + long sashpos = GetLong(wxT("sashpos"), 0); + long minpanesize = GetLong(wxT("minsize"), -1); + if (minpanesize != -1) + splitter->SetMinimumPaneSize(minpanesize); + + wxWindow *win1 = NULL, *win2 = NULL; + wxXmlNode *n = m_node->GetChildren(); + while (n) + { + if ((n->GetType() == wxXML_ELEMENT_NODE) && + (n->GetName() == wxT("object") || + n->GetName() == wxT("object_ref"))) + { + wxObject *created = CreateResFromNode(n, splitter, NULL); + wxWindow *win = wxDynamicCast(created, wxWindow); + if (win1 == NULL) + { + win1 = win; + } + else + { + win2 = win; + break; + } + } + n = n->GetNext(); + } + + if (win1 == NULL) + wxLogError(wxT("wxSplitterWindow node must contain at least one window.")); + + bool horizontal = (GetParamValue(wxT("orientation")) != wxT("vertical")); + if (win1 && win2) + { + if (horizontal) + splitter->SplitHorizontally(win1, win2, sashpos); + else + splitter->SplitVertically(win1, win2, sashpos); + } + else + { + splitter->Initialize(win1); + } + + return splitter; +} + +bool wxSplitterWindowXmlHandler::CanHandle(wxXmlNode *node) +{ + return IsOfClass(node, wxT("wxSplitterWindow")); +} + + diff --git a/contrib/src/xrc/xh_toolb.cpp b/contrib/src/xrc/xh_toolb.cpp index 6fe844c348..b35ee00b14 100644 --- a/contrib/src/xrc/xh_toolb.cpp +++ b/contrib/src/xrc/xh_toolb.cpp @@ -32,6 +32,11 @@ wxToolBarXmlHandler::wxToolBarXmlHandler() XRC_ADD_STYLE(wxTB_DOCKABLE); XRC_ADD_STYLE(wxTB_VERTICAL); XRC_ADD_STYLE(wxTB_HORIZONTAL); + XRC_ADD_STYLE(wxTB_3DBUTTONS); + XRC_ADD_STYLE(wxTB_TEXT); + XRC_ADD_STYLE(wxTB_NOICONS); + XRC_ADD_STYLE(wxTB_NODIVIDER); + XRC_ADD_STYLE(wxTB_NOALIGN); } wxObject *wxToolBarXmlHandler::DoCreateResource() @@ -39,15 +44,38 @@ wxObject *wxToolBarXmlHandler::DoCreateResource() if (m_class == wxT("tool")) { wxCHECK_MSG(m_toolbar, NULL, wxT("Incorrect syntax of XRC resource: tool not within a toolbar!")); - m_toolbar->AddTool(GetID(), - GetBitmap(wxT("bitmap"), wxART_TOOLBAR), - GetBitmap(wxT("bitmap2"), wxART_TOOLBAR), - GetBool(wxT("toggle")), - GetPosition().x, - GetPosition().y, - NULL, - GetText(wxT("tooltip")), - GetText(wxT("longhelp"))); + + if (GetPosition() != wxDefaultPosition) + { + m_toolbar->AddTool(GetID(), + GetBitmap(wxT("bitmap"), wxART_TOOLBAR), + GetBitmap(wxT("bitmap2"), wxART_TOOLBAR), + GetBool(wxT("toggle")), + GetPosition().x, + GetPosition().y, + NULL, + GetText(wxT("tooltip")), + GetText(wxT("longhelp"))); + } + else + { + wxItemKind kind = wxITEM_NORMAL; + if (GetBool(wxT("radio"))) + kind = wxITEM_RADIO; + if (GetBool(wxT("toggle"))) + { + wxASSERT_MSG( kind == wxITEM_NORMAL, + _T("can't have both toggleable and radion button at once") ); + kind = wxITEM_CHECK; + } + m_toolbar->AddTool(GetID(), + GetText(wxT("label")), + GetBitmap(wxT("bitmap"), wxART_TOOLBAR), + GetBitmap(wxT("bitmap2"), wxART_TOOLBAR), + kind, + GetText(wxT("tooltip")), + GetText(wxT("longhelp"))); + } return m_toolbar; // must return non-NULL } diff --git a/contrib/src/xrc/xh_unkwn.cpp b/contrib/src/xrc/xh_unkwn.cpp index 99a514c18f..3f8247d41a 100644 --- a/contrib/src/xrc/xh_unkwn.cpp +++ b/contrib/src/xrc/xh_unkwn.cpp @@ -43,6 +43,7 @@ public: } virtual void AddChild(wxWindowBase *child); + virtual void RemoveChild(wxWindowBase *child); protected: wxString m_controlName; @@ -68,7 +69,12 @@ void wxUnknownControlContainer::AddChild(wxWindowBase *child) Layout(); } - +void wxUnknownControlContainer::RemoveChild(wxWindowBase *child) +{ + wxPanel::RemoveChild(child); + m_controlAdded = FALSE; + GetSizer()->Remove((wxWindow*)child); +} wxUnknownWidgetXmlHandler::wxUnknownWidgetXmlHandler() : wxXmlResourceHandler() diff --git a/contrib/src/xrc/xh_wizrd.cpp b/contrib/src/xrc/xh_wizrd.cpp new file mode 100644 index 0000000000..958845ba64 --- /dev/null +++ b/contrib/src/xrc/xh_wizrd.cpp @@ -0,0 +1,99 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: xh_wizrd.cpp +// Purpose: XRC resource for wxWizard +// Author: Vaclav Slavik +// Created: 2003/03/01 +// RCS-ID: $Id$ +// Copyright: (c) 2000 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifdef __GNUG__ +#pragma implementation "xh_wizrd.h" +#endif + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_WIZARDDLG + +#include "wx/xrc/xh_wizrd.h" +#include "wx/log.h" +#include "wx/wizard.h" + + +wxWizardXmlHandler::wxWizardXmlHandler() : wxXmlResourceHandler() +{ + m_wizard = NULL; + m_lastSimplePage = NULL; + XRC_ADD_STYLE(wxWIZARD_EX_HELPBUTTON); +} + +wxObject *wxWizardXmlHandler::DoCreateResource() +{ + if (m_class == wxT("wxWizard")) + { + XRC_MAKE_INSTANCE(wiz, wxWizard) + + long style = GetStyle(wxT("exstyle"), 0); + if (style != 0) + wiz->SetExtraStyle(style); + wiz->Create(m_parentAsWindow, + GetID(), + GetText(wxT("title")), + GetBitmap(), + GetPosition()); + + wxWizard *old = m_wizard; + m_wizard = wiz; + m_lastSimplePage = NULL; + CreateChildren(wiz, true /*this handler only*/); + m_wizard = old; + return wiz; + } + else + { + wxWizardPage *page = NULL; + if (m_class == wxT("wxWizardPageSimple")) + { + XRC_MAKE_INSTANCE(p, wxWizardPageSimple) + p->Create(m_wizard, NULL, NULL, GetBitmap()); + if (m_lastSimplePage) + wxWizardPageSimple::Chain(m_lastSimplePage, p); + page = p; + m_lastSimplePage = p; + } + else /*if (m_class == wxT("wxWizardPage"))*/ + { + wxWizardPage *p = NULL; + if (m_instance) + p = wxStaticCast(m_instance, wxWizardPage); + else + wxLogError(wxT("wxWizardPage is abstract class, must be subclassed")); + p->Create(m_wizard, GetBitmap()); + page = p; + } + + page->SetName(GetName()); + page->SetId(GetID()); + + SetupWindow(page); + CreateChildren(page); + return page; + } +} + +bool wxWizardXmlHandler::CanHandle(wxXmlNode *node) +{ + return IsOfClass(node, wxT("wxWizard")) || + (m_wizard != NULL && + (IsOfClass(node, wxT("wxWizardPage")) || + IsOfClass(node, wxT("wxWizardPageSimple"))) + ); +} + +#endif // wxUSE_WIZARDDLG diff --git a/contrib/src/xrc/xml.cpp b/contrib/src/xrc/xml.cpp index a1c6a01796..0382c121ec 100644 --- a/contrib/src/xrc/xml.cpp +++ b/contrib/src/xrc/xml.cpp @@ -10,7 +10,6 @@ #ifdef __GNUG__ #pragma implementation "xml.h" -#pragma implementation "xmlio.h" #endif // For compilers that support precompilation, includes "wx.h". @@ -274,6 +273,14 @@ bool wxXmlNode::DeleteProperty(const wxString& name) // wxXmlDocument //----------------------------------------------------------------------------- +wxXmlDocument::wxXmlDocument() + : m_version(wxT("1.0")), m_fileEncoding(wxT("utf-8")), m_root(NULL) +{ +#if !wxUSE_UNICODE + m_encoding = wxT("UTF-8"); +#endif +} + wxXmlDocument::wxXmlDocument(const wxString& filename, const wxString& encoding) : wxObject(), m_root(NULL) { @@ -353,9 +360,9 @@ inline static wxString CharToString(wxMBConv *conv, wchar_t *buf = new wchar_t[nLen+1]; wxConvUTF8.MB2WC(buf, s, nLen); buf[nLen] = 0; - wxString s(buf, *conv, len); + wxString str(buf, *conv, len); delete[] buf; - return s; + return str; } else return wxString(s, len); @@ -465,26 +472,29 @@ static void DefaultHnd(void *userData, const char *s, int len) } static int UnknownEncodingHnd(void * WXUNUSED(encodingHandlerData), - const XML_Char *name, XML_Encoding *info) + const XML_Char *name, XML_Encoding *info) { // We must build conversion table for expat. The easiest way to do so // is to let wxCSConv convert as string containing all characters to // wide character representation: wxCSConv conv(wxString(name, wxConvLibc)); - char mbBuf[255]; - wchar_t wcBuf[255]; + char mbBuf[2]; + wchar_t wcBuf[10]; size_t i; - for (i = 0; i < 255; i++) - mbBuf[i] = (char) (i+1); - mbBuf[255] = 0; - conv.MB2WC(wcBuf, mbBuf, 255); - wcBuf[255] = 0; - + mbBuf[1] = 0; info->map[0] = 0; for (i = 0; i < 255; i++) - info->map[i+1] = (int)wcBuf[i]; - + { + mbBuf[0] = (char)(i+1); + if (conv.MB2WC(wcBuf, mbBuf, 2) == (size_t)-1) + { + // invalid/undefined byte in the encoding: + info->map[i+1] = -1; + } + info->map[i+1] = (int)wcBuf[0]; + } + info->data = NULL; info->convert = NULL; info->release = NULL; @@ -521,6 +531,7 @@ bool wxXmlDocument::Load(wxInputStream& stream, const wxString& encoding) XML_SetDefaultHandler(parser, DefaultHnd); XML_SetUnknownEncodingHandler(parser, UnknownEncodingHnd, NULL); + bool ok = TRUE; do { size_t len = stream.Read(buf, BUFSIZE).LastRead(); @@ -530,13 +541,17 @@ bool wxXmlDocument::Load(wxInputStream& stream, const wxString& encoding) wxLogError(_("XML parsing error: '%s' at line %d"), XML_ErrorString(XML_GetErrorCode(parser)), XML_GetCurrentLineNumber(parser)); - return FALSE; + ok = FALSE; + break; } } while (!done); - SetVersion(ctx.version); - SetFileEncoding(ctx.encoding); - SetRoot(ctx.root); + if (ok) + { + SetVersion(ctx.version); + SetFileEncoding(ctx.encoding); + SetRoot(ctx.root); + } XML_ParserFree(parser); #if !wxUSE_UNICODE @@ -544,7 +559,7 @@ bool wxXmlDocument::Load(wxInputStream& stream, const wxString& encoding) delete ctx.conv; #endif - return TRUE; + return ok; } diff --git a/contrib/src/xrc/xmlres.cpp b/contrib/src/xrc/xmlres.cpp index 0a1b72cd3a..0dc2f8d46f 100644 --- a/contrib/src/xrc/xmlres.cpp +++ b/contrib/src/xrc/xmlres.cpp @@ -24,6 +24,7 @@ #include "wx/frame.h" #include "wx/wfstream.h" #include "wx/filesys.h" +#include "wx/filename.h" #include "wx/log.h" #include "wx/intl.h" #include "wx/tokenzr.h" @@ -99,12 +100,29 @@ bool wxXmlResource::Load(const wxString& filemask) fnd = filemask; while (!!fnd) { -#if wxUSE_FILESYSTEM - if (filemask.Lower().Matches(wxT("*.zip")) || - filemask.Lower().Matches(wxT("*.xrs"))) + // NB: Load() accepts both filenames and URLs (should probably be + // changed to filenames only, but embedded resources currently + // rely on its ability to handle URLs - FIXME). This check + // serves as a quick way to determine whether found name is + // filename and not URL: + if (wxFileName::FileExists(fnd)) { - rt = rt && Load(fnd + wxT("#zip:*.xmlbin")); - rt = rt && Load(fnd + wxT("#zip:*.xrc")); + // Make the name absolute filename, because the app may + // change working directory later: + wxFileName fn(fnd); + if (fn.IsRelative()) + { + fn.Normalize(wxPATH_NORM_DOTS | wxPATH_NORM_ABSOLUTE); + fnd = fn.GetFullPath(); + } + } + +#if wxUSE_FILESYSTEM + if (fnd.Lower().Matches(wxT("*.zip")) || + fnd.Lower().Matches(wxT("*.xrs"))) + { + wxString url(wxFileSystem::FileNameToURL(fnd)); + rt = rt && Load(url + wxT("#zip:*.xrc")); } else #endif @@ -146,7 +164,6 @@ void wxXmlResource::ClearHandlers() } - wxMenu *wxXmlResource::LoadMenu(const wxString& name) { return (wxMenu*)CreateResFromNode(FindResource(name, wxT("wxMenu")), NULL, NULL); @@ -261,7 +278,7 @@ static void ProcessPlatformProperty(wxXmlNode *node) isok = TRUE; else { - wxStringTokenizer tkn(s, " |"); + wxStringTokenizer tkn(s, wxT(" |")); while (tkn.HasMoreTokens()) { @@ -408,10 +425,25 @@ wxXmlNode *wxXmlResource::DoFindResource(wxXmlNode *parent, if ( node->GetType() == wxXML_ELEMENT_NODE && (node->GetName() == wxT("object") || node->GetName() == wxT("object_ref")) && - (!classname || - node->GetPropVal(wxT("class"), wxEmptyString) == classname) && - node->GetPropVal(wxT("name"), &dummy) && dummy == name ) - return node; + node->GetPropVal(wxT("name"), &dummy) && dummy == name ) + { + wxString cls(node->GetPropVal(wxT("class"), wxEmptyString)); + if (!classname || cls == classname) + return node; + // object_ref may not have 'class' property: + if (cls.empty() && node->GetName() == wxT("object_ref")) + { + wxString refName = node->GetPropVal(wxT("ref"), wxEmptyString); + if (refName.empty()) + continue; + wxXmlNode* refNode = FindResource(refName, wxEmptyString, TRUE); + if (refNode && + refNode->GetPropVal(wxT("class"), wxEmptyString) == classname) + { + return node; + } + } + } } if ( recursive ) @@ -487,7 +519,7 @@ static void MergeNodes(wxXmlNode& dest, wxXmlNode& with) for (dnode = dest.GetChildren(); dnode; dnode = dnode->GetNext() ) { if ( dnode->GetName() == node->GetName() && - dnode->GetPropVal("name", wxEmptyString) == name && + dnode->GetPropVal(wxT("name"), wxEmptyString) == name && dnode->GetType() == node->GetType() ) { MergeNodes(*dnode, *node); @@ -503,7 +535,15 @@ static void MergeNodes(wxXmlNode& dest, wxXmlNode& with) dest.SetContent(with.GetContent()); } -wxObject *wxXmlResource::CreateResFromNode(wxXmlNode *node, wxObject *parent, wxObject *instance) +wxObject *wxXmlResource::CreateResFromNode(wxXmlNode *node, wxObject *parent, + wxObject *instance) +{ + return CreateResFromNode2(node, parent, instance); +} + +wxObject *wxXmlResource::CreateResFromNode2(wxXmlNode *node, wxObject *parent, + wxObject *instance, + wxXmlResourceHandler *handlerToUse) { if (node == NULL) return NULL; @@ -527,17 +567,26 @@ wxObject *wxXmlResource::CreateResFromNode(wxXmlNode *node, wxObject *parent, wx } wxXmlResourceHandler *handler; - wxObject *ret; - wxNode * ND = m_handlers.GetFirst(); - while (ND) - { - handler = (wxXmlResourceHandler*)ND->GetData(); - if (node->GetName() == wxT("object") && handler->CanHandle(node)) + + if (handlerToUse) + { + if (handlerToUse->CanHandle(node)) { - ret = handler->CreateResource(node, parent, instance); - if (ret) return ret; + return handlerToUse->CreateResource(node, parent, instance); + } + } + else if (node->GetName() == wxT("object")) + { + wxNode *ND = m_handlers.GetFirst(); + while (ND) + { + handler = (wxXmlResourceHandler*)ND->GetData(); + if (handler->CanHandle(node)) + { + return handler->CreateResource(node, parent, instance); + } + ND = ND->GetNext(); } - ND = ND->GetNext(); } wxLogError(_("No handler found for XML node '%s', class '%s'!"), @@ -547,6 +596,40 @@ wxObject *wxXmlResource::CreateResFromNode(wxXmlNode *node, wxObject *parent, wx } +#include "wx/listimpl.cpp" +WX_DECLARE_LIST(wxXmlSubclassFactory, wxXmlSubclassFactoriesList); +WX_DEFINE_LIST(wxXmlSubclassFactoriesList); + +wxXmlSubclassFactoriesList *wxXmlResource::ms_subclassFactories = NULL; + +/*static*/ void wxXmlResource::AddSubclassFactory(wxXmlSubclassFactory *factory) +{ + if (!ms_subclassFactories) + { + ms_subclassFactories = new wxXmlSubclassFactoriesList; + ms_subclassFactories->DeleteContents(TRUE); + } + ms_subclassFactories->Append(factory); +} + +class wxXmlSubclassFactoryCXX : public wxXmlSubclassFactory +{ +public: + ~wxXmlSubclassFactoryCXX() {} + + wxObject *Create(const wxString& className) + { + wxClassInfo* classInfo = wxClassInfo::FindClass(className); + + if (classInfo) + return classInfo->CreateObject(); + else + return NULL; + } +}; + + + wxXmlResourceHandler::wxXmlResourceHandler() @@ -568,18 +651,23 @@ wxObject *wxXmlResourceHandler::CreateResource(wxXmlNode *node, wxObject *parent !(m_resource->GetFlags() & wxXRC_NO_SUBCLASSING)) { wxString subclass = node->GetPropVal(wxT("subclass"), wxEmptyString); - wxClassInfo* classInfo = wxClassInfo::FindClass(subclass); - - if (classInfo) - m_instance = classInfo->CreateObject(); - - if (!m_instance) + if (!subclass.empty()) { - wxLogError(_("Subclass '%s' not found for resource '%s', not subclassing!"), - subclass.c_str(), node->GetPropVal(wxT("name"), wxEmptyString).c_str()); - } + for (wxXmlSubclassFactoriesList::Node *i = wxXmlResource::ms_subclassFactories->GetFirst(); + i; i = i->GetNext()) + { + m_instance = i->GetData()->Create(subclass); + if (m_instance) + break; + } - m_instance = classInfo->CreateObject(); + if (!m_instance) + { + wxString name = node->GetPropVal(wxT("name"), wxEmptyString); + wxLogError(_("Subclass '%s' not found for resource '%s', not subclassing!"), + subclass.c_str(), name.c_str()); + } + } } m_node = node; @@ -634,7 +722,7 @@ int wxXmlResourceHandler::GetStyle(const wxString& param, int defaults) if (!s) return defaults; - wxStringTokenizer tkn(s, wxT("| "), wxTOKEN_STRTOK); + wxStringTokenizer tkn(s, wxT("| \t\n"), wxTOKEN_STRTOK); int style = 0; int index; wxString fl; @@ -714,27 +802,7 @@ long wxXmlResourceHandler::GetLong(const wxString& param, long defaultv) int wxXmlResourceHandler::GetID() { - wxString sid = GetName(); - long num; - - if (sid == wxT("-1")) return -1; - else if (sid.IsNumber() && sid.ToLong(&num)) return num; -#define stdID(id) else if (sid == wxT(#id)) return id - stdID(wxID_OPEN); stdID(wxID_CLOSE); stdID(wxID_NEW); - stdID(wxID_SAVE); stdID(wxID_SAVEAS); stdID(wxID_REVERT); - stdID(wxID_EXIT); stdID(wxID_UNDO); stdID(wxID_REDO); - stdID(wxID_HELP); stdID(wxID_PRINT); stdID(wxID_PRINT_SETUP); - stdID(wxID_PREVIEW); stdID(wxID_ABOUT); stdID(wxID_HELP_CONTENTS); - stdID(wxID_HELP_COMMANDS); stdID(wxID_HELP_PROCEDURES); - stdID(wxID_CUT); stdID(wxID_COPY); stdID(wxID_PASTE); - stdID(wxID_CLEAR); stdID(wxID_FIND); stdID(wxID_DUPLICATE); - stdID(wxID_SELECTALL); stdID(wxID_OK); stdID(wxID_CANCEL); - stdID(wxID_APPLY); stdID(wxID_YES); stdID(wxID_NO); - stdID(wxID_STATIC); stdID(wxID_FORWARD); stdID(wxID_BACKWARD); - stdID(wxID_DEFAULT); stdID(wxID_MORE); stdID(wxID_SETUP); - stdID(wxID_RESET); stdID(wxID_HELP_CONTEXT); -#undef stdID - else return wxXmlResource::GetXRCID(sid); + return wxXmlResource::GetXRCID(GetName()); } @@ -829,15 +897,8 @@ wxIcon wxXmlResourceHandler::GetIcon(const wxString& param, const wxArtClient& defaultArtClient, wxSize size) { -#if wxCHECK_VERSION(2,3,0) || defined(__WXMSW__) wxIcon icon; icon.CopyFromBitmap(GetBitmap(param, defaultArtClient, size)); -#else - wxIcon *iconpt; - wxBitmap bmppt = GetBitmap(param, size); - iconpt = (wxIcon*)(&bmppt); - wxIcon icon(*iconpt); -#endif return icon; } @@ -845,6 +906,8 @@ wxIcon wxXmlResourceHandler::GetIcon(const wxString& param, wxXmlNode *wxXmlResourceHandler::GetParamNode(const wxString& param) { + wxCHECK_MSG(m_node, NULL, wxT("You can't access handler data before it was initialized!")); + wxXmlNode *n = m_node->GetChildren(); while (n) @@ -1054,12 +1117,10 @@ void wxXmlResourceHandler::CreateChildren(wxObject *parent, bool this_hnd_only) while (n) { if (n->GetType() == wxXML_ELEMENT_NODE && - n->GetName() == wxT("object")) + (n->GetName() == wxT("object") || n->GetName() == wxT("object_ref"))) { - if (this_hnd_only && CanHandle(n)) - CreateResource(n, parent, NULL); - else - m_resource->CreateResFromNode(n, parent, NULL); + m_resource->CreateResFromNode2(n, parent, NULL, + this_hnd_only ? this : NULL); } n = n->GetNext(); } @@ -1102,7 +1163,7 @@ struct XRCID_record static XRCID_record *XRCID_Records[XRCID_TABLE_SIZE] = {NULL}; -/*static*/ int wxXmlResource::GetXRCID(const wxChar *str_id) +static int XRCID_Lookup(const wxChar *str_id, int value_if_not_found = -2) { static int XRCID_LastID = wxID_HIGHEST; @@ -1126,13 +1187,34 @@ static XRCID_record *XRCID_Records[XRCID_TABLE_SIZE] = {NULL}; XRCID_record **rec_var = (oldrec == NULL) ? &XRCID_Records[index] : &oldrec->next; *rec_var = new XRCID_record; - (*rec_var)->id = ++XRCID_LastID; (*rec_var)->key = wxStrdup(str_id); (*rec_var)->next = NULL; + wxChar *end; + if (value_if_not_found != -2) + (*rec_var)->id = value_if_not_found; + else + { + int asint = wxStrtol(str_id, &end, 10); + if (*str_id && *end == 0) + { + // if str_id was integer, keep it verbosely: + (*rec_var)->id = asint; + } + else + { + (*rec_var)->id = ++XRCID_LastID; + } + } + return (*rec_var)->id; } +/*static*/ int wxXmlResource::GetXRCID(const wxChar *str_id) +{ + return XRCID_Lookup(str_id); +} + static void CleanXRCID_Record(XRCID_record *rec) { @@ -1147,11 +1229,32 @@ static void CleanXRCID_Record(XRCID_record *rec) static void CleanXRCID_Records() { for (int i = 0; i < XRCID_TABLE_SIZE; i++) + { CleanXRCID_Record(XRCID_Records[i]); + XRCID_Records[i] = NULL; + } } - - +static void AddStdXRCID_Records() +{ +#define stdID(id) XRCID_Lookup(wxT(#id), id) + stdID(-1); + stdID(wxID_OPEN); stdID(wxID_CLOSE); stdID(wxID_NEW); + stdID(wxID_SAVE); stdID(wxID_SAVEAS); stdID(wxID_REVERT); + stdID(wxID_EXIT); stdID(wxID_UNDO); stdID(wxID_REDO); + stdID(wxID_HELP); stdID(wxID_PRINT); stdID(wxID_PRINT_SETUP); + stdID(wxID_PREVIEW); stdID(wxID_ABOUT); stdID(wxID_HELP_CONTENTS); + stdID(wxID_HELP_COMMANDS); stdID(wxID_HELP_PROCEDURES); + stdID(wxID_CUT); stdID(wxID_COPY); stdID(wxID_PASTE); + stdID(wxID_CLEAR); stdID(wxID_FIND); stdID(wxID_DUPLICATE); + stdID(wxID_SELECTALL); stdID(wxID_OK); stdID(wxID_CANCEL); + stdID(wxID_APPLY); stdID(wxID_YES); stdID(wxID_NO); + stdID(wxID_STATIC); stdID(wxID_FORWARD); stdID(wxID_BACKWARD); + stdID(wxID_DEFAULT); stdID(wxID_MORE); stdID(wxID_SETUP); + stdID(wxID_RESET); stdID(wxID_HELP_CONTEXT); + stdID(wxID_CLOSE_ALL); +#undef stdID +} @@ -1166,11 +1269,14 @@ public: wxXmlResourceModule() {} bool OnInit() { + AddStdXRCID_Records(); + wxXmlResource::AddSubclassFactory(new wxXmlSubclassFactoryCXX); return TRUE; } void OnExit() { delete wxXmlResource::Set(NULL); + wxDELETE(wxXmlResource::ms_subclassFactories); CleanXRCID_Records(); } }; diff --git a/contrib/src/xrc/xmlrsall.cpp b/contrib/src/xrc/xmlrsall.cpp index b55badc9f9..7de3f4f9cb 100644 --- a/contrib/src/xrc/xmlrsall.cpp +++ b/contrib/src/xrc/xmlrsall.cpp @@ -94,4 +94,9 @@ void wxXmlResource::InitAllHandlers() AddHandler(new wxGenericDirCtrlXmlHandler); #endif AddHandler(new wxFrameXmlHandler); + AddHandler(new wxScrolledWindowXmlHandler); + AddHandler(new wxSplitterWindowXmlHandler); +#if wxUSE_WIZARDDLG + AddHandler(new wxWizardXmlHandler); +#endif } diff --git a/contrib/utils/convertrc/ConvertVC.dsp b/contrib/utils/convertrc/ConvertVC.dsp index 31de3d7b5e..b7921c3b0f 100644 --- a/contrib/utils/convertrc/ConvertVC.dsp +++ b/contrib/utils/convertrc/ConvertVC.dsp @@ -110,7 +110,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw233d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/wxconvert.exe" /pdbtype:sept /libpath:"..\..\..\lib" +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw24d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/wxconvert.exe" /pdbtype:sept /libpath:"..\..\..\lib" !ELSEIF "$(CFG)" == "ConvertVC - Win32 Release DLL" @@ -137,7 +137,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw233.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/wxconvert.exe" /libpath:"..\..\..\lib" +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw24.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/wxconvert.exe" /libpath:"..\..\..\lib" !ENDIF diff --git a/contrib/utils/convertrc/makefile.wat b/contrib/utils/convertrc/makefile.wat index d27085308e..3e4a1cf5d3 100644 --- a/contrib/utils/convertrc/makefile.wat +++ b/contrib/utils/convertrc/makefile.wat @@ -4,10 +4,16 @@ # WXDIR = $(%WXWIN) +EXTRACPPFLAGS = -I$(WXDIR)\contrib\include +THISDIR = $(WXDIR)\contrib\utils\convertrc PROGRAM = wxconvert -EXTRALIBS = $(WXDIR)\lib\wxxrc.lib -OBJECTS=convert.obj rc2xml.obj rc2wxr.obj wxr2xml.obj +EXTRALIBS = $(WXDIR)\lib\wxxrc_w.lib +OBJECTS=& + $(OUTPUTDIR)\convert.obj & + $(OUTPUTDIR)\rc2xml.obj & + $(OUTPUTDIR)\rc2wxr.obj & + $(OUTPUTDIR)\wxr2xml.obj !include $(WXDIR)\src\makeprog.wat diff --git a/contrib/utils/convertrc/rc2xml.cpp b/contrib/utils/convertrc/rc2xml.cpp index ee909b0256..3c8e797ae1 100644 --- a/contrib/utils/convertrc/rc2xml.cpp +++ b/contrib/utils/convertrc/rc2xml.cpp @@ -101,6 +101,8 @@ bool rc2xml::Convert(wxString rcfile, wxString xmlfile) m_xmlfile.Write("\n"); m_xmlfile.Close(); m_rc.Close(); + wxMessageBox(_("Conversion complete."), _("Done"), + wxOK | wxICON_INFORMATION); return TRUE; } @@ -116,7 +118,8 @@ microsoft reuses the keyword DIALOG for other things */ token=PeekToken(); //Microsoft notation? - if (token=="DISCARDABLE") + while ((token=="DISCARDABLE") + ||(token=="LOADONCALL")||(token=="MOVEABLE")) { token=GetToken(); token=PeekToken(); @@ -177,32 +180,60 @@ END void rc2xml::ParseControls() { wxString token; + wxString label,varname; token=GetToken(); while ((token!="END")&(token!="}")) { if (token=="AUTOCHECKBOX") - ParseCheckBox(); + { + label=GetQuoteField(); + varname=GetToken(); + ParseCheckBox(label,varname); + } else if (token=="AUTORADIOBUTTON") - ParseRadioButton(); + { + label=GetQuoteField(); + varname=GetToken(); + ParseRadioButton(label,varname); + } else if (token=="LTEXT") - ParseStaticText(); + { + label=GetQuoteField(); + varname=GetToken(); + ParseStaticText(label,varname); + } else if (token=="EDITTEXT") - ParseTextCtrl(); - else if (token=="PUSHBUTTON") - ParsePushButton(); - else if (token=="DEFPUSHBUTTON") - ParsePushButton(); + { + varname=GetToken(); + ParseTextCtrl(varname); + } + else if ((token=="PUSHBUTTON")||(token=="DEFPUSHBUTTON")) + { + label=GetQuoteField(); + varname=GetToken(); + ParsePushButton(label,varname); + } else if (token=="GROUPBOX") - ParseGroupBox(); + { + label=GetQuoteField(); + varname=GetToken(); + ParseGroupBox(label,varname); + } else if (token=="COMBOBOX") - ParseComboBox(); + { + varname=GetToken(); + ParseComboBox(varname); + } else if (token=="CONTROL") ParseControlMS(); else if (token=="LISTBOX") - ParseListBox(); + { + varname=GetToken(); + ParseListBox(varname); + } else if (token=="ICON") ParseIconStatic(); else if (token=="SCROLLBAR") @@ -212,12 +243,15 @@ void rc2xml::ParseControls() } //LTEXT "Radius",IDC_STATIC,9,67,23,8 -void rc2xml::ParseStaticText() +void rc2xml::ParseStaticText(wxString phrase, wxString varname) { wxString token; - wxString phrase,varname; - phrase=GetQuoteField(); - varname=GetToken(); + token=PeekToken(); + while (!token.IsNumber()) + { + token=GetToken(); + token=PeekToken(); + } int x,y,width,height; ReadRect(x,y,width,height); @@ -227,11 +261,16 @@ void rc2xml::ParseStaticText() } //EDITTEXT IDC_RADIUS,36,65,40,14,ES_AUTOHSCROLL -void rc2xml::ParseTextCtrl() +void rc2xml::ParseTextCtrl(wxString varname) { wxString token; - wxString varname,style; - varname=GetToken(); + wxString style; + token=PeekToken(); + while (!token.IsNumber()) + { + token=GetToken(); + token=PeekToken(); + } int x,y,width,height; ReadRect(x,y,width,height); //TODO @@ -242,13 +281,15 @@ void rc2xml::ParseTextCtrl() } //AUTOCHECKBOX "&log.", ID_XLOG, 25, 24, 21, 12 -void rc2xml::ParseCheckBox() +void rc2xml::ParseCheckBox(wxString phrase, wxString varname) { wxString token; - wxString phrase,varname; - phrase=GetQuoteField(); - varname=GetToken(); - + token=PeekToken(); + while (!token.IsNumber()) + { + token=GetToken(); + token=PeekToken(); + } int x,y,width,height; ReadRect(x,y,width,height); @@ -259,15 +300,14 @@ void rc2xml::ParseCheckBox() } //AUTORADIOBUTTON "&text", ID_SW10, 13, 12, 68, 10, BS_AUTORADIOBUTTON | WS_GROUP -void rc2xml::ParseRadioButton() +void rc2xml::ParseRadioButton(wxString phrase, wxString varname) { wxString token,style; - wxString phrase,varname; - phrase=GetQuoteField(); - varname=GetToken(); - int x,y,width,height; + bool GotOrs; + GotOrs = ReadOrs(token); if (ReadRect(x,y,width,height)) + if (GotOrs==FALSE) ReadOrs(token); if (token.Find("WS_GROUP") != -1) style += "wxRB_GROUP"; @@ -281,13 +321,16 @@ void rc2xml::ParseRadioButton() } //PUSHBUTTON "Create/Update",IDC_CREATE,15,25,53,13,NOT WS_TABSTOP -void rc2xml::ParsePushButton() +void rc2xml::ParsePushButton(wxString phrase, wxString varname) { wxString token; - wxString phrase,varname; - phrase=GetQuoteField(); - varname=GetToken(); + token=PeekToken(); + while (!token.IsNumber()) + { + token=GetToken(); + token=PeekToken(); + } int x,y,width,height; ReadRect(x,y,width,height); @@ -314,13 +357,16 @@ bool rc2xml::Seperator(int ch) return FALSE; } -void rc2xml::ParseGroupBox() +void rc2xml::ParseGroupBox(wxString phrase, wxString varname) { // GROUPBOX "Rotate",IDC_STATIC,1,1,71,79 wxString token; - wxString phrase,varname; - phrase=GetQuoteField(); - varname=GetToken(); + token=PeekToken(); + while (!token.IsNumber()) + { + token=GetToken(); + token=PeekToken(); + } int x,y,width,height; ReadRect(x,y,width,height); @@ -395,9 +441,8 @@ wxString rc2xml::GetQuoteField() while (ch!=34) ReadChar(ch); - ReadChar(ch); - + while (ch!=34) { phrase+=(char)ch; @@ -406,6 +451,49 @@ wxString rc2xml::GetQuoteField() return phrase; } +// string in stringtable may contain embedded quotes +// escape characters retained to allow strings to be rewritten +wxString rc2xml::GetStringQuote() +{ + wxString phrase; + //ASCII code 34 " + bool done=FALSE; + int p,ch=0,lastch=0; + ReadChar(ch); + + while (ch!=34) + ReadChar(ch); + ReadChar(ch); + while (done==FALSE) + { + if ((ch==34)&&(lastch!='\\')) + { + p=m_rc.Tell(); + ReadChar(ch); +// RC supports "", for embedded quote, as well as \" + if (ch==34) + phrase+='\\'; + else + { + m_rc.Seek(p); + done = TRUE; + } + } + if (done==TRUE) + break; + if (ch=='\r') + ReadChar(ch); // skip + if ((ch=='\n')&&(lastch=='\\')) // lastch be this + phrase+='n'; // escape + else + phrase+=(char)ch; + lastch=ch; + ReadChar(ch); + } + + return phrase; +} + void rc2xml::ReadChar(int &ch) { int result; @@ -423,15 +511,16 @@ void rc2xml::ReadChar(int &ch) m_done=TRUE; } -void rc2xml::ParseComboBox() +void rc2xml::ParseComboBox(wxString varname) { /* COMBOBOX IDC_SCALECOMBO,10,110,48,52,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP */ wxString token,style; - wxString varname; - varname=GetToken(); int x,y,width,height; + bool GotOrs; + GotOrs = ReadOrs(token); if (ReadRect(x,y,width,height)) + if (GotOrs==FALSE) ReadOrs(token); m_xmlfile.Write("\t\t\n"); - } - - if (token.Find("BS_AUTORADIOBUTTON")!=-1) - { - ReadRect(x,y,width,height); - m_xmlfile.Write("\t\t\n"); - } - + ParseCheckBox(label, varname); + else if ((token.Find("BS_AUTORADIOBUTTON")!=-1)|| + (token.Find("BS_RADIOBUTTON")!=-1)) + ParseRadioButton(label, varname); + else if (token.Find("BS_GROUPBOX")!=-1) + ParseGroupBox(label, varname); + else // if ((token.Find("BS_PUSHBUTTON")!=-1)|| +// (token.Find("BS_DEFPUSHBUTTON")!=-1)) + ParsePushButton(label, varname); // make default case } - void rc2xml::WriteSize(int width, int height) { wxString msg; @@ -713,11 +799,15 @@ void rc2xml::WriteStyle(wxString style) LISTBOX IDC_LIST1,16,89,48,40,LBS_SORT | LBS_MULTIPLESEL | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP */ -void rc2xml::ParseListBox() +void rc2xml::ParseListBox(wxString varname) { wxString token; - wxString varname; - varname=GetToken(); + token=PeekToken(); + while (!token.IsNumber()) + { + token=GetToken(); + token=PeekToken(); + } int x,y,width,height; ReadRect(x,y,width,height); @@ -811,7 +901,7 @@ void rc2xml::SecondPass() while (!m_done) { token=GetToken(); - if (token=="DIALOG") + if ((token=="DIALOG")||(token=="DIALOGEX")) ParseDialog(prevtok); else if (token=="MENU") ParseMenu(prevtok); @@ -855,7 +945,7 @@ void rc2xml::ParseToolBar(wxString varname) int c=0; wxString buttonname,msg,tip,longhelp; token=GetToken(); - while ((token!="BEGIN")) + while ((token!="BEGIN")&(token!="{")) token=GetToken(); while ((token!="END")&(token!="}")) @@ -905,7 +995,7 @@ void rc2xml::ParseStringTable(wxString varname) { wxString token; token=GetToken(); - while ((token!="BEGIN")) + while ((token!="BEGIN")&(token!="{")) token=GetToken(); token=GetToken(); wxString *msg; @@ -913,7 +1003,7 @@ void rc2xml::ParseStringTable(wxString varname) while ((token!="END")&(token!="}")) { msg=new wxString; - *msg=GetQuoteField(); + *msg=GetStringQuote(); m_stringtable->Append(token,msg); token=GetToken(); } @@ -969,7 +1059,8 @@ void rc2xml::ParseMenuItem() m_xmlfile.Write(">\n"); WriteLabel(token); //Look up help if any listed in stringtable - if (LookUpString(name,msg)) +//can't assume numbers correlate, restrict to string identifiers + if ((!name.IsNumber())&&(LookUpString(name,msg))) { SplitHelp(msg,tip,longhelp); m_xmlfile.Write("\t\t\t" @@ -978,9 +1069,11 @@ void rc2xml::ParseMenuItem() //look for extra attributes like checked and break wxString ptoken; ptoken=PeekToken(); + ptoken.MakeUpper(); while ((ptoken!="MENUITEM")&(ptoken!="POPUP")&(ptoken!="END")) { token=GetToken(); + ptoken.MakeUpper(); if (token=="CHECKED") m_xmlfile.Write("\t\t\t1\n"); else if (token=="MENUBREAK"); @@ -990,6 +1083,7 @@ void rc2xml::ParseMenuItem() wxLogError("Unknown Menu Item token:"+token); ptoken=PeekToken(); + ptoken.MakeUpper(); } m_xmlfile.Write("\t\t\t\n"); @@ -1000,6 +1094,10 @@ void rc2xml::ParseIconStatic() { wxString token; wxString varname,iconname; + token = PeekToken(); + if (token.Contains("\"")) + iconname = GetQuoteField(); + else iconname=GetToken(); //Look up icon varname=GetToken(); @@ -1046,8 +1144,7 @@ void rc2xml::ParseStaticBitmap(wxString bitmapname, wxString varname) { wxString token; //Grab SS_BITMAP - token=GetToken(); - + ReadOrs(token); int x,y,width,height; @@ -1085,6 +1182,23 @@ kindctrl.MakeUpper(); ParseCtrlButton(label,varname); if (kindctrl=="RICHEDIT") ParseRichEdit(label,varname); + if (kindctrl=="STATIC") + { + wxString token; + int p=m_rc.Tell(); + ReadOrs(token); + m_rc.Seek(p); + if (token.Find("SS_BITMAP")!=-1) + ParseStaticBitmap(label,varname); + else + ParseStaticText(label,varname); + } + if (kindctrl=="EDIT") + ParseTextCtrl(varname); + if (kindctrl=="LISTBOX") + ParseListBox(varname); + if (kindctrl=="COMBOBOX") + ParseComboBox(varname); } diff --git a/contrib/utils/convertrc/rc2xml.h b/contrib/utils/convertrc/rc2xml.h index 184a8dadfb..0b53937bff 100644 --- a/contrib/utils/convertrc/rc2xml.h +++ b/contrib/utils/convertrc/rc2xml.h @@ -52,19 +52,20 @@ protected: void ParseRichEdit(wxString label, wxString varname); void ParseDialog(wxString dlgname); void ParseControls(); - void ParseListBox(); - void ParseStaticText(); - void ParseTextCtrl(); - void ParseRadioButton(); - void ParseCheckBox(); - void ParsePushButton(); + 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); bool Seperator(int ch); - void ParseGroupBox(); + void ParseGroupBox(wxString phrase, wxString varname); bool ReadRect(int & x, int & y, int & width, int & height); wxString GetToken(bool *listseperator = 0); wxString GetQuoteField(); + wxString GetStringQuote(); void ReadChar(int &ch); - void ParseComboBox(); + void ParseComboBox(wxString varname); void ParseMenu(wxString varname); void ParsePopupMenu(); wxString PeekToken(); @@ -92,4 +93,4 @@ protected: }; -#endif \ No newline at end of file +#endif diff --git a/contrib/utils/convertrc/wxr2xml.h b/contrib/utils/convertrc/wxr2xml.h index dd699e7e2a..8692f9c8b9 100644 --- a/contrib/utils/convertrc/wxr2xml.h +++ b/contrib/utils/convertrc/wxr2xml.h @@ -8,6 +8,9 @@ #include #include "wx/resource.h" +#if !wxUSE_WX_RESOURCES +#error "convertc requires wxUSE_WX_RESOURCES" +#endif // wxUSE_WX_RESOURCES class wxr2xml : public wxObject { diff --git a/contrib/utils/wxrc/Makefile.in b/contrib/utils/wxrc/Makefile.in index 9685e6f172..b20802bbb0 100644 --- a/contrib/utils/wxrc/Makefile.in +++ b/contrib/utils/wxrc/Makefile.in @@ -9,7 +9,7 @@ PROGRAM=wxrc OBJECTS=wxrc.o -APPEXTRALIBS=$(top_builddir)/lib/libwxxrc.@WX_TARGET_LIBRARY_TYPE@ +APPEXTRALIBS=$(top_builddir)/lib/lib@WX_LIBRARY_BASENAME@_xrc-@WX_RELEASE@.@WX_TARGET_LIBRARY_TYPE@ APPEXTRADEFS=-I$(top_srcdir)/contrib/include include $(top_builddir)/src/makeprog.env diff --git a/contrib/utils/wxrc/makefile.wat b/contrib/utils/wxrc/makefile.wat index 4a5d318872..ac1ff9c3fa 100644 --- a/contrib/utils/wxrc/makefile.wat +++ b/contrib/utils/wxrc/makefile.wat @@ -4,10 +4,12 @@ # WXDIR = $(%WXWIN) +EXTRACPPFLAGS = -I$(WXDIR)\contrib\include +THISDIR = $(WXDIR)\contrib\utils\wxrc PROGRAM = wxrc -EXTRALIBS = $(WXDIR)\lib\wxxrc.lib -OBJECTS = $(PROGRAM).obj +EXTRALIBS = $(WXDIR)\lib\wxxrc_w.lib +OBJECTS = $(OUTPUTDIR)\$(PROGRAM).obj !include $(WXDIR)\src\makeprog.wat diff --git a/contrib/utils/wxrc/wxRcVC.dsp b/contrib/utils/wxrc/wxRcVC.dsp index 24ae29e1e7..915af870df 100644 --- a/contrib/utils/wxrc/wxRcVC.dsp +++ b/contrib/utils/wxrc/wxRcVC.dsp @@ -110,7 +110,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw233d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/wxrc.exe" /pdbtype:sept /libpath:"..\..\..\lib" +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw24d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/wxrc.exe" /pdbtype:sept /libpath:"..\..\..\lib" !ELSEIF "$(CFG)" == "wxRcVC - Win32 Release DLL" @@ -137,7 +137,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw233.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/wxrc.exe" /libpath:"..\..\..\lib" +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw24.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/wxrc.exe" /libpath:"..\..\..\lib" !ENDIF diff --git a/contrib/utils/wxrc/wxrc.cpp b/contrib/utils/wxrc/wxrc.cpp index 23b27952a7..a6e5ab1a01 100644 --- a/contrib/utils/wxrc/wxrc.cpp +++ b/contrib/utils/wxrc/wxrc.cpp @@ -29,6 +29,7 @@ #include "wx/cmdline.h" #include "wx/xrc/xml.h" #include "wx/ffile.h" +#include "wx/filename.h" #include "wx/wfstream.h" @@ -84,18 +85,18 @@ int XmlResApp::OnRun() { static const wxCmdLineEntryDesc cmdLineDesc[] = { - { wxCMD_LINE_SWITCH, "h", "help", "show help message", + { wxCMD_LINE_SWITCH, _T("h"), _T("help"), _T("show help message"), wxCMD_LINE_VAL_NONE, wxCMD_LINE_OPTION_HELP }, - { wxCMD_LINE_SWITCH, "v", "verbose", "be verbose" }, - { wxCMD_LINE_SWITCH, "c", "cpp-code", "output C++ source rather than .rsc file" }, - { wxCMD_LINE_SWITCH, "p", "python-code", "output wxPython source rather than .rsc file" }, - { wxCMD_LINE_SWITCH, "g", "gettext", "output list of translatable strings (to stdout or file if -o used)" }, - { wxCMD_LINE_OPTION, "n", "function", "C++/Python function name (with -c or -p) [InitXmlResource]" }, - { wxCMD_LINE_OPTION, "o", "output", "output file [resource.xrs/cpp]" }, + { wxCMD_LINE_SWITCH, _T("v"), _T("verbose"), _T("be verbose") }, + { wxCMD_LINE_SWITCH, _T("c"), _T("cpp-code"), _T("output C++ source rather than .rsc file") }, + { wxCMD_LINE_SWITCH, _T("p"), _T("python-code"), _T("output wxPython source rather than .rsc file") }, + { wxCMD_LINE_SWITCH, _T("g"), _T("gettext"), _T("output list of translatable strings (to stdout or file if -o used)") }, + { wxCMD_LINE_OPTION, _T("n"), _T("function"), _T("C++/Python function name (with -c or -p) [InitXmlResource]") }, + { wxCMD_LINE_OPTION, _T("o"), _T("output"), _T("output file [resource.xrs/cpp]") }, #if 0 // not yet implemented - { wxCMD_LINE_OPTION, "l", "list-of-handlers", "output list of neccessary handlers to this file" }, + { wxCMD_LINE_OPTION, _T("l"), _T("list-of-handlers", _T("output list of neccessary handlers to this file" }, #endif - { wxCMD_LINE_PARAM, NULL, NULL, "input file(s)", + { wxCMD_LINE_PARAM, NULL, NULL, _T("input file(s)"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_MULTIPLE | wxCMD_LINE_OPTION_MANDATORY }, @@ -139,30 +140,33 @@ int XmlResApp::OnRun() void XmlResApp::ParseParams(const wxCmdLineParser& cmdline) { - flagGettext = cmdline.Found("g"); - flagVerbose = cmdline.Found("v"); - flagCPP = cmdline.Found("c"); - flagPython = cmdline.Found("p"); + flagGettext = cmdline.Found(_T("g")); + flagVerbose = cmdline.Found(_T("v")); + flagCPP = cmdline.Found(_T("c")); + flagPython = cmdline.Found(_T("p")); - if (!cmdline.Found("o", &parOutput)) + if (!cmdline.Found(_T("o"), &parOutput)) { if (flagGettext) parOutput = wxEmptyString; else { if (flagCPP) - parOutput = "resource.cpp"; + parOutput = _T("resource.cpp"); else if (flagPython) - parOutput = "resource.py"; + parOutput = _T("resource.py"); else - parOutput = "resource.xrs"; + parOutput = _T("resource.xrs"); } } + wxFileName fn(parOutput); + fn.Normalize(); + parOutput = fn.GetFullPath(); parOutputPath = wxPathOnly(parOutput); - if (!parOutputPath) parOutputPath = "."; + if (!parOutputPath) parOutputPath = _T("."); - if (!cmdline.Found("n", &parFuncname)) - parFuncname = "InitXmlResource"; + if (!cmdline.Found(_T("n"), &parFuncname)) + parFuncname = _T("InitXmlResource"); for (size_t i = 0; i < cmdline.GetParamCount(); i++) parFiles.Add(cmdline.GetParam(i)); @@ -194,19 +198,19 @@ void XmlResApp::CompileRes() wxString XmlResApp::GetInternalFileName(const wxString& name, const wxArrayString& flist) { wxString name2 = name; - name2.Replace(":", "_"); - name2.Replace("/", "_"); - name2.Replace("\\", "_"); - name2.Replace("*", "_"); - name2.Replace("?", "_"); + name2.Replace(_T(":"), _T("_")); + name2.Replace(_T("/"), _T("_")); + name2.Replace(_T("\\"), _T("_")); + name2.Replace(_T("*"), _T("_")); + name2.Replace(_T("?"), _T("_")); - wxString s = wxFileNameFromPath(parOutput) + "$" + name2; + wxString s = wxFileNameFromPath(parOutput) + _T("$") + name2; if (wxFileExists(s) && flist.Index(s) == wxNOT_FOUND) { for (int i = 0;; i++) { - s.Printf(wxFileNameFromPath(parOutput) + "$%03i-" + name2, i); + s.Printf(wxFileNameFromPath(parOutput) + _T("$%03i-") + name2, i); if (!wxFileExists(s) || flist.Index(s) != wxNOT_FOUND) break; } @@ -221,13 +225,13 @@ wxArrayString XmlResApp::PrepareTempFiles() for (size_t i = 0; i < parFiles.Count(); i++) { if (flagVerbose) - wxPrintf("processing " + parFiles[i] + "...\n"); + wxPrintf(_T("processing ") + parFiles[i] + _T("...\n")); wxXmlDocument doc; if (!doc.Load(parFiles[i])) { - wxLogError("Error parsing file " + parFiles[i]); + wxLogError(_T("Error parsing file ") + parFiles[i]); retCode = 1; continue; } @@ -239,54 +243,85 @@ wxArrayString XmlResApp::PrepareTempFiles() wxString internalName = GetInternalFileName(parFiles[i], flist); - doc.Save(parOutputPath + "/" + internalName); + doc.Save(parOutputPath + wxFILE_SEP_PATH + internalName); flist.Add(internalName); } return flist; } +// Does 'node' contain filename information at all? +static bool NodeContainsFilename(wxXmlNode *node) +{ + // Any bitmaps: + if (node->GetName() == _T("bitmap")) + return TRUE; + + // URLs in wxHtmlWindow: + if (node->GetName() == _T("url")) + return TRUE; + + // wxBitmapButton: + wxXmlNode *parent = node->GetParent(); + if (parent != NULL && + parent->GetPropVal(_T("class"), _T("")) == _T("wxBitmapButton") && + (node->GetName() == _T("focus") || + node->GetName() == _T("disabled") || + node->GetName() == _T("selected"))) + return TRUE; + + // wxBitmap or wxIcon toplevel resources: + if (node->GetName() == _T("object")) + { + wxString klass = node->GetPropVal(_T("class"), wxEmptyString); + if (klass == _T("wxBitmap") || klass == _T("wxIcon")) + return TRUE; + } + + return FALSE; +} // find all files mentioned in structure, e.g. filename void XmlResApp::FindFilesInXML(wxXmlNode *node, wxArrayString& flist, const wxString& inputPath) { - wxXmlNode *n = node; - if (n == NULL) return; - n = n->GetChildren(); - + // Is 'node' XML node element? + if (node == NULL) return; + if (node->GetType() != wxXML_ELEMENT_NODE) return; + + bool containsFilename = NodeContainsFilename(node); + + wxXmlNode *n = node->GetChildren(); while (n) { - if ((node->GetType() == wxXML_ELEMENT_NODE) && - // parent is an element, i.e. has subnodes... + if (containsFilename && (n->GetType() == wxXML_TEXT_NODE || - n->GetType() == wxXML_CDATA_SECTION_NODE) && - // ...it is textnode... - ((node/*not n!*/->GetName() == "bitmap") || - (node/*not n!*/->GetName() == "url"))) - // ...and known to contain filename + n->GetType() == wxXML_CDATA_SECTION_NODE)) { wxString fullname; - if (wxIsAbsolutePath(n->GetContent()) || inputPath == "") fullname = n->GetContent(); - else fullname = inputPath + "/" + n->GetContent(); + if (wxIsAbsolutePath(n->GetContent()) || inputPath.empty()) + fullname = n->GetContent(); + else + fullname = inputPath + wxFILE_SEP_PATH + n->GetContent(); if (flagVerbose) - wxPrintf("adding " + fullname + "...\n"); - + wxPrintf(_T("adding ") + fullname + _T("...\n")); + wxString filename = GetInternalFileName(n->GetContent(), flist); n->SetContent(filename); - flist.Add(filename); + if (flist.Index(filename) == wxNOT_FOUND) + flist.Add(filename); wxFileInputStream sin(fullname); - wxFileOutputStream sout(parOutputPath + "/" + filename); + wxFileOutputStream sout(parOutputPath + wxFILE_SEP_PATH + filename); sin.Read(sout); // copy the stream } - + // subnodes: if (n->GetType() == wxXML_ELEMENT_NODE) FindFilesInXML(n, flist, inputPath); - + n = n->GetNext(); } } @@ -296,7 +331,7 @@ void XmlResApp::FindFilesInXML(wxXmlNode *node, wxArrayString& flist, const wxSt void XmlResApp::DeleteTempFiles(const wxArrayString& flist) { for (size_t i = 0; i < flist.Count(); i++) - wxRemoveFile(parOutputPath + "/" + flist[i]); + wxRemoveFile(parOutputPath + wxFILE_SEP_PATH + flist[i]); } @@ -306,17 +341,22 @@ void XmlResApp::MakePackageZIP(const wxArrayString& flist) wxString files; for (size_t i = 0; i < flist.Count(); i++) - files += flist[i] + " "; + files += flist[i] + _T(" "); files.RemoveLast(); if (flagVerbose) - wxPrintf("compressing " + parOutput + "...\n"); + wxPrintf(_T("compressing ") + parOutput + _T("...\n")); - if (wxExecute("zip -9 -j " + wxString(flagVerbose ? "" : "-q ") + - parOutput + " " + files, TRUE) == -1) + wxString cwd = wxGetCwd(); + wxSetWorkingDirectory(parOutputPath); + int execres = wxExecute(_T("zip -9 -j ") + + wxString(flagVerbose ? _T("") : _T("-q ")) + + parOutput + _T(" ") + files, TRUE); + wxSetWorkingDirectory(cwd); + if (execres == -1) { - wxLogError("Unable to execute zip program. Make sure it is in the path."); - wxLogError("You can download it at http://www.cdrom.com/pub/infozip/"); + wxLogError(_T("Unable to execute zip program. Make sure it is in the path.")); + wxLogError(_T("You can download it at http://www.cdrom.com/pub/infozip/")); retCode = 1; return; } @@ -333,9 +373,9 @@ static wxString FileToCppArray(wxString filename, int num) wxFFile file(filename, "rb"); size_t lng = file.Length(); - snum.Printf("%i", num); - output.Printf("static size_t xml_res_size_" + snum + " = %i;\n", lng); - output += "static unsigned char xml_res_file_" + snum + "[] = {\n"; + snum.Printf(_T("%i"), num); + output.Printf(_T("static size_t xml_res_size_") + snum + _T(" = %i;\n"), lng); + output += _T("static unsigned char xml_res_file_") + snum + _T("[] = {\n"); // we cannot use string literals because MSVC is dumb wannabe compiler // with arbitrary limitation to 2048 strings :( @@ -344,12 +384,12 @@ static wxString FileToCppArray(wxString filename, int num) for (size_t i = 0, linelng = 0; i < lng; i++) { - tmp.Printf("%i", buffer[i]); - if (i != 0) output << ','; + tmp.Printf(_T("%i"), buffer[i]); + if (i != 0) output << _T(','); if (linelng > 70) { linelng = 0; - output << "\n"; + output << _T("\n"); } output << tmp; linelng += tmp.Length()+1; @@ -357,7 +397,7 @@ static wxString FileToCppArray(wxString filename, int num) delete[] buffer; - output += "};\n\n"; + output += _T("};\n\n"); return output; } @@ -369,61 +409,62 @@ void XmlResApp::MakePackageCPP(const wxArrayString& flist) size_t i; if (flagVerbose) - wxPrintf("creating C++ source file " + parOutput + "...\n"); + wxPrintf(_T("creating C++ source file ") + parOutput + _T("...\n")); - file.Write("\ -//\n\ -// This file was automatically generated by wxrc, do not edit by hand.\n\ -//\n\n\ -#include \n\ -\n\ -#ifdef __BORLANDC__\n\ - #pragma hdrstop\n\ -#endif\n\ -\n\ -#ifndef WX_PRECOMP\n\ - #include \n\ -#endif\n\ -\ -#include \n\ -#include \n\ -#include \n\ -#include \n\ -\n"); + file.Write(_T("") +_T("//\n") +_T("// This file was automatically generated by wxrc, do not edit by hand.\n") +_T("//\n\n") +_T("#include \n") +_T("\n") +_T("#ifdef __BORLANDC__\n") +_T(" #pragma hdrstop\n") +_T("#endif\n") +_T("\n") +_T("#ifndef WX_PRECOMP\n") +_T(" #include \n") +_T("#endif\n") +_T("") +_T("#include \n") +_T("#include \n") +_T("#include \n") +_T("#include \n") +_T("\n")); for (i = 0; i < flist.Count(); i++) - file.Write(FileToCppArray(flist[i], i)); + file.Write( + FileToCppArray(parOutputPath + wxFILE_SEP_PATH + flist[i], i)); - file.Write("\ -void " + parFuncname + "()\n\ -{\n\ -\n\ - // Check for memory FS. If not present, load the handler:\n\ - {\n\ - wxMemoryFSHandler::AddFile(\"XRC_resource/dummy_file\", \"dummy one\");\n\ - wxFileSystem fsys;\n\ - wxFSFile *f = fsys.OpenFile(\"memory:XRC_resource/dummy_file\");\n\ - wxMemoryFSHandler::RemoveFile(\"XRC_resource/dummy_file\");\n\ - if (f) delete f;\n\ - else wxFileSystem::AddHandler(new wxMemoryFSHandler);\n\ - }\n\ -\n"); + file.Write(_T("") +_T("void ") + parFuncname + wxT("()\n") +_T("{\n") +_T("\n") +_T(" // Check for memory FS. If not present, load the handler:\n") +_T(" {\n") +_T(" wxMemoryFSHandler::AddFile(wxT(\"XRC_resource/dummy_file\"), wxT(\"dummy one\"));\n") +_T(" wxFileSystem fsys;\n") +_T(" wxFSFile *f = fsys.OpenFile(wxT(\"memory:XRC_resource/dummy_file\"));\n") +_T(" wxMemoryFSHandler::RemoveFile(wxT(\"XRC_resource/dummy_file\"));\n") +_T(" if (f) delete f;\n") +_T(" else wxFileSystem::AddHandler(new wxMemoryFSHandler);\n") +_T(" }\n") +_T("\n")); for (i = 0; i < flist.Count(); i++) { wxString s; - s.Printf(" wxMemoryFSHandler::AddFile(\"XRC_resource/" + flist[i] + - "\", xml_res_file_%i, xml_res_size_%i);\n", i, i); + s.Printf(_T(" wxMemoryFSHandler::AddFile(wxT(\"XRC_resource/") + flist[i] + + _T("\"), xml_res_file_%i, xml_res_size_%i);\n"), i, i); file.Write(s); } for (i = 0; i < parFiles.Count(); i++) { - file.Write(" wxXmlResource::Get()->Load(\"memory:XRC_resource/" + - GetInternalFileName(parFiles[i], flist) + "\");\n"); + file.Write(_T(" wxXmlResource::Get()->Load(wxT(\"memory:XRC_resource/") + + GetInternalFileName(parFiles[i], flist) + _T("\"));\n")); } - file.Write("}\n"); + file.Write(_T("}\n")); } @@ -436,8 +477,8 @@ static wxString FileToPythonArray(wxString filename, int num) wxFFile file(filename, "rb"); size_t lng = file.Length(); - snum.Printf("%i", num); - output = " xml_res_file_" + snum + " = \"\"\"\\\n"; + snum.Printf(_T("%i"), num); + output = _T(" xml_res_file_") + snum + _T(" = \"\"\"\\\n"); unsigned char *buffer = new unsigned char[lng]; file.Read(buffer, lng); @@ -451,15 +492,15 @@ static wxString FileToPythonArray(wxString filename, int num) linelng = 0; } else if (c < 32 || c > 127) - tmp.Printf("\\x%02x", c); + tmp.Printf(_T("\\x%02x"), c); else if (c == '\\') - tmp = "\\\\"; + tmp = _T("\\\\"); else tmp = (wxChar)c; if (linelng > 70) { linelng = 0; - output << "\\\n"; + output << _T("\\\n"); } output << tmp; linelng += tmp.Length(); @@ -467,7 +508,7 @@ static wxString FileToPythonArray(wxString filename, int num) delete[] buffer; - output += "\"\"\"\n\n"; + output += _T("\"\"\"\n\n"); return output; } @@ -479,26 +520,27 @@ void XmlResApp::MakePackagePython(const wxArrayString& flist) size_t i; if (flagVerbose) - wxPrintf("creating Python source file " + parOutput + "...\n"); + wxPrintf(_T("creating Python source file ") + parOutput + _T("...\n")); file.Write( - "#\n" - "# This file was automatically generated by wxrc, do not edit by hand.\n" - "#\n\n" - "from wxPython.wx import *\n" - "from wxPython.xrc import *\n\n" + _T("#\n") + _T("# This file was automatically generated by wxrc, do not edit by hand.\n") + _T("#\n\n") + _T("from wxPython.wx import *\n") + _T("from wxPython.xrc import *\n\n") ); - file.Write("def " + parFuncname + "():\n"); + file.Write(_T("def ") + parFuncname + _T("():\n")); for (i = 0; i < flist.Count(); i++) - file.Write(FileToPythonArray(flist[i], i)); + file.Write( + FileToPythonArray(parOutputPath + wxFILE_SEP_PATH + flist[i], i)); for (i = 0; i < flist.Count(); i++) { wxString s; - s.Printf(" wxXmlResource_Get().LoadFromString(xml_res_file_%i)\n", i); + s.Printf(_T(" wxXmlResource_Get().LoadFromString(xml_res_file_%i)\n"), i); file.Write(s); } } @@ -511,7 +553,7 @@ void XmlResApp::OutputGettext() wxFFile fout; if (!parOutput) fout.Attach(stdout); - else fout.Open(parOutput, _T("wt")); + else fout.Open(parOutput, "wt"); for (size_t i = 0; i < str.GetCount(); i++) fout.Write(_T("_(\"") + str[i] + _T("\");\n")); @@ -528,12 +570,12 @@ wxArrayString XmlResApp::FindStrings() for (size_t i = 0; i < parFiles.Count(); i++) { if (flagVerbose) - wxPrintf("processing " + parFiles[i] + "...\n"); + wxPrintf(_T("processing ") + parFiles[i] + _T("...\n")); wxXmlDocument doc; if (!doc.Load(parFiles[i])) { - wxLogError("Error parsing file " + parFiles[i]); + wxLogError(_T("Error parsing file ") + parFiles[i]); retCode = 1; continue; } @@ -567,7 +609,13 @@ static wxString ConvertText(const wxString& str) case wxT('\n') : str2 << wxT("\\n"); break; case wxT('\t') : str2 << wxT("\\t"); break; case wxT('\r') : str2 << wxT("\\r"); break; - case wxT('\\') : str2 << wxT("\\\\"); break; + case wxT('\\') : if ((*(dt+1) != 'n') && + (*(dt+1) != 't') && + (*(dt+1) != 'r')) + str2 << wxT("\\\\"); + else + str2 << wxT("\\"); + break; case wxT('"') : str2 << wxT("\\\""); break; default : str2 << *dt; break; } diff --git a/contrib/utils/wxrcedit/Makefile.in b/contrib/utils/wxrcedit/Makefile.in index 8f84122ee3..7fef156197 100644 --- a/contrib/utils/wxrcedit/Makefile.in +++ b/contrib/utils/wxrcedit/Makefile.in @@ -25,7 +25,7 @@ DATAFILES = df/break.df df/control.df df/menu_item.df df/notebookpage.df \ df/wxStaticLine.df df/wxStaticText.df df/wxTextCtrl.df \ df/wxToolBar.df df/wxTreeCtrl.df -APPEXTRALIBS=$(top_builddir)/lib/libwxxrc.@WX_TARGET_LIBRARY_TYPE@ +APPEXTRALIBS=$(top_builddir)/lib/lib@WX_LIBRARY_BASENAME@_xrc-@WX_RELEASE@.@WX_TARGET_LIBRARY_TYPE@ APPEXTRADEFS=-I$(top_srcdir)/contrib/include include $(top_builddir)/src/makeprog.env diff --git a/contrib/utils/wxrcedit/editor.cpp b/contrib/utils/wxrcedit/editor.cpp index affbc9e01b..d6b7c22f90 100644 --- a/contrib/utils/wxrcedit/editor.cpp +++ b/contrib/utils/wxrcedit/editor.cpp @@ -92,7 +92,7 @@ void wxXmlRcEditDocument::Upgrade() UpgradeNode(node); } node->DeleteProperty(wxT("version")); - node->AddProperty(wxT("version"), wxT(WX_XMLRES_CURRENT_VERSION_STRING)); + node->AddProperty(wxT("version"), WX_XMLRES_CURRENT_VERSION_STRING); } @@ -341,6 +341,12 @@ void EditorFrame::NewFile() m_FileName = ""; m_Resource = new wxXmlRcEditDocument; m_Resource->SetRoot(new wxXmlNode(wxXML_ELEMENT_NODE, _("resource"))); + m_Resource->SetFileEncoding("utf-8"); +#if !wxUSE_UNICODE + m_Resource->SetEncoding(wxLocale::GetSystemEncodingName()); +#endif + m_Resource->GetRoot()->AddProperty(_T("version"), + WX_XMLRES_CURRENT_VERSION_STRING); m_Modified = FALSE; RefreshTree(); @@ -482,20 +488,19 @@ void EditorFrame::OnTreeSel(wxTreeEvent& event) if (node) PropertiesFrame::Get()->ShowProps(node); - if (m_TreeCtrl->GetParent(event.GetItem()) == m_TreeCtrl->GetRootItem()) + if (m_TreeCtrl->GetItemParent(event.GetItem()) == m_TreeCtrl->GetRootItem()) { wxTreeItemId it = event.GetOldItem(); if (it.IsOk() && m_TreeCtrl->GetRootItem() != it) { - while (m_TreeCtrl->GetParent(it) != m_TreeCtrl->GetRootItem()) - it = m_TreeCtrl->GetParent(it); + while (m_TreeCtrl->GetItemParent(it) != m_TreeCtrl->GetRootItem()) + it = m_TreeCtrl->GetItemParent(it); m_TreeCtrl->Collapse(it); } RecursivelyExpand(m_TreeCtrl, event.GetItem()); - PreviewFrame::Get()->Preview(node,m_Resource->GetRoot()->GetPropVal( - wxT("version"), wxT("0.0.0.0"))); + PreviewFrame::Get()->Preview(node,m_Resource); } } @@ -509,8 +514,7 @@ void EditorFrame::OnToolbar(wxCommandEvent& event) { XmlTreeData* dt = (XmlTreeData*)m_TreeCtrl->GetItemData(m_TreeCtrl->GetSelection());; if (dt != NULL && dt->Node != NULL) - PreviewFrame::Get()->Preview(dt->Node,m_Resource->GetRoot()->GetPropVal( - wxT("version"), wxT("0.0.0.0"))); + PreviewFrame::Get()->Preview(dt->Node, m_Resource); break; } @@ -559,7 +563,7 @@ void EditorFrame::OnToolbar(wxCommandEvent& event) void EditorFrame::DeleteSelectedNode() { XmlTreeData *dt = (XmlTreeData*) - (m_TreeCtrl->GetItemData(m_TreeCtrl->GetParent(m_TreeCtrl->GetSelection()))); + (m_TreeCtrl->GetItemData(m_TreeCtrl->GetItemParent(m_TreeCtrl->GetSelection()))); wxXmlNode *n = (dt) ? dt->Node : NULL; m_SelectedNode->GetParent()->RemoveChild(m_SelectedNode); @@ -575,7 +579,7 @@ void EditorFrame::OnNewNode(wxCommandEvent& event) { XmlTreeData *pardt = (XmlTreeData*)(m_TreeCtrl->GetItemData( - m_TreeCtrl->GetParent(m_TreeCtrl->GetSelection()))); + m_TreeCtrl->GetItemParent(m_TreeCtrl->GetSelection()))); if (pardt && pardt->Node && pardt->Node != m_Resource->GetRoot()) { @@ -679,7 +683,7 @@ void EditorFrame::OnRightClickTree(wxPoint pos) XmlTreeData *pardt = (XmlTreeData*)(m_TreeCtrl->GetItemData( - m_TreeCtrl->GetParent(m_TreeCtrl->GetSelection()))); + m_TreeCtrl->GetItemParent(m_TreeCtrl->GetSelection()))); if (pardt && pardt->Node && pardt->Node != m_Resource->GetRoot()) { wxXmlNode *nd = pardt->Node; @@ -744,7 +748,7 @@ void EditorFrame::OnClipboardAction(wxCommandEvent& event) { XmlTreeData *pardt = (XmlTreeData*)(m_TreeCtrl->GetItemData( - m_TreeCtrl->GetParent(m_TreeCtrl->GetSelection()))); + m_TreeCtrl->GetItemParent(m_TreeCtrl->GetSelection()))); if (pardt && pardt->Node && pardt->Node != m_Resource->GetRoot()) { diff --git a/contrib/utils/wxrcedit/makefile.wat b/contrib/utils/wxrcedit/makefile.wat index 00a62ff36b..40d5f88bf9 100644 --- a/contrib/utils/wxrcedit/makefile.wat +++ b/contrib/utils/wxrcedit/makefile.wat @@ -4,10 +4,22 @@ # WXDIR = $(%WXWIN) +EXTRACPPFLAGS = -I$(WXDIR)\contrib\include +THISDIR = $(WXDIR)\contrib\utils\wxrcedit PROGRAM = wxrcedit -EXTRALIBS = $(WXDIR)\lib\wxxrc.lib -OBJECTS=edapp.obj editor.obj nodehnd.obj xmlhelpr.obj preview.obj nodesdb.obj pe_basic.obj pe_adv.obj propedit.obj propframe.obj splittree.obj +EXTRALIBS = $(WXDIR)\lib\wxxrc_w.lib +OBJECTS=$(OUTPUTDIR)\edapp.obj & + $(OUTPUTDIR)\editor.obj & + $(OUTPUTDIR)\nodehnd.obj & + $(OUTPUTDIR)\xmlhelpr.obj & + $(OUTPUTDIR)\preview.obj & + $(OUTPUTDIR)\nodesdb.obj & + $(OUTPUTDIR)\pe_basic.obj & + $(OUTPUTDIR)\pe_adv.obj & + $(OUTPUTDIR)\propedit.obj & + $(OUTPUTDIR)\propframe.obj & + $(OUTPUTDIR)\splittree.obj !include $(WXDIR)\src\makeprog.wat diff --git a/contrib/utils/wxrcedit/pe_basic.cpp b/contrib/utils/wxrcedit/pe_basic.cpp index 876c4f80fe..0b017f5904 100644 --- a/contrib/utils/wxrcedit/pe_basic.cpp +++ b/contrib/utils/wxrcedit/pe_basic.cpp @@ -172,7 +172,7 @@ class PropEditCtrlCoordXY : public PropEditCtrlInt wxString prev = XmlReadValue(GetNode(), m_PropInfo->Name); if (prev[prev.Len()-1] == _T('d')) s << _T('d'); XmlWriteValue(GetNode(), m_PropInfo->Name, s); - m_TreeCtrl->SetItemBold(m_TreeCtrl->GetParent(m_TreeItem), TRUE); + m_TreeCtrl->SetItemBold(m_TreeCtrl->GetItemParent(m_TreeItem), TRUE); } virtual wxString GetValueAsText(wxTreeItemId ti) @@ -228,7 +228,7 @@ class PropEditCtrlCoordDlg : public PropEditCtrlBool wxString s = XmlReadValue(GetNode(), m_PropInfo->Name).BeforeFirst(_T('d')); if (m_Choice->GetSelection() == 1) s << _T('d'); XmlWriteValue(GetNode(), m_PropInfo->Name, s); - m_TreeCtrl->SetItemBold(m_TreeCtrl->GetParent(m_TreeItem), TRUE); + m_TreeCtrl->SetItemBold(m_TreeCtrl->GetItemParent(m_TreeItem), TRUE); } virtual wxString GetValueAsText(wxTreeItemId ti) @@ -309,7 +309,7 @@ class PropEditCtrlDimX : public PropEditCtrlInt s = m_c; if (dlg) s << _T('d'); XmlWriteValue(GetNode(), m_PropInfo->Name, s); - m_TreeCtrl->SetItemBold(m_TreeCtrl->GetParent(m_TreeItem), TRUE); + m_TreeCtrl->SetItemBold(m_TreeCtrl->GetItemParent(m_TreeItem), TRUE); } virtual wxString GetValueAsText(wxTreeItemId ti) diff --git a/contrib/utils/wxrcedit/preview.cpp b/contrib/utils/wxrcedit/preview.cpp index ddf3be2b61..a7ffa2eacd 100644 --- a/contrib/utils/wxrcedit/preview.cpp +++ b/contrib/utils/wxrcedit/preview.cpp @@ -140,8 +140,10 @@ void PreviewFrame::MakeDirty() -void PreviewFrame::Preview(wxXmlNode *node,const wxString &version) +void PreviewFrame::Preview(wxXmlNode *node, wxXmlDocument *orig_doc) { + wxString version = orig_doc->GetRoot()->GetPropVal(wxT("version"), wxT("0.0.0.0")); + while (node->GetParent()->GetParent() != NULL) node = node->GetParent(); { @@ -150,6 +152,7 @@ void PreviewFrame::Preview(wxXmlNode *node,const wxString &version) root->AddProperty(new wxXmlProperty(wxT("version"),version,NULL)); doc.SetRoot(root); doc.GetRoot()->AddChild(new wxXmlNode(*node)); + doc.SetFileEncoding(orig_doc->GetFileEncoding()); if (XmlGetClass(doc.GetRoot()->GetChildren()) == _T("wxDialog")) XmlSetClass(doc.GetRoot()->GetChildren(), _T("wxPanel")); @@ -168,7 +171,7 @@ void PreviewFrame::Preview(wxXmlNode *node,const wxString &version) } m_Node = node; - m_Version = version; + m_Doc = orig_doc; m_LogCtrl->Clear(); wxLogTextCtrl mylog(m_LogCtrl); @@ -237,5 +240,5 @@ END_EVENT_TABLE() void PreviewFrame::OnMouseEnter(wxMouseEvent& event) { - if (m_Dirty) Preview(m_Node,m_Version); + if (m_Dirty) Preview(m_Node,m_Doc); } diff --git a/contrib/utils/wxrcedit/preview.h b/contrib/utils/wxrcedit/preview.h index abacbc1578..50b690a9df 100644 --- a/contrib/utils/wxrcedit/preview.h +++ b/contrib/utils/wxrcedit/preview.h @@ -31,7 +31,7 @@ class PreviewFrame : public wxFrame PreviewFrame(); ~PreviewFrame(); - void Preview(wxXmlNode *node,const wxString &version); + void Preview(wxXmlNode *node,wxXmlDocument *doc); void MakeDirty(); // current node updated, needs preview refresh // (will be done once mouse enters preview win) @@ -47,7 +47,7 @@ class PreviewFrame : public wxFrame private: static PreviewFrame *ms_Instance; wxXmlNode *m_Node; - wxString m_Version; + wxXmlDocument *m_Doc; wxScrolledWindow *m_ScrollWin; wxTextCtrl *m_LogCtrl; wxSplitterWindow *m_Splitter; diff --git a/contrib/utils/wxrcedit/wxRcEditVC.dsp b/contrib/utils/wxrcedit/wxRcEditVC.dsp index eddeaab732..0ee42679e5 100644 --- a/contrib/utils/wxrcedit/wxRcEditVC.dsp +++ b/contrib/utils/wxrcedit/wxRcEditVC.dsp @@ -110,7 +110,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw233d.lib wxxrcd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/wxrcedit.exe" /pdbtype:sept /libpath:"..\..\..\lib" +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw24d.lib wxxrcd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/wxrcedit.exe" /pdbtype:sept /libpath:"..\..\..\lib" !ELSEIF "$(CFG)" == "wxRcEditVC - Win32 Release DLL" @@ -137,7 +137,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw233.lib wxxrc.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/wxrcedit.exe" /libpath:"..\..\..\lib" +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw24.lib wxxrc.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/wxrcedit.exe" /libpath:"..\..\..\lib" !ENDIF diff --git a/debian/README.Debian b/debian/README.Debian index 84b7479015..1075a65747 100644 --- a/debian/README.Debian +++ b/debian/README.Debian @@ -27,12 +27,12 @@ wxwin-i18n message catalogs for native language support The following three can be built from the source package with the mingw32 cross compiler, but are not currently distributed by Debian. If you feel that should change, - please file a bug against the wxwindows2.2 package, or + please file a bug against the wxwindows2.4 package, or append your views to a report already there if you're not the first to do so. [ you can check the current state of affairs at: - http://bugs.debian.org/cgi-bin/pkgreport.cgi?pkg=wxwindows2.2 ] + http://bugs.debian.org/cgi-bin/pkgreport.cgi?pkg=wxwindows2.4 ] Oh and, please do *not* file bug reports for these packages to the Debian bts. But do feel free to email me personally @@ -44,7 +44,9 @@ libwxbase-msw-dev mingw32-cross wxBase libs. libwxbase-msw-dbg mingw32-cross wxBase (debug) libs. wxwin-headers-msw extra headers needed for wxMSW. -libwxgtk-univ wxUniversal for Gtk. +libwxgtk-univ wxUniversal for Gtk. NOTE this package is obsolete + and will be replaced by wxX11 and wxX11-univ at + some future time. -- Ron Lee , Sun, 13 Feb 2000 18:40:00 +1030 diff --git a/debian/changelog b/debian/changelog index f50761b210..99a4915d83 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,103 @@ +wxwindows2.4 (2.4.0.8) unstable; urgency=low + + * The "I wish people would read the existing discussion about new releases + before posting 'reminder' bugs" release. Closes: #189144 + * Moved back to using png2. gtk1 forces that on anything using it and + gtk2 support is still too flakey both in wx and dependent apps for + us to entertain it in a stable release. This is a *really* messed + up situation for anyone trying to maintain a development machine. + Thank the png and gtk theme people if its a pain in your ass too. + Closes: #186779 + * Add real package options to the gl build deps. Closes: #182210 + * Really fix the XRCed problem, unlike 2.4.0.7 ; ) Closes: #183712 + + -- Ron Lee Tue, 15 Apr 2003 18:42:54 -0700 + +wxwindows2.4 (2.4.0.3) unstable; urgency=low + + * Changed Conflict to Replaces so people can use 2.4 -dev before all + their 2.3 deps are gone. Closes: #178305 + * Added wxPy supplied 2.3 distutils to the source package, apparently the + standard 2.2 one is now insufficient. This hopefully Closes: #178457 + + -- Ron Lee Mon, 27 Jan 2003 17:36:59 -0800 + +wxwindows2.4 (2.4.0.2) unstable; urgency=low + + * Added missing quantize.h to install. Closes: #178135 + * Removed unnecessary -dev deps. + * move wxwin.m4 &c out of the runtime package and conflict with earlier + versions that didn't. Also nuke some empty dir cruft that slipped by. + Thanks for noticing the latter Josip. Closes: #176033 + * dinstall won't close bugs from earlier unreleased versions :( + see below for explanations. Closes: #162948, #171258, #168148 + Closes: #170748, #168250, #164557, #172390, #172447, #168887 + Closes: #155476, #155478 + + -- Ron Lee Thu, 16 Jan 2003 16:46:31 -0800 + +wxwindows2.4 (2.4.0) unstable; urgency=low + + * The fingers crossed release. + * de.po typo fix. Closes: #174084 + * tr.po stable tree patch. Closes: #174667 + * Add a manpage for the wxPython scripts pointing to the pydoc docs. + * Disabled generation of gtk-univ, it is a rather insensible combination + now and should be replaced by x11-univ instead. + * There had to be some payoff to all the delays -- a clean gcc3.2 + transition :-) This package certainly obsoletes 2.3.3.2 and I'll + be seeking to finally have 2.2.9.2 removed as well once Audacity + is updated. + + -- Ron Lee Thu, 19 Dec 2002 00:50:48 -0800 + +wxwindows2.3 (2.3.4.1) unstable; urgency=low + + * 2.4.0pre1 I guess. + * Added -ffunction-sections for broken hppa linker. Closes: #162948 + * Conflict/Replace wxPython2.2. Since its nmu these two packages + can no longer currently coexist. Closes: #171258 + * xrced.py path search fixed. Closes: #168148, #170748 + * Actually install all wxUniv headers to the header package. + Closes: #168250, #164557 + * Robin tells me this one should be fixed in 2.3 too, I can't confirm + so please reopen if it's not. Closes: #172390 + * Added menu items for pycrust/pyshell, thanks Martin. Closes: #172447 + * Broken header fixed. Closes: #168887 + + -- Ron Lee Mon, 18 Nov 2002 18:54:21 -0800 + +wxwindows2.3 (2.3.3.2) unstable; urgency=low + + * The one more for luck release. + * Debian-wise, it fixes the problem with contrib lib name clashes; + code-wise, lots of little issues (and a couple of big 'uns) from + 2.3.3 -- see the more regular change or cvs logs for details... + * Yes, it's still the unstable branch, yes the request for testing + to see if we can reasonably obsolete 2.2 in post-woody debian + is still current, and yes we're still working toward a stable + 2.4 release as fast as we can. Big thanks to everyone who's + been patient and/or active fixing things. + + -- Ron Lee Thu, 26 Sep 2002 17:43:05 -0700 + +wxwindows2.3 (2.3.3.1) unstable; urgency=low + + * Ok, Robin says wxPython is good to go. + * Since wx2.2 has crashed and burned with the new releases of + python and png, Could package maintainers with packages that + depend on wx please recompile with this package and let me + know if they still need 2.2 in woody? If not I'll have them + removed. There should be a 2.4 release following very soon. + (hah, let's see how the date on that comment testifies!) + * Yes, I know wxpython is missing man pages for some of its + scripts. File a bug if you must, but preferably, if you know + what they do, attach a patch containing one. I don't use them + myself or could even do more than guess what they do today. + Sorry, C++. + + -- Ron Lee Thu, 19 Sep 2002 16:25:12 -0700 + wxwindows2.3 (2.3.3) unstable; urgency=low * The "If it sucks, You whined for it!" release. diff --git a/debian/control.in b/debian/control.in index 3d02a9e5f0..319f8850ee 100644 --- a/debian/control.in +++ b/debian/control.in @@ -1,9 +1,9 @@ Source: wxwindows=V Section: libs Priority: optional -Build-Depends: debhelper (>=2.0), flex, bison, gettext, libgtk1.2-dev, python (>=2.2), python (<<2.3), python2.2-dev, zlib1g-dev, libjpeg62-dev, libpng3-dev, libtiff3g-dev, libgl-dev, libesd0-dev +Build-Depends: debhelper (>=2.0), flex, bison, gettext, libgtk1.2-dev, python (>=2.2), python (<<2.3), python2.2-dev, zlib1g-dev, libjpeg62-dev, libpng2-dev, libtiff3g-dev, xlibmesa-gl-dev | libgl-dev, xlibmesa-glu-dev | libglu-dev, libesd0-dev Maintainer: Ron Lee -Standards-Version: 3.5.7.0 +Standards-Version: 3.5.9.0 Package: libwxbase=V Architecture: any @@ -15,17 +15,17 @@ Description: wxBase library (runtime) - non-GUI support classes of wxWindows too portable wrappers around many OS-specific functions allowing to build the same program under all supported folders, wxThread class for writing multithreaded programs using either Win32 or POSIX threads and much more. - wxBase currently supports the following platforms: Generic Unix (Linux, FreeBSD, - Solaris, HP-UX, ...), win32, and BeOS. + wxBase currently supports the following platforms: Generic Unix (Linux, + FreeBSD, Solaris, HP-UX, ...), win32, and BeOS. . - This package is only useful for non-gui apps. It offers a subset of the - classes in libwx_gtk=V for use in console apps and daemons. It is currently - under development and may not be as stable as the gui version. + This package is only useful for non-GUI apps. It offers a subset of the + classes in libwx_gtk=V for use in console apps and daemons. You do not need + this package to build or use wxWindows GUI apps. Package: libwxbase=V-dev Architecture: any Section: devel -Depends: wxwin=V-headers (= ${Source-Version}), libwxbase=V (= ${Source-Version}), zlib1g-dev, libc6-dev +Depends: wxwin=V-headers (= ${Source-Version}), libwxbase=V (= ${Source-Version}), libc6-dev Suggests: wxwin=V-doc, gettext Conflicts: libwxbase-dev Replaces: libwxbase-dev @@ -36,10 +36,11 @@ Description: wxBase library (development) - non-GUI support classes of wxWindows portable wrappers around many OS-specific functions allowing to build the same program under all supported folders, wxThread class for writing multithreaded programs using either Win32 or POSIX threads and much more. - wxBase currently supports the following platforms: Generic Unix (Linux, FreeBSD, - Solaris, HP-UX, ...), win32, and BeOS. + wxBase currently supports the following platforms: Generic Unix (Linux, + FreeBSD, Solaris, HP-UX, ...), win32, and BeOS. . - This package provides the files needed to compile apps using the wxBase library. + This package provides the files needed to compile apps using the wxBase + library. Package: libwxbase=V-dbg Architecture: any @@ -55,8 +56,8 @@ Description: wxBase library (debug) - non-GUI support classes of wxWindows toolk portable wrappers around many OS-specific functions allowing to build the same program under all supported folders, wxThread class for writing multithreaded programs using either Win32 or POSIX threads and much more. - wxBase currently supports the following platforms: Generic Unix (Linux, FreeBSD, - Solaris, HP-UX, ...) win32, and BeOS. + wxBase currently supports the following platforms: Generic Unix (Linux, + FreeBSD, Solaris, HP-UX, ...) win32, and BeOS. . This package provides a debug version of the wxBase library. It is compiled both with -g for normal debugger tracing and with the __WXDEBUG__ flag which @@ -81,7 +82,7 @@ Description: wxWindows Cross-platform C++ GUI toolkit (GTK+ runtime) Package: libwxgtk=V-dev Architecture: any Section: devel -Depends: wxwin=V-headers (= ${Source-Version}), libwxgtk=V (= ${Source-Version}), libgtk1.2-dev, zlib1g-dev, libjpeg62-dev, libpng-dev, libtiff3g-dev, libc6-dev +Depends: wxwin=V-headers (= ${Source-Version}), libwxgtk=V (= ${Source-Version}), libc6-dev Suggests: wxwin=V-doc, libstdc++-dev, gettext, libgl-dev Conflicts: libwxgtk-dev Replaces: libwxgtk-dev, wxgtk2.1-dev @@ -116,17 +117,19 @@ Description: wxWindows Cross-platform C++ GUI toolkit (GTK+ development) Package: libwxgtk=V-python Architecture: any Section: interpreters -Depends: python (>=2.1), python (<<2.2), ${shlibs:Depends} -Suggests: wxwin=V-doc, wxwin=V-examples -Conflicts: libwxgtk=V-python-contrib, python-wxwin -Replaces: libwxgtk=V-python-contrib, python-wxwin +Depends: python (>=2.2), python (<<2.3), ${shlibs:Depends} +Suggests: wxwin=V-doc, wxwin=V-examples, python2.2-xml +Conflicts: libwxgtk-python, python-wxwin, libwxgtk2.2-python-contrib, libwxgtk2.2-python, libwxgtk2.3-python +Replaces: libwxgtk-python, python-wxwin, libwxgtk2.2-python-contrib, libwxgtk2.2-python, libwxgtk2.3-python +Provides: libwxgtk-python Description: wxWindows Cross-platform C++ GUI toolkit (wxPython binding) wxWindows is a class library for C++ providing GUI (Graphical User Interface) and other facilities on more than one platform. Version =V currently supports subsets of GTK+, Motif, and MS Windows. . This package provides a Python binding to the wxGTK library and it's - contrib libs. + contrib libs. If you wish to use xrced you'll also need the python-xml + package installed. Package: libwxgtk=V-contrib Architecture: any @@ -137,21 +140,7 @@ Description: wxWindows Cross-platform C++ GUI toolkit (runtime contrib libs) Interface) and other facilities on more than one platform. Version =V currently supports subsets of GTK+, Motif, and MS Windows. . - This package provides the contrib libs of the wxWindows source tree - (mmedia, ogl, stc) - -Package: libwxgtk=V-univ -Architecture: any -Section: libs -Depends: wxwin=V-headers (= ${Source-Version}), libwxgtk=V (= ${Source-Version}), libgtk1.2-dev, zlib1g-dev, libjpeg62-dev, libpng-dev, libtiff3g-dev, libc6-dev, ${shlibs:Depends} -Suggests: wxwin=V-doc, libstdc++-dev, gettext, libgl-dev -Description: wxWindows Cross-platform C++ GUI toolkit (wxUNIVERSAL widgets) - wxWindows is a class library for C++ providing GUI (Graphical User - Interface) and other facilities on more than one platform. Version =V - currently supports subsets of GTK+, Motif, and MS Windows. - . - This package is built to use the wxUNIVERSAL widget set instead of - native gtk widgets. + This package provides the contrib libs from the wxWindows source tree Package: libwxgtk=V-contrib-dev Architecture: any @@ -166,13 +155,13 @@ Description: wxWindows Cross-platform C++ GUI toolkit (development contrib libs) currently supports subsets of GTK+, Motif, and MS Windows. . Install this package if you wish to compile applications that use the - contrib libs from the wxWindows source tree (mmedia, ogl, stc) + contrib libs from the wxWindows source tree. Package: wxwin=V-headers Architecture: any Section: devel Conflicts: wxwin-headers -Replaces: wxwin-headers, wxgtk2.1-dev +Replaces: wxwin-headers, wxgtk2.1-dev, libwxgtk2.3 Provides: wxwin-headers Description: wxWindows Cross-platform C++ GUI toolkit (header files) wxWindows is a class library for C++ providing GUI (Graphical User @@ -215,7 +204,21 @@ Description: wxWindows Cross-platform C++ GUI toolkit (examples) Interface) and other facilities on more than one platform. Version =V currently supports subsets of GTK+, Motif, and MS Windows. . - This package contains examples of using the wxWindows toolkit. + This package contains examples of using the wxWindows toolkit in + C++ and with the wxPython language binding. + +Package: libwxgtk=V-univ +Architecture: any +Section: libs +Depends: wxwin=V-headers (= ${Source-Version}), libwxgtk=V (= ${Source-Version}), libc6-dev, ${shlibs:Depends} +Suggests: wxwin=V-doc, libstdc++-dev, gettext, libgl-dev +Description: wxWindows Cross-platform C++ GUI toolkit (wxUNIVERSAL widgets) + wxWindows is a class library for C++ providing GUI (Graphical User + Interface) and other facilities on more than one platform. Version =V + currently supports subsets of GTK+, Motif, and MS Windows. + . + This package is built to use the wxUNIVERSAL widget set instead of + native gtk widgets. Package: libwxbase-msw=V-dev Architecture: i386 diff --git a/debian/copyright b/debian/copyright index 55c8d06dfc..4000ca932d 100644 --- a/debian/copyright +++ b/debian/copyright @@ -29,7 +29,8 @@ alters the actual terms of the authorative licence detailed below, it is intended to be purely informative of the fact that the Debian binary packages will be built primarily with features useful to Free Software developers and may not be suitable "as is" for compiling software for distribution that is -licenced incompatibly with the LGPL. +licenced incompatibly with the LGPL. See /usr/share/common-licenses for +the full text of the LGPL. Modifications and additions to the Library itself are encouraged to be placed under the wxWindows Library Licence. We hope you find it useful. diff --git a/debian/libwxbase-dev.files b/debian/libwxbase-dev.files deleted file mode 100644 index 610ec6f1b3..0000000000 --- a/debian/libwxbase-dev.files +++ /dev/null @@ -1,4 +0,0 @@ -usr/bin/wxbase-=V-config -usr/lib/wx/include/base-=V/wx/setup.h -usr/lib/libwx_base*.so - diff --git a/debian/libwxbase.dirs b/debian/libwxbase.dirs index 99e2a10872..f5b3beeb43 100644 --- a/debian/libwxbase.dirs +++ b/debian/libwxbase.dirs @@ -1,3 +1,2 @@ -usr/bin usr/lib diff --git a/debian/libwxgtk-contrib-dev.files b/debian/libwxgtk-contrib-dev.files deleted file mode 100644 index c88f73cd31..0000000000 --- a/debian/libwxgtk-contrib-dev.files +++ /dev/null @@ -1,12 +0,0 @@ -usr/include/wx/ -usr/lib/libcanvas.so -usr/lib/libfl.so -usr/lib/libgizmos.so -usr/lib/libmmedia.so -usr/lib/libogl.so -usr/lib/libstc.so -usr/lib/libwx_dcsvg.so -usr/lib/libwx_net.so -usr/lib/libwx_plot.so -usr/lib/libwxxrc.so - diff --git a/debian/libwxgtk-dev.files b/debian/libwxgtk-dev.files deleted file mode 100644 index 17d4068a55..0000000000 --- a/debian/libwxgtk-dev.files +++ /dev/null @@ -1,4 +0,0 @@ -usr/bin/wxgtk-=V-config -usr/lib/wx/include/gtk-=V/wx/setup.h -usr/lib/libwx_gtk*.so - diff --git a/debian/libwxgtk-python.files b/debian/libwxgtk-python.files deleted file mode 100644 index 877efadf42..0000000000 --- a/debian/libwxgtk-python.files +++ /dev/null @@ -1,4 +0,0 @@ -usr/lib/=PY/site-packages/wxPython -usr/lib/libwxPyHelpers*.so -usr/lib/libwxPyHelpers*.so.* - diff --git a/debian/libwxgtk-python.menu b/debian/libwxgtk-python.menu new file mode 100644 index 0000000000..a5f8285fbc --- /dev/null +++ b/debian/libwxgtk-python.menu @@ -0,0 +1,7 @@ +?package(libwxgtk=V-python):needs=X11 section=Apps/Programming\ + title="pycrust" command="/usr/bin/pycrust" +?package(libwxgtk=V-python):needs=X11 section=Apps/Programming\ + title="pyshell" command="/usr/bin/pyshell" +?package(libwxgtk=V-python):needs=X11 section=Apps/Programming\ + title="xrced" command="/usr/bin/xrced" + diff --git a/debian/libwxgtk.dirs b/debian/libwxgtk.dirs index d578dd55f1..f7077cffb4 100644 --- a/debian/libwxgtk.dirs +++ b/debian/libwxgtk.dirs @@ -1,3 +1,2 @@ usr/lib -usr/share/wx/afm -usr/share/wx/gs_afm +usr/share diff --git a/debian/lintian-override b/debian/lintian-override index 400e87d66b..c74e5f84fd 100644 --- a/debian/lintian-override +++ b/debian/lintian-override @@ -1,4 +1,3 @@ -libwxgtk2.3-dbg: non-dev-pkg-with-shlib-symlink -libwxbase2.3-dbg: non-dev-pkg-with-shlib-symlink -libwxgtk2.3-univ: non-dev-pkg-with-shlib-symlink +libwxgtk2.4-dbg: non-dev-pkg-with-shlib-symlink +libwxbase2.4-dbg: non-dev-pkg-with-shlib-symlink diff --git a/debian/rules b/debian/rules index 03e582f943..67e79d075a 100755 --- a/debian/rules +++ b/debian/rules @@ -49,12 +49,15 @@ objdir_wxbase_debug=objs_wxbase_d objdir_gtk_shared=objs_gtk_sh objdir_gtk_static=objs_gtk_st objdir_gtk_debug=objs_gtk_d +objdir_gtk_install=objs_gtk_install +objdir_gtk_contrib_install=objs_gtk_contrib_install objdir_doc_cruft=objs_doc_con objdir_doc=docs/wxWindows-manual.html objdir_examples=docs/examples objdir_i18n=locale objdir_gtk_univ=objs_gtk_univ +objdir_univ_install=objs_univ_install objdir_wxbase_msw_shared=objs_wxbase_msw_sh objdir_wxbase_msw_static=objs_wxbase_msw_st @@ -64,10 +67,13 @@ objdir_msw_static=objs_msw_st objdir_msw_dbg=objs_msw_d objdirs=$(objdir_wxbase_shared) $(objdir_wxbase_static) $(objdir_wxbase_debug) \ - $(objdir_gtk_shared) $(objdir_gtk_static) $(objdir_gtk_debug) $(objdir_gtk_univ) \ - $(objdir_doc_cruft) $(objdir_doc) $(objdir_examples) \ - $(objdir_wxbase_msw_shared) $(objdir_wxbase_msw_static) $(objdir_wxbase_msw_dbg) \ - $(objdir_msw_shared) $(objdir_msw_static) $(objdir_msw_dbg) + $(objdir_gtk_shared) $(objdir_gtk_static) $(objdir_gtk_debug) \ + $(objdir_gtk_install) $(objdir_gtk_contrib_install) $(objdir_gtk_univ) \ + $(objdir_univ_install) $(objdir_doc_cruft) $(objdir_doc) \ + $(objdir_examples) \ + $(objdir_wxbase_msw_shared) $(objdir_wxbase_msw_static) \ + $(objdir_wxbase_msw_dbg) $(objdir_msw_shared) $(objdir_msw_static) \ + $(objdir_msw_dbg) # note that the i18n package is actually arch indep (once built) # but must be built (and installed) during the arch any phase as @@ -77,10 +83,12 @@ objdirs=$(objdir_wxbase_shared) $(objdir_wxbase_static) $(objdir_wxbase_debug) \ build_arch_stamps=build-wxbase-shared-stamp build-wxbase-static-stamp \ build-wxbase-debug-stamp build-gtk-shared-stamp \ build-gtk-static-stamp build-gtk-debug-stamp \ - build-gtk-univ-stamp \ build-contrib-shared-stamp build-contrib-static-stamp \ build-gtk-py-stamp build-i18n-stamp +# disable gtk-univ build, we'll replace it with x11-univ later. +# build-gtk-univ-stamp + build_indep_stamps=build-examples-stamp build-doc-stamp build_cross_stamps=build-wxbase-msw-shared-stamp build-wxbase-msw-static-stamp \ @@ -94,10 +102,12 @@ build_stamps=$(build_stamps_native) $(build_cross_stamps) # Install targets: install_all_arch=install-wxbase-lib install-wxbase-dev install-wxbase-dbg \ install-gtk-lib install-gtk-dev install-gtk-dbg \ - install-gtk-univ \ install-gtk-contrib install-gtk-contrib-dev install-gtk-py \ install-headers install-i18n +# disable gtk-univ build, we'll replace it with x11-univ later. +# install-gtk-univ + install_all_indep=install-examples install-doc install_all_cross=install-wxbase-msw-dev install-wxbase-msw-dbg install-msw-dev install-msw-dbg install-headers-msw @@ -123,7 +133,7 @@ control-files-stamp: debian/control echo "generating control file $(package_wxbase_lib).$$f"; \ cp debian/libwxbase.$$f debian/$(package_wxbase_lib).$$f; \ done; - @for f in dirs files links postinst prerm; do \ + @for f in dirs links postinst prerm; do \ echo "generating control file $(package_wxbase_dev).$$f"; \ sed -e 's/=V/$(release)/g' < debian/libwxbase-dev.$$f \ > debian/$(package_wxbase_dev).$$f; \ @@ -137,7 +147,7 @@ control-files-stamp: debian/control echo "generating control file $(package_gtk_lib).$$f"; \ cp debian/libwxgtk.$$f debian/$(package_gtk_lib).$$f; \ done; - @for f in dirs files links postinst prerm; do \ + @for f in dirs links postinst prerm; do \ echo "generating control file $(package_gtk_dev).$$f"; \ sed -e 's/=V/$(release)/g' < debian/libwxgtk-dev.$$f \ > debian/$(package_gtk_dev).$$f; \ @@ -147,12 +157,7 @@ control-files-stamp: debian/control sed -e 's/=V/$(release)/g' < debian/libwxgtk-dbg.$$f \ > debian/$(package_gtk_dbg).$$f; \ done; - @for f in dirs links postinst prerm; do \ - echo "generating control file $(package_gtk_univ).$$f"; \ - sed -e 's/=V/$(release)/g' < debian/libwxgtk-univ.$$f \ - > debian/$(package_gtk_univ).$$f; \ - done; - @for f in dirs docs files postinst prerm; do \ + @for f in dirs docs menu postinst prerm; do \ echo "generating control file $(package_gtk_py).$$f"; \ sed -e 's/=PY/$(python_dir)/g;s/=V/$(release)/g' < debian/libwxgtk-python.$$f \ > debian/$(package_gtk_py).$$f; \ @@ -161,15 +166,15 @@ control-files-stamp: debian/control echo "generating control file $(package_gtk_contrib).$$f"; \ cp debian/libwxgtk-contrib.$$f debian/$(package_gtk_contrib).$$f; \ done; - @for f in dirs files; do \ + @for f in dirs; do \ echo "generating control file $(package_gtk_contrib_dev).$$f"; \ cp debian/libwxgtk-contrib-dev.$$f debian/$(package_gtk_contrib_dev).$$f; \ done; - @for f in dirs files; do \ + @for f in dirs; do \ echo "generating control file $(package_headers).$$f"; \ cp debian/wxwin-headers.$$f debian/$(package_headers).$$f; \ done; - @for f in dirs files; do \ + @for f in dirs; do \ echo "generating control file $(package_i18n).$$f"; \ cp debian/wxwin-i18n.$$f debian/$(package_i18n).$$f; \ done; @@ -207,6 +212,11 @@ control-files-stamp: debian/control sed -e 's/=H/$(cross_host)/g' < debian/wxwin-headers-msw.$$f \ > debian/$(package_headers_msw).$$f; \ done; + @for f in dirs links postinst prerm; do \ + echo "generating control file $(package_gtk_univ).$$f"; \ + sed -e 's/=V/$(release)/g' < debian/libwxgtk-univ.$$f \ + > debian/$(package_gtk_univ).$$f; \ + done; touch $@ build_arch: control-files-stamp $(build_arch_stamps) @@ -221,7 +231,7 @@ build_all: control-files-stamp $(build_stamps_native) build: build_arch -build-wxbase-shared-stamp: +configure-wxbase-shared-stamp: dh_testdir mkdir -p $(objdir_wxbase_shared) cd $(objdir_wxbase_shared) \ @@ -229,11 +239,15 @@ build-wxbase-shared-stamp: --cache-file=$(config_cache) \ --disable-gui \ --enable-soname \ - --with-zlib=sys \ - && $(MAKE) + --with-zlib=sys touch $@ -build-wxbase-static-stamp: +build-wxbase-shared-stamp: configure-wxbase-shared-stamp + dh_testdir + cd $(objdir_wxbase_shared) && $(MAKE) + touch $@ + +configure-wxbase-static-stamp: dh_testdir mkdir -p $(objdir_wxbase_static) cd $(objdir_wxbase_static) \ @@ -241,11 +255,15 @@ build-wxbase-static-stamp: --cache-file=$(config_cache) \ --disable-gui \ --disable-shared \ - --with-zlib=sys \ - && $(MAKE) + --with-zlib=sys touch $@ -build-wxbase-debug-stamp: +build-wxbase-static-stamp: configure-wxbase-static-stamp + dh_testdir + cd $(objdir_wxbase_static) && $(MAKE) + touch $@ + +configure-wxbase-debug-stamp: dh_testdir mkdir -p $(objdir_wxbase_debug) cd $(objdir_wxbase_debug) \ @@ -254,11 +272,15 @@ build-wxbase-debug-stamp: --disable-gui \ --enable-debug \ --enable-soname \ - --with-zlib=sys \ - && $(MAKE) + --with-zlib=sys touch $@ -build-gtk-shared-stamp: +build-wxbase-debug-stamp: configure-wxbase-debug-stamp + dh_testdir + cd $(objdir_wxbase_debug) && $(MAKE) + touch $@ + +configure-gtk-shared-stamp: dh_testdir mkdir -p $(objdir_gtk_shared) cd $(objdir_gtk_shared) \ @@ -271,11 +293,15 @@ build-gtk-shared-stamp: --with-libjpeg=sys \ --with-libpng=sys \ --with-libtiff=sys \ - --enable-dynamic-loader \ - && $(MAKE) + --enable-dynamic-loader touch $@ -build-gtk-static-stamp: +build-gtk-shared-stamp: configure-gtk-shared-stamp + dh_testdir + cd $(objdir_gtk_shared) && $(MAKE) + touch $@ + +configure-gtk-static-stamp: dh_testdir mkdir -p $(objdir_gtk_static) cd $(objdir_gtk_static) \ @@ -288,11 +314,15 @@ build-gtk-static-stamp: --with-libjpeg=sys \ --with-libpng=sys \ --with-libtiff=sys \ - --enable-dynamic-loader \ - && $(MAKE) + --enable-dynamic-loader touch $@ -build-gtk-debug-stamp: +build-gtk-static-stamp: configure-gtk-static-stamp + dh_testdir + cd $(objdir_gtk_static) && $(MAKE) + touch $@ + +configure-gtk-debug-stamp: dh_testdir mkdir -p $(objdir_gtk_debug) cd $(objdir_gtk_debug) \ @@ -306,11 +336,15 @@ build-gtk-debug-stamp: --with-libjpeg=sys \ --with-libpng=sys \ --with-libtiff=sys \ - --enable-dynamic-loader \ - && $(MAKE) + --enable-dynamic-loader touch $@ -build-gtk-univ-stamp: +build-gtk-debug-stamp: configure-gtk-debug-stamp + dh_testdir + cd $(objdir_gtk_debug) && $(MAKE) + touch $@ + +configure-gtk-univ-stamp: dh_testdir mkdir -p $(objdir_gtk_univ) cd $(objdir_gtk_univ) \ @@ -324,8 +358,12 @@ build-gtk-univ-stamp: --with-libjpeg=sys \ --with-libpng=sys \ --with-libtiff=sys \ - --enable-dynamic-loader \ - && $(MAKE) + --enable-dynamic-loader + touch $@ + +build-gtk-univ-stamp: configure-gtk-univ-stamp + dh_testdir + cd $(objdir_gtk_univ) && $(MAKE) touch $@ build-contrib-shared-stamp: build-gtk-shared-stamp @@ -351,6 +389,7 @@ build-doc-stamp: build-gtk-shared-stamp dh_testdir cd $(objdir_gtk_shared)/utils/tex2rtf/src \ && $(MAKE) + rm -rf $(objdir_doc) mkdir $(objdir_doc) mkdir $(objdir_doc_cruft) cd $(objdir_doc_cruft) \ @@ -398,7 +437,7 @@ build-i18n-stamp: build-gtk-shared-stamp && $(MAKE) allmo touch $@ -build-wxbase-msw-shared-stamp: +configure-wxbase-msw-shared-stamp: dh_testdir mkdir -p $(objdir_wxbase_msw_shared) cd $(objdir_wxbase_msw_shared) \ @@ -406,11 +445,15 @@ build-wxbase-msw-shared-stamp: --cache-file=$(config_cache_cross) \ --host=$(cross_host) \ --build=$(cross_build) \ - --disable-gui \ - && $(MAKE) + --disable-gui touch $@ -build-wxbase-msw-static-stamp: +build-wxbase-msw-shared-stamp: configure-wxbase-msw-shared-stamp + dh_testdir + cd $(objdir_wxbase_msw_shared) && $(MAKE) + touch $@ + +configure-wxbase-msw-static-stamp: dh_testdir mkdir -p $(objdir_wxbase_msw_static) cd $(objdir_wxbase_msw_static) \ @@ -419,12 +462,16 @@ build-wxbase-msw-static-stamp: --host=$(cross_host) \ --build=$(cross_build) \ --disable-gui \ - --disable-shared \ - && $(MAKE) + --disable-shared + touch $@ + +build-wxbase-msw-static-stamp: configure-wxbase-msw-static-stamp + dh_testdir + cd $(objdir_wxbase_msw_static) && $(MAKE) touch $@ # Note this builds dll only, since wxmsw static debug is > 130MB ! -build-wxbase-msw-dbg-stamp: +configure-wxbase-msw-dbg-stamp: dh_testdir mkdir -p $(objdir_wxbase_msw_dbg) cd $(objdir_wxbase_msw_dbg) \ @@ -433,22 +480,30 @@ build-wxbase-msw-dbg-stamp: --host=$(cross_host) \ --build=$(cross_build) \ --disable-gui \ - --enable-debug \ - && $(MAKE) + --enable-debug touch $@ -build-msw-shared-stamp: +build-wxbase-msw-dbg-stamp: configure-wxbase-msw-dbg-stamp + dh_testdir + cd $(objdir_wxbase_msw_dbg) && $(MAKE) + touch $@ + +configure-msw-shared-stamp: dh_testdir mkdir -p $(objdir_msw_shared) cd $(objdir_msw_shared) \ && ../configure --prefix=/usr/$(cross_host) \ --cache-file=$(config_cache_cross) \ --host=$(cross_host) \ - --build=$(cross_build) \ - && $(MAKE) + --build=$(cross_build) touch $@ -build-msw-static-stamp: +build-msw-shared-stamp: configure-msw-shared-stamp + dh_testdir + cd $(objdir_msw_shared) && $(MAKE) + touch $@ + +configure-msw-static-stamp: dh_testdir mkdir -p $(objdir_msw_static) cd $(objdir_msw_static) \ @@ -456,11 +511,15 @@ build-msw-static-stamp: --cache-file=$(config_cache_cross) \ --host=$(cross_host) \ --build=$(cross_build) \ - --disable-shared \ - && $(MAKE) + --disable-shared touch $@ -build-msw-dbg-stamp: +build-msw-static-stamp: configure-msw-static-stamp + dh_testdir + cd $(objdir_msw_static) && $(MAKE) + touch $@ + +configure-msw-dbg-stamp: dh_testdir mkdir -p $(objdir_msw_dbg) cd $(objdir_msw_dbg) \ @@ -468,8 +527,12 @@ build-msw-dbg-stamp: --cache-file=$(config_cache_cross) \ --host=$(cross_host) \ --build=$(cross_build) \ - --enable-debug \ - && $(MAKE) + --enable-debug + touch $@ + +build-msw-dbg-stamp: configure-msw-dbg-stamp + dh_testdir + cd $(objdir_msw_dbg) && $(MAKE) touch $@ @@ -477,13 +540,12 @@ clean: debian/control dh_testdir dh_testroot - rm -rf config_deb.cache config_deb_cross.cache control-files-stamp $(build_stamps) $(objdirs) + rm -rf config_deb.cache config_deb_cross.cache *-stamp $(objdirs) rm -f docs/lgpl.txt rm -f docs/latex/wx/manual.bb rm -f $(objdir_i18n)/*.mo cd wxPython \ - && ./setup.py clean \ && rm -rf licence \ && rm -rf build \ && rm -rf contrib/gizmos/contrib \ @@ -492,6 +554,10 @@ clean: debian/control && rm -rf contrib/xrc/contrib \ && rm -rf *.pyc +# We do the equivalent of this above by removing build, unfortunately +# its not enough by itself to get the tree properly clean again. +# && ./setup.py clean + dh_clean rm -f debian/$(package_wxbase_lib).* rm -f debian/$(package_wxbase_dev).* @@ -499,7 +565,6 @@ clean: debian/control rm -f debian/$(package_gtk_lib).* rm -f debian/$(package_gtk_dev).* rm -f debian/$(package_gtk_dbg).* - rm -f debian/$(package_gtk_univ).* rm -f debian/$(package_gtk_py).* rm -f debian/$(package_gtk_contrib).* rm -f debian/$(package_gtk_contrib_dev).* @@ -507,6 +572,7 @@ clean: debian/control rm -f debian/$(package_i18n).* rm -f debian/$(package_doc).* rm -f debian/$(package_examples).* + rm -f debian/$(package_gtk_univ).* rm -f debian/$(package_wxbase_msw_dev).* rm -f debian/$(package_wxbase_msw_dbg).* rm -f debian/$(package_msw_dev).* @@ -523,17 +589,17 @@ install-wxbase-lib: build-wxbase-shared-stamp dh_testroot dh_clean -k dh_installdirs - cp -a $(objdir_wxbase_shared)/lib/* debian/$(package_wxbase_lib)/usr/lib - cp $(objdir_wxbase_shared)/wxbase-$(release)-config debian/$(package_wxbase_lib)/usr/bin/ + dh_install $(objdir_wxbase_shared)/lib/*.so.* usr/lib install-wxbase-dev: DH_OPTIONS=-p$(package_wxbase_dev) -install-wxbase-dev: build-wxbase-static-stamp install-wxbase-lib +install-wxbase-dev: build-wxbase-static-stamp dh_testdir dh_testroot dh_clean -k dh_installdirs - dh_movefiles --sourcedir=debian/$(package_wxbase_lib) - cp $(objdir_wxbase_static)/lib/*.a debian/$(package_wxbase_dev)/usr/lib + dh_install $(objdir_wxbase_shared)/wxbase-$(release)-config usr/bin + dh_install $(objdir_wxbase_shared)/lib/{wx,*.so} usr/lib + dh_install $(objdir_wxbase_static)/lib/*.a usr/lib install-wxbase-dbg: DH_OPTIONS=-p$(package_wxbase_dbg) install-wxbase-dbg: build-wxbase-debug-stamp @@ -541,28 +607,35 @@ install-wxbase-dbg: build-wxbase-debug-stamp dh_testroot dh_clean -k dh_installdirs - cp -a $(objdir_wxbase_debug)/lib/* debian/$(package_wxbase_dbg)/usr/lib - cp $(objdir_wxbase_debug)/wxbased-$(release)-config debian/$(package_wxbase_dbg)/usr/bin/ + dh_install $(objdir_wxbase_debug)/wxbased-$(release)-config usr/bin + dh_install $(objdir_wxbase_debug)/lib usr cp debian/lintian-override debian/$(package_wxbase_dbg)/usr/share/lintian/overrides/$(package_wxbase_dbg) +install-gtk-shared-stamp: + dh_testdir + mkdir -p $(objdir_gtk_install) + cd $(objdir_gtk_shared) \ + && $(MAKE) install prefix=`pwd`/../$(objdir_gtk_install) + touch $@ + install-gtk-lib: DH_OPTIONS=-p$(package_gtk_lib) -install-gtk-lib: build-gtk-shared-stamp +install-gtk-lib: build-gtk-shared-stamp install-gtk-shared-stamp dh_testdir dh_testroot dh_clean -k dh_installdirs - cd $(objdir_gtk_shared) \ - && $(MAKE) install prefix=`pwd`/../debian/$(package_gtk_lib)/usr - rm -f debian/$(package_gtk_lib)/usr/bin/wx-config + dh_install $(objdir_gtk_install)/share/wx usr/share + dh_install $(objdir_gtk_install)/lib/*.so.* usr/lib install-gtk-dev: DH_OPTIONS=-p$(package_gtk_dev) -install-gtk-dev: build-gtk-static-stamp install-gtk-lib +install-gtk-dev: build-gtk-static-stamp install-gtk-shared-stamp dh_testdir dh_testroot dh_clean -k dh_installdirs - dh_movefiles --sourcedir=debian/$(package_gtk_lib) - cp $(objdir_gtk_static)/lib/libwx_gtk*.a debian/$(package_gtk_dev)/usr/lib + dh_install $(objdir_gtk_install)/bin/wxgtk-$(release)-config usr/bin + dh_install $(objdir_gtk_install)/lib/{wx,*.so} usr/lib + dh_install $(objdir_gtk_static)/lib/libwx_gtk{-,_gl}*.a usr/lib install-gtk-dbg: DH_OPTIONS=-p$(package_gtk_dbg) install-gtk-dbg: build-gtk-debug-stamp @@ -570,8 +643,8 @@ install-gtk-dbg: build-gtk-debug-stamp dh_testroot dh_clean -k dh_installdirs - cp -a $(objdir_gtk_debug)/lib/* debian/$(package_gtk_dbg)/usr/lib - cp $(objdir_gtk_debug)/wxgtkd-$(release)-config debian/$(package_gtk_dbg)/usr/bin/ + dh_install $(objdir_gtk_debug)/wxgtkd-$(release)-config usr/bin + dh_install $(objdir_gtk_debug)/lib usr cp debian/lintian-override debian/$(package_gtk_dbg)/usr/share/lintian/overrides/$(package_gtk_dbg) install-gtk-univ: DH_OPTIONS=-p$(package_gtk_univ) @@ -580,28 +653,35 @@ install-gtk-univ: build-gtk-univ-stamp dh_testroot dh_clean -k dh_installdirs - cp -a $(objdir_gtk_univ)/lib/* debian/$(package_gtk_univ)/usr/lib - cp $(objdir_gtk_univ)/wxgtkuniv-$(release)-config debian/$(package_gtk_univ)/usr/bin/ + dh_install $(objdir_gtk_univ)/wxgtkuniv-$(release)-config usr/bin + dh_install $(objdir_gtk_univ)/lib usr cp debian/lintian-override debian/$(package_gtk_univ)/usr/share/lintian/overrides/$(package_gtk_univ) +install-gtk-contrib-stamp: + dh_testdir + mkdir -p $(objdir_gtk_contrib_install)/lib + cd $(objdir_gtk_shared)/contrib/src \ + && $(MAKE) install prefix=`pwd`/../../../$(objdir_gtk_contrib_install) + touch $@ + install-gtk-contrib: DH_OPTIONS=-p$(package_gtk_contrib) -install-gtk-contrib: build-contrib-shared-stamp +install-gtk-contrib: build-contrib-shared-stamp install-gtk-contrib-stamp dh_testdir dh_testroot dh_clean -k dh_installdirs - cd $(objdir_gtk_shared)/contrib/src \ - && $(MAKE) install prefix=`pwd`/../../../debian/$(package_gtk_contrib)/usr + dh_install $(objdir_gtk_contrib_install)/lib/*.so.* usr/lib install-gtk-contrib-dev: DH_OPTIONS=-p$(package_gtk_contrib_dev) -install-gtk-contrib-dev: build-contrib-static-stamp install-gtk-dev +install-gtk-contrib-dev: build-contrib-static-stamp install-gtk-contrib-stamp dh_testdir dh_testroot dh_clean -k dh_installdirs - dh_movefiles --sourcedir=debian/$(package_gtk_contrib) - cp $(objdir_gtk_static)/lib/*.a debian/$(package_gtk_contrib_dev)/usr/lib - rm -f debian/$(package_gtk_contrib_dev)/usr/lib/libwx_gtk*.a + dh_install $(objdir_gtk_contrib_install)/include usr + dh_install $(objdir_gtk_contrib_install)/lib/*.so usr/lib + dh_install -Xlibwx_gtk- -Xlibwx_gtk_gl- \ + $(objdir_gtk_static)/lib/*.a usr/lib install-gtk-py: DH_OPTIONS=-p$(package_gtk_py) install-gtk-py: build-gtk-py-stamp @@ -610,32 +690,52 @@ install-gtk-py: build-gtk-py-stamp dh_clean -k dh_installdirs cd wxPython \ - && ./setup.py install --prefix=`pwd`/../debian/$(package_gtk_py)/usr + && ./setup.py install \ + --prefix=`pwd`/../debian/$(package_gtk_py)/usr \ + WX_CONFIG='$(wxconfig)' find debian/$(package_gtk_py)/usr/lib/$(python_dir)/site-packages/wxPython \ -name '*.py?' -exec rm '{}' ';' + dh_installman debian/wxPython-tools.1 + dh_link usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/img2py.1 \ + usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/img2xpm.1 \ + usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/img2png.1 \ + usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/pycrust.1 \ + usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/pyshell.1 \ + usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/xrced.1 \ + usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/helpviewer.1 \ + usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/pycwrap.1 + #usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/pyalacarte.1 + #usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/pyalamode.1 + #usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/pywrap.1 + install-headers: DH_OPTIONS=-p$(package_headers) -install-headers: install-gtk-lib +install-headers: install-gtk-shared-stamp dh_testdir dh_testroot dh_clean -k dh_installdirs - dh_movefiles --sourcedir=debian/$(package_gtk_lib) - dh_installmanpages \ - ansi2knr.1 \ - jpegtran.1 \ - libpng.3 \ - libpngpf.3 \ - zlib.3 \ - png.5 + +# The only way to be really sure we get the univ headers correct is to install +# them. Do that in a scratch dirs, and move the gtk ones last, so at least +# they win in the result of any uncaught conflict. + +# cd $(objdir_gtk_univ) \ +# && $(MAKE) install prefix=`pwd`/../$(objdir_univ_install)/usr + +# dh_movefiles --sourcedir=$(objdir_univ_install) + dh_install $(objdir_gtk_install)/include usr + dh_install $(objdir_gtk_install)/share/aclocal usr/share + + dh_installman debian/wx-config.1 install-i18n: DH_OPTIONS=-p$(package_i18n) -install-i18n: build-i18n-stamp install-gtk-lib +install-i18n: build-i18n-stamp install-gtk-shared-stamp dh_testdir dh_testroot dh_clean -k dh_installdirs - dh_movefiles --sourcedir=debian/$(package_gtk_lib) + dh_install $(objdir_gtk_install)/share/locale usr/share install-doc: DH_OPTIONS=-p$(package_doc) install-doc: build-doc-stamp @@ -720,6 +820,7 @@ binary-common: dh_installdocs dh_installchangelogs dh_installexamples + dh_installmenu dh_link @# Don't strip debug libs at all, and strip cross libs elsewhere @@ -742,13 +843,13 @@ binary-common: # building the arch specific package files needed to create them. binary-indep: build_all install $(MAKE) -f debian/rules \ - DH_OPTIONS="-i -N$(package_wxbase_msw_dev) -N$(package_wxbase_msw_dbg) -N$(package_msw_dev) -N$(package_msw_dbg) -N$(package_headers_msw)" \ + DH_OPTIONS="-i -N$(package_wxbase_msw_dev) -N$(package_wxbase_msw_dbg) -N$(package_msw_dev) -N$(package_msw_dbg) -N$(package_headers_msw) -N$(package_gtk_univ)" \ binary-common # Build just the architecture-dependent files here. binary-arch: build_arch install_arch $(MAKE) -f debian/rules \ - DH_OPTIONS="-a -N$(package_wxbase_msw_dev) -N$(package_wxbase_msw_dbg) -N$(package_msw_dev) -N$(package_msw_dbg) -N$(package_headers_msw)" \ + DH_OPTIONS="-a -N$(package_wxbase_msw_dev) -N$(package_wxbase_msw_dbg) -N$(package_msw_dev) -N$(package_msw_dbg) -N$(package_headers_msw) -N$(package_gtk_univ)" \ binary-common # Build all packages target. diff --git a/debian/wx-config.1 b/debian/wx-config.1 index 72aeac5390..fd9f478c19 100644 --- a/debian/wx-config.1 +++ b/debian/wx-config.1 @@ -1,31 +1,31 @@ -.TH wx-config 1 "15 Feb 2000" "Debian GNU/Linux" "wxWindows 2.2" +.TH wx\-config 1 "15 Feb 2000" "Debian GNU/Linux" "wxWindows" .SH NAME -wx-config - generate compile time info for wxWindows +wx-config \- generate compile time info for wxWindows .SH SYNOPSIS .nh -.B wxbase-config +.B wxbase\-config .br -.B wxgtk-config +.B wxgtk\-config .HP -.B wx-config +.B wx\-config [\-\-version] [\-\-libs] [\-\-cflags] [\-\-cc] [\-\-cxx] [\-\-ld] [\-\-prefix\fI[=DIR]\fP] [\-\-exec\-prefix\fI[=DIR]\fP] .SH DESCRIPTION -\fIwx-config\fP is a tool to determine the compiler and linker +\fIwx\-config\fP is a tool to determine the compiler and linker flags required for applications using the \fIwxWindows\fP toolkit(s). .PP -\fIwx-config\fP is normally a symlink to one of the port-specific -versions like \fIwxbase-config\fP or \fIwxgtk-config\fP which +\fIwx\-config\fP is normally a symlink to one of the port\-specific +versions like \fIwxbase\-config\fP or \fIwxgtk\-config\fP which designates the default port to compile applications with. You can override this default either by using one of the specific versions directly, or by changing which version the symlink points to. On Debian systems this can be done using the -.BR update-alternatives (8) +.BR update\-alternatives (8) mechanism. .hy .SH OPTIONS .l -\fIwx-config\fP accepts the following options: +\fIwx\-config\fP accepts the following options: .TP 8 .B \-\-version What to @@ -58,7 +58,7 @@ before any \-\-libs or \-\-cflags options. .br .nh .HP -(Translation: this is the root path to the \fIwxWindows\fP headers -- [Ron]) +(Translation: this is the root path to the \fIwxWindows\fP headers \-\- [Ron]) .hy .TP 8 .B \-\-exec\-prefix=PREFIX @@ -69,18 +69,18 @@ and \-\-libs options. This option must be specified before any .br .nh .HP -(Translation: this is the root path to the \fIwxWindows\fP library -- [Ron]) +(Translation: this is the root path to the \fIwxWindows\fP library \-\- [Ron]) .hy .SH SEE ALSO -.BR gtk-config (1), -.BR update-alternatives (8) +.BR gtk\-config (1), +.BR update\-alternatives (8) .SH COPYRIGHT -This manpage was copied whole-heartedly from the \fBgtk-config\fP(1) manpage +This manpage was copied whole\-heartedly from the \fBgtk\-config\fP(1) manpage by Brian Bassett for the Debian GNU/Linux distribution of wxGTK. It was then updated to include new options and otherwise bastardised generally by Ron Lee -The original gtk-config manpage copyright: +The original gtk\-config manpage copyright: Copyright \(co 1995 Spencer Kimball and Peter Mattis diff --git a/debian/wxPython-tools.1 b/debian/wxPython-tools.1 new file mode 100644 index 0000000000..1f800ea42a --- /dev/null +++ b/debian/wxPython-tools.1 @@ -0,0 +1,27 @@ +.TH wxPython\-tools 1 "3 Jan 2003" "Debian GNU/Linux" "wxWindows" +.SH NAME +img2py \- wxPython tools. +.br +img2png \- wxPython tools. +.br +img2xpm \- wxPython tools. +.br +pycrust \- wxPython tools. +.br +pyshell \- wxPython tools. +.br +xrced \- wxPython tools. +.br +helpviewer \- wxPython tools. + +.SH DESCRIPTION +The real documentation for these tools is available in pydoc format. + +.SH SEE ALSO +.BR pydoc (1) + +.SH COPYRIGHT +This manpage was written by Ron Lee for the Debian GNU/Linux +distribution of wxWindows. It may be freely distributed by anyone insane enough +to find it useful. + diff --git a/debian/wxwin-headers.files b/debian/wxwin-headers.files deleted file mode 100644 index e3a60cecd2..0000000000 --- a/debian/wxwin-headers.files +++ /dev/null @@ -1 +0,0 @@ -usr/include/wx/ diff --git a/debian/wxwin-i18n.files b/debian/wxwin-i18n.files deleted file mode 100644 index 39825b2213..0000000000 --- a/debian/wxwin-i18n.files +++ /dev/null @@ -1,2 +0,0 @@ -/usr/share/locale/ - diff --git a/demos/bombs/bombs.cpp b/demos/bombs/bombs.cpp index 875e960073..26a1779409 100644 --- a/demos/bombs/bombs.cpp +++ b/demos/bombs/bombs.cpp @@ -40,7 +40,7 @@ bool AppClass::OnInit() level=IDM_EASY; BombsFrame = - new BombsFrameClass(NULL, "wxBombs", wxPoint(155, 165), wxSize(300, 300), wxMINIMIZE_BOX | wxSYSTEM_MENU | wxCAPTION); + new BombsFrameClass(NULL, _T("wxBombs"), wxPoint(155, 165), wxSize(300, 300), wxMINIMIZE_BOX | wxSYSTEM_MENU | wxCAPTION); int xmax=BombsFrame->BombsCanvas->field_width*BombsFrame->BombsCanvas->x_cell*X_UNIT; int ymax=BombsFrame->BombsCanvas->field_height*BombsFrame->BombsCanvas->y_cell*Y_UNIT; @@ -72,17 +72,17 @@ BombsFrameClass::BombsFrameClass(wxFrame *parent, const wxString& title, const w // Create a menu bar for the frame wxMenuBar *menuBar1 = new wxMenuBar; wxMenu *menu1 = new wxMenu; - menu1->Append(IDM_EXIT, "E&xit"); // , "Quit the program"); + menu1->Append(IDM_EXIT, _T("E&xit")); // , "Quit the program"); menu1->AppendSeparator(); - menu1->Append(IDM_ABOUT, "&About..."); // , "Infos on wxBombs"); - menuBar1->Append(menu1, "&File"); + menu1->Append(IDM_ABOUT, _T("&About...")); // , "Infos on wxBombs"); + menuBar1->Append(menu1, _T("&File")); wxMenu *menu2 = new wxMenu; - menu2->Append(IDM_RESTART, "&Restart"); // , "Clear the play field"); + menu2->Append(IDM_RESTART, _T("&Restart")); // , "Clear the play field"); menu2->AppendSeparator(); - menu2->Append(IDM_EASY, "&Easy", wxEmptyString, TRUE); // "10x10 play field", TRUE); - menu2->Append(IDM_MEDIUM, "&Medium", wxEmptyString, TRUE); // "15x15 play field", TRUE); - menu2->Append(IDM_DIFFICULT, "&Difficult", wxEmptyString, TRUE); // "25x20 play field", TRUE); - menuBar1->Append(menu2, "&Game"); + menu2->Append(IDM_EASY, _T("&Easy"), wxEmptyString, TRUE); // "10x10 play field", TRUE); + menu2->Append(IDM_MEDIUM, _T("&Medium"), wxEmptyString, TRUE); // "15x15 play field", TRUE); + menu2->Append(IDM_DIFFICULT, _T("&Difficult"), wxEmptyString, TRUE); // "25x20 play field", TRUE); + menuBar1->Append(menu2, _T("&Game")); SetMenuBar(menuBar1); menuBar=menuBar1; menuBar->Check(wxGetApp().level, TRUE); @@ -124,7 +124,7 @@ void BombsFrameClass::OnRestart(wxCommandEvent& event) void BombsFrameClass::OnAbout(wxCommandEvent& event) { - wxMessageBox("wxBombs (c) 1996 by P. Foggia\n", "About wxBombs"); + wxMessageBox(_T("wxBombs (c) 1996 by P. Foggia\n"), _T("About wxBombs")); } void BombsFrameClass::OnEasy(wxCommandEvent& event) @@ -162,7 +162,7 @@ BombsCanvasClass::BombsCanvasClass(wxFrame *parent, const wxPoint& pos, const wx dc.SetFont(font); long chw, chh; - char buf[]="M"; + wxChar buf[]=_T("M"); dc.GetTextExtent(buf, &chw, &chh); dc.SetFont(wxNullFont); diff --git a/demos/bombs/bombs.dsp b/demos/bombs/bombs.dsp index 6982b81d40..a905216eb3 100644 --- a/demos/bombs/bombs.dsp +++ b/demos/bombs/bombs.dsp @@ -45,17 +45,17 @@ RSC=rc.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W4 /O2 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /YX /FD /c -# ADD CPP /nologo /MD /W4 /O2 /I "../../include" /I "../../lib/mswdll" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D "_MT" /D wxUSE_GUI=1 /D "WXUSINGDLL" /YX /FD /I../../..\lib\mswdll /c +# ADD CPP /nologo /MD /W4 /O2 /I "..\..\include" /I "..\..\lib/mswdll" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D "_MT" /D wxUSE_GUI=1 /D "WXUSINGDLL" /YX /FD /I..\..\lib\mswdll /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 -# ADD BASE RSC /l 0x409 /i "../../../include" /d "NDEBUG" -# ADD RSC /l 0x409 /i "../../../include" /d "NDEBUG" +# ADD BASE RSC /l 0x409 /i "..\..\include" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\include" /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib /nologo /subsystem:windows /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib ../..\lib\wxmsw233.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib ..\..\lib\wxmsw24.lib /nologo /subsystem:windows /machine:I386 !ELSEIF "$(CFG)" == "bombs - Win32 Debug DLL" @@ -71,17 +71,17 @@ LINK32=link.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W4 /Zi /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /YX /FD /c -# ADD CPP /nologo /MDd /W4 /Zi /Od /I "../../include" /I "../../lib/mswdlld" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D "_MT" /D wxUSE_GUI=1 /D "__WXDEBUG__" /D WXDEBUG=1 /D "WXUSINGDLL" /YX /FD /I../../..\lib\mswdlld /c +# ADD CPP /nologo /MDd /W4 /Zi /Od /I "..\..\include" /I "..\..\lib/mswdlld" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D "_MT" /D wxUSE_GUI=1 /D "__WXDEBUG__" /D WXDEBUG=1 /D "WXUSINGDLL" /YX /FD /I..\..\lib\mswdlld /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 -# ADD BASE RSC /l 0x409 /i "../../../include" /d "_DEBUG" -# ADD RSC /l 0x409 /i "../../../include" /d "_DEBUG" +# ADD BASE RSC /l 0x409 /i "..\..\include" /d "_DEBUG" +# ADD RSC /l 0x409 /i "..\..\include" /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib ../..\lib\wxmsw233d.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib ..\..\lib\wxmsw24d.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept !ELSEIF "$(CFG)" == "bombs - Win32 Release" @@ -97,17 +97,17 @@ LINK32=link.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W4 /O2 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /YX /FD /c -# ADD CPP /nologo /MD /W4 /O2 /I "../../include" /I "../../lib/msw" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D "_MT" /D wxUSE_GUI=1 /YX /FD /I../../..\lib\msw /c +# ADD CPP /nologo /MD /W4 /O2 /I "..\..\include" /I "..\..\lib/msw" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D "_MT" /D wxUSE_GUI=1 /YX /FD /I..\..\lib\msw /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 -# ADD BASE RSC /l 0x409 /i "../../../include" /d "NDEBUG" -# ADD RSC /l 0x409 /i "../../../include" /d "NDEBUG" +# ADD BASE RSC /l 0x409 /i "..\..\include" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\include" /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib /nologo /subsystem:windows /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib ../..\lib\zlib.lib ../..\lib\regex.lib ../..\lib\png.lib ../..\lib\jpeg.lib ../..\lib\tiff.lib ../..\lib\wxmsw.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib ..\..\lib\zlib.lib ..\..\lib\regex.lib ..\..\lib\png.lib ..\..\lib\jpeg.lib ..\..\lib\tiff.lib ..\..\lib\wxmsw.lib /nologo /subsystem:windows /machine:I386 !ELSEIF "$(CFG)" == "bombs - Win32 Debug" @@ -123,17 +123,17 @@ LINK32=link.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W4 /Zi /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /YX /FD /c -# ADD CPP /nologo /MDd /W4 /Zi /Od /I "../../include" /I "../../lib/mswd" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D "_MT" /D wxUSE_GUI=1 /D "__WXDEBUG__" /D WXDEBUG=1 /YX /FD /I../../..\lib\mswd /c +# ADD CPP /nologo /MDd /W4 /Zi /Od /I "..\..\include" /I "..\..\lib/mswd" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D "_MT" /D wxUSE_GUI=1 /D "__WXDEBUG__" /D WXDEBUG=1 /YX /FD /I..\..\lib\mswd /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 -# ADD BASE RSC /l 0x409 /i "../../../include" /d "_DEBUG" -# ADD RSC /l 0x409 /i "../../../include" /d "_DEBUG" +# ADD BASE RSC /l 0x409 /i "..\..\include" /d "_DEBUG" +# ADD RSC /l 0x409 /i "..\..\include" /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib ../..\lib\zlibd.lib ../..\lib\regexd.lib ../..\lib\pngd.lib ../..\lib\jpegd.lib ../..\lib\tiffd.lib ../..\lib\wxmswd.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib ..\..\lib\zlibd.lib ..\..\lib\regexd.lib ..\..\lib\pngd.lib ..\..\lib\jpegd.lib ..\..\lib\tiffd.lib ..\..\lib\wxmswd.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept !ENDIF @@ -151,8 +151,7 @@ SOURCE=.\bombs.cpp SOURCE=.\bombs.rc # ADD BASE RSC /l 0x809 -# ADD RSC /l 0x809 /i "../../include" -# SUBTRACT RSC /i "../../../include" +# ADD RSC /l 0x809 /i "..\..\include" # End Source File # Begin Source File diff --git a/demos/bombs/bombs1.cpp b/demos/bombs/bombs1.cpp index 173bce2383..e884888349 100644 --- a/demos/bombs/bombs1.cpp +++ b/demos/bombs/bombs1.cpp @@ -33,15 +33,15 @@ /*---------------------------------------------------------------------*/ void BombsCanvasClass::DrawField(wxDC *dc, int xc1, int yc1, int xc2, int yc2) { int x,y,xmax,ymax; - char buf[2]; + wxChar buf[2]; long chw, chh; - wxColour *wxBlack = wxTheColourDatabase->FindColour("BLACK"); - wxColour *wxWhite = wxTheColourDatabase->FindColour("WHITE"); - wxColour *wxRed = wxTheColourDatabase->FindColour("RED"); - wxColour *wxBlue = wxTheColourDatabase->FindColour("BLUE"); - wxColour *wxGrey = wxTheColourDatabase->FindColour("LIGHT GREY"); - wxColour *wxGreen = wxTheColourDatabase->FindColour("GREEN"); + wxColour *wxBlack = wxTheColourDatabase->FindColour(_T("BLACK")); + wxColour *wxWhite = wxTheColourDatabase->FindColour(_T("WHITE")); + wxColour *wxRed = wxTheColourDatabase->FindColour(_T("RED")); + wxColour *wxBlue = wxTheColourDatabase->FindColour(_T("BLUE")); + wxColour *wxGrey = wxTheColourDatabase->FindColour(_T("LIGHT GREY")); + wxColour *wxGreen = wxTheColourDatabase->FindColour(_T("GREEN")); wxPen *blackPen = wxThePenList->FindOrCreatePen(*wxBlack, 1, wxSOLID); wxPen *redPen = wxThePenList->FindOrCreatePen(*wxRed, 1, wxSOLID); @@ -64,7 +64,7 @@ void BombsCanvasClass::DrawField(wxDC *dc, int xc1, int yc1, int xc2, int yc2) wxFont font= BOMBS_FONT; dc->SetFont(font); - buf[1]='\0'; + buf[1]=_T('\0'); for(x=xc1; x<=xc2; x++) for(y=yc1; y<=yc2; y++) { if (wxGetApp().Game.IsMarked(x,y)) @@ -72,7 +72,7 @@ void BombsCanvasClass::DrawField(wxDC *dc, int xc1, int yc1, int xc2, int yc2) dc->SetBrush(* greyBrush); dc->DrawRectangle( x*x_cell*X_UNIT, y*y_cell*Y_UNIT, x_cell*X_UNIT+1, y_cell*Y_UNIT+1); - *buf='M'; + *buf=_T('M'); if (!wxGetApp().Game.IsHidden(x,y) && wxGetApp().Game.IsBomb(x,y)) dc->SetTextForeground(*wxBlue); else @@ -102,7 +102,7 @@ void BombsCanvasClass::DrawField(wxDC *dc, int xc1, int yc1, int xc2, int yc2) dc->SetBrush(* redBrush); dc->DrawRectangle( x*x_cell*X_UNIT, y*y_cell*Y_UNIT, x_cell*X_UNIT+1, y_cell*Y_UNIT+1); - *buf='B'; + *buf=_T('B'); dc->SetTextForeground(* wxBlack); dc->SetTextBackground(* wxRed); dc->GetTextExtent(buf, &chw, &chh); @@ -123,11 +123,11 @@ void BombsCanvasClass::DrawField(wxDC *dc, int xc1, int yc1, int xc2, int yc2) dc->SetBrush(* whiteBrush); dc->DrawRectangle( x*x_cell*X_UNIT, y*y_cell*Y_UNIT, x_cell*X_UNIT+1, y_cell*Y_UNIT+1); - *buf = (wxGetApp().Game.Get(x,y) & BG_MASK) + '0'; + *buf = (wxGetApp().Game.Get(x,y) & BG_MASK) + _T('0'); dc->GetTextExtent(buf, &chw, &chh); switch(*buf) - { case '0': dc->SetTextForeground(* wxGreen); break; - case '1': dc->SetTextForeground(* wxBlue); break; + { case _T('0'): dc->SetTextForeground(* wxGreen); break; + case _T('1'): dc->SetTextForeground(* wxBlue); break; default: dc->SetTextForeground(* wxBlack); break; } dc->SetTextBackground(* wxWhite); @@ -140,9 +140,10 @@ void BombsCanvasClass::DrawField(wxDC *dc, int xc1, int yc1, int xc2, int yc2) dc->SetFont(wxNullFont); if (wxGetApp().BombsFrame) - { char buf[80]; - sprintf(buf, "%d bombs %d remaining cells", - wxGetApp().Game.GetBombs(), wxGetApp().Game.GetRemainingCells()); + { wxString buf; + buf.Printf(_T("%d bombs %d remaining cells"), + wxGetApp().Game.GetBombs(), + wxGetApp().Game.GetRemainingCells()); wxGetApp().BombsFrame->SetStatusText(buf, 0); } } @@ -172,7 +173,7 @@ void BombsCanvasClass::Uncover(int x, int y) if (wxGetApp().Game.IsBomb(x,y) || wxGetApp().Game.GetRemainingCells()==0) { wxBell(); if (!wxGetApp().Game.IsBomb(x,y)) - { wxMessageBox("Nice! You found all the bombs!", "wxWin Bombs", + { wxMessageBox(_T("Nice! You found all the bombs!"), _T("wxWin Bombs"), wxOK|wxCENTRE, wxGetApp().BombsFrame); } else // x,y is a bomb diff --git a/demos/bombs/makefile.bcc b/demos/bombs/makefile.bcc deleted file mode 100644 index 38896fc477..0000000000 --- a/demos/bombs/makefile.bcc +++ /dev/null @@ -1,19 +0,0 @@ -# -# File: makefile.bcc -# Author: Julian Smart -# Created: 1998 -# Updated: -# -# Builds a BC++ 16-bit sample - -!if "$(WXWIN)" == "" -!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx -!endif - -WXDIR = $(WXWIN) - -TARGET=bombs -OBJECTS=$(TARGET).obj bombs1.obj game.obj - -!include $(WXDIR)\src\makeprog.bcc - diff --git a/demos/bombs/makefile.wat b/demos/bombs/makefile.wat index 08562fa92a..a7ce420ae1 100644 --- a/demos/bombs/makefile.wat +++ b/demos/bombs/makefile.wat @@ -8,7 +8,7 @@ WXDIR = $(%WXWIN) PROGRAM = bombs -OBJECTS = $(PROGRAM).obj bombs1.obj game.obj +OBJECTS = $(OUTPUTDIR)\$(PROGRAM).obj $(OUTPUTDIR)\bombs1.obj $(OUTPUTDIR)\game.obj !include $(WXDIR)\src\makeprog.wat diff --git a/demos/dbbrowse/dbbrowse.dsp b/demos/dbbrowse/dbbrowse.dsp index af2e12d045..61645492d8 100644 --- a/demos/dbbrowse/dbbrowse.dsp +++ b/demos/dbbrowse/dbbrowse.dsp @@ -45,17 +45,17 @@ RSC=rc.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W4 /O2 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /YX /FD /c -# ADD CPP /nologo /MD /W4 /O2 /I "../../include" /I "../../lib/mswdll" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D "_MT" /D wxUSE_GUI=1 /D "WXUSINGDLL" /YX /FD /I../../..\lib\mswdll /c +# ADD CPP /nologo /MD /W4 /O2 /I "..\..\include" /I "..\..\lib/mswdll" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D "_MT" /D wxUSE_GUI=1 /D "WXUSINGDLL" /YX /FD /I..\..\lib\mswdll /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 -# ADD BASE RSC /l 0x409 /i "../../../include" /d "NDEBUG" -# ADD RSC /l 0x409 /i "../../../include" /i "../../lib/mswdll" /d "NDEBUG" +# ADD BASE RSC /l 0x409 /i "..\..\include" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\include" /i "..\..\lib/mswdll" /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib /nologo /subsystem:windows /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib ../..\lib\wxmsw233.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib ..\..\lib\wxmsw24.lib /nologo /subsystem:windows /machine:I386 !ELSEIF "$(CFG)" == "dbbrowse - Win32 Debug DLL" @@ -71,17 +71,17 @@ LINK32=link.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W4 /Zi /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /YX /FD /c -# ADD CPP /nologo /MDd /W4 /Zi /Od /I "../../include" /I "../../lib/mswdlld" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D "_MT" /D wxUSE_GUI=1 /D "__WXDEBUG__" /D WXDEBUG=1 /D "WXUSINGDLL" /YX /FD /I../../..\lib\mswdlld /c +# ADD CPP /nologo /MDd /W4 /Zi /Od /I "..\..\include" /I "..\..\lib/mswdlld" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D "_MT" /D wxUSE_GUI=1 /D "__WXDEBUG__" /D WXDEBUG=1 /D "WXUSINGDLL" /YX /FD /I..\..\lib\mswdlld /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 -# ADD BASE RSC /l 0x409 /i "../../../include" /d "_DEBUG" -# ADD RSC /l 0x409 /i "../../../include" /i "../../lib/mswdlld" /d "_DEBUG" +# ADD BASE RSC /l 0x409 /i "..\..\include" /d "_DEBUG" +# ADD RSC /l 0x409 /i "..\..\include" /i "..\..\lib/mswdlld" /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib ../..\lib\wxmsw233d.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib ..\..\lib\wxmsw24d.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept !ELSEIF "$(CFG)" == "dbbrowse - Win32 Release" @@ -97,17 +97,17 @@ LINK32=link.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W4 /O2 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /YX /FD /c -# ADD CPP /nologo /MD /W4 /O2 /I "../../include" /I "../../lib/msw" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D "_MT" /D wxUSE_GUI=1 /YX /FD /I../../..\lib\msw /c +# ADD CPP /nologo /MD /W4 /O2 /I "..\..\include" /I "..\..\lib/msw" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D "_MT" /D wxUSE_GUI=1 /YX /FD /I..\..\lib\msw /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 -# ADD BASE RSC /l 0x409 /i "../../../include" /d "NDEBUG" -# ADD RSC /l 0x409 /i "../../../include" /i "../../lib/msw" /d "NDEBUG" +# ADD BASE RSC /l 0x409 /i "..\..\include" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\include" /i "..\..\lib/msw" /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib /nologo /subsystem:windows /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib ../../..\lib\zlib.lib ../../..\lib\regex.lib ../../..\lib\png.lib ../..\lib\jpeg.lib ../..\lib\tiff.lib ../..\lib\wxmsw.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib ..\..\lib\zlib.lib ..\..\lib\regex.lib ..\..\lib\png.lib ..\..\lib\jpeg.lib ..\..\lib\tiff.lib ..\..\lib\wxmsw.lib /nologo /subsystem:windows /machine:I386 !ELSEIF "$(CFG)" == "dbbrowse - Win32 Debug" @@ -123,17 +123,17 @@ LINK32=link.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W4 /Zi /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /YX /FD /c -# ADD CPP /nologo /MDd /W4 /Zi /Od /I "../../include" /I "../../lib/mswd" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D "_MT" /D wxUSE_GUI=1 /D "__WXDEBUG__" /D WXDEBUG=1 /YX /FD /I../../..\lib\mswd /c +# ADD CPP /nologo /MDd /W4 /Zi /Od /I "..\..\include" /I "..\..\lib/mswd" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D "_MT" /D wxUSE_GUI=1 /D "__WXDEBUG__" /D WXDEBUG=1 /YX /FD /I..\..\lib\mswd /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 -# ADD BASE RSC /l 0x409 /i "../../../include" /d "_DEBUG" -# ADD RSC /l 0x409 /i "../../../include" /i "../../lib/mswd" /d "_DEBUG" +# ADD BASE RSC /l 0x409 /i "..\..\include" /d "_DEBUG" +# ADD RSC /l 0x409 /i "..\..\include" /i "..\..\lib/mswd" /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib ../..\lib\zlibd.lib ../..\lib\regexd.lib ../..\lib\pngd.lib ../..\lib\jpegd.lib ../..\lib\tiffd.lib ../..\lib\wxmswd.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib ..\..\lib\zlibd.lib ..\..\lib\regexd.lib ..\..\lib\pngd.lib ..\..\lib\jpegd.lib ..\..\lib\tiffd.lib ..\..\lib\wxmswd.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept !ENDIF @@ -155,8 +155,7 @@ SOURCE=.\dbbrowse.cpp SOURCE=.\dbbrowse.rc # ADD BASE RSC /l 0x809 -# ADD RSC /l 0x809 /i "../../include" -# SUBTRACT RSC /i "../../../include" +# ADD RSC /l 0x809 /i "..\..\include" # End Source File # Begin Source File diff --git a/demos/dbbrowse/makefile.gtk b/demos/dbbrowse/makefile.gtk deleted file mode 100644 index cd8a960812..0000000000 --- a/demos/dbbrowse/makefile.gtk +++ /dev/null @@ -1,15 +0,0 @@ - -# Top dir of wxWindows -top_builddir = /gtm/bart/wxGTK - -PROGRAM=dbbrowser_gtk - - -OBJECTS= dbbrowse.o doc.o pgmctrl.o tabpgwin.o\ - browsedb.o dbtree.o dbgrid.o dlguser.o - - - - -include $(top_builddir)/src/makeprog.env - diff --git a/demos/forty/canvas.cpp b/demos/forty/canvas.cpp index 81e7985234..995e7cbfbf 100644 --- a/demos/forty/canvas.cpp +++ b/demos/forty/canvas.cpp @@ -56,7 +56,7 @@ FortyCanvas::FortyCanvas(wxWindow* parent, int x, int y, int w, int h) : m_arrowCursor = new wxCursor(wxCURSOR_ARROW); wxString name = wxTheApp->GetAppName(); - if (name.Length() <= 0) name = "forty"; + if (name.Length() <= 0) name = _T("forty"); m_scoreFile = new ScoreFile(name); m_game = new Game(0, 0, 0); m_game->Deal(); @@ -159,8 +159,8 @@ Called when the main frame is closed bool FortyCanvas::OnCloseCanvas() { if (m_game->InPlay() && - wxMessageBox("Are you sure you want to\nabandon the current game?", - "Warning", wxYES_NO | wxICON_QUESTION) == wxNO) + wxMessageBox(_T("Are you sure you want to\nabandon the current game?"), + _T("Warning"), wxYES_NO | wxICON_QUESTION) == wxNO) { return FALSE; } diff --git a/demos/forty/card.cpp b/demos/forty/card.cpp index 295e7c5947..94df438732 100644 --- a/demos/forty/card.cpp +++ b/demos/forty/card.cpp @@ -67,25 +67,25 @@ Card::Card(int value, WayUp way_up) : if (!m_symbolBmap) { #ifdef __WXMSW__ - m_symbolBmap = new wxBitmap("CardSymbols", wxBITMAP_TYPE_BMP_RESOURCE); + m_symbolBmap = new wxBitmap(_T("CardSymbols"), wxBITMAP_TYPE_BMP_RESOURCE); #else m_symbolBmap = new wxBitmap(Symbols_bits, Symbols_width, Symbols_height); #endif if (!m_symbolBmap->Ok()) { - ::wxMessageBox("Failed to load bitmap CardSymbols", "Error"); + ::wxMessageBox(_T("Failed to load bitmap CardSymbols"), _T("Error")); } } if (!m_pictureBmap) { #ifdef __WXMSW__ - m_pictureBmap = new wxBitmap("CardPictures", wxBITMAP_TYPE_BMP_RESOURCE); + m_pictureBmap = new wxBitmap(_T("CardPictures"), wxBITMAP_TYPE_BMP_RESOURCE); #else m_pictureBmap = new wxBitmap(Pictures); #endif if (!m_pictureBmap->Ok()) { - ::wxMessageBox("Failed to load bitmap CardPictures", "Error"); + ::wxMessageBox(_T("Failed to load bitmap CardPictures"), _T("Error")); } } @@ -196,7 +196,7 @@ void Card::Draw(wxDC& dc, int x, int y) dc.SetBackground(* wxRED_BRUSH); dc.SetBackgroundMode(wxSOLID); wxBrush* brush = wxTheBrushList->FindOrCreateBrush( - "BLACK", wxCROSSDIAG_HATCH + _T("BLACK"), wxCROSSDIAG_HATCH ); dc.SetBrush(* brush); diff --git a/demos/forty/forty.cpp b/demos/forty/forty.cpp index cb37828bef..582cb08f3d 100644 --- a/demos/forty/forty.cpp +++ b/demos/forty/forty.cpp @@ -76,7 +76,7 @@ bool FortyApp::OnInit() bool largecards = FALSE; wxSize size(668,510); - if ((argc > 1) && (!wxStrcmp(argv[1],"-L"))) + if ((argc > 1) && (!wxStrcmp(argv[1],_T("-L")))) { largecards = TRUE; size = wxSize(1000,750); @@ -84,7 +84,7 @@ bool FortyApp::OnInit() FortyFrame* frame = new FortyFrame( 0, - "Forty Thieves", + _T("Forty Thieves"), -1, -1, size.x, size.y,largecards ); @@ -120,14 +120,14 @@ const wxColour& FortyApp::TextColour() { if (!m_textColour) { - m_textColour = new wxColour("BLACK"); + m_textColour = new wxColour(_T("BLACK")); } return *m_textColour; } // My frame constructor -FortyFrame::FortyFrame(wxFrame* frame, char* title, int x, int y, int w, int h,bool largecards): +FortyFrame::FortyFrame(wxFrame* frame, const wxString& title, int x, int y, int w, int h,bool largecards): wxFrame(frame, -1, title, wxPoint(x, y), wxSize(w, h)) { #ifdef __WXMAC__ @@ -136,7 +136,7 @@ FortyFrame::FortyFrame(wxFrame* frame, char* title, int x, int y, int w, int h,b #endif // set the icon #ifdef __WXMSW__ - SetIcon(wxIcon("CardsIcon")); + SetIcon(wxIcon(_T("CardsIcon"))); #else #ifdef GTK_TBD SetIcon(wxIcon(Cards_bits, Cards_width, Cards_height)); @@ -145,28 +145,28 @@ FortyFrame::FortyFrame(wxFrame* frame, char* title, int x, int y, int w, int h,b // Make a menu bar wxMenu* gameMenu = new wxMenu; - gameMenu->Append(NEW_GAME, "&New", "Start a new game"); - gameMenu->Append(SCORES, "&Scores...", "Displays scores"); - gameMenu->Append(EXIT, "E&xit", "Exits Forty Thieves"); + gameMenu->Append(NEW_GAME, _T("&New"), _T("Start a new game")); + gameMenu->Append(SCORES, _T("&Scores..."), _T("Displays scores")); + gameMenu->Append(EXIT, _T("E&xit"), _T("Exits Forty Thieves")); wxMenu* editMenu = new wxMenu; - editMenu->Append(UNDO, "&Undo", "Undo the last move"); - editMenu->Append(REDO, "&Redo", "Redo a move that has been undone"); + editMenu->Append(UNDO, _T("&Undo"), _T("Undo the last move")); + editMenu->Append(REDO, _T("&Redo"), _T("Redo a move that has been undone")); wxMenu* optionsMenu = new wxMenu; optionsMenu->Append(RIGHT_BUTTON_UNDO, - "&Right button undo", - "Enables/disables right mouse button undo and redo", + _T("&Right button undo"), + _T("Enables/disables right mouse button undo and redo"), TRUE ); optionsMenu->Append(HELPING_HAND, - "&Helping hand", - "Enables/disables hand cursor when a card can be moved", + _T("&Helping hand"), + _T("Enables/disables hand cursor when a card can be moved"), TRUE ); optionsMenu->Append(LARGE_CARDS, - "&Large cards", - "Enables/disables large cards for high resolution displays", + _T("&Large cards"), + _T("Enables/disables large cards for high resolution displays"), TRUE ); optionsMenu->Check(HELPING_HAND, TRUE); @@ -174,13 +174,13 @@ FortyFrame::FortyFrame(wxFrame* frame, char* title, int x, int y, int w, int h,b optionsMenu->Check(LARGE_CARDS, largecards ? TRUE : FALSE); wxMenu* helpMenu = new wxMenu; - helpMenu->Append(ABOUT, "&About...", "Displays information about the game"); + helpMenu->Append(ABOUT, _T("&About..."), _T("Displays information about the game")); m_menuBar = new wxMenuBar; - m_menuBar->Append(gameMenu, "&Game"); - m_menuBar->Append(editMenu, "&Edit"); - m_menuBar->Append(optionsMenu, "&Options"); - m_menuBar->Append(helpMenu, "&Help"); + m_menuBar->Append(gameMenu, _T("&Game")); + m_menuBar->Append(editMenu, _T("&Edit")); + m_menuBar->Append(optionsMenu, _T("&Options")); + m_menuBar->Append(helpMenu, _T("&Help")); SetMenuBar(m_menuBar); @@ -243,14 +243,14 @@ FortyFrame::About(wxCommandEvent&) #endif { wxMessageBox( - "Forty Thieves\n\n" - "A freeware program using the wxWindows\n" - "portable C++ GUI toolkit.\n" - "http://www.wxwindows.org\n" - "http://www.freiburg.linux.de/~wxxt\n\n" - "Author: Chris Breeze (c) 1992-1998\n" - "email: chris.breeze@iname.com", - "About Forty Thieves", + _T("Forty Thieves\n\n") + _T("A freeware program using the wxWindows\n") + _T("portable C++ GUI toolkit.\n") + _T("http://www.wxwindows.org\n") + _T("http://www.freiburg.linux.de/~wxxt\n\n") + _T("Author: Chris Breeze (c) 1992-1998\n") + _T("email: chris.breeze@iname.com"), + _T("About Forty Thieves"), wxOK, this ); } @@ -331,7 +331,7 @@ bool FortyAboutDialog::AddControls(wxWindow* parent) wxFile file; file.Open(htmlFile, wxFile::read); long len = file.Length(); - char* buf = htmlText.GetWriteBuf(len + 1); + wxChar* buf = htmlText.GetWriteBuf(len + 1); file.Read(buf, len); buf[len] = 0; htmlText.UngetWriteBuf(); @@ -349,7 +349,7 @@ bool FortyAboutDialog::AddControls(wxWindow* parent) verString.Printf("%.2f", stVERSION_NUMBER); htmlText.Replace(wxT("$VERSION$"), verString); #endif - htmlText.Replace(wxT("$DATE$"), __DATE__); + htmlText.Replace(wxT("$DATE$"), _T(__DATE__)); wxSize htmlSize(400, 290); @@ -373,7 +373,7 @@ bool FortyAboutDialog::AddControls(wxWindow* parent) wxASSERT( item1 ); item0->Add( item1, 0, wxALIGN_CENTRE|wxALL, 5 ); - wxButton *item2 = new wxButton( parent, wxID_CANCEL, "&Close", wxDefaultPosition, wxDefaultSize, 0 ); + wxButton *item2 = new wxButton( parent, wxID_CANCEL, _T("&Close"), wxDefaultPosition, wxDefaultSize, 0 ); item2->SetDefault(); item2->SetFocus(); diff --git a/demos/forty/forty.dsp b/demos/forty/forty.dsp index 83bb08020d..8795a48e85 100644 --- a/demos/forty/forty.dsp +++ b/demos/forty/forty.dsp @@ -45,17 +45,17 @@ RSC=rc.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W4 /O2 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /YX /FD /c -# ADD CPP /nologo /MD /W4 /O2 /I "../../include" /I "../../lib/mswdll" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D "_MT" /D wxUSE_GUI=1 /D "WXUSINGDLL" /YX /FD /I../../..\lib\mswdll /c +# ADD CPP /nologo /MD /W4 /O2 /I "../../include" /I "../../lib/mswdll" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D "_MT" /D wxUSE_GUI=1 /D "WXUSINGDLL" /YX /FD /I..\..\lib\mswdll /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 -# ADD BASE RSC /l 0x409 /i "../../../include" /d "NDEBUG" -# ADD RSC /l 0x409 /i "../../../include" /d "NDEBUG" +# ADD BASE RSC /l 0x409 /i "../../include" /d "NDEBUG" +# ADD RSC /l 0x409 /i "../../include" /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib /nologo /subsystem:windows /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib ../..\lib\wxmsw233.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib ..\..\lib\wxmsw24.lib /nologo /subsystem:windows /machine:I386 !ELSEIF "$(CFG)" == "forty - Win32 Debug DLL" @@ -71,17 +71,17 @@ LINK32=link.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W4 /Zi /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /YX /FD /c -# ADD CPP /nologo /MDd /W4 /Zi /Od /I "../../include" /I "../../lib/mswdlld" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D "_MT" /D wxUSE_GUI=1 /D "__WXDEBUG__" /D WXDEBUG=1 /D "WXUSINGDLL" /YX /FD /I../../..\lib\mswdlld /c +# ADD CPP /nologo /MDd /W4 /Zi /Od /I "../../include" /I "../../lib/mswdlld" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D "_MT" /D wxUSE_GUI=1 /D "__WXDEBUG__" /D WXDEBUG=1 /D "WXUSINGDLL" /YX /FD /I..\..\lib\mswdlld /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 -# ADD BASE RSC /l 0x409 /i "../../../include" /d "_DEBUG" -# ADD RSC /l 0x409 /i "../../../include" /d "_DEBUG" +# ADD BASE RSC /l 0x409 /i "../../include" /d "_DEBUG" +# ADD RSC /l 0x409 /i "../../include" /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib ../..\lib\wxmsw233d.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib ..\..\lib\wxmsw24d.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept !ELSEIF "$(CFG)" == "forty - Win32 Release" @@ -97,17 +97,17 @@ LINK32=link.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W4 /O2 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /YX /FD /c -# ADD CPP /nologo /MD /W4 /O2 /I "../../include" /I "../../lib/msw" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D "_MT" /D wxUSE_GUI=1 /YX /FD /I../../..\lib\msw /c +# ADD CPP /nologo /MD /W4 /O2 /I "../../include" /I "../../lib/msw" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D "_MT" /D wxUSE_GUI=1 /YX /FD /I..\..\lib\msw /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 -# ADD BASE RSC /l 0x409 /i "../../../include" /d "NDEBUG" -# ADD RSC /l 0x409 /i "../../../include" /d "NDEBUG" +# ADD BASE RSC /l 0x409 /i "../../include" /d "NDEBUG" +# ADD RSC /l 0x409 /i "../../include" /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib /nologo /subsystem:windows /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib ../..\lib\zlib.lib ../..\lib\regex.lib ../..\lib\png.lib ../..\lib\jpeg.lib ../..\lib\tiff.lib ../..\lib\wxmsw.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib ..\..\lib\zlib.lib ..\..\lib\regex.lib ..\..\lib\png.lib ..\..\lib\jpeg.lib ..\..\lib\tiff.lib ..\..\lib\wxmsw.lib /nologo /subsystem:windows /machine:I386 !ELSEIF "$(CFG)" == "forty - Win32 Debug" @@ -123,17 +123,17 @@ LINK32=link.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W4 /Zi /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /YX /FD /c -# ADD CPP /nologo /MDd /W4 /Zi /Od /I "../../include" /I "../../lib/mswd" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D "_MT" /D wxUSE_GUI=1 /D "__WXDEBUG__" /D WXDEBUG=1 /YX /FD /I../../..\lib\mswd /c +# ADD CPP /nologo /MDd /W4 /Zi /Od /I "../../include" /I "../../lib/mswd" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D "_MT" /D wxUSE_GUI=1 /D "__WXDEBUG__" /D WXDEBUG=1 /YX /FD /I..\..\lib\mswd /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 -# ADD BASE RSC /l 0x409 /i "../../../include" /d "_DEBUG" -# ADD RSC /l 0x409 /i "../../../include" /d "_DEBUG" +# ADD BASE RSC /l 0x409 /i "../../include" /d "_DEBUG" +# ADD RSC /l 0x409 /i "../../include" /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib ../..\lib\zlibd.lib ../..\lib\regexd.lib ../..\lib\pngd.lib ../..\lib\jpegd.lib ../..\lib\tiffd.lib ../..\lib\wxmswd.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib ..\..\lib\zlibd.lib ..\..\lib\regexd.lib ..\..\lib\pngd.lib ..\..\lib\jpegd.lib ..\..\lib\tiffd.lib ..\..\lib\wxmswd.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept !ENDIF @@ -160,7 +160,6 @@ SOURCE=.\forty.cpp SOURCE=.\forty.rc # ADD BASE RSC /l 0x809 # ADD RSC /l 0x809 /i "../../include" -# SUBTRACT RSC /i "../../../include" # End Source File # Begin Source File diff --git a/demos/forty/forty.h b/demos/forty/forty.h index 0ad38bae0a..9a4383c9a1 100644 --- a/demos/forty/forty.h +++ b/demos/forty/forty.h @@ -34,7 +34,7 @@ class FortyCanvas; class FortyFrame: public wxFrame { public: - FortyFrame(wxFrame* frame, char* title, int x, int y, int w, int h,bool largecards); + FortyFrame(wxFrame* frame, const wxString& title, int x, int y, int w, int h,bool largecards); virtual ~FortyFrame(); void OnCloseWindow(wxCloseEvent& event); diff --git a/demos/forty/game.cpp b/demos/forty/game.cpp index e137996530..9b9048f6de 100644 --- a/demos/forty/game.cpp +++ b/demos/forty/game.cpp @@ -163,7 +163,7 @@ void Game::DoMove(wxDC& dc, Pile* src, Pile* dest) { if (src == dest) { - wxMessageBox("Game::DoMove() src == dest", "Debug message", + wxMessageBox(_T("Game::DoMove() src == dest"), _T("Debug message"), wxOK | wxICON_EXCLAMATION); } m_moves[m_moveIndex].src = src; @@ -175,7 +175,7 @@ void Game::DoMove(wxDC& dc, Pile* src, Pile* dest) } else { - wxMessageBox("Game::DoMove() Undo buffer full", "Debug message", + wxMessageBox(_T("Game::DoMove() Undo buffer full"), _T("Debug message"), wxOK | wxICON_EXCLAMATION); } @@ -203,8 +203,8 @@ void Game::DoMove(wxDC& dc, Pile* src, Pile* dest) // Redraw the score box to update games won DisplayScore(dc); - if (wxMessageBox("Do you wish to play again?", - "Well Done, You have won!", wxYES_NO | wxICON_QUESTION) == wxYES) + if (wxMessageBox(_T("Do you wish to play again?"), + _T("Well Done, You have won!"), wxYES_NO | wxICON_QUESTION) == wxYES) { Deal(); canvas->Refresh(); @@ -241,25 +241,25 @@ void Game::DisplayScore(wxDC& dc) int w, h; { long width, height; - dc.GetTextExtent("Average score:m_x", &width, &height); + dc.GetTextExtent(_T("Average score:m_x"), &width, &height); w = width; h = height; } dc.DrawRectangle(x + w, y, 20, 4 * h); - char str[80]; - sprintf(str, "%d", m_currentScore); - dc.DrawText("Score:", x, y); + wxString str; + str.Printf(_T("%d"), m_currentScore); + dc.DrawText(_T("Score:"), x, y); dc.DrawText(str, x + w, y); y += h; - sprintf(str, "%d", m_numGames); - dc.DrawText("Games played:", x, y); + str.Printf(_T("%d"), m_numGames); + dc.DrawText(_T("Games played:"), x, y); dc.DrawText(str, x + w, y); y += h; - sprintf(str, "%d", m_numWins); - dc.DrawText("Games won:", x, y); + str.Printf(_T("%d"), m_numWins); + dc.DrawText(_T("Games won:"), x, y); dc.DrawText(str, x + w, y); y += h; @@ -268,8 +268,8 @@ void Game::DisplayScore(wxDC& dc) { average = (2 * (m_currentScore + m_totalScore) + m_numGames ) / (2 * m_numGames); } - sprintf(str, "%d", average); - dc.DrawText("Average score:", x, y); + str.Printf(_T("%d"), average); + dc.DrawText(_T("Average score:"), x, y); dc.DrawText(str, x + w, y); } @@ -798,8 +798,8 @@ void Pack::Redraw(wxDC& dc) { Pile::Redraw(dc); - char str[10]; - sprintf(str, "%d ", m_topCard + 1); + wxString str; + str.Printf(_T("%d "), m_topCard + 1); dc.SetBackgroundMode( wxSOLID ); dc.SetTextBackground(FortyApp::BackgroundColour()); @@ -816,7 +816,7 @@ void Pack::AddCard(Card* card) } else { - wxMessageBox("Pack::AddCard() Undo error", "Forty Thieves: Warning", + wxMessageBox(_T("Pack::AddCard() Undo error"), _T("Forty Thieves: Warning"), wxOK | wxICON_EXCLAMATION); } card->TurnCard(facedown); diff --git a/demos/forty/makefile.bcc b/demos/forty/makefile.bcc deleted file mode 100644 index 53fdb7bf91..0000000000 --- a/demos/forty/makefile.bcc +++ /dev/null @@ -1,19 +0,0 @@ -# -# File: makefile.bcc -# Author: Julian Smart -# Created: 1998 -# Updated: -# -# Builds a BC++ 16-bit sample - -!if "$(WXWIN)" == "" -!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx -!endif - -WXDIR = $(WXWIN) - -TARGET=forty -OBJECTS=$(TARGET).obj canvas.obj card.obj game.obj pile.obj playerdg.obj scoredg.obj scorefil.obj - -!include $(WXDIR)\src\makeprog.bcc - diff --git a/demos/forty/makefile.wat b/demos/forty/makefile.wat index 9db1dcaceb..cf6c8c03bc 100644 --- a/demos/forty/makefile.wat +++ b/demos/forty/makefile.wat @@ -8,7 +8,8 @@ WXDIR = $(%WXWIN) PROGRAM = forty -OBJECTS = $(PROGRAM).obj canvas.obj card.obj game.obj pile.obj playerdg.obj scoredg.obj scorefil.obj +OBJECTS = $(OUTPUTDIR)\$(PROGRAM).obj $(OUTPUTDIR)\canvas.obj $(OUTPUTDIR)\card.obj $(OUTPUTDIR)\game.obj & + $(OUTPUTDIR)\pile.obj $(OUTPUTDIR)\playerdg.obj $(OUTPUTDIR)\scoredg.obj $(OUTPUTDIR)\scorefil.obj !include $(WXDIR)\src\makeprog.wat diff --git a/demos/forty/playerdg.cpp b/demos/forty/playerdg.cpp index 674758143b..4c5c48e3fc 100644 --- a/demos/forty/playerdg.cpp +++ b/demos/forty/playerdg.cpp @@ -44,7 +44,7 @@ PlayerSelectionDialog::PlayerSelectionDialog( wxWindow* parent, ScoreFile* file ) : - wxDialog(parent, -1, "Player Selection", + wxDialog(parent, -1, _T("Player Selection"), wxDefaultPosition, wxSize(320, 200), wxDIALOG_MODAL | wxDEFAULT_DIALOG_STYLE), m_scoreFile(file) @@ -52,7 +52,7 @@ PlayerSelectionDialog::PlayerSelectionDialog( // enable constraints SetAutoLayout (TRUE); - wxStaticText* msg = new wxStaticText(this, -1, "Please select a name or type a new one:"); + wxStaticText* msg = new wxStaticText(this, -1, _T("Please select a name or type a new one:")); wxListBox* list = new wxListBox( this, ID_LISTBOX, @@ -68,10 +68,10 @@ PlayerSelectionDialog::PlayerSelectionDialog( list->Append(players[i]); } - m_textField = new wxTextCtrl(this, -1, "", wxDefaultPosition, wxDefaultSize, 0); + m_textField = new wxTextCtrl(this, -1, _T(""), wxDefaultPosition, wxDefaultSize, 0); - m_OK = new wxButton(this, wxID_OK, "OK"); - m_cancel = new wxButton(this, wxID_CANCEL, "Cancel"); + m_OK = new wxButton(this, wxID_OK, _T("OK")); + m_cancel = new wxButton(this, wxID_CANCEL, _T("Cancel")); wxLayoutConstraints* layout; @@ -149,7 +149,7 @@ const wxString& PlayerSelectionDialog::GetPlayersName() void PlayerSelectionDialog::OnCloseWindow(wxCloseEvent& event) { - m_player = ""; + m_player = _T(""); EndModal(wxID_CANCEL); } @@ -169,9 +169,9 @@ void PlayerSelectionDialog::ButtonCallback(wxCommandEvent& event) wxString name = m_textField->GetValue(); if (!name.IsNull() && name.Length() > 0) { - if (name.Contains('@')) + if (name.Contains(_T('@'))) { - wxMessageBox("Names should not contain the '@' character", "Forty Thieves"); + wxMessageBox(_T("Names should not contain the '@' character"), _T("Forty Thieves")); } else { @@ -181,12 +181,12 @@ void PlayerSelectionDialog::ButtonCallback(wxCommandEvent& event) } else { - wxMessageBox("Please enter your name", "Forty Thieves"); + wxMessageBox(_T("Please enter your name"), _T("Forty Thieves")); } } else { - m_player = ""; + m_player = _T(""); EndModal(wxID_CANCEL); } } diff --git a/demos/forty/scoredg.cpp b/demos/forty/scoredg.cpp index fddbc0e3c4..4af39aa4f1 100644 --- a/demos/forty/scoredg.cpp +++ b/demos/forty/scoredg.cpp @@ -27,16 +27,6 @@ #include "wx/wx.h" #endif -#if wxUSE_IOSTREAMH -#if defined(__WXMSW__) && !defined(__GNUWIN32__) && !defined(__MWERKS__) -#include -#else -#include -#endif -#else -#include -//using namespace std; -#endif #include "scorefil.h" #include "scoredg.h" @@ -66,9 +56,9 @@ ScoreCanvas::ScoreCanvas(wxWindow* parent, ScoreFile* scoreFile) : wxArrayString players; scoreFile->GetPlayerList( players); - ostrstream os; + wxString os; - os << "Player\tWins\tGames\tScore\n"; + os << wxT("Player\tWins\tGames\tScore\n"); for (unsigned int i = 0; i < players.Count(); i++) { int wins, games, score; @@ -79,15 +69,13 @@ ScoreCanvas::ScoreCanvas(wxWindow* parent, ScoreFile* scoreFile) : average = (2 * score + games) / (2 * games); } - os << players[i] << '\t' - << wins << '\t' - << games << '\t' - << average << '\n'; + os << players[i] << wxT('\t') + << wins << wxT('\t') + << games << wxT('\t') + << average << wxT('\n'); } - os << '\0'; - char* str = os.str(); - m_text = str; - delete str; + os << wxT('\0'); + m_text = os; } ScoreCanvas::~ScoreCanvas() @@ -98,7 +86,7 @@ void ScoreCanvas::OnDraw(wxDC& dc) { dc.SetFont(* m_font); - const char* str = m_text; + const wxChar* str = m_text; unsigned int tab = 0; unsigned int tabstops[] = { 5, 100, 150, 200 }; @@ -106,29 +94,29 @@ void ScoreCanvas::OnDraw(wxDC& dc) int lineSpacing; { long w, h; - dc.GetTextExtent("Testing", &w, &h); + dc.GetTextExtent(_T("Testing"), &w, &h); lineSpacing = (int)h; } int y = 0; while (*str) { - char text[256]; - char* dest = text; + wxChar text[256]; + wxChar* dest = text; - while (*str && *str >= ' ') *dest++ = *str++; - *dest = '\0'; + while (*str && *str >= _T(' ')) *dest++ = *str++; + *dest = _T('\0'); dc.DrawText(text, tabstops[tab], y); - if (*str == '\t') + if (*str == _T('\t')) { if (tab < sizeof(tabstops) / sizeof(tabstops[0]) - 1) { tab++; } } - else if (*str == '\n') + else if (*str == _T('\n')) { tab = 0; y += lineSpacing; @@ -145,7 +133,7 @@ ScoreDialog::ScoreDialog( wxWindow* parent, ScoreFile* file ) : - wxDialog(parent, -1, "Scores", + wxDialog(parent, -1, _T("Scores"), wxDefaultPosition, wxSize(310, 200), wxDIALOG_MODAL | wxDEFAULT_DIALOG_STYLE), m_scoreFile(file) @@ -154,7 +142,7 @@ ScoreDialog::ScoreDialog( SetAutoLayout (TRUE); ScoreCanvas* list = new ScoreCanvas(this, m_scoreFile); - m_OK = new wxButton(this, wxID_OK, "OK"); + m_OK = new wxButton(this, wxID_OK, _T("OK")); wxLayoutConstraints* layout; diff --git a/demos/forty/scorefil.cpp b/demos/forty/scorefil.cpp index 307b0610c3..ef98e7761b 100644 --- a/demos/forty/scorefil.cpp +++ b/demos/forty/scorefil.cpp @@ -38,7 +38,7 @@ #include "scorefil.h" -ScoreFile::ScoreFile(const char* appName) +ScoreFile::ScoreFile(const wxString& appName) { #if 0 wxString filename; @@ -68,7 +68,8 @@ ScoreFile::ScoreFile(const char* appName) } #endif - m_config = new wxConfig(appName, "wxWindows", appName, "", wxCONFIG_USE_LOCAL_FILE); // only local + m_config = new wxConfig(appName, _T("wxWindows"), appName, _T(""), + wxCONFIG_USE_LOCAL_FILE); // only local } ScoreFile::~ScoreFile() @@ -84,7 +85,7 @@ ScoreFile::~ScoreFile() void ScoreFile::GetPlayerList( wxArrayString &list ) { - m_config->SetPath("/Players"); + m_config->SetPath(_T("/Players")); int length = m_config->GetNumberOfGroups(); if (length <= 0) return; @@ -106,12 +107,14 @@ void ScoreFile::GetPlayerList( wxArrayString &list ) // Calculate an encrypted check number to prevent tampering with // score file -long ScoreFile::CalcCheck(const char* name, int p1, int p2, int p3) +long ScoreFile::CalcCheck(const wxString& name, int p1, int p2, int p3) { long check = 0; - while (*name) + size_t i, max = name.length(); + + for(i = 0; i < max; ++i ) { - check = (check << 1) ^ (long)*name++; + check = (check << 1) ^ (long)name[i]; check = ((check >> 23) ^ check) & 0xFFFFFF; } check = (check << 1) ^ (long)p1; @@ -126,13 +129,13 @@ long ScoreFile::CalcCheck(const char* name, int p1, int p2, int p3) wxString ScoreFile::GetPreviousPlayer() const { wxString result; - m_config->SetPath("/General"); - m_config->Read("LastPlayer", &result); + m_config->SetPath(_T("/General")); + m_config->Read(_T("LastPlayer"), &result); return result; } void ScoreFile::ReadPlayersScore( - const char* player, + const wxString& player, int& wins, int& games, int& score) @@ -142,17 +145,17 @@ void ScoreFile::ReadPlayersScore( games = wins = score = 0; - m_config->SetPath("/Players"); + m_config->SetPath(_T("/Players")); m_config->SetPath(player); - if (m_config->Read("Score", &myScore, 0L) && - m_config->Read("Games", &myGames, 0L) && - m_config->Read("Wins", &myWins, 0L) && - m_config->Read("Check", &check, 0L)) + if (m_config->Read(_T("Score"), &myScore, 0L) && + m_config->Read(_T("Games"), &myGames, 0L) && + m_config->Read(_T("Wins"), &myWins, 0L) && + m_config->Read(_T("Check"), &check, 0L)) { if (check != CalcCheck(player, myGames, myWins, myScore)) { - wxMessageBox("Score file corrupted", "Warning", - wxOK | wxICON_EXCLAMATION); + wxMessageBox(_T("Score file corrupted"), _T("Warning"), + wxOK | wxICON_EXCLAMATION); } else { @@ -165,18 +168,18 @@ void ScoreFile::ReadPlayersScore( } -void ScoreFile::WritePlayersScore(const char* player, int wins, int games, int score) +void ScoreFile::WritePlayersScore(const wxString& player, int wins, int games, int score) { if (player) { - m_config->SetPath("/General"); - m_config->Write("LastPlayer", wxString(player)); // Without wxString tmp, thinks it's bool in VC++ + m_config->SetPath(_T("/General")); + m_config->Write(_T("LastPlayer"), wxString(player)); // Without wxString tmp, thinks it's bool in VC++ - m_config->SetPath("/Players"); + m_config->SetPath(_T("/Players")); m_config->SetPath(player); - m_config->Write("Score", (long)score); - m_config->Write("Games", (long)games); - m_config->Write("Wins", (long)wins); - m_config->Write("Check", CalcCheck(player, games, wins, score)); + m_config->Write(_T("Score"), (long)score); + m_config->Write(_T("Games"), (long)games); + m_config->Write(_T("Wins"), (long)wins); + m_config->Write(_T("Check"), CalcCheck(player, games, wins, score)); } } diff --git a/demos/forty/scorefil.h b/demos/forty/scorefil.h index 25c1ee717d..d73bb62540 100644 --- a/demos/forty/scorefil.h +++ b/demos/forty/scorefil.h @@ -24,17 +24,17 @@ class ScoreFile { public: - ScoreFile(const char* appName); + ScoreFile(const wxString& appName); virtual ~ScoreFile(); void GetPlayerList( wxArrayString &list ); wxString GetPreviousPlayer() const; - void ReadPlayersScore(const char* player, int& wins, int& games, int &score); - void WritePlayersScore(const char* player, int wins, int games, int score); + void ReadPlayersScore(const wxString& player, int& wins, int& games, int &score); + void WritePlayersScore(const wxString& player, int wins, int games, int score); private: - long CalcCheck(const char* name, int p1, int p2, int p3); + long CalcCheck(const wxString& name, int p1, int p2, int p3); wxString m_configFilename; wxConfig* m_config; }; diff --git a/demos/fractal/fractal.cpp b/demos/fractal/fractal.cpp index fe84a6a584..0bf697e9e6 100644 --- a/demos/fractal/fractal.cpp +++ b/demos/fractal/fractal.cpp @@ -90,13 +90,13 @@ DECLARE_EVENT_TABLE() bool MyApp::OnInit() { // Create the main frame window - MyFrame *frame = new MyFrame(NULL, "Fractal Mountains for wxWindows", wxPoint(-1, -1), wxSize(640, 480)); + MyFrame *frame = new MyFrame(NULL, _T("Fractal Mountains for wxWindows"), wxPoint(-1, -1), wxSize(640, 480)); // Make a menubar wxMenu *file_menu = new wxMenu; - file_menu->Append(wxID_EXIT, "E&xit"); + file_menu->Append(wxID_EXIT, _T("E&xit")); menuBar = new wxMenuBar; - menuBar->Append(file_menu, "&File"); + menuBar->Append(file_menu, _T("&File")); frame->SetMenuBar(menuBar); int width, height; diff --git a/demos/fractal/fractal.dsp b/demos/fractal/fractal.dsp index b2ab319f57..34008ce0fd 100644 --- a/demos/fractal/fractal.dsp +++ b/demos/fractal/fractal.dsp @@ -45,17 +45,17 @@ RSC=rc.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W4 /O2 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /YX /FD /c -# ADD CPP /nologo /MD /W4 /O2 /I "../../include" /I "../../lib/mswdll" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D "_MT" /D wxUSE_GUI=1 /D "WXUSINGDLL" /YX /FD /I../../..\lib\mswdll /c +# ADD CPP /nologo /MD /W4 /O2 /I "..\..\include" /I "..\..\lib/mswdll" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D "_MT" /D wxUSE_GUI=1 /D "WXUSINGDLL" /YX /FD /I..\..\lib\mswdll /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 -# ADD BASE RSC /l 0x409 /i "../../../include" /d "NDEBUG" -# ADD RSC /l 0x409 /i "../../../include" /d "NDEBUG" +# ADD BASE RSC /l 0x409 /i "..\..\include" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\include" /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib /nologo /subsystem:windows /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib ../..\lib\wxmsw233.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib ..\..\lib\wxmsw24.lib /nologo /subsystem:windows /machine:I386 !ELSEIF "$(CFG)" == "fractal - Win32 Debug DLL" @@ -71,17 +71,17 @@ LINK32=link.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W4 /Zi /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /YX /FD /c -# ADD CPP /nologo /MDd /W4 /Zi /Od /I "../../include" /I "../../lib/mswdlld" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D "_MT" /D wxUSE_GUI=1 /D "__WXDEBUG__" /D WXDEBUG=1 /D "WXUSINGDLL" /YX /FD /I../../..\lib\mswdlld /c +# ADD CPP /nologo /MDd /W4 /Zi /Od /I "..\..\include" /I "..\..\lib/mswdlld" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D "_MT" /D wxUSE_GUI=1 /D "__WXDEBUG__" /D WXDEBUG=1 /D "WXUSINGDLL" /YX /FD /I..\..\lib\mswdlld /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 -# ADD BASE RSC /l 0x409 /i "../../../include" /d "_DEBUG" -# ADD RSC /l 0x409 /i "../../../include" /d "_DEBUG" +# ADD BASE RSC /l 0x409 /i "..\..\include" /d "_DEBUG" +# ADD RSC /l 0x409 /i "..\..\include" /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib ../..\lib\wxmsw233d.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib ..\..\lib\wxmsw24d.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept !ELSEIF "$(CFG)" == "fractal - Win32 Release" @@ -97,17 +97,17 @@ LINK32=link.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W4 /O2 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /YX /FD /c -# ADD CPP /nologo /MD /W4 /O2 /I "../../include" /I "../../lib/msw" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D "_MT" /D wxUSE_GUI=1 /YX /FD /I../../..\lib\msw /c +# ADD CPP /nologo /MD /W4 /O2 /I "..\..\include" /I "..\..\lib/msw" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D "_MT" /D wxUSE_GUI=1 /YX /FD /I..\..\lib\msw /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 -# ADD BASE RSC /l 0x409 /i "../../../include" /d "NDEBUG" -# ADD RSC /l 0x409 /i "../../../include" /d "NDEBUG" +# ADD BASE RSC /l 0x409 /i "..\..\include" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\include" /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib /nologo /subsystem:windows /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib ../..\lib\zlib.lib ../..\lib\regex.lib ../..\lib\png.lib ../..\lib\jpeg.lib ../..\lib\tiff.lib ../..\lib\wxmsw.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib ..\..\lib\zlib.lib ..\..\lib\regex.lib ..\..\lib\png.lib ..\..\lib\jpeg.lib ..\..\lib\tiff.lib ..\..\lib\wxmsw.lib /nologo /subsystem:windows /machine:I386 !ELSEIF "$(CFG)" == "fractal - Win32 Debug" @@ -123,17 +123,17 @@ LINK32=link.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W4 /Zi /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /YX /FD /c -# ADD CPP /nologo /MDd /W4 /Zi /Od /I "../../include" /I "../../lib/mswd" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D "_MT" /D wxUSE_GUI=1 /D "__WXDEBUG__" /D WXDEBUG=1 /YX /FD /I../../..\lib\mswd /c +# ADD CPP /nologo /MDd /W4 /Zi /Od /I "..\..\include" /I "..\..\lib/mswd" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D "_MT" /D wxUSE_GUI=1 /D "__WXDEBUG__" /D WXDEBUG=1 /YX /FD /I..\..\lib\mswd /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 -# ADD BASE RSC /l 0x409 /i "../../../include" /d "_DEBUG" -# ADD RSC /l 0x409 /i "../../../include" /d "_DEBUG" +# ADD BASE RSC /l 0x409 /i "..\..\include" /d "_DEBUG" +# ADD RSC /l 0x409 /i "..\..\include" /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib ../..\lib\zlibd.lib ../..\lib\regexd.lib ../..\lib\pngd.lib ../..\lib\jpegd.lib ../..\lib\tiffd.lib ../..\lib\wxmswd.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib ..\..\lib\zlibd.lib ..\..\lib\regexd.lib ..\..\lib\pngd.lib ..\..\lib\jpegd.lib ..\..\lib\tiffd.lib ..\..\lib\wxmswd.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept !ENDIF @@ -151,8 +151,7 @@ SOURCE=.\fractal.cpp SOURCE=.\fractal.rc # ADD BASE RSC /l 0x809 -# ADD RSC /l 0x809 /i "../../include" -# SUBTRACT RSC /i "../../../include" +# ADD RSC /l 0x809 /i "..\..\include" # End Source File # End Target # End Project diff --git a/demos/fractal/makefile.bcc b/demos/fractal/makefile.bcc deleted file mode 100644 index 6b4aacde28..0000000000 --- a/demos/fractal/makefile.bcc +++ /dev/null @@ -1,19 +0,0 @@ -# -# File: makefile.bcc -# Author: Julian Smart -# Created: 1998 -# Updated: -# -# Builds a BC++ 16-bit sample - -!if "$(WXWIN)" == "" -!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx -!endif - -WXDIR = $(WXWIN) - -TARGET=fractal -OBJECTS=$(TARGET).obj - -!include $(WXDIR)\src\makeprog.bcc - diff --git a/demos/fractal/makefile.wat b/demos/fractal/makefile.wat index d48fab6488..05bcc43d03 100644 --- a/demos/fractal/makefile.wat +++ b/demos/fractal/makefile.wat @@ -8,7 +8,7 @@ WXDIR = $(%WXWIN) PROGRAM = fractal -OBJECTS = $(PROGRAM).obj +OBJECTS = $(OUTPUTDIR)\$(PROGRAM).obj !include $(WXDIR)\src\makeprog.wat diff --git a/demos/life/game.h b/demos/life/game.h index 8605e51376..b86757ebf9 100644 --- a/demos/life/game.h +++ b/demos/life/game.h @@ -58,9 +58,18 @@ public: m_name = name; m_description = description; m_rules = _(""); - m_shape.Add( wxString::Format("%i %i", -width/2, -height/2) ); + m_shape.Add( wxString::Format(_T("%i %i"), -width/2, -height/2) ); for(int j = 0; j < height; j++) - m_shape.Add( wxString(shape + (j * width), (size_t) width) ); + { + wxString tmp; + + for(int i = 0; i < width; i++) + { + tmp += wxChar(shape[j * width + i]); + } + + m_shape.Add( tmp ); + } }; wxString m_name; diff --git a/demos/life/life.cpp b/demos/life/life.cpp index 35bcc5b6b4..b6d1a7ae58 100644 --- a/demos/life/life.cpp +++ b/demos/life/life.cpp @@ -194,9 +194,9 @@ LifeFrame::LifeFrame() : wxFrame((wxFrame *)0, -1, _("Life!"), wxPoint(200, 200) SetIcon(wxICON(mondrian)); // menu bar - wxMenu *menuFile = new wxMenu("", wxMENU_TEAROFF); - wxMenu *menuView = new wxMenu("", wxMENU_TEAROFF); - wxMenu *menuGame = new wxMenu("", wxMENU_TEAROFF); + wxMenu *menuFile = new wxMenu(_T(""), wxMENU_TEAROFF); + wxMenu *menuView = new wxMenu(_T(""), wxMENU_TEAROFF); + wxMenu *menuGame = new wxMenu(_T(""), wxMENU_TEAROFF); menuFile->Append(ID_NEW, _("&New"), _("Start a new game")); menuFile->Append(ID_OPEN, _("&Open..."), _("Open an existing Life pattern")); @@ -1057,7 +1057,7 @@ void LifeCanvas::OnScroll(wxScrollWinEvent& event) else if (type == wxEVT_SCROLLWIN_PAGEDOWN) { - scrollinc = -10; + scrollinc = +10; } else if (type == wxEVT_SCROLLWIN_THUMBTRACK) diff --git a/demos/life/life.dsp b/demos/life/life.dsp index e711056638..e4c146648f 100644 --- a/demos/life/life.dsp +++ b/demos/life/life.dsp @@ -45,17 +45,17 @@ RSC=rc.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W4 /O2 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /YX /FD /c -# ADD CPP /nologo /MD /W4 /O2 /I "../../include" /I "../../lib/mswdll" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D "_MT" /D wxUSE_GUI=1 /D "WXUSINGDLL" /YX /FD /I../../..\lib\mswdll /c +# ADD CPP /nologo /MD /W4 /O2 /I "..\..\include" /I "..\..\lib/mswdll" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D "_MT" /D wxUSE_GUI=1 /D "WXUSINGDLL" /YX /FD /I..\..\lib\mswdll /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 -# ADD BASE RSC /l 0x409 /i "../../../include" /d "NDEBUG" -# ADD RSC /l 0x409 /i "../../../include" /d "NDEBUG" +# ADD BASE RSC /l 0x409 /i "..\..\include" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\include" /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib /nologo /subsystem:windows /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib ../..\lib\wxmsw233.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib ..\..\lib\wxmsw24.lib /nologo /subsystem:windows /machine:I386 !ELSEIF "$(CFG)" == "life - Win32 Debug DLL" @@ -71,17 +71,17 @@ LINK32=link.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W4 /Zi /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /YX /FD /c -# ADD CPP /nologo /MDd /W4 /Zi /Od /I "../../include" /I "../../lib/mswdlld" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D "_MT" /D wxUSE_GUI=1 /D "__WXDEBUG__" /D WXDEBUG=1 /D "WXUSINGDLL" /YX /FD /I../../..\lib\mswdlld /c +# ADD CPP /nologo /MDd /W4 /Zi /Od /I "..\..\include" /I "..\..\lib/mswdlld" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D "_MT" /D wxUSE_GUI=1 /D "__WXDEBUG__" /D WXDEBUG=1 /D "WXUSINGDLL" /YX /FD /I..\..\lib\mswdlld /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 -# ADD BASE RSC /l 0x409 /i "../../../include" /d "_DEBUG" -# ADD RSC /l 0x409 /i "../../../include" /d "_DEBUG" +# ADD BASE RSC /l 0x409 /i "..\..\include" /d "_DEBUG" +# ADD RSC /l 0x409 /i "..\..\include" /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib ../..\lib\wxmsw233d.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib ..\..\lib\wxmsw24d.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept !ELSEIF "$(CFG)" == "life - Win32 Release" @@ -97,17 +97,17 @@ LINK32=link.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W4 /O2 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /YX /FD /c -# ADD CPP /nologo /MD /W4 /O2 /I "../../include" /I "../../lib/msw" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D "_MT" /D wxUSE_GUI=1 /YX /FD /I../../..\lib\msw /c +# ADD CPP /nologo /MD /W4 /O2 /I "..\..\include" /I "..\..\lib/msw" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D "_MT" /D wxUSE_GUI=1 /YX /FD /I..\..\lib\msw /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 -# ADD BASE RSC /l 0x409 /i "../../../include" /d "NDEBUG" -# ADD RSC /l 0x409 /i "../../../include" /d "NDEBUG" +# ADD BASE RSC /l 0x409 /i "..\..\include" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\include" /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib /nologo /subsystem:windows /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib ../..\lib\zlib.lib ../..\lib\regex.lib ../..\lib\png.lib ../..\lib\jpeg.lib ../..\lib\tiff.lib ../..\lib\wxmsw.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib ..\..\lib\zlib.lib ..\..\lib\regex.lib ..\..\lib\png.lib ..\..\lib\jpeg.lib ..\..\lib\tiff.lib ..\..\lib\wxmsw.lib /nologo /subsystem:windows /machine:I386 !ELSEIF "$(CFG)" == "life - Win32 Debug" @@ -123,17 +123,17 @@ LINK32=link.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W4 /Zi /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /YX /FD /c -# ADD CPP /nologo /MDd /W4 /Zi /Od /I "../../include" /I "../../lib/mswd" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D "_MT" /D wxUSE_GUI=1 /D "__WXDEBUG__" /D WXDEBUG=1 /YX /FD /I../../..\lib\mswd /c +# ADD CPP /nologo /MDd /W4 /Zi /Od /I "..\..\include" /I "..\..\lib/mswd" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D "_MT" /D wxUSE_GUI=1 /D "__WXDEBUG__" /D WXDEBUG=1 /YX /FD /I..\..\lib\mswd /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 -# ADD BASE RSC /l 0x409 /i "../../../include" /d "_DEBUG" -# ADD RSC /l 0x409 /i "../../../include" /d "_DEBUG" +# ADD BASE RSC /l 0x409 /i "..\..\include" /d "_DEBUG" +# ADD RSC /l 0x409 /i "..\..\include" /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib ../..\lib\zlibd.lib ../..\lib\regexd.lib ../..\lib\pngd.lib ../..\lib\jpegd.lib ../..\lib\tiffd.lib ../..\lib\wxmswd.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib ..\..\lib\zlibd.lib ..\..\lib\regexd.lib ..\..\lib\pngd.lib ..\..\lib\jpegd.lib ..\..\lib\tiffd.lib ..\..\lib\wxmswd.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept !ENDIF @@ -159,8 +159,7 @@ SOURCE=.\life.cpp SOURCE=.\life.rc # ADD BASE RSC /l 0x809 -# ADD RSC /l 0x809 /i "../../include" -# SUBTRACT RSC /i "../../../include" +# ADD RSC /l 0x809 /i "..\..\include" # End Source File # Begin Source File diff --git a/demos/life/makefile.bcc b/demos/life/makefile.bcc deleted file mode 100644 index 52b5acfd36..0000000000 --- a/demos/life/makefile.bcc +++ /dev/null @@ -1,19 +0,0 @@ -# -# File: makefile.bcc -# Author: Julian Smart -# Created: 1998 -# Updated: -# -# Builds a BC++ 16-bit sample - -!if "$(WXWIN)" == "" -!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx -!endif - -WXDIR = $(WXWIN) - -TARGET=life -OBJECTS=$(TARGET).obj dialogs.obj game.obj reader.obj - -!include $(WXDIR)\src\makeprog.bcc - diff --git a/demos/life/makefile.wat b/demos/life/makefile.wat index 4fd507ae4b..3fce04a810 100644 --- a/demos/life/makefile.wat +++ b/demos/life/makefile.wat @@ -8,7 +8,7 @@ WXDIR = $(%WXWIN) PROGRAM = life -OBJECTS = $(PROGRAM).obj dialogs.obj game.obj reader.obj +OBJECTS = $(OUTPUTDIR)\$(PROGRAM).obj $(OUTPUTDIR)\dialogs.obj $(OUTPUTDIR)\game.obj $(OUTPUTDIR)\reader.obj !include $(WXDIR)\src\makeprog.wat diff --git a/demos/poem/makefile.bcc b/demos/poem/makefile.bcc deleted file mode 100644 index 263704432f..0000000000 --- a/demos/poem/makefile.bcc +++ /dev/null @@ -1,19 +0,0 @@ -# -# File: makefile.bcc -# Author: Julian Smart -# Created: 1998 -# Updated: -# -# Builds a BC++ 16-bit sample - -!if "$(WXWIN)" == "" -!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx -!endif - -WXDIR = $(WXWIN) - -TARGET=wxpoem -OBJECTS=$(TARGET).obj - -!include $(WXDIR)\src\makeprog.bcc - diff --git a/demos/poem/makefile.wat b/demos/poem/makefile.wat index b07d6af21e..c03bbda0af 100644 --- a/demos/poem/makefile.wat +++ b/demos/poem/makefile.wat @@ -8,7 +8,7 @@ WXDIR = $(%WXWIN) PROGRAM = wxpoem -OBJECTS = $(PROGRAM).obj +OBJECTS = $(OUTPUTDIR)\$(PROGRAM).obj !include $(WXDIR)\src\makeprog.wat diff --git a/demos/poem/poem.dsp b/demos/poem/poem.dsp index e2a0182619..24374dbe06 100644 --- a/demos/poem/poem.dsp +++ b/demos/poem/poem.dsp @@ -45,17 +45,17 @@ RSC=rc.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W4 /O2 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /YX /FD /c -# ADD CPP /nologo /MD /W4 /O2 /I "../../include" /I "../../lib/mswdll" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D "_MT" /D wxUSE_GUI=1 /D "WXUSINGDLL" /YX /FD /I../../..\lib\mswdll /c +# ADD CPP /nologo /MD /W4 /O2 /I "..\..\include" /I "..\..\lib/mswdll" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D "_MT" /D wxUSE_GUI=1 /D "WXUSINGDLL" /YX /FD /I..\..\lib\mswdll /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 -# ADD BASE RSC /l 0x409 /i "../../../include" /d "NDEBUG" -# ADD RSC /l 0x409 /i "../../include" /d "NDEBUG" +# ADD BASE RSC /l 0x409 /i "..\..\include" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\include" /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib /nologo /subsystem:windows /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib ../..\lib\wxmsw233.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib ..\..\lib\wxmsw24.lib /nologo /subsystem:windows /machine:I386 !ELSEIF "$(CFG)" == "poem - Win32 Debug DLL" @@ -71,17 +71,17 @@ LINK32=link.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W4 /Zi /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /YX /FD /c -# ADD CPP /nologo /MDd /W4 /Zi /Od /I "../../include" /I "../../lib/mswdlld" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D "_MT" /D wxUSE_GUI=1 /D "__WXDEBUG__" /D WXDEBUG=1 /D "WXUSINGDLL" /YX /FD /I../../..\lib\mswdlld /c +# ADD CPP /nologo /MDd /W4 /Zi /Od /I "..\..\include" /I "..\..\lib/mswdlld" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D "_MT" /D wxUSE_GUI=1 /D "__WXDEBUG__" /D WXDEBUG=1 /D "WXUSINGDLL" /YX /FD /I..\..\lib\mswdlld /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 -# ADD BASE RSC /l 0x409 /i "../../../include" /d "_DEBUG" -# ADD RSC /l 0x409 /i "../../include" /d "_DEBUG" +# ADD BASE RSC /l 0x409 /i "..\..\include" /d "_DEBUG" +# ADD RSC /l 0x409 /i "..\..\include" /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib ../..\lib\wxmsw233d.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib ..\..\lib\wxmsw24d.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept !ELSEIF "$(CFG)" == "poem - Win32 Release" @@ -97,17 +97,17 @@ LINK32=link.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W4 /O2 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /YX /FD /c -# ADD CPP /nologo /MD /W4 /O2 /I "../../include" /I "../../lib/msw" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D "_MT" /D wxUSE_GUI=1 /YX /FD /I../../..\lib\msw /c +# ADD CPP /nologo /MD /W4 /O2 /I "..\..\include" /I "..\..\lib/msw" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D "_MT" /D wxUSE_GUI=1 /YX /FD /I..\..\lib\msw /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 -# ADD BASE RSC /l 0x409 /i "../../../include" /d "NDEBUG" -# ADD RSC /l 0x409 /i "../../include" /d "NDEBUG" +# ADD BASE RSC /l 0x409 /i "..\..\include" /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\..\include" /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib /nologo /subsystem:windows /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib ../..\lib\zlib.lib ../..\lib\regex.lib ../..\lib\png.lib ../..\lib\jpeg.lib ../..\lib\tiff.lib ../..\lib\wxmsw.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib ..\..\lib\zlib.lib ..\..\lib\regex.lib ..\..\lib\png.lib ..\..\lib\jpeg.lib ..\..\lib\tiff.lib ..\..\lib\wxmsw.lib /nologo /subsystem:windows /machine:I386 !ELSEIF "$(CFG)" == "poem - Win32 Debug" @@ -123,17 +123,17 @@ LINK32=link.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W4 /Zi /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /YX /FD /c -# ADD CPP /nologo /MDd /W4 /Zi /Od /I "../../include" /I "../../lib/mswd" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D "_MT" /D wxUSE_GUI=1 /D "__WXDEBUG__" /D WXDEBUG=1 /YX /FD /I../../..\lib\mswd /c +# ADD CPP /nologo /MDd /W4 /Zi /Od /I "..\..\include" /I "..\..\lib/mswd" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D WINVER=0x400 /D "_MT" /D wxUSE_GUI=1 /D "__WXDEBUG__" /D WXDEBUG=1 /YX /FD /I..\..\lib\mswd /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 -# ADD BASE RSC /l 0x409 /i "../../../include" /d "_DEBUG" -# ADD RSC /l 0x409 /i "../../include" /d "_DEBUG" +# ADD BASE RSC /l 0x409 /i "..\..\include" /d "_DEBUG" +# ADD RSC /l 0x409 /i "..\..\include" /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib ../..\lib\zlibd.lib ../..\lib\regexd.lib ../..\lib\pngd.lib ../..\lib\jpegd.lib ../..\lib\tiffd.lib ../..\lib\wxmswd.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib ..\..\lib\zlibd.lib ..\..\lib\regexd.lib ..\..\lib\pngd.lib ..\..\lib\jpegd.lib ..\..\lib\tiffd.lib ..\..\lib\wxmswd.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept !ENDIF diff --git a/demos/poem/wxpoem.cpp b/demos/poem/wxpoem.cpp index 8a883d1543..b67c0c0fca 100644 --- a/demos/poem/wxpoem.cpp +++ b/demos/poem/wxpoem.cpp @@ -206,7 +206,7 @@ void MainWindow::ScanBuffer(wxDC *dc, bool DrawIt, int *max_x, int *max_y) dc->SetFont(* NormalFont); long xx; long yy; - dc->GetTextExtent("X", &xx, &yy); + dc->GetTextExtent(_T("X"), &xx, &yy); char_height = (int)yy; if (current_page == 0) @@ -844,9 +844,11 @@ int GetIndex() // Read preferences void ReadPreferences() { +#if wxUSE_RESOURCES wxGetResource("wxPoem", "FontSize", &pointSize); wxGetResource("wxPoem", "X", &XPos); wxGetResource("wxPoem", "Y", &YPos); +#endif } // Write preferences to disk @@ -854,10 +856,12 @@ void WritePreferences() { #ifdef __WXMSW__ TheMainWindow->GetPosition(&XPos, &YPos); +#if wxUSE_RESOURCES wxWriteResource("wxPoem", "FontSize", pointSize); wxWriteResource("wxPoem", "X", XPos); wxWriteResource("wxPoem", "Y", YPos); #endif +#endif } // Load a poem from given file, at given point in file. diff --git a/distrib/mac/shared-ld-sh b/distrib/mac/shared-ld-sh index 951edf11be..91f95588fe 100755 --- a/distrib/mac/shared-ld-sh +++ b/distrib/mac/shared-ld-sh @@ -21,7 +21,7 @@ while test $# -gt 0; do verbose=1 ;; - -o|-compatibility_version|-current_version|-framework|-undefined) + -o|-compatibility_version|-current_version|-framework|-undefined|-install_name) # collect these options and values args="$args $1 $2" shift diff --git a/distrib/msw/contrib.rsp b/distrib/msw/contrib.rsp index b176cf90ff..55e3f264bb 100644 --- a/distrib/msw/contrib.rsp +++ b/distrib/msw/contrib.rsp @@ -65,8 +65,8 @@ contrib/samples/gizmos/multicell/*.txt contrib/samples/gizmos/multicell/*.ico contrib/samples/gizmos/multicell/*.bmp contrib/samples/gizmos/multicell/*.rc -contrib/samples/gizmos/multicell/MulticellVC.dsp -contrib/samples/gizmos/multicell/MulticellVC.dsw +contrib/samples/gizmos/multicell/multicell.dsp +contrib/samples/gizmos/multicell/multicell.dsw contrib/samples/gizmos/splittree/*.cpp contrib/samples/gizmos/splittree/*.h @@ -91,8 +91,8 @@ contrib/samples/gizmos/editlbox/*.txt contrib/samples/gizmos/editlbox/*.ico contrib/samples/gizmos/editlbox/*.bmp contrib/samples/gizmos/editlbox/*.rc -contrib/samples/gizmos/editlbox/EditlboxVC.dsp -contrib/samples/gizmos/editlbox/EditlboxVC.dsw +contrib/samples/gizmos/editlbox/editlbox.dsp +contrib/samples/gizmos/editlbox/editlbox.dsw contrib/samples/gizmos/dynsash/*.cpp contrib/samples/gizmos/dynsash/*.h @@ -104,8 +104,8 @@ contrib/samples/gizmos/dynsash/*.txt contrib/samples/gizmos/dynsash/*.ico contrib/samples/gizmos/dynsash/*.bmp contrib/samples/gizmos/dynsash/*.rc -contrib/samples/gizmos/dynsash/DynsashVC.dsp -contrib/samples/gizmos/dynsash/SynsashVC.dsw +contrib/samples/gizmos/dynsash/dynsash.dsp +contrib/samples/gizmos/dynsash/dynsash.dsw contrib/samples/gizmos/dynsash_switch/*.cpp contrib/samples/gizmos/dynsash_switch/*.h @@ -117,8 +117,21 @@ contrib/samples/gizmos/dynsash_switch/*.txt contrib/samples/gizmos/dynsash_switch/*.ico contrib/samples/gizmos/dynsash_switch/*.bmp contrib/samples/gizmos/dynsash_switch/*.rc -contrib/samples/gizmos/dynsash_switch/DynsashSwitchVC.dsp -contrib/samples/gizmos/dynsash_switch/DynsashSwitchVC.dsw +contrib/samples/gizmos/dynsash_switch/dynsash_switch.dsp +contrib/samples/gizmos/dynsash_switch/dynsash_switch.dsw + +contrib/samples/gizmos/led/*.cpp +contrib/samples/gizmos/led/*.h +contrib/samples/gizmos/led/*.def +contrib/samples/gizmos/led/makefile* +contrib/samples/gizmos/led/*.xbm +contrib/samples/gizmos/led/*.xpm +contrib/samples/gizmos/led/*.txt +contrib/samples/gizmos/led/*.ico +contrib/samples/gizmos/led/*.bmp +contrib/samples/gizmos/led/*.rc +contrib/samples/gizmos/led/led.dsp +contrib/samples/gizmos/led/led.dsw contrib/samples/animate/*.cpp contrib/samples/animate/*.h @@ -130,8 +143,9 @@ contrib/samples/animate/*.txt contrib/samples/animate/*.ico contrib/samples/animate/*.bmp contrib/samples/animate/*.rc -contrib/samples/animate/AnimVC.dsp -contrib/samples/animate/AnimVC.dsw +contrib/samples/animate/*.gif +contrib/samples/animate/AniTestVC.dsp +contrib/samples/animate/AniTestVC.dsw contrib/samples/fl/makefile* contrib/samples/fl/bitmaps/*.bmp diff --git a/distrib/msw/copybase.bat b/distrib/msw/copybase.bat index 8512cde9d4..27b86d800b 100755 --- a/distrib/msw/copybase.bat +++ b/distrib/msw/copybase.bat @@ -1,9 +1,10 @@ @echo off -rem VZ: this is quick and _very_ dirty +rem VZ: this is quick and _very_ dirty, to be replaced by a script directly +rem parsing the files.txt and include/wx/version.h... -set VER=2.3.3 -set DEST=s:\upload\wxBase-%VER% +set VER=2.4.0 +set DEST=t:\wxBase-%VER% mkdir %DEST% mkdir %DEST%\include @@ -20,26 +21,46 @@ mkdir %DEST%\src\msw mkdir %DEST%\src\regex mkdir %DEST%\src\unix mkdir %DEST%\src\zlib +mkdir %DEST%\lib chdir %WXWIN% rem Copy the files to the root directory +copy /q configure.in %DEST% +copy /q configure %DEST% +copy /q wxwin.m4 %DEST% +copy /q aclocal.m4 %DEST% +copy /q config.sub %DEST% +copy /q config.guess %DEST% +copy /q install-sh %DEST% +copy /q mkinstalldirs %DEST% +copy /q wx-config.in %DEST% +copy /q setup.h.in %DEST% +copy /q Makefile.in %DEST% +copy /q wxBase.spec %DEST% copy /q docs\changes.txt %DEST%\CHANGES.txt copy /q docs\licence.txt %DEST%\LICENCE.txt -copy /q docs\install.txt %DEST%\README.txt -copy /q docs\symbols.txt %DEST%\SYMBOLS.txt +copy /q docs\base\readme.txt %DEST%\README.txt -rem Copy the project files +rem Copy the project/make files copy /q src\wxBase.dsp %DEST%\src\wxBase.dsp copy /q src\wxBase.dsw %DEST%\src\wxBase.dsw -copy /q include\wx\msw\setup.h %DEST%\include\wx\msw\setup.h +copy /q include\wx\msw\setup0.h %DEST%\include\wx\msw\setup.h +copy /q src\makeb32.env %DEST%\src\makeb32.env +copy /q src\makelib.b32 %DEST%\src\makelib.b32 +copy /q src\makeprog.b32 %DEST%\src\makeprog.b32 +copy /q src\msw\makebase.b32 %DEST%\src\msw\makebase.b32 +copy /q src\*.in %DEST%\src rem Copy the sample copy /q samples\console\console.cpp %DEST%\samples\console\console.cpp copy /q samples\console\console.dsp %DEST%\samples\console\console.dsp +copy /q samples\console\makefile.b32 %DEST%\samples\console\makefile.b32 +copy /q samples\console\makefile.unx %DEST%\samples\console +copy /q samples\console\Makefile.in %DEST%\samples\console copy /q samples\console\testdata.fc %DEST%\samples\console\testdata.fc rem Copy regex and zlib files @@ -51,101 +72,27 @@ rem The files not in src/files.lst copy /q src\msw\dummy.cpp %DEST%\src\msw\dummy.cpp copy /q src\msw\dummydll.cpp %DEST%\src\msw\dummydll.cpp +copy /q src\common\execcmn.cpp %DEST%\src\common\execcmn.cpp copy /q src\common\unictabl.inc %DEST%\src\common\unictabl.inc +copy /q src\common\unzip.h %DEST%\src\common\unzip.h -rem The rest is generated from src/files.lst - -copy /q include\wx\app.h %DEST%\include\wx\app.h -copy /q include\wx\arrimpl.cpp %DEST%\include\wx\arrimpl.cpp -copy /q include\wx\buffer.h %DEST%\include\wx\buffer.h -copy /q include\wx\chkconf.h %DEST%\include\wx\chkconf.h -copy /q include\wx\clntdata.h %DEST%\include\wx\clntdata.h -copy /q include\wx\cmdline.h %DEST%\include\wx\cmdline.h -copy /q include\wx\confbase.h %DEST%\include\wx\confbase.h -copy /q include\wx\config.h %DEST%\include\wx\config.h -copy /q include\wx\date.h %DEST%\include\wx\date.h -copy /q include\wx\datetime.h %DEST%\include\wx\datetime.h -copy /q include\wx\datetime.inl %DEST%\include\wx\datetime.inl -copy /q include\wx\datstrm.h %DEST%\include\wx\datstrm.h -copy /q include\wx\db.h %DEST%\include\wx\db.h -copy /q include\wx\dbtable.h %DEST%\include\wx\dbtable.h -copy /q include\wx\dde.h %DEST%\include\wx\dde.h -copy /q include\wx\debug.h %DEST%\include\wx\debug.h -copy /q include\wx\defs.h %DEST%\include\wx\defs.h -copy /q include\wx\dir.h %DEST%\include\wx\dir.h -copy /q include\wx\dynarray.h %DEST%\include\wx\dynarray.h -copy /q include\wx\dynlib.h %DEST%\include\wx\dynlib.h -copy /q include\wx\encconv.h %DEST%\include\wx\encconv.h -copy /q include\wx\event.h %DEST%\include\wx\event.h -copy /q include\wx\ffile.h %DEST%\include\wx\ffile.h -copy /q include\wx\file.h %DEST%\include\wx\file.h -copy /q include\wx\fileconf.h %DEST%\include\wx\fileconf.h -copy /q include\wx\filefn.h %DEST%\include\wx\filefn.h -copy /q include\wx\filename.h %DEST%\include\wx\filename.h -copy /q include\wx\filesys.h %DEST%\include\wx\filesys.h -copy /q include\wx\fontenc.h %DEST%\include\wx\fontenc.h -copy /q include\wx\fontmap.h %DEST%\include\wx\fontmap.h -copy /q include\wx\fs_inet.h %DEST%\include\wx\fs_inet.h -copy /q include\wx\fs_mem.h %DEST%\include\wx\fs_mem.h -copy /q include\wx\fs_zip.h %DEST%\include\wx\fs_zip.h -copy /q include\wx\gsocket.h %DEST%\include\wx\gsocket.h -copy /q include\wx\hash.h %DEST%\include\wx\hash.h -copy /q include\wx\intl.h %DEST%\include\wx\intl.h -copy /q include\wx\ioswrap.h %DEST%\include\wx\ioswrap.h -copy /q include\wx\ipcbase.h %DEST%\include\wx\ipcbase.h -copy /q include\wx\list.h %DEST%\include\wx\list.h -copy /q include\wx\listimpl.cpp %DEST%\include\wx\listimpl.cpp -copy /q include\wx\log.h %DEST%\include\wx\log.h -copy /q include\wx\longlong.h %DEST%\include\wx\longlong.h -copy /q include\wx\memconf.h %DEST%\include\wx\memconf.h -copy /q include\wx\memory.h %DEST%\include\wx\memory.h -copy /q include\wx\memtext.h %DEST%\include\wx\memtext.h -copy /q include\wx\mimetype.h %DEST%\include\wx\mimetype.h -copy /q include\wx\module.h %DEST%\include\wx\module.h -copy /q include\wx\mstream.h %DEST%\include\wx\mstream.h -copy /q include\wx\object.h %DEST%\include\wx\object.h -copy /q include\wx\objstrm.h %DEST%\include\wx\objstrm.h -copy /q include\wx\platform.h %DEST%\include\wx\platform.h -copy /q include\wx\process.h %DEST%\include\wx\process.h -copy /q include\wx\regex.h %DEST%\include\wx\regex.h -copy /q include\wx\sckaddr.h %DEST%\include\wx\sckaddr.h -copy /q include\wx\sckipc.h %DEST%\include\wx\sckipc.h -copy /q include\wx\sckstrm.h %DEST%\include\wx\sckstrm.h -copy /q include\wx\serbase.h %DEST%\include\wx\serbase.h -copy /q include\wx\snglinst.h %DEST%\include\wx\snglinst.h -copy /q include\wx\socket.h %DEST%\include\wx\socket.h -copy /q include\wx\strconv.h %DEST%\include\wx\strconv.h -copy /q include\wx\stream.h %DEST%\include\wx\stream.h -copy /q include\wx\string.h %DEST%\include\wx\string.h -copy /q include\wx\sysopt.h %DEST%\include\wx\sysopt.h -copy /q include\wx\textbuf.h %DEST%\include\wx\textbuf.h -copy /q include\wx\textfile.h %DEST%\include\wx\textfile.h -copy /q include\wx\thread.h %DEST%\include\wx\thread.h -copy /q include\wx\time.h %DEST%\include\wx\time.h -copy /q include\wx\timer.h %DEST%\include\wx\timer.h -copy /q include\wx\tokenzr.h %DEST%\include\wx\tokenzr.h -copy /q include\wx\txtstrm.h %DEST%\include\wx\txtstrm.h -copy /q include\wx\unzip.h %DEST%\include\wx\unzip.h -copy /q include\wx\url.h %DEST%\include\wx\url.h -copy /q include\wx\utils.h %DEST%\include\wx\utils.h -copy /q include\wx\variant.h %DEST%\include\wx\variant.h -copy /q include\wx\vector.h %DEST%\include\wx\vector.h -copy /q include\wx\version.h %DEST%\include\wx\version.h -copy /q include\wx\wfstream.h %DEST%\include\wx\wfstream.h -copy /q include\wx\wx.h %DEST%\include\wx\wx.h -copy /q include\wx\wxchar.h %DEST%\include\wx\wxchar.h -copy /q include\wx\wxprec.h %DEST%\include\wx\wxprec.h -copy /q include\wx\zipstrm.h %DEST%\include\wx\zipstrm.h -copy /q include\wx\zstream.h %DEST%\include\wx\zstream.h -copy /q include\wx\unix\gsockunx.h %DEST%\include\wx\unix\gsockunx.h -copy /q include\wx\unix\mimetype.h %DEST%\include\wx\unix\mimetype.h -copy /q include\wx\msw\dde.h %DEST%\include\wx\msw\dde.h -copy /q include\wx\msw\mimetype.h %DEST%\include\wx\msw\mimetype.h -copy /q include\wx\protocol\file.h %DEST%\include\wx\protocol\file.h -copy /q include\wx\protocol\ftp.h %DEST%\include\wx\protocol\ftp.h -copy /q include\wx\protocol\http.h %DEST%\include\wx\protocol\http.h -copy /q include\wx\protocol\protocol.h %DEST%\include\wx\protocol\protocol.h +copy /q include\wx\msw\gsockmsw.h %DEST%\include\wx\msw\gsockmsw.h +copy /q include\wx\msw\missing.h %DEST%\include\wx\msw\missing.h +copy /q include\wx\msw\mslu.h %DEST%\include\wx\msw\mslu.h +copy /q include\wx\msw\msvcrt.h %DEST%\include\wx\msw\msvcrt.h +copy /q include\wx\msw\private.h %DEST%\include\wx\msw\private.h +copy /q include\wx\msw\regconf.h %DEST%\include\wx\msw\regconf.h +copy /q include\wx\msw\registry.h %DEST%\include\wx\msw\registry.h +rem The rest is generated from src/files.lst by pasting the ALL_SOURCES and +rem ALL_HEADERS here and doing +rem +rem .,$s@^\s*\(.*\)/\([^ ]*\)\( \\\)\?$@copy /q src\\\1\\\2 %DEST%\\src\\\1\\\2 +rem +rem and +rem +rem .,$s@/@\\@|exe "normal "|.,$s@^\s*\([^ ]*\)\( \\\)\?$@copy /q include\\wx\\\1 %DEST%\\include\\wx\\\1 +rem copy /q src\common\init.cpp %DEST%\src\common\init.cpp copy /q src\common\appcmn.cpp %DEST%\src\common\appcmn.cpp copy /q src\common\clntdata.cpp %DEST%\src\common\clntdata.cpp @@ -158,6 +105,7 @@ copy /q src\common\dbtable.cpp %DEST%\src\common\dbtable.cpp copy /q src\common\dircmn.cpp %DEST%\src\common\dircmn.cpp copy /q src\common\dynarray.cpp %DEST%\src\common\dynarray.cpp copy /q src\common\dynlib.cpp %DEST%\src\common\dynlib.cpp +copy /q src\common\dynload.cpp %DEST%\src\common\dynload.cpp copy /q src\common\encconv.cpp %DEST%\src\common\encconv.cpp copy /q src\common\event.cpp %DEST%\src\common\event.cpp copy /q src\common\extended.c %DEST%\src\common\extended.c @@ -173,6 +121,7 @@ copy /q src\common\fs_mem.cpp %DEST%\src\common\fs_mem.cpp copy /q src\common\fs_zip.cpp %DEST%\src\common\fs_zip.cpp copy /q src\common\ftp.cpp %DEST%\src\common\ftp.cpp copy /q src\common\hash.cpp %DEST%\src\common\hash.cpp +copy /q src\common\hashmap.cpp %DEST%\src\common\hashmap.cpp copy /q src\common\http.cpp %DEST%\src\common\http.cpp copy /q src\common\intl.cpp %DEST%\src\common\intl.cpp copy /q src\common\ipcbase.cpp %DEST%\src\common\ipcbase.cpp @@ -182,9 +131,9 @@ copy /q src\common\longlong.cpp %DEST%\src\common\longlong.cpp copy /q src\common\memory.cpp %DEST%\src\common\memory.cpp copy /q src\common\mimecmn.cpp %DEST%\src\common\mimecmn.cpp copy /q src\common\module.cpp %DEST%\src\common\module.cpp +copy /q src\common\msgout.cpp %DEST%\src\common\msgout.cpp copy /q src\common\mstream.cpp %DEST%\src\common\mstream.cpp copy /q src\common\object.cpp %DEST%\src\common\object.cpp -copy /q src\common\objstrm.cpp %DEST%\src\common\objstrm.cpp copy /q src\common\process.cpp %DEST%\src\common\process.cpp copy /q src\common\protocol.cpp %DEST%\src\common\protocol.cpp copy /q src\common\regex.cpp %DEST%\src\common\regex.cpp @@ -192,7 +141,6 @@ copy /q src\common\sckaddr.cpp %DEST%\src\common\sckaddr.cpp copy /q src\common\sckfile.cpp %DEST%\src\common\sckfile.cpp copy /q src\common\sckipc.cpp %DEST%\src\common\sckipc.cpp copy /q src\common\sckstrm.cpp %DEST%\src\common\sckstrm.cpp -copy /q src\common\serbase.cpp %DEST%\src\common\serbase.cpp copy /q src\common\socket.cpp %DEST%\src\common\socket.cpp copy /q src\common\strconv.cpp %DEST%\src\common\strconv.cpp copy /q src\common\stream.cpp %DEST%\src\common\stream.cpp @@ -229,3 +177,105 @@ copy /q src\msw\snglinst.cpp %DEST%\src\msw\snglinst.cpp copy /q src\msw\thread.cpp %DEST%\src\msw\thread.cpp copy /q src\msw\utils.cpp %DEST%\src\msw\utils.cpp copy /q src\msw\utilsexc.cpp %DEST%\src\msw\utilsexc.cpp +copy /q src\msw\volume.cpp %DEST%\src\msw\volume.cpp + +copy /q include\wx\app.h %DEST%\include\wx\app.h +copy /q include\wx\arrimpl.cpp %DEST%\include\wx\arrimpl.cpp +copy /q include\wx\buffer.h %DEST%\include\wx\buffer.h +copy /q include\wx\build.h %DEST%\include\wx\build.h +copy /q include\wx\chkconf.h %DEST%\include\wx\chkconf.h +copy /q include\wx\clntdata.h %DEST%\include\wx\clntdata.h +copy /q include\wx\cmdline.h %DEST%\include\wx\cmdline.h +copy /q include\wx\confbase.h %DEST%\include\wx\confbase.h +copy /q include\wx\config.h %DEST%\include\wx\config.h +copy /q include\wx\date.h %DEST%\include\wx\date.h +copy /q include\wx\datetime.h %DEST%\include\wx\datetime.h +copy /q include\wx\datetime.inl %DEST%\include\wx\datetime.inl +copy /q include\wx\datstrm.h %DEST%\include\wx\datstrm.h +copy /q include\wx\db.h %DEST%\include\wx\db.h +copy /q include\wx\dbkeyg.h %DEST%\include\wx\dbkeyg.h +copy /q include\wx\dbtable.h %DEST%\include\wx\dbtable.h +copy /q include\wx\dde.h %DEST%\include\wx\dde.h +copy /q include\wx\debug.h %DEST%\include\wx\debug.h +copy /q include\wx\defs.h %DEST%\include\wx\defs.h +copy /q include\wx\dir.h %DEST%\include\wx\dir.h +copy /q include\wx\dynarray.h %DEST%\include\wx\dynarray.h +copy /q include\wx\dynlib.h %DEST%\include\wx\dynlib.h +copy /q include\wx\dynload.h %DEST%\include\wx\dynload.h +copy /q include\wx\encconv.h %DEST%\include\wx\encconv.h +copy /q include\wx\event.h %DEST%\include\wx\event.h +copy /q include\wx\features.h %DEST%\include\wx\features.h +copy /q include\wx\ffile.h %DEST%\include\wx\ffile.h +copy /q include\wx\file.h %DEST%\include\wx\file.h +copy /q include\wx\fileconf.h %DEST%\include\wx\fileconf.h +copy /q include\wx\filefn.h %DEST%\include\wx\filefn.h +copy /q include\wx\filename.h %DEST%\include\wx\filename.h +copy /q include\wx\filesys.h %DEST%\include\wx\filesys.h +copy /q include\wx\fontenc.h %DEST%\include\wx\fontenc.h +copy /q include\wx\fontmap.h %DEST%\include\wx\fontmap.h +copy /q include\wx\fs_inet.h %DEST%\include\wx\fs_inet.h +copy /q include\wx\fs_mem.h %DEST%\include\wx\fs_mem.h +copy /q include\wx\fs_zip.h %DEST%\include\wx\fs_zip.h +copy /q include\wx\gsocket.h %DEST%\include\wx\gsocket.h +copy /q include\wx\hash.h %DEST%\include\wx\hash.h +copy /q include\wx\hashmap.h %DEST%\include\wx\hashmap.h +copy /q include\wx\intl.h %DEST%\include\wx\intl.h +copy /q include\wx\ioswrap.h %DEST%\include\wx\ioswrap.h +copy /q include\wx\ipc.h %DEST%\include\wx\ipc.h +copy /q include\wx\ipcbase.h %DEST%\include\wx\ipcbase.h +copy /q include\wx\isql.h %DEST%\include\wx\isql.h +copy /q include\wx\isqlext.h %DEST%\include\wx\isqlext.h +copy /q include\wx\list.h %DEST%\include\wx\list.h +copy /q include\wx\listimpl.cpp %DEST%\include\wx\listimpl.cpp +copy /q include\wx\log.h %DEST%\include\wx\log.h +copy /q include\wx\longlong.h %DEST%\include\wx\longlong.h +copy /q include\wx\memconf.h %DEST%\include\wx\memconf.h +copy /q include\wx\memory.h %DEST%\include\wx\memory.h +copy /q include\wx\memtext.h %DEST%\include\wx\memtext.h +copy /q include\wx\mimetype.h %DEST%\include\wx\mimetype.h +copy /q include\wx\module.h %DEST%\include\wx\module.h +copy /q include\wx\msgout.h %DEST%\include\wx\msgout.h +copy /q include\wx\mstream.h %DEST%\include\wx\mstream.h +copy /q include\wx\object.h %DEST%\include\wx\object.h +copy /q include\wx\platform.h %DEST%\include\wx\platform.h +copy /q include\wx\process.h %DEST%\include\wx\process.h +copy /q include\wx\regex.h %DEST%\include\wx\regex.h +copy /q include\wx\sckaddr.h %DEST%\include\wx\sckaddr.h +copy /q include\wx\sckipc.h %DEST%\include\wx\sckipc.h +copy /q include\wx\sckstrm.h %DEST%\include\wx\sckstrm.h +copy /q include\wx\snglinst.h %DEST%\include\wx\snglinst.h +copy /q include\wx\socket.h %DEST%\include\wx\socket.h +copy /q include\wx\strconv.h %DEST%\include\wx\strconv.h +copy /q include\wx\stream.h %DEST%\include\wx\stream.h +copy /q include\wx\string.h %DEST%\include\wx\string.h +copy /q include\wx\sysopt.h %DEST%\include\wx\sysopt.h +copy /q include\wx\textbuf.h %DEST%\include\wx\textbuf.h +copy /q include\wx\textfile.h %DEST%\include\wx\textfile.h +copy /q include\wx\thread.h %DEST%\include\wx\thread.h +copy /q include\wx\thrimpl.cpp %DEST%\include\wx\thrimpl.cpp +copy /q include\wx\time.h %DEST%\include\wx\time.h +copy /q include\wx\timer.h %DEST%\include\wx\timer.h +copy /q include\wx\tokenzr.h %DEST%\include\wx\tokenzr.h +copy /q include\wx\txtstrm.h %DEST%\include\wx\txtstrm.h +copy /q include\wx\url.h %DEST%\include\wx\url.h +copy /q include\wx\utils.h %DEST%\include\wx\utils.h +copy /q include\wx\variant.h %DEST%\include\wx\variant.h +copy /q include\wx\vector.h %DEST%\include\wx\vector.h +copy /q include\wx\version.h %DEST%\include\wx\version.h +copy /q include\wx\volume.h %DEST%\include\wx\volume.h +copy /q include\wx\wfstream.h %DEST%\include\wx\wfstream.h +copy /q include\wx\wx.h %DEST%\include\wx\wx.h +copy /q include\wx\wxchar.h %DEST%\include\wx\wxchar.h +copy /q include\wx\wxprec.h %DEST%\include\wx\wxprec.h +copy /q include\wx\zipstrm.h %DEST%\include\wx\zipstrm.h +copy /q include\wx\zstream.h %DEST%\include\wx\zstream.h +copy /q include\wx\unix\gsockunx.h %DEST%\include\wx\unix\gsockunx.h +copy /q include\wx\unix\mimetype.h %DEST%\include\wx\unix\mimetype.h +copy /q include\wx\msw\dde.h %DEST%\include\wx\msw\dde.h +copy /q include\wx\msw\gccpriv.h %DEST%\include\wx\msw\gccpriv.h +copy /q include\wx\msw\mimetype.h %DEST%\include\wx\msw\mimetype.h +copy /q include\wx\msw\winundef.h %DEST%\include\wx\msw\winundef.h +copy /q include\wx\protocol\file.h %DEST%\include\wx\protocol\file.h +copy /q include\wx\protocol\ftp.h %DEST%\include\wx\protocol\ftp.h +copy /q include\wx\protocol\http.h %DEST%\include\wx\protocol\http.h +copy /q include\wx\protocol\protocol.h %DEST%\include\wx\protocol\protocol.h diff --git a/distrib/msw/cw.rsp b/distrib/msw/cw.rsp index 108452a03d..ecd847c8db 100644 --- a/distrib/msw/cw.rsp +++ b/distrib/msw/cw.rsp @@ -71,6 +71,7 @@ samples/rotate/*W7.xml samples/sashtest/*W7.xml samples/scroll/*W7.xml samples/scrollsub/*W7.xml +samples/shaped/*W7.xml samples/sockets/*W7.xml samples/splitter/*W7.xml samples/statbar/*W7.xml diff --git a/distrib/msw/cw_mac.rsp b/distrib/msw/cw_mac.rsp index 55621df2ff..f59f7874bf 100644 --- a/distrib/msw/cw_mac.rsp +++ b/distrib/msw/cw_mac.rsp @@ -129,6 +129,8 @@ samples/scroll/*M?.xml samples/scroll/*.mcp samples/scrollsub/*M?.xml samples/scrollsub/*.mcp +samples/shaped/*M?.xml +samples/shaped/*.mcp samples/sockets/*M?.xml samples/sockets/*.mcp samples/splitter/*M?.xml diff --git a/distrib/msw/docsrc.rsp b/distrib/msw/docsrc.rsp index 9bbf15761a..eda8928447 100644 --- a/distrib/msw/docsrc.rsp +++ b/distrib/msw/docsrc.rsp @@ -32,7 +32,6 @@ utils/dialoged/docs/*.gif contrib/docs/latex/svg/*.gif contrib/docs/latex/svg/*.tex -contrib/docs/latex/svg/*.gif contrib/docs/latex/svg/*.ini contrib/docs/latex/svg/*.sty diff --git a/distrib/msw/filerepl.bat b/distrib/msw/filerepl.bat index 815fc0b19b..450a30b609 100755 --- a/distrib/msw/filerepl.bat +++ b/distrib/msw/filerepl.bat @@ -10,6 +10,7 @@ set files=%3 echo s/%keyword/%repl/g > script.tmp call %wxwin\distrib\msw\expdwild.bat %3 list.tmp +Rem goto end set len=%@LINES[%files] do i = 0 to %len by 1 diff --git a/distrib/msw/generic.rsp b/distrib/msw/generic.rsp index 7e61bcc925..7d0a054cb2 100644 --- a/distrib/msw/generic.rsp +++ b/distrib/msw/generic.rsp @@ -8,11 +8,9 @@ config.sub configure.in setup.h.in install-sh -missing mkinstalldirs -modules -template.mak wx-config.in +version-script.in setup.h_vms distrib/msw/*.rsp @@ -28,19 +26,18 @@ distrib/msw/tmake/makeall.bat distrib/msw/tmake/makeall.sh distrib/msw/tmake/wxwin.pro distrib/msw/tmake/tmake.conf -distrib/gtk/* locale/*.po -locale/*.mo locale/Makefile art/*.xpm +art/*.ico +art/*.png art/motif/*.xpm art/gtk/*.xpm docs/readme.txt docs/readme_vms.txt -docs/install.txt docs/changes.txt docs/todo.txt docs/licence.txt @@ -48,18 +45,10 @@ docs/licendoc.txt docs/preamble.txt docs/gpl.txt docs/lgpl.txt -docs/symbols.txt -docs/bugs.txt docs/index.htm docs/html/*.htm docs/html/*.gif -docs/html/*.png -docs/html/icons/*.gif -docs/html/icons/*.png -docs/html/icons/*.jpg docs/html/images/*.gif -docs/html/images/*.png -docs/html/images/*.jpg docs/tech/*.txt docs/tech/*.htm @@ -152,19 +141,9 @@ lib/dummy tools/gettext/*.* -bitmaps/xpm/16x16/*.* -bitmaps/xpm/32x32/*.* -bitmaps/xpm/64x64/*.* -bitmaps/xpm/misc/*.* -bitmaps/*.* -bitmaps/bmp/16x15/*.* -bitmaps/bmp/10x8/*.* -bitmaps/ico/32x32/*.* - misc/afm/*.afm misc/gs_afm/*.afm -utils/*.txt utils/make*.* utils/configure utils/configure.in @@ -572,6 +551,7 @@ samples/html/test/*.ico samples/html/test/*.htm samples/html/test/*.html samples/html/test/*.pro +samples/html/test/*.gif samples/html/virtual/*.cpp samples/html/virtual/*.h @@ -649,6 +629,7 @@ samples/image/*.ico samples/image/*.cur samples/image/*.txt samples/image/*.pro +samples/image/*.ani samples/internat/*.cpp samples/internat/*.h @@ -999,6 +980,19 @@ samples/scrollsub/*.ico samples/scrollsub/*.txt samples/scrollsub/*.pro +samples/shaped/*.cpp +samples/shaped/*.h +samples/shaped/makefile* +samples/shaped/*.rc +samples/shaped/*.def +samples/shaped/*.bmp +samples/shaped/*.xpm +samples/shaped/*.xbm +samples/shaped/*.png +samples/shaped/*.ico +samples/shaped/*.txt +samples/shaped/*.pro + samples/splitter/*.cpp samples/splitter/*.h samples/splitter/*.def diff --git a/distrib/msw/innobott.txt b/distrib/msw/innobott.txt index 4fda9d8113..5aa2666062 100644 --- a/distrib/msw/innobott.txt +++ b/distrib/msw/innobott.txt @@ -6,7 +6,6 @@ Name: {group}\Tex2rtf Help; Filename: {app}\bin\tex2rtf.chm; WorkingDir: {app}\bin; IconIndex: 0; Flags: useapppaths Name: {group}\Changes; Filename: {app}\docs\changes.txt; WorkingDir: {app}; IconIndex: 0; Flags: useapppaths Name: {group}\Readme; Filename: {app}\docs\readme.txt; WorkingDir: {app}; IconIndex: 0; Flags: useapppaths -; Name: {group}\Debug View; Filename: {app}\bin\DBGVIEW.EXE; WorkingDir: {app}\bin; IconFilename: {app}\bin\DBGVIEW.EXE; IconIndex: 0 Name: {group}\Compiling wxWindows; Filename: {app}\docs\msw\install.txt; WorkingDir: {app}; IconIndex: 0; Flags: useapppaths Name: {group}\wxWindows Manual; Filename: {app}\docs\htmlhelp\wx.chm; WorkingDir: {app}; IconIndex: 0; Flags: useapppaths Name: {group}\Tutorial; Filename: {app}\docs\pdf\wxTutorial.pdf; WorkingDir: {app}; IconIndex: 0; Flags: useapppaths @@ -16,6 +15,7 @@ [INI] [Registry] + Root: HKCU; SubKey: Software\Environment\; ValueName: WXWIN; ValueType: string; ValueData: {app}; Flags: createvalueifdoesntexist [UninstallDelete] @@ -32,10 +32,10 @@ ; DO NOT DELETE THEM or you may be unable to reload the script ;[ScriptSetup] -;VerNum=2.3.3 +;VerNum=2.4.1 ;InnoVer=1.3 ;AddVerTo=AppVerName ;SetupFilename=setup.exe -;OutputFolder=C:\wx2dev\wxWindows\deliver +;OutputFolder=C:\wx24\wxWindows\deliver ;CopyrightText=Copyright © The wxWindows Team diff --git a/distrib/msw/innotop.txt b/distrib/msw/innotop.txt index 7e5c76ba20..c8323db6f6 100644 --- a/distrib/msw/innotop.txt +++ b/distrib/msw/innotop.txt @@ -4,13 +4,13 @@ [Setup] MinVersion=4.0,4.0 - AppName=wxWindows 2.3.3 + AppName=wxWindows 2.4.1 AppId=wxWindows CreateUninstallRegKey=1 UsePreviousAppDir=0 UsePreviousGroup=0 - AppVersion=2.3.3 - AppVerName=wxWindows 2.3.3 + AppVersion=2.4.1 + AppVerName=wxWindows 2.4.1 AppCopyright=Copyright © The wxWindows Team BackColor=$FF0000 BackColor2=$000000 @@ -19,7 +19,7 @@ WindowStartMaximized=1 WindowVisible=1 WindowResizable=1 - UninstallDisplayName=wxWindows 2.3.3 + UninstallDisplayName=wxWindows 2.4.1 UninstallLogMode=Append DirExistsWarning=auto UninstallFilesDir={app} @@ -28,19 +28,19 @@ CreateAppDir=1 DisableProgramGroupPage=0 AlwaysCreateUninstallIcon=1 - UninstallIconName=Uninstall wxWindows 2.3.3 + UninstallIconName=Uninstall wxWindows 2.4.1 Uninstallable=1 - DefaultDirName=c:\wxWindows_2.3.3 - DefaultGroupName=wxWindows 2.3.3 - LicenseFile=C:\wx2dev\wxWindows\docs\licence.txt - InfoBeforeFile=C:\wx2dev\wxWindows\docs\readme.txt - InfoAfterFile=C:\wx2dev\wxWindows\docs\msw\install.txt + DefaultDirName=c:\wxWindows-2.4.1 + DefaultGroupName=wxWindows 2.4.1 + LicenseFile=C:\wx24\wxWindows\docs\licence.txt + InfoBeforeFile=C:\wx24\wxWindows\docs\readme.txt + InfoAfterFile=C:\wx24\wxWindows\docs\msw\install.txt MessagesFile=compiler:default.isl DiskSpanning=1 DiskSize=1457664 DiskClusterSize=512 ReserveBytes=0 UseSetupLdr=1 - SourceDir=c:\wx2dev\wxWindows\deliver\wxWindows-2.3.3 - OutputDir=c:\wx2dev\wxWindows\deliver + SourceDir=c:\wx24\wxWindows\deliver\wxWindows-2.4.1 + OutputDir=c:\wx24\wxWindows\deliver diff --git a/distrib/msw/makefile.rsp b/distrib/msw/makefile.rsp index 14b0c62499..1a660ca1c0 100644 --- a/distrib/msw/makefile.rsp +++ b/distrib/msw/makefile.rsp @@ -58,6 +58,7 @@ samples/rotate/Makefile.in samples/sashtest/Makefile.in samples/scroll/Makefile.in samples/scrollsub/Makefile.in +samples/shaped/Makefile.in samples/splitter/Makefile.in samples/statbar/Makefile.in samples/text/Makefile.in @@ -121,6 +122,7 @@ contrib/samples/gizmos/splittree/Makefile.in contrib/samples/gizmos/editlbox/Makefile.in contrib/samples/gizmos/dynsash/Makefile.in contrib/samples/gizmos/dynsash_switch/Makefile.in +contrib/samples/gizmos/led/Makefile.in contrib/samples/ogl/Makefile.in contrib/samples/ogl/ogledit/Makefile.in contrib/samples/ogl/studio/Makefile.in diff --git a/distrib/msw/makeinno.bat b/distrib/msw/makeinno.bat index 59f04ddee2..552b8589cf 100755 --- a/distrib/msw/makeinno.bat +++ b/distrib/msw/makeinno.bat @@ -30,11 +30,15 @@ echo [Dirs] >> %temp\files2.tmp do i = 0 to %len by 1 set line=%@LINE[%TEMP\files1.tmp,%i] +Rem echo line is %line Rem Skip files. if not isdir %line enddo set sz2=%@LEN[%line] +Rem echo size is %sz2 set n=%@EVAL[%sz2-%sz] +Rem echo n is %sz2 set line2=%@SUBSTR[%line,%sz,%n] +Rem echo line2 is %line2 if "%line2%" == "" enddo echo Name: {app}\%line2 >> %TEMP\files2.tmp @@ -63,7 +67,7 @@ enddo Rem Concatenate the 3 sections cat %wxwindir\distrib\msw\innotop.txt %TEMP\files2.tmp %wxwindir\distrib\msw\innobott.txt > %wxwindir\distrib\msw\wxwin2.iss -erase /Y %TEMP\files1.tmp +rem erase /Y %TEMP\files1.tmp rem erase /Y %TEMP\files2.tmp goto end diff --git a/distrib/msw/makerpm b/distrib/msw/makerpm new file mode 100755 index 0000000000..7744f0c05b --- /dev/null +++ b/distrib/msw/makerpm @@ -0,0 +1,273 @@ +#!/bin/sh +# Makes the wxWindows RPMs + +doupdatecvs() +{ + cd $WXSRC + echo Updating from CVS... + cvswx update -d -P +} + +dospinwxgtk() +{ + echo Making wxGTK RPMs... + RPM_ROOT=$WXDEST/wxgtk/rpm-root + + if [ ! -d $WXDEST ]; then + mkdir $WXDEST + fi + + rm -f -r $WXDEST/wxgtk + mkdir $WXDEST/wxgtk + mkdir $WXDEST/wxgtk/release + mkdir $RPM_ROOT + + cd $WXSRC + cd locale + make allmo + cd $WXDEST/wxgtk/release + echo Configuring... + $WXSRC/configure --no-recursion + echo Making... + make -j1 dist bzip-dist-only + + echo Setting up RPM build dir $RPM_ROOT... + rm -f -r $RPM_ROOT + mkdir $RPM_ROOT + mkdir $RPM_ROOT/BUILD + mkdir $RPM_ROOT/RPMS + mkdir $RPM_ROOT/RPMS/i386 + mkdir $RPM_ROOT/RPMS/i686 + mkdir $RPM_ROOT/RPMS/noarch + mkdir $RPM_ROOT/SOURCES + mkdir $RPM_ROOT/SPECS + mkdir $RPM_ROOT/SRPMS + + echo %_topdir $RPM_ROOT > ~/.rpmmacros + + echo Copying wxGTK-$WXVER.tar.bz2 to $RPM_ROOT/SOURCES... + cp wxGTK-$WXVER.tar.bz2 $RPM_ROOT/SOURCES + echo Copying wxGTK.spec to $RPM_ROOT/SPECS... + cp $WXSRC/wxGTK.spec $RPM_ROOT/SPECS + + echo Starting wxGTK RPM build... + cd $RPM_ROOT + rpmbuild -ba SPECS/wxGTK.spec 2>&1 | tee wxGTK.out + + echo Finished wxBase RPM build, in $RPM_ROOT. + echo "SRPMS:" + ls SRPMS + echo "RPMS/i386:" + ls RPMS/i386 + + cp $RPM_ROOT/SRPMS/*.rpm $WXDEST + cp $RPM_ROOT/RPMS/i386/*.rpm $WXDEST + cp $WXDEST/wxgtk/release/*.tar.gz $WXDEST + cp $WXDEST/wxgtk/release/*.tar.bz2 $WXDEST + + echo Now try the RPMs with rpm -i. +} + +dospinwxbase() +{ + echo Making wxBase RPMs... + RPM_ROOT=$WXDEST/wxbase/rpm-root + + if [ ! -d $WXDEST ]; then + mkdir $WXDEST + fi + + rm -f -r $WXDEST/wxbase + mkdir $WXDEST/wxbase + mkdir $WXDEST/wxbase/release + mkdir $RPM_ROOT + + cd $WXSRC + cd locale + make allmo + cd $WXDEST/wxbase/release + echo Configuring... + $WXSRC/configure --disable-gui --no-recursion + echo Making... + make -j1 dist bzip-dist-only + + echo Setting up RPM build dir $RPM_ROOT... + rm -f -r $RPM_ROOT + mkdir $RPM_ROOT + mkdir $RPM_ROOT/BUILD + mkdir $RPM_ROOT/RPMS + mkdir $RPM_ROOT/RPMS/i386 + mkdir $RPM_ROOT/RPMS/i686 + mkdir $RPM_ROOT/RPMS/noarch + mkdir $RPM_ROOT/SOURCES + mkdir $RPM_ROOT/SPECS + mkdir $RPM_ROOT/SRPMS + + echo %_topdir $RPM_ROOT > ~/.rpmmacros + + echo Copying wxBase-$WXVER.tar.bz2 to $RPM_ROOT/SOURCES... + cp wxBase-$WXVER.tar.bz2 $RPM_ROOT/SOURCES + echo Copying wxBase.spec to $RPM_ROOT/SPECS... + cp $WXSRC/wxBase.spec $RPM_ROOT/SPECS + + echo Starting wxBase RPM build... + cd $RPM_ROOT + rpmbuild -ba SPECS/wxBase.spec 2>&1 | tee wxBase.out + + echo Finished wxBase RPM build, in $RPM_ROOT. + echo "SRPMS:" + ls SRPMS + echo "RPMS/i386:" + ls RPMS/i386 + + cp $RPM_ROOT/SRPMS/*.rpm $WXDEST + cp $RPM_ROOT/RPMS/i386/*.rpm $WXDEST + cp $WXDEST/wxbase/release/*.tar.gz $WXDEST + cp $WXDEST/wxbase/release/*.tar.bz2 $WXDEST + + echo Now try the RPMs with rpm -i. +} + +dospinwxx11() +{ + echo Making wxX11 RPMs... + RPM_ROOT=$WXDEST/wxx11/rpm-root + + if [ ! -d $WXDEST ]; then + mkdir $WXDEST + fi + + rm -f -r $WXDEST/wxx11 + mkdir $WXDEST/wxx11 + mkdir $WXDEST/wxx11/release + mkdir $RPM_ROOT + + cd $WXSRC + cd locale + make allmo + cd $WXDEST/wxx11/release + echo Configuring... + $WXSRC/configure --with-x11 --no-recursion + echo Making... + make -j1 dist bzip-dist-only + + echo Setting up RPM build dir $RPM_ROOT... + rm -f -r $RPM_ROOT + mkdir $RPM_ROOT + mkdir $RPM_ROOT/BUILD + mkdir $RPM_ROOT/RPMS + mkdir $RPM_ROOT/RPMS/i386 + mkdir $RPM_ROOT/RPMS/i686 + mkdir $RPM_ROOT/RPMS/noarch + mkdir $RPM_ROOT/SOURCES + mkdir $RPM_ROOT/SPECS + mkdir $RPM_ROOT/SRPMS + + echo %_topdir $RPM_ROOT > ~/.rpmmacros + + echo Copying wxX11-$WXVER.tar.bz2 to $RPM_ROOT/SOURCES... + cp wxX11-$WXVER.tar.bz2 $RPM_ROOT/SOURCES + echo Copying wxX11.spec to $RPM_ROOT/SPECS... + cp $WXSRC/wxX11.spec $RPM_ROOT/SPECS + + echo Starting wxX11 RPM build... + cd $RPM_ROOT + rpmbuild -ba SPECS/wxX11.spec 2>&1 | tee wxX11.out + + echo Finished wxX11 RPM build, in $RPM_ROOT. + echo "SRPMS:" + ls SRPMS + echo "RPMS/i386:" + ls RPMS/i386 + + cp $RPM_ROOT/SRPMS/*.rpm $WXDEST + cp $RPM_ROOT/RPMS/i386/*.rpm $WXDEST + cp $WXDEST/wxx11/release/*.tar.gz $WXDEST + cp $WXDEST/wxx11/release/*.tar.bz2 $WXDEST + + echo Now try the RPMs with rpm -i. +} + +PROGNAME=$0 +WXSRC=$1 +WXDEST=$2 +WXVER=$3 + +SPINWXX11=0 +SPINWXGTK=0 +SPINWXBASE=0 +SPINEVERYTHING=0 +UPDATECVS=0 + +usage() +{ + echo Usage: $PROGNAME "src-dir dest-dir version-number [ options ]" + echo Options: + echo " --help Display this help message" + echo " --wxgtk Spin wxGTK RPMs" + echo " --wxbase Spin wxBase RPMs" + echo " --wxx11 Spin wxX11 RPMs" + echo " --all Spin EVERYTHING" + echo " --updatecvs Update from CVS" + + exit 1 +} + +init="" +if [ "$1" = "" ] +then + usage + exit +fi + +if [ "$2" = "" ] +then + usage + exit +fi + +if [ "$3" = "" ] +then + usage + exit +fi + +# Process command line options. +shift 3 +for i in "$@"; do + case "$i" in + --wxx11) SPINWXX11=1 ;; + --wxgtk) SPINWXGTK=1 ;; + --wxbase) SPINWXBASE=1 ;; + --all) SPINEVERYTHING=1 ;; + --updatecvs) UPDATECVS=1 ;; + *) + usage + exit + ;; + esac +done + +echo About to make wxWindows RPMs: +echo From $WXSRC +echo To $WXDEST +echo Version $WXVER +echo CTRL-C if this is not correct. +read dummy + +if [ "$UPDATECVS" = "1" ]; then + doupdatecvs +fi + +if [ "$SPINWXX11" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then + dospinwxx11 +fi + +if [ "$SPINWXGTK" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then + dospinwxgtk +fi + +if [ "$SPINWXBASE" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then + dospinwxbase +fi + diff --git a/distrib/msw/stc.rsp b/distrib/msw/stc.rsp index 442a116e07..3c655da7d4 100644 --- a/distrib/msw/stc.rsp +++ b/distrib/msw/stc.rsp @@ -43,7 +43,6 @@ contrib/samples/stc/*.rc contrib/samples/stc/*.def contrib/samples/stc/*.xbm contrib/samples/stc/make*.* -contrib/samples/stc/Makefile contrib/samples/stc/*.txt contrib/samples/stc/*.ico contrib/samples/stc/*.bmp diff --git a/distrib/msw/tardist b/distrib/msw/tardist index 4093e66f17..39caf9cb4c 100644 --- a/distrib/msw/tardist +++ b/distrib/msw/tardist @@ -29,6 +29,361 @@ expandlines() done } +doinit() +{ + cd $WXSRC + echo Removing backup files... + rm *~ */*~ */*/*~ */*/*/*~ */*/*/*/*~ + + rm -f $WXDEST/wx*-${WXVER}*.tar.gz + # Copy setup files + cp $WXSRC/include/wx/os2/SETUP0.H $WXSRC/include/wx/os2/setup.h + cp $WXSRC/include/wx/msw/setup0.h $WXSRC/include/wx/msw/setup.h + cp $WXSRC/include/wx/univ/setup0.h $WXSRC/include/wx/univ/setup.h + + # Copy readme and other files + + cp $WXSRC/docs/readme.txt $WXDEST/readme-${WXVER}.txt + cp $WXSRC/docs/changes.txt $WXDEST/changes-${WXVER}.txt + cp $WXSRC/docs/mgl/readme.txt $WXDEST/readme-mgl-${WXVER}.txt + cp $WXSRC/docs/mgl/install.txt $WXDEST/install-mgl-${WXVER}.txt + cp $WXSRC/docs/x11/readme.txt $WXDEST/readme-x11-${WXVER}.txt + cp $WXSRC/docs/x11/readme-nanox.txt $WXDEST/readme-nanox-${WXVER}.txt + cp $WXSRC/docs/x11/install.txt $WXDEST/install-x11-${WXVER}.txt + cp $WXSRC/docs/motif/readme.txt $WXDEST/readme-motif-${WXVER}.txt + cp $WXSRC/docs/motif/install.txt $WXDEST/install-motif-${WXVER}.txt + cp $WXSRC/docs/msw/readme.txt $WXDEST/readme-msw-${WXVER}.txt + cp $WXSRC/docs/msw/install.txt $WXDEST/install-msw-${WXVER}.txt + cp $WXSRC/docs/gtk/readme.txt $WXDEST/readme-gtk-${WXVER}.txt + cp $WXSRC/docs/gtk/install.txt $WXDEST/install-gtk-${WXVER}.txt + cp $WXSRC/docs/mac/readme.txt $WXDEST/readme-mac-${WXVER}.txt + cp $WXSRC/docs/mac/install.txt $WXDEST/install-mac-${WXVER}.txt + cp $WXSRC/docs/os2/install.txt $WXDEST/install-os2-${WXVER}.txt + + # Make .mo files + cd $WXSRC/locale + make allmo +} + +dospinwxgtk() +{ +echo Tarring wxGTK... + +cd $WXSRC +cat $WXSRC/distrib/msw/generic.rsp $WXSRC/distrib/msw/contrib.rsp $WXSRC/distrib/msw/stc.rsp $WXSRC/distrib/msw/xml.rsp $WXSRC/distrib/msw/utils.rsp $WXSRC/distrib/msw/ogl.rsp $WXSRC/distrib/msw/tex2rtf.rsp $WXSRC/distrib/msw/dialoged.rsp $WXSRC/distrib/msw/gtk.rsp $WXSRC/distrib/msw/makefile.rsp $WXSRC/distrib/msw/tiff.rsp $WXSRC/distrib/msw/jpeg.rsp > /tmp/wxgtk_in.txt +expandlines /tmp/wxgtk_in.txt /tmp/wxgtk.txt +$TAR cf $WXDEST/wxGTK-${WXVER}.tar -T /tmp/wxgtk.txt + +echo Re-tarring wxGTK in a subdirectory... +cd $WXDEST +mkdir wxGTK-${WXVER} +cd wxGTK-${WXVER} +$TAR xf ../wxGTK-${WXVER}.tar +cd .. +rm -f wxGTK-${WXVER}.tar +$TAR cf $WXDEST/wxGTK-${WXVER}.tar wxGTK-${WXVER}/* +rm -f -r wxGTK-${WXVER} +gzip $WXDEST/wxGTK-${WXVER}.tar +} + +dospinwxmotif() +{ +echo Tarring wxMotif... + +cd $WXSRC +cat $WXSRC/distrib/msw/generic.rsp $WXSRC/distrib/msw/motif.rsp $WXSRC/distrib/msw/contrib.rsp $WXSRC/distrib/msw/stc.rsp $WXSRC/distrib/msw/xml.rsp $WXSRC/distrib/msw/ogl.rsp $WXSRC/distrib/msw/makefile.rsp $WXSRC/distrib/msw/tiff.rsp $WXSRC/distrib/msw/jpeg.rsp > /tmp/wxmotif_in.txt +expandlines /tmp/wxmotif_in.txt /tmp/wxmotif.txt +$TAR cf $WXDEST/wxMotif-${WXVER}.tar -T /tmp/wxmotif.txt + +echo Re-tarring wxMotif in a subdirectory... +cd $WXDEST +mkdir wxMotif-${WXVER} +cd wxMotif-${WXVER} +$TAR xf ../wxMotif-${WXVER}.tar +cd .. +rm -f wxMotif-${WXVER}.tar +$TAR cf $WXDEST/wxMotif-${WXVER}.tar wxMotif-${WXVER}/* +rm -f -r wxMotif-${WXVER} +gzip $WXDEST/wxMotif-${WXVER}.tar +} + +dospinwxx11() +{ +echo Tarring wxX11... + +### wxX11: combined wxMotif and wxX11 distributions +cd $WXSRC +cat $WXSRC/distrib/msw/generic.rsp $WXSRC/distrib/msw/motif.rsp $WXSRC/distrib/msw/x11.rsp $WXSRC/distrib/msw/univ.rsp $WXSRC/distrib/msw/contrib.rsp $WXSRC/distrib/msw/stc.rsp $WXSRC/distrib/msw/utils.rsp $WXSRC/distrib/msw/xml.rsp $WXSRC/distrib/msw/dialoged.rsp $WXSRC/distrib/msw/ogl.rsp $WXSRC/distrib/msw/makefile.rsp $WXSRC/distrib/msw/tiff.rsp $WXSRC/distrib/msw/jpeg.rsp > /tmp/wxx11_in.txt +expandlines /tmp/wxx11_in.txt /tmp/wxx11.txt +$TAR cf $WXDEST/wxX11-${WXVER}.tar -T /tmp/wxx11.txt + +echo Re-tarring wxX11 in a subdirectory... +cd $WXDEST +mkdir wxX11-${WXVER} +cd wxX11-${WXVER} +$TAR xf ../wxX11-${WXVER}.tar +cd .. +rm -f wxX11-${WXVER}.tar +$TAR cf $WXDEST/wxX11-${WXVER}.tar wxX11-${WXVER}/* +rm -f -r wxX11-${WXVER} +gzip $WXDEST/wxX11-${WXVER}.tar +} + +### wxMSW +# cd $WXSRC +# cat $WXSRC/distrib/msw/msw.rsp $WXSRC/distrib/msw/vc.rsp $WXSRC/distrib/msw/bc.rsp $WXSRC/distrib/msw/contrib.rsp $WXSRC/distrib/msw/xml.rsp $WXSRC/distrib/msw/makefile.rsp $WXSRC/distrib/msw/tiff.rsp $WXSRC/distrib/msw/jpeg.rsp > /tmp/wxmsw_in.txt +# expandlines /tmp/wxmsw_in.txt /tmp/wxmsw.txt +# $TAR cf $WXDEST/wxMSW-${WXVER}.tar -T /tmp/wxmsw.txt +# gzip $WXDEST/wxMSW-${WXVER}.tar + +dospinwxmac() +{ +echo Tarring wxMac... +### wxMac +cp $WXSRC/include/wx/mac/setup0.h $WXSRC/include/wx/setup.h +cd $WXSRC +cat $WXSRC/distrib/msw/mac.rsp $WXSRC/distrib/msw/generic.rsp $WXSRC/distrib/msw/cw_mac.rsp $WXSRC/distrib/msw/tex2rtf.rsp $WXSRC/distrib/msw/utils.rsp $WXSRC/distrib/msw/dialoged.rsp $WXSRC/distrib/msw/ogl.rsp $WXSRC/distrib/msw/stc.rsp $WXSRC/distrib/msw/xml.rsp $WXSRC/distrib/msw/contrib.rsp $WXSRC/distrib/msw/makefile.rsp $WXSRC/distrib/msw/tiff.rsp $WXSRC/distrib/msw/jpeg.rsp > /tmp/wxmac_in.txt +expandlines /tmp/wxmac_in.txt /tmp/wxmac.txt +$TAR cf $WXDEST/wxMac-${WXVER}.tar -T /tmp/wxmac.txt + +rm -f $WXSRC/include/wx/setup.h + +echo Re-tarring wxMac in a subdirectory... +cd $WXDEST +mkdir wxMac-${WXVER} +cd wxMac-${WXVER} + +# If we have the full set of Mac CW project files, +# get them +if [ -f $WXDEST/extra/wxWindows-${WXVER}-CW-Mac.zip ]; then + unzip -o $WXDEST/extra/wxWindows-${WXVER}-CW-Mac.zip +else + echo "Warning - did not find $WXDEST/deliver/extra/wxWindows-${WXVER}-CW-Mac.zip" +fi + +$TAR xf ../wxMac-${WXVER}.tar +rm -f -r contrib/src/mmedia contrib/samples/mmedia +cd .. +rm -f wxMac-${WXVER}.tar +$TAR cf $WXDEST/wxMac-${WXVER}.tar wxMac-${WXVER}/* +rm -f -r wxMac-${WXVER} +gzip $WXDEST/wxMac-${WXVER}.tar +} + +### wxUniv: universal-specific files +#cd $WXSRC +#cat $WXSRC/distrib/msw/univ.rsp > /tmp/wxuniv_in.txt +#expandlines /tmp/wxuniv_in.txt /tmp/wxuniv.txt +#$TAR cf $WXDEST/wxWindows-${WXVER}-Univ.tar -T /tmp/wxuniv.txt +# +#echo Re-tarring wxUniversal in a subdirectory... +#cd $WXDEST +#mkdir wxWindows-${WXVER} +#cd wxWindows-${WXVER} +#$TAR xf ../wxWindows-${WXVER}-Univ.tar +#cd .. +#rm -f wxWindows-${WXVER}-Univ.tar +#$TAR cf $WXDEST/wxWindows-${WXVER}-Univ.tar wxWindows-${WXVER}/* +#rm -f -r wxWindows-${WXVER} +#gzip $WXDEST/wxWindows-${WXVER}-Univ.tar + +dospinwxall() +{ +echo Tarring wxAll... + +### wxAll: all distributions in one giant archive +cd $WXSRC +cat $WXSRC/distrib/msw/generic.rsp $WXSRC/distrib/msw/msw.rsp $WXSRC/distrib/msw/vc.rsp $WXSRC/distrib/msw/cw.rsp $WXSRC/distrib/msw/cw_mac.rsp $WXSRC/distrib/msw/gtk.rsp $WXSRC/distrib/msw/x11.rsp $WXSRC/distrib/msw/motif.rsp $WXSRC/distrib/msw/mac.rsp $WXSRC/distrib/msw/os2.rsp $WXSRC/distrib/msw/x11.rsp $WXSRC/distrib/msw/univ.rsp $WXSRC/distrib/msw/mgl.rsp $WXSRC/distrib/msw/contrib.rsp $WXSRC/distrib/msw/utilmake.rsp $WXSRC/distrib/msw/utils.rsp $WXSRC/distrib/msw/mmedia.rsp $WXSRC/distrib/msw/tex2rtf.rsp $WXSRC/distrib/msw/stc.rsp $WXSRC/distrib/msw/xml.rsp $WXSRC/distrib/msw/dialoged.rsp $WXSRC/distrib/msw/ogl.rsp $WXSRC/distrib/msw/makefile.rsp $WXSRC/distrib/msw/tiff.rsp $WXSRC/distrib/msw/jpeg.rsp $WXSRC/distrib/msw/docsrc.rsp | uniq > /tmp/wxall_in.txt +expandlines /tmp/wxall_in.txt /tmp/wxall.txt +$TAR cf $WXDEST/wxAll-${WXVER}.tar -T /tmp/wxall.txt + +echo Re-tarring wxAll in a subdirectory... +cd $WXDEST +mkdir wxWindows-${WXVER} + +cd wxWindows-${WXVER} + +# If we have the full set of VC++ project files, +# get them +if [ -f $WXDEST/extra/wxWindows-${WXVER}-VC.zip ]; then + unzip -o $WXDEST/extra/wxWindows-${WXVER}-VC.zip +else + echo "Warning - did not find $WXDEST/deliver/extra/wxWindows-${WXVER}-VC.zip" +fi + +# If we have the full set of Mac CW project files, +# get them +if [ -f $WXDEST/extra/wxWindows-${WXVER}-CW-Mac.zip ]; then + unzip -o $WXDEST/extra/wxWindows-${WXVER}-CW-Mac.zip +else + echo "Warning - did not find $WXDEST/deliver/extra/wxWindows-${WXVER}-CW-Mac.zip" +fi + +$TAR xf ../wxAll-${WXVER}.tar + +# Translate all .dsp and .dsw files to DOS format +unix2dos --unix2dos `cat $WXSRC/distrib/msw/vc.rsp` + +# Copy OS/2 specific configure files +cp $WXSRC/distrib/os2/os2-specific.zip docs/os2 + +# Copy the OS/2 files which probably haven't been copied yet +mkdir include/wx/os2 +mkdir src/os2 +cp $WXSRC/include/wx/os2/*.H include/wx/os2 +cp $WXSRC/src/os2/*.CPP $WXSRC/src/os2/*.I src/os2 + +# Make all OS/2 files lower case +$WXSRC/distrib/msw/namedown include/wx/os2/*.H +$WXSRC/distrib/msw/namedown src/os2/*.CPP src/os2/*.I + +cd .. +rm -f wxAll-${WXVER}.tar +$TAR cf $WXDEST/wxAll-${WXVER}.tar wxWindows-${WXVER}/* +rm -f -r wxWindows-${WXVER} +gzip $WXDEST/wxAll-${WXVER}.tar +} + +dospinwxdocs() +{ +echo Tarring wxDocs... + +### Doc sources +#cd $WXSRC +#cat $WXSRC/distrib/msw/docsrc.rsp > /tmp/docsrc_in.txt +#expandlines /tmp/docsrc_in.txt /tmp/docsrc.txt +#$TAR cf $WXDEST/wxWindows-${WXVER}-doc.tar -T /tmp/docsrc.txt +# +#echo Re-tarring docs in a subdirectory... +#cd $WXDEST +#mkdir wxWindows-${WXVER} +#cd wxWindows-${WXVER} +#$TAR xf ../wxWindows-${WXVER}-doc.tar +#cd .. +#rm -f wxWindows-${WXVER}-doc.tar +#$TAR cf $WXDEST/wxWindows-${WXVER}-doc.tar wxWindows-${WXVER}/* +#rm -f -r wxWindows-${WXVER} +#gzip $WXDEST/wxWindows-${WXVER}-doc.tar + +### HTML docs +cd $WXSRC +cat $WXSRC/distrib/msw/wx_html.rsp > /tmp/html_in.txt +expandlines /tmp/html_in.txt /tmp/html.txt +$TAR cf $WXDEST/wxWindows-${WXVER}-HTML.tar -T /tmp/html.txt + +echo Re-tarring HTML in a subdirectory... +cd $WXDEST +mkdir wxWindows-${WXVER} +cd wxWindows-${WXVER} +$TAR xf ../wxWindows-${WXVER}-HTML.tar +cd .. +rm -f wxWindows-${WXVER}-HTML.tar +$TAR cf $WXDEST/wxWindows-${WXVER}-HTML.tar wxWindows-${WXVER}/* +rm -f -r wxWindows-${WXVER} +gzip $WXDEST/wxWindows-${WXVER}-HTML.tar + +### HTB docs +cd $WXSRC +cat $WXSRC/distrib/msw/wx_htb.rsp > /tmp/htb_in.txt +expandlines /tmp/htb_in.txt /tmp/htb.txt +$TAR cf $WXDEST/wxWindows-${WXVER}-HTB.tar -T /tmp/htb.txt + +echo Re-tarring HTB in a subdirectory... +cd $WXDEST +mkdir wxWindows-${WXVER} +cd wxWindows-${WXVER} +$TAR xf ../wxWindows-${WXVER}-HTB.tar +cd .. +rm -f wxWindows-${WXVER}-HTB.tar +$TAR cf $WXDEST/wxWindows-${WXVER}-HTB.tar wxWindows-${WXVER}/* +rm -f -r wxWindows-${WXVER} +gzip $WXDEST/wxWindows-${WXVER}-HTB.tar + +### PDF docs +cd $WXSRC +cat $WXSRC/distrib/msw/wx_pdf.rsp > /tmp/pdf_in.txt +expandlines /tmp/pdf_in.txt /tmp/pdf.txt +$TAR cf $WXDEST/wxWindows-${WXVER}-PDF.tar -T /tmp/pdf.txt + +echo Re-tarring PDF in a subdirectory... +cd $WXDEST +mkdir wxWindows-${WXVER} +cd wxWindows-${WXVER} +$TAR xf ../wxWindows-${WXVER}-PDF.tar +cd .. +rm -f wxWindows-${WXVER}-PDF.tar +$TAR cf $WXDEST/wxWindows-${WXVER}-PDF.tar wxWindows-${WXVER}/* +rm -f -r wxWindows-${WXVER} +gzip $WXDEST/wxWindows-${WXVER}-PDF.tar +} + +### Tex2RTF +#cd $WXSRC +#cat $WXSRC/distrib/msw/tex2rtf.rsp > /tmp/tex2rtf_in.txt +#expandlines /tmp/tex2rtf_in.txt /tmp/tex2rtf.txt +#$TAR cf $WXDEST/wxWindows-${WXVER}-tex2rtf.tar -T /tmp/tex2rtf.txt +# +#echo Re-tarring Tex2RTF in a subdirectory... +#cd $WXDEST +#mkdir wxWindows-${WXVER} +#cd wxWindows-${WXVER} +#$TAR xf ../wxWindows-${WXVER}-tex2rtf.tar +#cd .. +#rm -f wxWindows-${WXVER}-tex2rtf.tar +#$TAR cf $WXDEST/wxWindows-${WXVER}-tex2rtf.tar wxWindows-${WXVER}/* +#rm -f -r wxWindows-${WXVER} +#gzip $WXDEST/wxWindows-${WXVER}-tex2rtf.tar + +### OGL +#cd $WXSRC +#cat $WXSRC/distrib/msw/ogl.rsp > /tmp/ogl_in.txt +#expandlines /tmp/ogl_in.txt /tmp/ogl.txt +#$TAR cf $WXDEST/wxWindows-${WXVER}-ogl.tar -T /tmp/ogl.txt +# +#echo Re-tarring OGL in a subdirectory... +#cd $WXDEST +#mkdir wxWindows-${WXVER} +#cd wxWindows-${WXVER} +#$TAR xf ../wxWindows-${WXVER}-ogl.tar +#cd .. +#rm -f wxWindows-${WXVER}-ogl.tar +#$TAR cf $WXDEST/wxWindows-${WXVER}-ogl.tar wxWindows-${WXVER}/* +#rm -f -r wxWindows-${WXVER} +#gzip $WXDEST/wxWindows-${WXVER}-ogl.tar + +### JPEG +#cd $WXSRC +#cat $WXSRC/distrib/msw/jpeg.rsp > /tmp/jpeg_in.txt +#expandlines /tmp/jpeg_in.txt /tmp/jpeg.txt +#$TAR cf $WXDEST/wxWindows-${WXVER}-jpeg.tar -T /tmp/jpeg.txt +# +#echo Re-tarring jpeg in a subdirectory... +#cd $WXDEST +#mkdir wxWindows-${WXVER} +#cd wxWindows-${WXVER} +#$TAR xf ../wxWindows-${WXVER}-jpeg.tar +#cd .. +#rm -f wxWindows-${WXVER}-jpeg.tar +#$TAR cf $WXDEST/wxWindows-${WXVER}-jpeg.tar wxWindows-${WXVER}/* +#rm -f -r wxWindows-${WXVER} +#gzip $WXDEST/wxWindows-${WXVER}-jpeg.tar + +### TIFF +#cd $WXSRC +#cat $WXSRC/distrib/msw/tiff.rsp > /tmp/tiff_in.txt +#expandlines /tmp/tiff_in.txt /tmp/tiff.txt +#$TAR cf $WXDEST/wxWindows-${WXVER}-tiff.tar -T /tmp/tiff.txt +# +#echo Re-tarring docs in a subdirectory... +#cd $WXDEST +#mkdir wxWindows-${WXVER} +#cd wxWindows-${WXVER} +#$TAR xf ../wxWindows-${WXVER}-tiff.tar +#cd .. +#rm -f wxWindows-${WXVER}-tiff.tar +#$TAR cf $WXDEST/wxWindows-${WXVER}-tiff.tar wxWindows-${WXVER}/* +#rm -f -r wxWindows-${WXVER} +#gzip $WXDEST/wxWindows-${WXVER}-tiff.tar init="" if [ "$1" = "" ] @@ -49,327 +404,84 @@ then exit fi +PROGNAME=$0 +WXSRC=$1 +WXDEST=$2 WXVER=$3 +SPINWXALL=0 +SPINWXX11=0 +SPINWXGTK=0 +SPINWXMOTIF=0 +SPINWXMAC=0 +SPINWXDOCS=0 +SPINEVERYTHING=0 + +usage() +{ + echo Usage: $PROGNAME "src-dir dest-dir version-number [ options ]" + echo Options: + echo " --help Display this help message" + echo " --wxall Spin wxAll" + echo " --wxgtk Spin wxGTK" + echo " --wxmotif Spin wxMotif" + echo " --wxmac Spin wxMac" + echo " --wxx11 Spin wxX11" + echo " --wxdocs Spin docs" + echo " --all Spin EVERYTHING" + + exit 1 +} + +# Process command line options. +shift 3 +for i in "$@"; do + case "$i" in + --wxall) SPINWXALL=1 ;; + --wxx11) SPINWXX11=1 ;; + --wxgtk) SPINWXGTK=1 ;; + --wxmotif) SPINWXMOTIF=1 ;; + --wxmac) SPINWXMAC=1 ;; + --wxdocs) SPINWXDOCS=1 ;; + --all) SPINEVERYTHING=1 ;; + *) + usage + exit + ;; + esac +done + echo About to archive wxWindows: -echo From $1 -echo To $2 +echo From $WXSRC +echo To $WXDEST +echo Version $WXVER echo CTRL-C if this is not correct. read dummy -cd $1 +doinit -echo Removing backup files... -rm *~ */*~ */*/*~ */*/*/*~ */*/*/*/*~ - -rm -f $2/wx*-${WXVER}*.tar.gz - -# Copy setup files -cp $1/include/wx/os2/SETUP0.H $1/include/wx/os2/setup.h -cp $1/include/wx/msw/setup0.h $1/include/wx/msw/setup.h - -echo Tarring... - -### Generic -#cat $1/distrib/msw/generic.rsp $1/distrib/msw/contrib.rsp $1/distrib/msw/xml.rsp $1/distrib/msw/makefile.rsp > /tmp/wxgen_in.txt -#expandlines /tmp/wxgen_in.txt /tmp/wxgen.txt -#$TAR cf $2/wxWindows-${WXVER}-gen.tar -T /tmp/wxgen.txt -#gzip $2/wxWindows-${WXVER}-gen.tar -#mv $2/wxWindows-${WXVER}-gen.tar.gz $2/wxWindows-${WXVER}-gen.tgz - -### wxGTK -cd $1 -cat $1/distrib/msw/generic.rsp $1/distrib/msw/contrib.rsp $1/distrib/msw/xml.rsp $1/distrib/msw/utils.rsp $1/distrib/msw/ogl.rsp $1/distrib/msw/tex2rtf.rsp $1/distrib/msw/dialoged.rsp $1/distrib/msw/gtk.rsp $1/distrib/msw/makefile.rsp $1/distrib/msw/tiff.rsp $1/distrib/msw/jpeg.rsp > /tmp/wxgtk_in.txt -expandlines /tmp/wxgtk_in.txt /tmp/wxgtk.txt -$TAR cf $2/wxGTK-${WXVER}.tar -T /tmp/wxgtk.txt - -echo Re-tarring wxGTK in a subdirectory... -cd $2 -mkdir wxWindows-${WXVER} -cd wxWindows-${WXVER} -$TAR xf ../wxGTK-${WXVER}.tar -cd .. -rm -f wxGTK-${WXVER}.tar -$TAR cf $2/wxGTK-${WXVER}.tar wxWindows-${WXVER}/* -rm -f -r wxWindows-${WXVER} -gzip $2/wxGTK-${WXVER}.tar - -### wxMotif -cd $1 -cat $1/distrib/msw/generic.rsp $1/distrib/msw/motif.rsp $1/distrib/msw/contrib.rsp $1/distrib/msw/xml.rsp $1/distrib/msw/ogl.rsp $1/distrib/msw/makefile.rsp $1/distrib/msw/tiff.rsp $1/distrib/msw/jpeg.rsp > /tmp/wxmotif_in.txt -expandlines /tmp/wxmotif_in.txt /tmp/wxmotif.txt -$TAR cf $2/wxMotif-${WXVER}.tar -T /tmp/wxmotif.txt - -echo Re-tarring wxMotif in a subdirectory... -cd $2 -mkdir wxWindows-${WXVER} -cd wxWindows-${WXVER} -$TAR xf ../wxMotif-${WXVER}.tar -cd .. -rm -f wxMotif-${WXVER}.tar -$TAR cf $2/wxMotif-${WXVER}.tar wxWindows-${WXVER}/* -rm -f -r wxWindows-${WXVER} -gzip $2/wxMotif-${WXVER}.tar - -### wxX11: combined wxMotif and wxX11 distributions -cd $1 -cat $1/distrib/msw/generic.rsp $1/distrib/msw/motif.rsp $1/distrib/msw/x11.rsp $1/distrib/msw/univ.rsp $1/distrib/msw/contrib.rsp $1/distrib/msw/utils.rsp $1/distrib/msw/xml.rsp $1/distrib/msw/dialoged.rsp $1/distrib/msw/ogl.rsp $1/distrib/msw/makefile.rsp $1/distrib/msw/tiff.rsp $1/distrib/msw/jpeg.rsp > /tmp/wxx11_in.txt -expandlines /tmp/wxx11_in.txt /tmp/wxx11.txt -$TAR cf $2/wxX11-${WXVER}.tar -T /tmp/wxx11.txt - -echo Re-tarring wxX11 in a subdirectory... -cd $2 -mkdir wxWindows-${WXVER} -cd wxWindows-${WXVER} -$TAR xf ../wxX11-${WXVER}.tar -cd .. -rm -f wxX11-${WXVER}.tar -$TAR cf $2/wxX11-${WXVER}.tar wxWindows-${WXVER}/* -rm -f -r wxWindows-${WXVER} -gzip $2/wxX11-${WXVER}.tar - -### wxMSW -# cd $1 -# cat $1/distrib/msw/msw.rsp $1/distrib/msw/vc.rsp $1/distrib/msw/bc.rsp $1/distrib/msw/contrib.rsp $1/distrib/msw/xml.rsp $1/distrib/msw/makefile.rsp $1/distrib/msw/tiff.rsp $1/distrib/msw/jpeg.rsp > /tmp/wxmsw_in.txt -# expandlines /tmp/wxmsw_in.txt /tmp/wxmsw.txt -# $TAR cf $2/wxMSW-${WXVER}.tar -T /tmp/wxmsw.txt -# gzip $2/wxMSW-${WXVER}.tar - -### wxMac -cp $1/include/wx/mac/setup0.h $1/include/wx/setup.h -cd $1 -cat $1/distrib/msw/mac.rsp $1/distrib/msw/generic.rsp $1/distrib/msw/cw_mac.rsp $1/distrib/msw/tex2rtf.rsp $1/distrib/msw/utils.rsp $1/distrib/msw/dialoged.rsp $1/distrib/msw/ogl.rsp $1/distrib/msw/stc.rsp $1/distrib/msw/xml.rsp $1/distrib/msw/contrib.rsp $1/distrib/msw/makefile.rsp $1/distrib/msw/tiff.rsp $1/distrib/msw/jpeg.rsp > /tmp/wxmac_in.txt -expandlines /tmp/wxmac_in.txt /tmp/wxmac.txt -$TAR cf $2/wxMac-${WXVER}.tar -T /tmp/wxmac.txt - -rm -f $1/include/wx/setup.h - -echo Re-tarring wxMac in a subdirectory... -cd $2 -mkdir wxWindows-${WXVER} -cd wxWindows-${WXVER} -$TAR xf ../wxMac-${WXVER}.tar -rm -f -r contrib/src/mmedia contrib/samples/mmedia -cd .. -rm -f wxMac-${WXVER}.tar -$TAR cf $2/wxMac-${WXVER}.tar wxWindows-${WXVER}/* -rm -f -r wxWindows-${WXVER} -gzip $2/wxMac-${WXVER}.tar - -### wxUniv: universal-specific files -cd $1 -cat $1/distrib/msw/univ.rsp > /tmp/wxuniv_in.txt -expandlines /tmp/wxuniv_in.txt /tmp/wxuniv.txt -$TAR cf $2/wxWindows-${WXVER}-Univ.tar -T /tmp/wxuniv.txt - -echo Re-tarring wxUniversal in a subdirectory... -cd $2 -mkdir wxWindows-${WXVER} -cd wxWindows-${WXVER} -$TAR xf ../wxWindows-${WXVER}-Univ.tar -cd .. -rm -f wxWindows-${WXVER}-Univ.tar -$TAR cf $2/wxWindows-${WXVER}-Univ.tar wxWindows-${WXVER}/* -rm -f -r wxWindows-${WXVER} -gzip $2/wxWindows-${WXVER}-Univ.tar - -### wxAll: all distributions in one giant archive -cd $1 -cat $1/distrib/msw/generic.rsp $1/distrib/msw/msw.rsp $1/distrib/msw/vc.rsp $1/distrib/msw/cw.rsp $1/distrib/msw/cw_mac.rsp $1/distrib/msw/gtk.rsp $1/distrib/msw/x11.rsp $1/distrib/msw/motif.rsp $1/distrib/msw/mac.rsp $1/distrib/msw/os2.rsp $1/distrib/msw/x11.rsp $1/distrib/msw/univ.rsp $1/distrib/msw/mgl.rsp $1/distrib/msw/contrib.rsp $1/distrib/msw/utilmake.rsp $1/distrib/msw/utils.rsp $1/distrib/msw/mmedia.rsp $1/distrib/msw/tex2rtf.rsp $1/distrib/msw/stc.rsp $1/distrib/msw/xml.rsp $1/distrib/msw/dialoged.rsp $1/distrib/msw/ogl.rsp $1/distrib/msw/makefile.rsp $1/distrib/msw/tiff.rsp $1/distrib/msw/jpeg.rsp $1/distrib/msw/docsrc.rsp | uniq > /tmp/wxall_in.txt -expandlines /tmp/wxall_in.txt /tmp/wxall.txt -$TAR cf $2/wxAll-${WXVER}.tar -T /tmp/wxall.txt - -echo Re-tarring wxAll in a subdirectory... -cd $2 -mkdir wxWindows-${WXVER} - -# If we have the full set of VC++ project files, -# get them -if [ -f $2/extra/wxWindows-${WXVER}-VC.zip ]; then - unzip -o $2/extra/wxWindows-${WXVER}-VC.zip -else - echo "Warning - did not find $2/deliver/extra/wxWindows-${WXVER}-VC.zip" +if [ "$SPINWXX11" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then + dospinwxx11 fi -cd wxWindows-${WXVER} -$TAR xf ../wxAll-${WXVER}.tar +if [ "$SPINWXGTK" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then + dospinwxgtk +fi -# Translate all .dsp and .dsw files to DOS format -unix2dos --unix2dos `cat $1/distrib/msw/vc.rsp` +if [ "$SPINWXMAC" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then + dospinwxmac +fi -# Copy OS/2 specific configure files -cp $1/distrib/os2/os2-specific.zip docs/os2 +if [ "$SPINWXMOTIF" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then + dospinwxmotif +fi -# Copy the OS/2 files which probably haven't been copied yet -mkdir include/wx/os2 -mkdir src/os2 -cp $1/include/wx/os2/*.H include/wx/os2 -cp $1/src/os2/*.CPP $1/src/os2/*.I src/os2 +if [ "$SPINWXDOCS" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then + dospinwxdocs +fi -# Make all OS/2 files lower case -$1/distrib/msw/namedown include/wx/os2/*.H -$1/distrib/msw/namedown src/os2/*.CPP src/os2/*.I - -cd .. -rm -f wxAll-${WXVER}.tar -$TAR cf $2/wxAll-${WXVER}.tar wxWindows-${WXVER}/* -rm -f -r wxWindows-${WXVER} -gzip $2/wxAll-${WXVER}.tar +if [ "$SPINWXALL" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then + dospinwxall +fi -### Doc sources -#cd $1 -#cat $1/distrib/msw/docsrc.rsp > /tmp/docsrc_in.txt -#expandlines /tmp/docsrc_in.txt /tmp/docsrc.txt -#$TAR cf $2/wxWindows-${WXVER}-doc.tar -T /tmp/docsrc.txt -# -#echo Re-tarring docs in a subdirectory... -#cd $2 -#mkdir wxWindows-${WXVER} -#cd wxWindows-${WXVER} -#$TAR xf ../wxWindows-${WXVER}-doc.tar -#cd .. -#rm -f wxWindows-${WXVER}-doc.tar -#$TAR cf $2/wxWindows-${WXVER}-doc.tar wxWindows-${WXVER}/* -#rm -f -r wxWindows-${WXVER} -#gzip $2/wxWindows-${WXVER}-doc.tar - -### HTML docs -cd $1 -cat $1/distrib/msw/wx_html.rsp > /tmp/html_in.txt -expandlines /tmp/html_in.txt /tmp/html.txt -$TAR cf $2/wxWindows-${WXVER}-HTML.tar -T /tmp/html.txt - -echo Re-tarring HTML in a subdirectory... -cd $2 -mkdir wxWindows-${WXVER} -cd wxWindows-${WXVER} -$TAR xf ../wxWindows-${WXVER}-HTML.tar -cd .. -rm -f wxWindows-${WXVER}-HTML.tar -$TAR cf $2/wxWindows-${WXVER}-HTML.tar wxWindows-${WXVER}/* -rm -f -r wxWindows-${WXVER} -gzip $2/wxWindows-${WXVER}-HTML.tar - -### HTB docs -cd $1 -cat $1/distrib/msw/wx_htb.rsp > /tmp/htb_in.txt -expandlines /tmp/htb_in.txt /tmp/htb.txt -$TAR cf $2/wxWindows-${WXVER}-HTB.tar -T /tmp/htb.txt - -echo Re-tarring HTB in a subdirectory... -cd $2 -mkdir wxWindows-${WXVER} -cd wxWindows-${WXVER} -$TAR xf ../wxWindows-${WXVER}-HTB.tar -cd .. -rm -f wxWindows-${WXVER}-HTB.tar -$TAR cf $2/wxWindows-${WXVER}-HTB.tar wxWindows-${WXVER}/* -rm -f -r wxWindows-${WXVER} -gzip $2/wxWindows-${WXVER}-HTB.tar - -### PDF docs -cd $1 -cat $1/distrib/msw/wx_pdf.rsp > /tmp/pdf_in.txt -expandlines /tmp/pdf_in.txt /tmp/pdf.txt -$TAR cf $2/wxWindows-${WXVER}-PDF.tar -T /tmp/pdf.txt - -echo Re-tarring PDF in a subdirectory... -cd $2 -mkdir wxWindows-${WXVER} -cd wxWindows-${WXVER} -$TAR xf ../wxWindows-${WXVER}-PDF.tar -cd .. -rm -f wxWindows-${WXVER}-PDF.tar -$TAR cf $2/wxWindows-${WXVER}-PDF.tar wxWindows-${WXVER}/* -rm -f -r wxWindows-${WXVER} -gzip $2/wxWindows-${WXVER}-PDF.tar - -### Tex2RTF -#cd $1 -#cat $1/distrib/msw/tex2rtf.rsp > /tmp/tex2rtf_in.txt -#expandlines /tmp/tex2rtf_in.txt /tmp/tex2rtf.txt -#$TAR cf $2/wxWindows-${WXVER}-tex2rtf.tar -T /tmp/tex2rtf.txt -# -#echo Re-tarring Tex2RTF in a subdirectory... -#cd $2 -#mkdir wxWindows-${WXVER} -#cd wxWindows-${WXVER} -#$TAR xf ../wxWindows-${WXVER}-tex2rtf.tar -#cd .. -#rm -f wxWindows-${WXVER}-tex2rtf.tar -#$TAR cf $2/wxWindows-${WXVER}-tex2rtf.tar wxWindows-${WXVER}/* -#rm -f -r wxWindows-${WXVER} -#gzip $2/wxWindows-${WXVER}-tex2rtf.tar - -### OGL -#cd $1 -#cat $1/distrib/msw/ogl.rsp > /tmp/ogl_in.txt -#expandlines /tmp/ogl_in.txt /tmp/ogl.txt -#$TAR cf $2/wxWindows-${WXVER}-ogl.tar -T /tmp/ogl.txt -# -#echo Re-tarring OGL in a subdirectory... -#cd $2 -#mkdir wxWindows-${WXVER} -#cd wxWindows-${WXVER} -#$TAR xf ../wxWindows-${WXVER}-ogl.tar -#cd .. -#rm -f wxWindows-${WXVER}-ogl.tar -#$TAR cf $2/wxWindows-${WXVER}-ogl.tar wxWindows-${WXVER}/* -#rm -f -r wxWindows-${WXVER} -#gzip $2/wxWindows-${WXVER}-ogl.tar - -### JPEG -#cd $1 -#cat $1/distrib/msw/jpeg.rsp > /tmp/jpeg_in.txt -#expandlines /tmp/jpeg_in.txt /tmp/jpeg.txt -#$TAR cf $2/wxWindows-${WXVER}-jpeg.tar -T /tmp/jpeg.txt -# -#echo Re-tarring jpeg in a subdirectory... -#cd $2 -#mkdir wxWindows-${WXVER} -#cd wxWindows-${WXVER} -#$TAR xf ../wxWindows-${WXVER}-jpeg.tar -#cd .. -#rm -f wxWindows-${WXVER}-jpeg.tar -#$TAR cf $2/wxWindows-${WXVER}-jpeg.tar wxWindows-${WXVER}/* -#rm -f -r wxWindows-${WXVER} -#gzip $2/wxWindows-${WXVER}-jpeg.tar - -### TIFF -#cd $1 -#cat $1/distrib/msw/tiff.rsp > /tmp/tiff_in.txt -#expandlines /tmp/tiff_in.txt /tmp/tiff.txt -#$TAR cf $2/wxWindows-${WXVER}-tiff.tar -T /tmp/tiff.txt -# -#echo Re-tarring docs in a subdirectory... -#cd $2 -#mkdir wxWindows-${WXVER} -#cd wxWindows-${WXVER} -#$TAR xf ../wxWindows-${WXVER}-tiff.tar -#cd .. -#rm -f wxWindows-${WXVER}-tiff.tar -#$TAR cf $2/wxWindows-${WXVER}-tiff.tar wxWindows-${WXVER}/* -#rm -f -r wxWindows-${WXVER} -#gzip $2/wxWindows-${WXVER}-tiff.tar - -# Copy readme and other files -cd $1 -cp $1/docs/readme.txt $2/readme-${WXVER}.txt -cp $1/docs/changes.txt $2/changes-${WXVER}.txt -cp $1/docs/mgl/readme.txt $2/readme-mgl-${WXVER}.txt -cp $1/docs/mgl/install.txt $2/install-mgl-${WXVER}.txt -cp $1/docs/x11/readme.txt $2/readme-x11-${WXVER}.txt -cp $1/docs/x11/readme-nanox.txt $2/readme-nanox-${WXVER}.txt -cp $1/docs/x11/install.txt $2/install-x11-${WXVER}.txt -cp $1/docs/motif/readme.txt $2/readme-motif-${WXVER}.txt -cp $1/docs/motif/install.txt $2/install-motif-${WXVER}.txt -cp $1/docs/msw/readme.txt $2/readme-msw-${WXVER}.txt -cp $1/docs/msw/install.txt $2/install-msw-${WXVER}.txt -cp $1/docs/gtk/readme.txt $2/readme-gtk-${WXVER}.txt -cp $1/docs/gtk/install.txt $2/install-gtk-${WXVER}.txt -cp $1/docs/mac/readme.txt $2/readme-mac-${WXVER}.txt -cp $1/docs/mac/install.txt $2/install-mac-${WXVER}.txt -cp $1/docs/os2/install.txt $2/install-os2-${WXVER}.txt - -echo Done! diff --git a/distrib/msw/tarwxall b/distrib/msw/tarwxall index a6cecb08d8..b38bddd888 100755 --- a/distrib/msw/tarwxall +++ b/distrib/msw/tarwxall @@ -103,6 +103,7 @@ $1/distrib/msw/namedown include/wx/os2/*.H $1/distrib/msw/namedown src/os2/*.CPP src/os2/*.I cd .. + rm -f wxAll-${WXVER}.tar $TAR cf $2/wxAll-${WXVER}.tar wxWindows-${WXVER}/* rm -f -r wxWindows-${WXVER} diff --git a/distrib/msw/tarwxmac b/distrib/msw/tarwxmac index d4b27af39e..1e2b159d1c 100755 --- a/distrib/msw/tarwxmac +++ b/distrib/msw/tarwxmac @@ -63,7 +63,7 @@ echo Removing backup files... rm *~ */*~ */*/*~ */*/*/*~ */*/*/*/*~ rm -f $2/wxMac-${WXVER}*.tar.gz -rm -f -r $2/wxWindows-${WXVER} +rm -f -r $2/wxMac-${WXVER} cp $1/include/wx/mac/setup0.h $1/include/wx/setup.h @@ -78,8 +78,8 @@ rm -f $1/include/wx/setup.h echo Re-tarring in a subdirectory... cd $2 -mkdir wxWindows-${WXVER} -cd wxWindows-${WXVER} +mkdir wxMac-${WXVER} +cd wxMac-${WXVER} $TAR xf ../wxMac-${WXVER}.tar # Remove mmedia @@ -87,8 +87,8 @@ rm -f -r contrib/src/mmedia contrib/samples/mmedia cd .. rm -f wxMac-${WXVER}.tar -$TAR cf $2/wxMac-${WXVER}.tar wxWindows-${WXVER}/* -rm -f -r wxWindows-${WXVER} +$TAR cf $2/wxMac-${WXVER}.tar wxMac-${WXVER}/* +rm -f -r wxMac-${WXVER} gzip $2/wxMac-${WXVER}.tar # Copy readme and other files diff --git a/distrib/msw/tarwxx11 b/distrib/msw/tarwxx11 new file mode 100755 index 0000000000..065f67c0d4 --- /dev/null +++ b/distrib/msw/tarwxx11 @@ -0,0 +1,85 @@ +#!/bin/sh +# tarwxall: make up a tar.gz distribution of wxX11 +# Supply a source (e.g. ~/wx2) and destination (e.g. ~/wx2/deliver) + +# We can't use e.g. this: +# ls `cat $SRC/distrib/msw/makefile.rsp` zip -@ -u $DEST/wxWindows-$VERSION-gen.zip +# because there's not enough space on the command line, plus we need to ignore the +# blank lines. + +TAR=tar +ARCH=`arch` +if [ "$ARCH" = "ppc" ]; then + TAR=gnutar +fi + +expandlines() +{ + toexpand=$1 + outputfile=$2 + + rm -f $outputfile + touch $outputfile + for line in `cat $toexpand` ; do + if [ "$line" != "" ]; then + ls $line >> $outputfile + fi + uniq < $outputfile > /tmp/uniqtemp.txt + mv /tmp/uniqtemp.txt $outputfile + done +} + + +init="" +if [ "$1" = "" ] +then + echo Usage: tarwxx11 wx-dir output-dir version + exit +fi + +if [ "$2" = "" ] +then + echo Usage: tarwxx11 wx-dir output-dir version + exit +fi + +if [ "$3" = "" ] +then + echo Usage: tarwxx11 wx-dir output-dir version + exit +fi + +WXVER=$3 + +echo About to archive wxAll: +echo From $1 +echo To $2 +echo CTRL-C if this is not correct. +read dummy + +cd $1 + +echo Removing backup files... +rm *~ */*~ */*/*~ */*/*/*~ */*/*/*/*~ + +rm -f $2/wxX11-${WXVER}*.tar.gz +rm -f $2/wxX11-${WXVER} + +### wxX11: combined wxMotif and wxX11 distributions +cd $1 +cat $1/distrib/msw/generic.rsp $1/distrib/msw/motif.rsp $1/distrib/msw/x11.rsp $1/distrib/msw/univ.rsp $1/distrib/msw/contrib.rsp $1/distrib/msw/utils.rsp $1/distrib/msw/xml.rsp $1/distrib/msw/dialoged.rsp $1/distrib/msw/ogl.rsp $1/distrib/msw/makefile.rsp $1/distrib/msw/tiff.rsp $1/distrib/msw/jpeg.rsp > /tmp/wxx11_in.txt +expandlines /tmp/wxx11_in.txt /tmp/wxx11.txt +$TAR cf $2/wxX11-${WXVER}.tar -T /tmp/wxx11.txt + +echo Re-tarring wxX11 in a subdirectory... +cd $2 +mkdir wxX11-${WXVER} +cd wxX11-${WXVER} +$TAR xf ../wxX11-${WXVER}.tar +cd .. +rm -f wxX11-${WXVER}.tar +$TAR cf $2/wxX11-${WXVER}.tar wxX11-${WXVER}/* +rm -f -r wxX11-${WXVER} +gzip $2/wxX11-${WXVER}.tar + + diff --git a/distrib/msw/tmake/b32.t b/distrib/msw/tmake/b32.t index 5f0f0f5605..e7a344a00b 100644 --- a/distrib/msw/tmake/b32.t +++ b/distrib/msw/tmake/b32.t @@ -13,12 +13,20 @@ IncludeTemplate("filelist.t"); #! now transform these hashes into $project tags - foreach $file (sort keys %wxGeneric) { - my $tag = ""; - next if $wxGeneric{$file} =~ /\b(PS|G|16|U)\b/; + foreach $file (sort keys %wxUNIV) { + next if $wxUNIV{$file} =~ /\T\b/; $file =~ s/cp?p?$/obj/; - $project{"WXGENERICOBJS"} .= "\$(MSWDIR)\\" . $file . " " + $obj = "\$(UNIVDIR)\\" . $file . " "; + $project{"WXUNIVOBJS"} .= "\$(MSWDIR)\\" . $file . " " + } + + foreach $file (sort keys %wxUNIV) { + next unless $wxUNIV{$file} =~ /\T\b/; + + $file =~ s/cp?p?$/obj/; + $obj = "\$(UNIVTHEMEDIR)\\" . $file . " "; + $project{"WXUNIVTHEMEOBJS"} .= "\$(MSWDIR)\\" . $file . " " } foreach $file (sort keys %wxHTML) { @@ -38,6 +46,7 @@ $project{"WXCOBJS"} .= $obj if $isCFile; } +#! MSW dir for native port foreach $file (sort keys %wxMSW) { next if $wxMSW{$file} =~ /\b16\b/; @@ -61,6 +70,57 @@ } $project{"WXCOBJS"} .= $obj if $isCFile; } + +#! Now do MSW dir for UNIV + foreach $file (sort keys %wxMSW) { + next unless $wxMSW{$file} =~ /\b(L|B)\b/; + +#! if ( $file =~ /^automtn/ ) { +#! #! comment in old makefile.b32 seems to imply that this file can not +#! #! be compiled with Borland (leads to crash in oleauto sample) +#! No longer true, at least for BC++ 5.2 +#! next; +#! } + + $isCFile = $file =~ /\.c$/; + + my $isOleObj = $wxMSW{$file} =~ /\bO\b/; + $file =~ s/cp?p?$/obj/; + my $obj = "\$(MSWDIR)\\" . $file . " "; + + $project{"WXMSWUNIVOBJS"} .= $obj; + if ( $isOleObj ) { + #! remember that this file is in ole subdir + $project{"WXOLEUNIVOBJS"} .= $obj; + } + $project{"WXCUNIVOBJS"} .= $obj if $isCFile; + } + +#! Generic Dir for Native Port + foreach $file (sort keys %wxGeneric) { + my $tag = ""; + next if $wxGeneric{$file} =~ /\b(PS|G|16|U)\b/; + + $file =~ s/cp?p?$/obj/; + $project{"WXGENERICOBJS"} .= "\$(MSWDIR)\\" . $file . " " + } + +#! Generic Dir for UNIV Port + foreach $file (sort keys %wxGeneric) { + my $filereal = $file; + if ( $file =~ /^([^.]+)g.cpp$/ ) { + $filereal = "$1.cpp"; + } + $file =~ s/cp?p?$/obj/; + $filereal =~ s/cp?p?$/obj/; + + next if $project{"WXMSWUNIVOBJS"} =~ /\b$filereal\b/ || + $project{"WXUNIVOBJS"} =~ /\b$filereal\b/; + + + $project{"WXGENERICUNIVOBJS"} .= "\$(MSWDIR)\\" . $file . " " + } + #$} # This file was automatically generated by tmake @@ -87,6 +147,7 @@ WXDIR = $(WXWIN) THISDIR = $(WXDIR)\src\msw + # Set all these to 1 if you want to build a dynamic library !if "$(DLL)" == "1" WXMAKINGDLL=1 @@ -128,31 +189,35 @@ GENDIR=..\generic COMMDIR=..\common HTMLDIR=..\html OLEDIR=.\ole +UNIVDIR=..\univ +UNIVTHEMEDIR=..\univ\themes MSWDIR=. DOCDIR = $(WXDIR)\docs GENERICOBJS= #$ ExpandList("WXGENERICOBJS"); -# Not needed: -# $(MSWDIR)\colrdlgg.obj \ -# $(MSWDIR)\fontdlgg.obj \ -# $(MSWDIR)\msgdlgg.obj \ -# $(MSWDIR)\printps.obj \ -# $(MSWDIR)\prntdlgg.obj \ -# $(MSWDIR)\listctrl.obj \ -# $(MSWDIR)\notebook.obj \ -# $(MSWDIR)\treectrl.obj +MSWOBJS = #$ ExpandList("WXMSWOBJS"); + +GENERICUNIVOBJS= #$ ExpandList("WXGENERICUNIVOBJS"); + +MSWUNIVOBJS = #$ ExpandList("WXMSWUNIVOBJS"); + +UNIVOBJS = #$ ExpandList("WXUNIVOBJS"); + +UNIVTHEMEOBJS = #$ ExpandList("WXUNIVTHEMEOBJS"); + +HTMLOBJS = #$ ExpandList("WXHTMLOBJS"); COMMONOBJS = \ $(MSWDIR)\y_tab.obj \ #$ ExpandList("WXCOMMONOBJS"); -MSWOBJS = #$ ExpandList("WXMSWOBJS"); - -HTMLOBJS = #$ ExpandList("WXHTMLOBJS"); - +!if "$(WXUSINGUNIV)" == "1" +OBJECTS = $(COMMONOBJS) $(GENERICUNIVOBJS) $(MSWUNIVOBJS) $(HTMLOBJS) $(UNIVOBJS) $(UNIVTHEMEOBJS) +!else OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS) $(HTMLOBJS) +!endif default: wx @@ -168,18 +233,18 @@ makesetuph: # Copy include\wx\msw\setup.h to the architecture-specific location makearchsetuph: - copy $(WXDIR)\include\wx\msw\setup.h $(ARCHSETUPH) + copy $(SETUPSRCDIR)\setup.h $(ARCHSETUPH) cd $(WXDIR)\src\msw $(ARCHINCDIR)\wx: -mkdir $(ARCHINCDIR) -mkdir $(ARCHINCDIR)\wx - -erase $(CFG) + -$(RM) $(CFG) !if "$(DLL)" == "0" $(LIBTARGET): $(DUMMY).obj $(OBJECTS) - -erase $(LIBTARGET) + -$(RM) $(LIBTARGET) tlib "$(LIBTARGET)" /P1024 $(LINKDEBUGFLAGS) @&&! +$(OBJECTS:.obj =.obj +) +$(PERIPH_LIBS:.lib =.lib +) ! @@ -187,8 +252,8 @@ $(LIBTARGET): $(DUMMY).obj $(OBJECTS) !else $(LIBTARGET): $(DUMMY).obj $(OBJECTS) - -erase $(LIBTARGET) - -erase $(WXDLL) + -$(RM) $(LIBTARGET) + -$(RM) $(WXDLL) $(LINK) $(LINK_FLAGS) $(LINKDEBUGFLAGS) /L$(WXLIBDIR);$(BCCDIR)\lib;$(BCCDIR)\lib\psdk @&&! c0d32.obj $(OBJECTS) $(WXDLL) @@ -196,7 +261,7 @@ nul $(PERIPH_LIBS) $(LIBS) wxb32 ! - implib -c $(LIBTARGET) $(WXDLL) + implib -c -f $(LIBTARGET) $(WXDLL) !endif dummy.obj: dummy.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h @@ -219,6 +284,27 @@ $(COMMDIR)\lex_yy.c: $(COMMDIR)\doslex.c # $(OBJECTS): $(WXDIR)\include\wx\setup.h +!if "$(WXUSINGUNIV)" == "1" +######################################################## +# MSW objects (compile Native or UNIV) - UNIV + +#${ + $_ = $project{"WXMSWUNIVOBJS"}; + my @objs = split; + foreach (@objs) { + $text .= $_ . ": "; + if ( $project{"WXOLEOBJS"} =~ /\Q$_/ ) { s/MSWDIR/OLEDIR/; } + $suffix = $project{"WXCUNIVOBJS"} =~ /\Q$_/ ? "c" : '$(SRCSUFF)'; + s/obj$/$suffix/; + $text .= $_ . "\n\n"; + } +#$} + + +!else +######################################################## +# MSW objects (compile Native or UNIV) - Native + #${ $_ = $project{"WXMSWOBJS"}; my @objs = split; @@ -230,6 +316,38 @@ $(COMMDIR)\lex_yy.c: $(COMMDIR)\doslex.c $text .= $_ . "\n\n"; } #$} +!endif + +!if "$(WXUSINGUNIV)" == "1" +######################################################## +# UNIV objects +#${ + $_ = $project{"WXUNIVOBJS"}; + my @objs = split; + foreach (@objs) { + $text .= $_ . ": "; + s/MSWDIR/UNIVDIR/; + s/obj$/\$(SRCSUFF)/; + $text .= $_ . "\n\n"; + } +#$} + + +######################################################## +# UNIV THEME objects + +#${ + $_ = $project{"WXUNIVTHEMEOBJS"}; + my @objs = split; + foreach (@objs) { + $text .= $_ . ": "; + s/MSWDIR/UNIVTHEMEDIR/; + s/obj$/\$(SRCSUFF)/; + $text .= $_ . "\n\n"; + } +#$} + +!endif ######################################################## # Common objects (always compiled) @@ -246,9 +364,29 @@ $(COMMDIR)\lex_yy.c: $(COMMDIR)\doslex.c } #$} +!if "$(WXUSINGUNIV)" == "1" ######################################################## # Generic objects (not always compiled, depending on # whether platforms have native implementations) +# Native + + +#${ + $_ = $project{"WXGENERICUNIVOBJS"}; + my @objs = split; + foreach (@objs) { + $text .= $_ . ": "; + s/MSWDIR/GENDIR/; + s/obj$/\$(SRCSUFF)/; + $text .= $_ . "\n\n"; + } +#$} + +!else +######################################################## +# Generic objects (not always compiled, depending on +# whether platforms have native implementations) +# Native #${ $_ = $project{"WXGENERICOBJS"}; @@ -260,6 +398,7 @@ $(COMMDIR)\lex_yy.c: $(COMMDIR)\doslex.c $text .= $_ . "\n\n"; } #$} +!endif ######################################################## # HTML objects (always compiled) @@ -293,7 +432,7 @@ all_execs: png: $(CFG) cd $(WXDIR)\src\png - ${MAKE} -f makefile.b32 + ${MAKE} -f makefile.b32 FINAL=$(FINAL) cd $(WXDIR)\src\msw clean_png: @@ -303,7 +442,7 @@ clean_png: zlib: $(CFG) cd $(WXDIR)\src\zlib - ${MAKE} -f makefile.b32 lib + ${MAKE} -f makefile.b32 FINAL=$(FINAL) lib cd $(WXDIR)\src\msw clean_zlib: @@ -313,7 +452,7 @@ clean_zlib: jpeg: $(CFG) cd $(WXDIR)\src\jpeg - ${MAKE} -f makefile.b32 + ${MAKE} -f makefile.b32 FINAL=$(FINAL) cd $(WXDIR)\src\msw clean_jpeg: @@ -323,7 +462,7 @@ clean_jpeg: regex: $(CFG) cd $(WXDIR)\src\regex - ${MAKE} -f makefile.b32 lib + ${MAKE} -f makefile.b32 FINAL=$(FINAL) lib cd $(WXDIR)\src\msw clean_regex: @@ -333,7 +472,7 @@ clean_regex: tiff: $(CFG) cd $(WXDIR)\src\tiff - ${MAKE} -f makefile.b32 lib + ${MAKE} -f makefile.b32 FINAL=$(FINAL) lib cd $(WXDIR)\src\msw clean_tiff: @@ -360,7 +499,7 @@ $(CFG): makefile.b32 -L$(BCCDIR)\lib;$(BCCDIR)\lib\psdk -D__WXWIN__ --D__WXMSW__ +-D$(PORT) -D__WINDOWS__ -DWIN32 $(OPT) @@ -369,14 +508,14 @@ $(WIN95FLAG) ! $(CFG) clean: $(PERIPH_CLEAN_TARGET) - -erase $(WXLIBDIR)\wx.tds - -erase $(WXLIBDIR)\wx.il? - -erase *.obj - -erase *.pch - -erase *.csm - -erase "wx32.#??" - -erase ..\common\y_tab.c - -erase ..\common\lex_yy.c + -$(RM) $(WXLIBDIR)\wx.tds + -$(RM) $(WXLIBDIR)\wx.il? + -$(RM) *.obj + -$(RM) *.pch + -$(RM) *.csm + -$(RM) "wx32.#??" + -$(RM) ..\common\y_tab.c + -$(RM) ..\common\lex_yy.c cleanall: clean @@ -473,7 +612,7 @@ allpdfrtf: pdfrtf portingpdfrtf proppdfrtf $(DOCDIR)/winhelp/wx.hlp: $(DOCDIR)/latex/wx/wx.rtf $(DOCDIR)/latex/wx/wx.hpj cd $(DOCDIR)/latex/wx - -erase wx.ph + -$(RM) wx.ph hc wx move wx.hlp $(DOCDIR)\winhelp\wx.hlp move wx.cnt $(DOCDIR)\winhelp\wx.cnt @@ -481,7 +620,7 @@ $(DOCDIR)/winhelp/wx.hlp: $(DOCDIR)/latex/wx/wx.rtf $(DOCDIR)/latex/wx/w $(DOCDIR)/winhelp/porting.hlp: $(DOCDIR)/latex/porting/porting.rtf $(DOCDIR)/latex/porting/porting.hpj cd $(DOCDIR)/latex/porting - -erase porting.ph + -$(RM) porting.ph hc porting move porting.hlp $(DOCDIR)\winhelp\porting.hlp move porting.cnt $(DOCDIR)\winhelp\porting.cnt @@ -489,7 +628,7 @@ $(DOCDIR)/winhelp/porting.hlp: $(DOCDIR)/latex/porting/porting.rtf $(DOC $(DOCDIR)/winhelp/prop.hlp: $(DOCDIR)/latex/proplist/prop.rtf $(DOCDIR)/latex/proplist/prop.hpj cd $(DOCDIR)/latex/proplist - -erase prop.ph + -$(RM) prop.ph hc prop move prop.hlp $(DOCDIR)\winhelp\prop.hlp move prop.cnt $(DOCDIR)\winhelp\prop.cnt @@ -497,7 +636,7 @@ $(DOCDIR)/winhelp/prop.hlp: $(DOCDIR)/latex/proplist/prop.rtf $(DOCDIR)/ $(DOCDIR)/winhelp/techref.hlp: $(DOCDIR)/latex/techref/techref.rtf $(DOCDIR)/latex/techref/techref.hpj cd $(DOCDIR)/latex/techref - -erase techref.ph + -$(RM) techref.ph hc techref move techref.hlp $(DOCDIR)\winhelp\techref.hlp move techref.cnt $(DOCDIR)\winhelp\techref.cnt @@ -555,10 +694,10 @@ $(DOCDIR)\html\wx\wx.htm: $(DOCDIR)\latex\wx\classes.tex $(DOCDIR)\latex cd $(DOCDIR)\latex\wx -mkdir $(DOCDIR)\html\wx -start $(WAITFLAG) tex2rtf $(DOCDIR)\latex\wx\manual.tex $(DOCDIR)\html\wx\wx.htm -twice -html - -erase $(DOCDIR)\html\wx\*.con - -erase $(DOCDIR)\html\wx\*.ref - -erase $(DOCDIR)\latex\wx\*.con - -erase $(DOCDIR)\latex\wx\*.ref + -$(RM) $(DOCDIR)\html\wx\*.con + -$(RM) $(DOCDIR)\html\wx\*.ref + -$(RM) $(DOCDIR)\latex\wx\*.con + -$(RM) $(DOCDIR)\latex\wx\*.ref cd $(THISDIR) $(DOCDIR)\html\wx\wx.chm : $(DOCDIR)\html\wx\wx.htm $(DOCDIR)\html\wx\wx.hhp @@ -571,20 +710,20 @@ $(DOCDIR)\html\porting\port.htm: $(DOCDIR)\latex\porting\porting.tex cd $(DOCDIR)\latex\porting -mkdir $(DOCDIR)\html\porting -start $(WAITFLAG) tex2rtf $(DOCDIR)\latex\porting\porting.tex $(DOCDIR)\html\porting\port.htm -twice -html - -erase $(DOCDIR)\html\porting\*.con - -erase $(DOCDIR)\html\porting\*.ref - -erase $(DOCDIR)\latex\porting\*.con - -erase $(DOCDIR)\latex\porting\*.ref + -$(RM) $(DOCDIR)\html\porting\*.con + -$(RM) $(DOCDIR)\html\porting\*.ref + -$(RM) $(DOCDIR)\latex\porting\*.con + -$(RM) $(DOCDIR)\latex\porting\*.ref cd $(THISDIR) $(DOCDIR)\html\proplist\prop.htm: $(DOCDIR)\latex\proplist\prop.tex $(DOCDIR)\latex\proplist\body.tex $(DOCDIR)\latex\proplist\classes.tex $(DOCDIR)\latex\proplist\changes.tex cd $(DOCDIR)\latex\proplist -mkdir $(DOCDIR)\html\proplist -start $(WAITFLAG) tex2rtf $(DOCDIR)\latex\proplist\prop.tex $(DOCDIR)\html\proplist\prop.htm -twice -html - -erase $(DOCDIR)\html\proplist\*.con - -erase $(DOCDIR)\html\proplist\*.ref - -erase $(DOCDIR)\latex\proplist\*.con - -erase $(DOCDIR)\latex\proplist\*.ref + -$(RM) $(DOCDIR)\html\proplist\*.con + -$(RM) $(DOCDIR)\html\proplist\*.ref + -$(RM) $(DOCDIR)\latex\proplist\*.con + -$(RM) $(DOCDIR)\latex\proplist\*.ref cd $(THISDIR) $(WXDIR)\docs\latex\wx\manual.dvi: $(DOCDIR)/latex/wx/body.tex $(DOCDIR)/latex/wx/manual.tex diff --git a/distrib/msw/tmake/b32base.t b/distrib/msw/tmake/b32base.t index c80f5de01d..7ae5829c8a 100644 --- a/distrib/msw/tmake/b32base.t +++ b/distrib/msw/tmake/b32base.t @@ -85,8 +85,8 @@ wxUSE_GUI=0 !include $(WXDIR)\src\makeb32.env PERIPH_LIBS= -PERIPH_TARGET=zlib png jpeg tiff regex $(PERIPH_TARGET) -PERIPH_CLEAN_TARGET=clean_zlib clean_png clean_jpeg clean_tiff clean_regex $(PERIPH_CLEAN_TARGET) +PERIPH_TARGET=zlib regex $(PERIPH_TARGET) +PERIPH_CLEAN_TARGET=clean_zlib clean_regex $(PERIPH_CLEAN_TARGET) !if "$(DLL)" == "0" DUMMY=dummy @@ -106,7 +106,6 @@ MSWDIR=. DOCDIR = $(WXDIR)\docs COMMONOBJS = \ - $(MSWDIR)\y_tab.obj \ #$ ExpandList("WXCOMMONOBJS"); MSWOBJS = #$ ExpandList("WXMSWOBJS"); @@ -133,12 +132,12 @@ makearchsetuph: $(ARCHINCDIR)\wx: -mkdir $(ARCHINCDIR) -mkdir $(ARCHINCDIR)\wx - -erase $(CFG) + -$(RM) $(CFG) !if "$(DLL)" == "0" $(LIBTARGET): $(DUMMY).obj $(OBJECTS) - -erase $(WXLIB) + -$(RM) $(WXLIB) tlib "$(WXLIB)" /P1024 @&&! +$(OBJECTS:.obj =.obj +) +$(PERIPH_LIBS:.lib =.lib +) ! @@ -146,8 +145,8 @@ $(LIBTARGET): $(DUMMY).obj $(OBJECTS) !else $(LIBTARGET): $(DUMMY).obj $(OBJECTS) - -erase $(WXLIB) - -erase $(WXDLL) + -$(RM) $(WXLIB) + -$(RM) $(WXDLL) $(LINK) $(LINK_FLAGS) /L$(WXLIBDIR);$(BCCDIR)\lib;$(BCCDIR)\lib\psdk /v @&&! c0d32.obj $(OBJECTS) $(WXLIBDIR)\$(WXLIBNAME) @@ -164,19 +163,6 @@ dummydll.obj: dummydll.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\includ version.res: brc32 -r -i$(WXDIR)\include\ $(MSWDIR)\version.rc -$(MSWDIR)\y_tab.obj: $(COMMDIR)\y_tab.c $(COMMDIR)\lex_yy.c - -# cl @<< -# $(CPPFLAGS2) /c $*.c -DUSE_DEFINE -DYY_USE_PROTOS /Fo$@ -# << - -$(COMMDIR)\y_tab.c: $(COMMDIR)\dosyacc.c - copy $(COMMDIR)\dosyacc.c $(COMMDIR)\y_tab.c - -$(COMMDIR)\lex_yy.c: $(COMMDIR)\doslex.c - copy $(COMMDIR)\doslex.c $(COMMDIR)\lex_yy.c - - #${ $_ = $project{"WXMSWOBJS"}; my @objs = split; @@ -299,14 +285,12 @@ $(WIN95FLAG) ! $(CFG) clean: $(PERIPH_CLEAN_TARGET) - -erase $(WXLIBDIR)\wx.tds - -erase $(WXLIBDIR)\wx.il? - -erase *.obj - -erase *.pch - -erase *.csm - -erase "wx32.#??" - -erase ..\common\y_tab.c - -erase ..\common\lex_yy.c + -$(RM) $(WXLIBDIR)\wx.tds + -$(RM) $(WXLIBDIR)\wx.il? + -$(RM) *.obj + -$(RM) *.pch + -$(RM) *.csm + -$(RM) "wx32.#??" cleanall: clean diff --git a/distrib/msw/tmake/b32univ.t b/distrib/msw/tmake/b32univ.t deleted file mode 100644 index 65220c2419..0000000000 --- a/distrib/msw/tmake/b32univ.t +++ /dev/null @@ -1,722 +0,0 @@ -#!############################################################################# -#! File: b32.t -#! Purpose: tmake template file from which makefile.b32 is generated by running -#! tmake -t b32 wxwin.pro -#! Author: Vadim Zeitlin -#! Created: 14.07.99 -#! Version: $Id$ -#!############################################################################# - -#${ - #! include the code which parses filelist.txt file and initializes - #! %wxCommon, %wxGeneric and %wxMSW hashes. - IncludeTemplate("filelist.t"); - - #! now transform these hashes into $project tags - - foreach $file (sort keys %wxUNIV) { - next if $wxUNIV{$file} =~ /\T\b/; - - $file =~ s/cp?p?$/obj/; - $obj = "\$(UNIVDIR)\\" . $file . " "; - $project{"WXUNIVOBJS"} .= "\$(MSWDIR)\\" . $file . " " - } - - foreach $file (sort keys %wxUNIV) { - next unless $wxUNIV{$file} =~ /\T\b/; - - $file =~ s/cp?p?$/obj/; - $obj = "\$(UNIVTHEMEDIR)\\" . $file . " "; - $project{"WXUNIVTHEMEOBJS"} .= "\$(MSWDIR)\\" . $file . " " - } - - foreach $file (sort keys %wxHTML) { - next if $wxHTML{$file} =~ /\b16\b/; - - $file =~ s/cp?p?$/obj/; - $project{"WXHTMLOBJS"} .= "\$(MSWDIR)\\" . $file . " " - } - - foreach $file (sort keys %wxCommon) { - next if $wxCommon{$file} =~ /\b(16|U)\b/; - - $isCFile = $file =~ /\.c$/; - $file =~ s/cp?p?$/obj/; - $obj = "\$(MSWDIR)\\" . $file . " "; - $project{"WXCOMMONOBJS"} .= $obj; - $project{"WXCOBJS"} .= $obj if $isCFile; - } - - foreach $file (sort keys %wxMSW) { - next unless $wxMSW{$file} =~ /\b(L|B)\b/; - -#! if ( $file =~ /^automtn/ ) { -#! #! comment in old makefile.b32 seems to imply that this file can not -#! #! be compiled with Borland (leads to crash in oleauto sample) -#! No longer true, at least for BC++ 5.2 -#! next; -#! } - - $isCFile = $file =~ /\.c$/; - - my $isOleObj = $wxMSW{$file} =~ /\bO\b/; - $file =~ s/cp?p?$/obj/; - my $obj = "\$(MSWDIR)\\" . $file . " "; - - $project{"WXMSWOBJS"} .= $obj; - if ( $isOleObj ) { - #! remember that this file is in ole subdir - $project{"WXOLEOBJS"} .= $obj; - } - $project{"WXCOBJS"} .= $obj if $isCFile; - } - - foreach $file (sort keys %wxGeneric) { - my $filereal = $file; - if ( $file =~ /^([^.]+)g.cpp$/ ) { - $filereal = "$1.cpp"; - } - $file =~ s/cp?p?$/obj/; - $filereal =~ s/cp?p?$/obj/; - - next if $project{"WXMSWOBJS"} =~ /\b$filereal\b/ || - $project{"WXUNIVOBJS"} =~ /\b$filereal\b/; - - - $project{"WXGENERICOBJS"} .= "\$(MSWDIR)\\" . $file . " " - } - -#$} - -# This file was automatically generated by tmake -# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE B32.T! - -# -# File: makefile.b32 -# Author: Julian Smart -# Created: 1998 -# Updated: -# Copyright: -# -# "%W% %G%" -# -# Makefile : Builds wxWindows library wx.lib for MS Windows, -# and Borland C++ (32-bit). - -# BCCDIR now defined in ../makeb32.env - -!if "$(WXWIN)" == "" -!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx -!endif - -WXDIR = $(WXWIN) -THISDIR = $(WXDIR)\src\msw - -# Set all these to 1 if you want to build a dynamic library -!if "$(DLL)" == "1" -WXMAKINGDLL=1 -WXBUILDDLL=1 -!endif - -!include $(WXDIR)\src\makeb32.env - -# Please set these according to the settings in wx_setup.h, so we can include -# the appropriate libraries in wx.lib -USE_CTL3D=0 - -PERIPH_LIBS= -PERIPH_TARGET= -PERIPH_CLEAN_TARGET= - -!if "$(USE_CTL3D)" == "1" -#Use WIN32S/WIN95 32 bit version ctl3d32.dll under win95 (Andre Beltman) -PERIPH_LIBS=$(WXDIR)\lib\ctl3d32.lib $(PERIPH_LIBS) -PERIPH_TARGET=ctl3d $(PERIPH_TARGET) -PERIPH_CLEAN_TARGET=clean_ctl3d $(PERIPH_CLEAN_TARGET) -!endif - -#PERIPH_LIBS=$(WXDIR)\lib\zlib.lib $(WXDIR)\lib\winpng.lib $(WXDIR)\lib\jpeg.lib $(WXDIR)\lib\tiff.lib $(PERIPH_LIBS) -PERIPH_LIBS= -PERIPH_TARGET=zlib png jpeg tiff regex $(PERIPH_TARGET) -PERIPH_CLEAN_TARGET=clean_zlib clean_png clean_jpeg clean_tiff clean_regex $(PERIPH_CLEAN_TARGET) - -!if "$(DLL)" == "0" -DUMMY=dummy -!else -DUMMY=dummydll -LIBS= cw32mti import32 ole2w32 odbc32 zlib winpng jpeg tiff regex -!endif - -LIBTARGET=$(WXLIB) - -GENDIR=..\generic -COMMDIR=..\common -HTMLDIR=..\html -OLEDIR=.\ole -UNIVDIR=..\univ -UNIVTHEMEDIR=..\univ\themes -MSWDIR=. - -DOCDIR = $(WXDIR)\docs - -GENERICOBJS= #$ ExpandList("WXGENERICOBJS"); - -# Not needed: -# $(MSWDIR)\colrdlgg.obj \ -# $(MSWDIR)\fontdlgg.obj \ -# $(MSWDIR)\msgdlgg.obj \ -# $(MSWDIR)\printps.obj \ -# $(MSWDIR)\prntdlgg.obj \ -# $(MSWDIR)\listctrl.obj \ -# $(MSWDIR)\notebook.obj \ -# $(MSWDIR)\treectrl.obj - -COMMONOBJS = \ - $(MSWDIR)\y_tab.obj \ - #$ ExpandList("WXCOMMONOBJS"); - -MSWOBJS = #$ ExpandList("WXMSWOBJS"); - -HTMLOBJS = #$ ExpandList("WXHTMLOBJS"); - -UNIVOBJS = #$ ExpandList("WXUNIVOBJS"); - -UNIVTHEMEOBJS = #$ ExpandList("WXUNIVTHEMEOBJS"); - -OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS) $(HTMLOBJS) $(UNIVOBJS) $(UNIVTHEMEOBJS) - -default: wx - -wx: $(ARCHINCDIR)\wx makesetuph makearchsetuph $(CFG) $(DUMMY).obj $(OBJECTS) $(PERIPH_TARGET) $(LIBTARGET) - -all: wx - -# Copy the in-CVS setup0.h to setup.h if necessary -makesetuph: - cd $(WXDIR)\include\wx\msw - if not exist setup.h copy setup0.h setup.h - cd $(WXDIR)\src\msw - -# Copy include\wx\univ\setup.h to the architecture-specific location -makearchsetuph: - copy $(WXDIR)\include\wx\univ\setup.h $(ARCHSETUPH) - cd $(WXDIR)\src\msw - -$(ARCHINCDIR)\wx: - -mkdir $(ARCHINCDIR) - -mkdir $(ARCHINCDIR)\wx - -!if "$(DLL)" == "0" - -$(LIBTARGET): $(DUMMY).obj $(OBJECTS) - -erase $(LIBTARGET) - tlib "$(LIBTARGET)" /P1024 @&&! -+$(OBJECTS:.obj =.obj +) +$(PERIPH_LIBS:.lib =.lib +) -! - -!else - -$(LIBTARGET): $(DUMMY).obj $(OBJECTS) - -erase $(LIBTARGET) - -erase $(WXLIBDIR)\wx.dll - $(LINK) $(LINK_FLAGS) /L$(WXLIBDIR);$(BCCDIR)\lib;$(BCCDIR)\lib\psdk /v @&&! -c0d32.obj $(OBJECTS) -$(WXLIBDIR)\wx -nul -$(PERIPH_LIBS) $(LIBS) -wxb32 -! - -erase $(WXLIBDIR)\version.res - brc32 -r -i$(WXDIR)\include\ $(MSWDIR)\version.rc - implib -c $(LIBTARGET) $(WXLIBDIR)\wx.dll - -!endif - -dummy.obj: dummy.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h -dummydll.obj: dummydll.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h version.res - -$(MSWDIR)\y_tab.obj: $(COMMDIR)\y_tab.c $(COMMDIR)\lex_yy.c - -# cl @<< -# $(CPPFLAGS2) /c $*.c -DUSE_DEFINE -DYY_USE_PROTOS /Fo$@ -# << - -$(COMMDIR)\y_tab.c: $(COMMDIR)\dosyacc.c - copy $(COMMDIR)\dosyacc.c $(COMMDIR)\y_tab.c - -$(COMMDIR)\lex_yy.c: $(COMMDIR)\doslex.c - copy $(COMMDIR)\doslex.c $(COMMDIR)\lex_yy.c - -# $(OBJECTS): $(WXDIR)\include\wx\setup.h - -#${ - $_ = $project{"WXMSWOBJS"}; - my @objs = split; - foreach (@objs) { - $text .= $_ . ": "; - if ( $project{"WXOLEOBJS"} =~ /\Q$_/ ) { s/MSWDIR/OLEDIR/; } - $suffix = $project{"WXCOBJS"} =~ /\Q$_/ ? "c" : '$(SRCSUFF)'; - s/obj$/$suffix/; - $text .= $_ . "\n\n"; - } -#$} - -######################################################## -# Common objects (always compiled) - -#${ - $_ = $project{"WXCOMMONOBJS"}; - my @objs = split; - foreach (@objs) { - $text .= $_ . ": "; - $suffix = $project{"WXCOBJS"} =~ /\Q$_/ ? "c" : '$(SRCSUFF)'; - s/MSWDIR/COMMDIR/; - s/obj$/$suffix/; - $text .= $_ . "\n\n"; - } -#$} - -######################################################## -# Generic objects (not always compiled, depending on -# whether platforms have native implementations) - -#${ - $_ = $project{"WXGENERICOBJS"}; - my @objs = split; - foreach (@objs) { - $text .= $_ . ": "; - s/MSWDIR/GENDIR/; - s/obj$/\$(SRCSUFF)/; - $text .= $_ . "\n\n"; - } -#$} - -######################################################## -# HTML objects (always compiled) - -#${ - $_ = $project{"WXHTMLOBJS"}; - my @objs = split; - foreach (@objs) { - $text .= $_ . ": "; - s/MSWDIR/HTMLDIR/; - s/obj$/\$(SRCSUFF)/; - $text .= $_ . "\n\n"; - } -#$} - - -######################################################## -# UNIV objects (always compiled) - -#${ - $_ = $project{"WXUNIVOBJS"}; - my @objs = split; - foreach (@objs) { - $text .= $_ . ": "; - s/MSWDIR/UNIVDIR/; - s/obj$/\$(SRCSUFF)/; - $text .= $_ . "\n\n"; - } -#$} - - -######################################################## -# UNIV THEME objects (always compiled) - -#${ - $_ = $project{"WXUNIVTHEMEOBJS"}; - my @objs = split; - foreach (@objs) { - $text .= $_ . ": "; - s/MSWDIR/UNIVTHEMEDIR/; - s/obj$/\$(SRCSUFF)/; - $text .= $_ . "\n\n"; - } -#$} - - -all_utils: - cd $(WXDIR)\utils - make -f makefile.b32 - cd $(WXDIR)\src\msw - -all_samples: - cd $(WXDIR)\samples - make -f makefile.b32 - cd $(WXDIR)\src\msw - -all_execs: - cd $(WXDIR)\utils - make -f makefile.b32 all_execs - cd $(WXDIR)\src\msw - -png: $(CFG) - cd $(WXDIR)\src\png - make -f makefile.b32 - cd $(WXDIR)\src\msw - -clean_png: - cd $(WXDIR)\src\png - make -f makefile.b32 clean - cd $(WXDIR)\src\msw - -zlib: $(CFG) - cd $(WXDIR)\src\zlib - make -f makefile.b32 lib - cd $(WXDIR)\src\msw - -clean_zlib: - cd $(WXDIR)\src\zlib - make -f makefile.b32 clean - cd $(WXDIR)\src\msw - -jpeg: $(CFG) - cd $(WXDIR)\src\jpeg - make -f makefile.b32 - cd $(WXDIR)\src\msw - -clean_jpeg: - cd $(WXDIR)\src\jpeg - make -f makefile.b32 clean - cd $(WXDIR)\src\msw - -regex: $(CFG) - cd $(WXDIR)\src\regex - make -f makefile.b32 lib - cd $(WXDIR)\src\msw - -clean_regex: - cd $(WXDIR)\src\regex - make -f makefile.b32 clean - cd $(WXDIR)\src\msw - -tiff: $(CFG) - cd $(WXDIR)\src\tiff - make -f makefile.b32 lib - cd $(WXDIR)\src\msw - -clean_tiff: - cd $(WXDIR)\src\tiff - make -f makefile.b32 clean - cd $(WXDIR)\src\msw - -$(CFG): makeuniv.b32 - copy &&! --Hc --H=$(WXDIR)\src\msw\wx32.csm --3 --d --a1 # byte alignment --R- --X --w-par --w-aus --w-hid # virtual function A hides virtual function B --tWM - --I$(ARCHINCDIR);$(WXINC);$(BCCDIR)\include;$(WXDIR)/src/generic;$(WXDIR)/src/png;$(WXDIR)/src/jpeg;$(WXDIR)/src/zlib;$(WXDIR)/src/tiff --I$(WXDIR)\include\wx\msw\gnuwin32 - --L$(BCCDIR)\lib;$(BCCDIR)\lib\psdk --D__WXWIN__ --D__WINDOWS__ --D__WXUNIVERSAL__ --D_WIN32 --DWIN32 -$(OPT) -$(DEBUG_FLAGS) -$(WIN95FLAG) -! $(CFG) - -clean: $(PERIPH_CLEAN_TARGET) - -erase $(LIBTARGET) - -erase $(WXLIBDIR)\wx.dll - -erase $(WXLIBDIR)\wx.tds - -erase $(WXLIBDIR)\wx.il? - -erase *.obj - -erase *.pch - -erase *.csm - -erase *.cfg - -erase "wx32.#??" - -erase ..\common\y_tab.c - -erase ..\common\lex_yy.c - -cleanall: clean - - -# Making documents -docs: allhlp allhtml allpdfrtf -alldocs: docs -hlp: wxhlp portinghlp -wxhlp: $(DOCDIR)/winhelp/wx.hlp -prophlp: $(DOCDIR)/winhelp/prop.hlp -refhlp: $(DOCDIR)/winhelp/techref.hlp -rtf: $(DOCDIR)/winhelp/wx.rtf -proprtf: $(DOCDIR)/winhelp/prop.rtf -pdfrtf: $(DOCDIR)/pdf/wx.rtf -proppdfrtf: $(DOCDIR)/pdf/prop.rtf -refpdfrtf: $(DOCDIR)/pdf/techref.rtf -html: wxhtml portinghtml -wxhtml: $(DOCDIR)\html\wx\wx.htm -htmlhelp: $(DOCDIR)\html\wx\wx.chm -prophtml: $(DOCDIR)\html\proplist\prop.htm -ps: wxps referencps -wxps: $(WXDIR)\docs\ps\wx.ps -propps: $(WXDIR)\docs\ps\prop.ps -referencps: $(WXDIR)\docs\ps\referenc.ps - -portinghtml: $(DOCDIR)\html\porting\port.htm -portingrtf: $(DOCDIR)/winhelp/porting.rtf -portinghlp: $(DOCDIR)/winhelp/porting.hlp -portingpdfrtf: $(DOCDIR)/pdf/porting.rtf -portingps: $(WXDIR)\docs\ps\porting.ps - -allhlp: wxhlp portinghlp prophlp - cd $(WXDIR)\utils\dialoged\src - make -f makefile.b32 hlp - cd $(THISDIR) - -# cd $(WXDIR)\utils\wxhelp\src -# make -f makefile.b32 hlp -# cd $(WXDIR)\utils\tex2rtf\src -# make -f makefile.b32 hlp -# cd $(WXDIR)\utils\wxgraph\src -# make -f makefile.b32 hlp -# cd $(WXDIR)\utils\wxchart\src -# make -f makefile.b32 hlp -# cd $(WXDIR)\utils\wxtree\src -# make -f makefile.b32 hlp -# cd $(WXDIR)\utils\wxbuild\src -# make -f makefile.b32 hlp -# cd $(WXDIR)\utils\wxgrid\src -# make -f makefile.b32 hlp - -allhtml: wxhtml portinghtml prophtml - cd $(WXDIR)\utils\dialoged\src - make -f makefile.b32 html - cd $(THISDIR) - -# make -f makefile.b32 html -# cd $(WXDIR)\utils\dialoged\src -# make -f makefile.b32 html -# cd $(WXDIR)\utils\hytext\src -# make -f makefile.b32 html -# cd $(WXDIR)\utils\wxhelp\src -# make -f makefile.b32 html -# cd $(WXDIR)\utils\tex2rtf\src -# make -f makefile.b32 html -# cd $(WXDIR)\utils\wxgraph\src -# make -f makefile.b32 html -# cd $(WXDIR)\utils\wxchart\src -# make -f makefile.b32 html -# cd $(WXDIR)\utils\wxtree\src -# make -f makefile.b32 html - -allps: wxps referencps portingps propps - cd $(WXDIR)\utils\dialoged\src - make -f makefile.b32 ps - cd $(THISDIR) - -allpdfrtf: pdfrtf portingpdfrtf proppdfrtf - cd $(WXDIR)\utils\dialoged\src - make -f makefile.b32 pdfrtf - cd $(THISDIR) - -# cd $(WXDIR)\utils\wxhelp\src -# make -f makefile.b32 ps -# cd $(WXDIR)\utils\tex2rtf\src -# make -f makefile.b32 ps -# cd $(WXDIR)\utils\wxgraph\src -# make -f makefile.b32 ps -# cd $(WXDIR)\utils\wxchart\src -# make -f makefile.b32 ps -# cd $(WXDIR)\utils\wxtree\src -# make -f makefile.b32 ps -# cd $(THISDIR) - -$(DOCDIR)/winhelp/wx.hlp: $(DOCDIR)/latex/wx/wx.rtf $(DOCDIR)/latex/wx/wx.hpj - cd $(DOCDIR)/latex/wx - -erase wx.ph - hc wx - move wx.hlp $(DOCDIR)\winhelp\wx.hlp - move wx.cnt $(DOCDIR)\winhelp\wx.cnt - cd $(THISDIR) - -$(DOCDIR)/winhelp/porting.hlp: $(DOCDIR)/latex/porting/porting.rtf $(DOCDIR)/latex/porting/porting.hpj - cd $(DOCDIR)/latex/porting - -erase porting.ph - hc porting - move porting.hlp $(DOCDIR)\winhelp\porting.hlp - move porting.cnt $(DOCDIR)\winhelp\porting.cnt - cd $(THISDIR) - -$(DOCDIR)/winhelp/prop.hlp: $(DOCDIR)/latex/proplist/prop.rtf $(DOCDIR)/latex/proplist/prop.hpj - cd $(DOCDIR)/latex/proplist - -erase prop.ph - hc prop - move prop.hlp $(DOCDIR)\winhelp\prop.hlp - move prop.cnt $(DOCDIR)\winhelp\prop.cnt - cd $(THISDIR) - -$(DOCDIR)/winhelp/techref.hlp: $(DOCDIR)/latex/techref/techref.rtf $(DOCDIR)/latex/techref/techref.hpj - cd $(DOCDIR)/latex/techref - -erase techref.ph - hc techref - move techref.hlp $(DOCDIR)\winhelp\techref.hlp - move techref.cnt $(DOCDIR)\winhelp\techref.cnt - cd $(THISDIR) - -$(DOCDIR)/latex/wx/wx.rtf: $(DOCDIR)/latex/wx/classes.tex $(DOCDIR)/latex/wx/body.tex $(DOCDIR)/latex/wx/topics.tex $(DOCDIR)/latex/wx/manual.tex - cd $(DOCDIR)\latex\wx - -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/wx/manual.tex $(DOCDIR)/latex/wx/wx.rtf -twice -winhelp - cd $(THISDIR) - -$(DOCDIR)/latex/porting/porting.rtf: $(DOCDIR)/latex/porting/porting.tex - cd $(DOCDIR)\latex\porting - -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/porting/porting.tex $(DOCDIR)/latex/porting/porting.rtf -twice -winhelp - cd $(THISDIR) - -$(DOCDIR)/latex/proplist/prop.rtf: $(DOCDIR)/latex/proplist/prop.tex $(DOCDIR)/latex/proplist/body.tex $(DOCDIR)/latex/proplist/classes.tex $(DOCDIR)/latex/proplist/changes.tex - cd $(DOCDIR)\latex\proplist - -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/proplist/prop.tex $(DOCDIR)/latex/proplist/prop.rtf -twice -winhelp - cd $(THISDIR) - -$(DOCDIR)/latex/techref/techref.rtf: $(DOCDIR)/latex/techref/techref.tex - cd $(DOCDIR)\latex\techref - -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/techref/techref.tex $(DOCDIR)/latex/techref/techref.rtf -twice -winhelp - cd $(THISDIR) - -$(DOCDIR)/pdf/wx.rtf: $(DOCDIR)/latex/wx/classes.tex $(DOCDIR)/latex/wx/body.tex $(DOCDIR)/latex/wx/topics.tex $(DOCDIR)/latex/wx/manual.tex - cd $(DOCDIR)\latex\wx - -copy *.wmf $(DOCDIR)\pdf - -copy *.bmp $(DOCDIR)\pdf - -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/wx/manual.tex $(DOCDIR)/pdf/wx.rtf -twice -rtf - cd $(THISDIR) - -$(DOCDIR)/pdf/porting.rtf: $(DOCDIR)/latex/porting/porting.tex - cd $(DOCDIR)\latex\porting - -copy *.wmf $(DOCDIR)\pdf - -copy *.bmp $(DOCDIR)\pdf - -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/porting/porting.tex $(DOCDIR)/pdf/porting.rtf -twice -rtf - cd $(THISDIR) - -$(DOCDIR)/pdf/prop.rtf: $(DOCDIR)/latex/proplist/prop.tex $(DOCDIR)/latex/proplist/body.tex $(DOCDIR)/latex/proplist/classes.tex $(DOCDIR)/latex/proplist/changes.tex - cd $(DOCDIR)\latex\proplist - -copy *.wmf $(DOCDIR)\pdf - -copy *.bmp $(DOCDIR)\pdf - -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/proplist/prop.tex $(DOCDIR)/pdf/prop.rtf -twice -rtf - cd $(THISDIR) - -$(DOCDIR)/pdf/techref.rtf: $(DOCDIR)/latex/techref/techref.tex - cd $(DOCDIR)\latex\techref - -copy *.wmf $(DOCDIR)\pdf - -copy *.bmp $(DOCDIR)\pdf - -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/techref/techref.tex $(DOCDIR)/pdf/techref.rtf -twice -rtf - cd $(THISDIR) - -$(DOCDIR)\html\wx\wx.htm: $(DOCDIR)\latex\wx\classes.tex $(DOCDIR)\latex\wx\body.tex $(DOCDIR)/latex/wx/topics.tex $(DOCDIR)\latex\wx\manual.tex - cd $(DOCDIR)\latex\wx - -mkdir $(DOCDIR)\html\wx - -start $(WAITFLAG) tex2rtf $(DOCDIR)\latex\wx\manual.tex $(DOCDIR)\html\wx\wx.htm -twice -html - -erase $(DOCDIR)\html\wx\*.con - -erase $(DOCDIR)\html\wx\*.ref - -erase $(DOCDIR)\latex\wx\*.con - -erase $(DOCDIR)\latex\wx\*.ref - cd $(THISDIR) - -$(DOCDIR)\html\wx\wx.chm : $(DOCDIR)\html\wx\wx.htm $(DOCDIR)\html\wx\wx.hhp - cd $(DOCDIR)\html\wx - -hhc wx.hhp - cd $(THISDIR) - - -$(DOCDIR)\html\porting\port.htm: $(DOCDIR)\latex\porting\porting.tex - cd $(DOCDIR)\latex\porting - -mkdir $(DOCDIR)\html\porting - -start $(WAITFLAG) tex2rtf $(DOCDIR)\latex\porting\porting.tex $(DOCDIR)\html\porting\port.htm -twice -html - -erase $(DOCDIR)\html\porting\*.con - -erase $(DOCDIR)\html\porting\*.ref - -erase $(DOCDIR)\latex\porting\*.con - -erase $(DOCDIR)\latex\porting\*.ref - cd $(THISDIR) - -$(DOCDIR)\html\proplist\prop.htm: $(DOCDIR)\latex\proplist\prop.tex $(DOCDIR)\latex\proplist\body.tex $(DOCDIR)\latex\proplist\classes.tex $(DOCDIR)\latex\proplist\changes.tex - cd $(DOCDIR)\latex\proplist - -mkdir $(DOCDIR)\html\proplist - -start $(WAITFLAG) tex2rtf $(DOCDIR)\latex\proplist\prop.tex $(DOCDIR)\html\proplist\prop.htm -twice -html - -erase $(DOCDIR)\html\proplist\*.con - -erase $(DOCDIR)\html\proplist\*.ref - -erase $(DOCDIR)\latex\proplist\*.con - -erase $(DOCDIR)\latex\proplist\*.ref - cd $(THISDIR) - -$(WXDIR)\docs\latex\wx\manual.dvi: $(DOCDIR)/latex/wx/body.tex $(DOCDIR)/latex/wx/manual.tex - cd $(WXDIR)\docs\latex\wx - -latex manual - -latex manual - -makeindx manual - -bibtex manual - -latex manual - -latex manual - cd $(THISDIR) - -$(WXDIR)\docs\latex\porting\porting.dvi: $(DOCDIR)/latex/porting/porting.tex - cd $(WXDIR)\docs\latex\porting - -latex porting - -latex porting - -makeindx porting - -bibtex porting - -latex porting - -latex porting - cd $(THISDIR) - -$(WXDIR)\docs\ps\wx.ps: $(WXDIR)\docs\latex\wx\manual.dvi - cd $(WXDIR)\docs\latex\wx - -dvips32 -o wx.ps manual - move wx.ps $(WXDIR)\docs\ps\wx.ps - cd $(THISDIR) - -$(WXDIR)\docs\ps\porting.ps: $(WXDIR)\docs\latex\porting\porting.dvi - cd $(WXDIR)\docs\latex\porting - -dvips32 -o porting.ps porting - move porting.ps $(WXDIR)\docs\ps\porting.ps - cd $(THISDIR) - -$(WXDIR)\docs\latex\wx\referenc.dvi: $(DOCDIR)/latex/wx/classes.tex $(DOCDIR)/latex/wx/topics.tex $(DOCDIR)/latex/wx/referenc.tex - cd $(WXDIR)\docs\latex\wx - -latex referenc - -latex referenc - -makeindx referenc - -bibtex referenc - -latex referenc - -latex referenc - cd $(THISDIR) - -$(WXDIR)\docs\ps\referenc.ps: $(WXDIR)\docs\latex\wx\referenc.dvi - cd $(WXDIR)\docs\latex\wx - -dvips32 -o referenc.ps referenc - move referenc.ps $(WXDIR)\docs\ps\referenc.ps - cd $(THISDIR) - -# In order to force document reprocessing -touchmanual: - -touch $(WXDIR)\docs\latex\wx\manual.tex - -updatedocs: touchmanual alldocs - -# Start Word, running the GeneratePDF macro. MakeManual.dot should be in the -# Office StartUp folder, and PDFMaker should be installed. -updatepdf: # touchmanual pdfrtf - start $(WAITFLAG) "winword d:\wx2\wxWindows\docs\latex\pdf\wx.rtf /mGeneratePDF" - - -MFTYPE=b32 -# Can't use this or we'll have to distribute all tmake files with wxWindows -# makefile.$(MFTYPE) : $(WXWIN)\distrib\msw\tmake\filelist.txt $(WXWIN)\distrib\msw\tmake\$(MFTYPE).t - -self: - cd $(WXWIN)\distrib\msw\tmake - tmake -t $(MFTYPE) wxwin.pro -o makefile.$(MFTYPE) - copy makefile.$(MFTYPE) $(WXWIN)\src\msw - diff --git a/distrib/msw/tmake/bcc.t b/distrib/msw/tmake/bcc.t deleted file mode 100644 index d9ccb8f43e..0000000000 --- a/distrib/msw/tmake/bcc.t +++ /dev/null @@ -1,300 +0,0 @@ -#!############################################################################# -#! File: bcc.t -#! Purpose: tmake template file from which makefile.bcc is generated by running -#! tmake -t bcc wxwin.pro -o makefile.bcc -#! -#! TODO: -#! - resourc2.obj is not correctly generated (see list and target). -#! - cpp is incorrectly substituted into filenames containing 'obj' -#! -#! Author: Vadim Zeitlin -#! Created: 14.07.99 -#! Version: $Id$ -#!############################################################################# - -#${ - #! include the code which parses filelist.txt file and initializes - #! %wxCommon, %wxGeneric and %wxMSW hashes. - IncludeTemplate("filelist.t"); - - #! now transform these hashes into $project tags - foreach $file (sort keys %wxGeneric) { - my $tag = ""; - if ( $wxGeneric{$file} =~ /\b(PS|G|U)\b/ ) { - #! Need this file too since it has wxGenericPageSetupDialog - next unless $file =~ /^prntdlgg\./; - } - - $file =~ s/cp?p?$/obj/; - $project{"WXGENERICOBJS"} .= "\$(MSWDIR)\\" . $file . " " - } - - foreach $file (sort keys %wxCommon) { - #! socket files don't compile under Win16 currently - next if $wxCommon{$file} =~ /\b(32|S|U)\b/; - - #! needs extra files (sql*.h) so not compiled by default. - next if $file =~ /^odbc\./; - - $isCFile = $file =~ /\.c$/; - $file =~ s/cp?p?$/obj/; - $obj = "\$(MSWDIR)\\" . $file . " "; - $project{"WXCOMMONOBJS"} .= $obj; - $project{"WXCOBJS"} .= $obj if $isCFile; - } - - #! special hack for Borland in 16 bits needs this file - $project{"WXCOMMONOBJS"} .= '${MSWDIR}\resourc2.obj'; - - foreach $file (sort keys %wxMSW) { - #! don't take files not appropriate for 16-bit Windows - next if $wxMSW{$file} =~ /\b(32|O)\b/; - - $isCFile = $file =~ /\.c$/; - $file =~ s/cp?p?$/obj/; - $obj = "\$(MSWDIR)\\" . $file . " "; - $project{"WXMSWOBJS"} .= $obj; - $project{"WXCOBJS"} .= $obj if $isCFile; - } -#$} - -# This file was automatically generated by tmake -# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE BCC.T! - -# -# File: makefile.bcc -# Author: Julian Smart -# Created: 1993 -# Updated: -# Copyright:(c) 1993, AIAI, University of Edinburgh -# -# "%W% %G%" -# -# Makefile : Builds wxWindows library wx.lib for Windows 3.1 -# and Borland C++ 3.1 - -!if "$(BCCDIR)" == "" -!error You must define the BCCDIR variable in autoexec.bat, e.g. BCCDIR=d:\bc4 -!endif - -!if "$(WXWIN)" == "" -!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx -!endif - -!if "$(CFG)" == "" -# !error You must start compiling from wx\src, not wx\src\msw. -!endif - -!ifndef DEBUG -DEBUG=0 -!endif - -WXDIR = $(WXWIN) - -!include $(WXDIR)\src\makebcc.env - -THISDIR = $(WXDIR)\src\msw - -# Please set these according to the settings in wx_setup.h, so we can include -# the appropriate libraries in wx.lib -USE_CTL3D=1 - -PERIPH_LIBS= -PERIPH_TARGET= -PERIPH_CLEAN_TARGET= - -!if "$(USE_CTL3D)" == "1" -PERIPH_LIBS=$(WXDIR)\lib\bcc16\ctl3dv2.lib $(PERIPH_LIBS) -!endif - -# TODO: add these libraries -# PERIPH_LIBS=$(WXDIR)\lib\zlib.lib $(WXDIR)\lib\winpng.lib $(PERIPH_LIBS) -PERIPH_TARGET=zlib png $(PERIPH_TARGET) -PERIPH_CLEAN_TARGET=clean_zlib clean_png $(PERIPH_CLEAN_TARGET) - -CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG) - -LIBTARGET= $(WXLIBDIR)\wx.lib -DUMMY=dummy - -GENDIR=..\generic -COMMDIR=..\common -OLEDIR=.\ole -MSWDIR=. - -DOCDIR = $(WXDIR)\docs - -GENERICOBJS= #$ ExpandList("WXGENERICOBJS"); - -COMMONOBJS = \ - $(MSWDIR)\y_tab.obj \ - #$ ExpandList("WXCOMMONOBJS"); - -MSWOBJS = #$ ExpandList("WXMSWOBJS"); - -OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS) - -default: wx - -wx: $(CFG) $(DUMMY).obj $(OBJECTS) $(PERIPH_TARGET) $(LIBTARGET) - -$(LIBTARGET): $(DUMMY).obj $(OBJECTS) $(PERIPH_LIBS) - erase $(LIBTARGET) - tlib $(LIBTARGET) /P2048 @&&! -+$(COMMONOBJS:.obj =.obj +)\ -+$(GENERICOBJS:.obj =.obj +)\ -+$(MSWOBJS:.obj =.obj +)\ -+$(PERIPH_LIBS:.lib =.lib +) -! - -dummy.obj: dummy.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h -dummydll.obj: dummydll.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h - -$(MSWDIR)\y_tab.obj: $(COMMDIR)\y_tab.c $(COMMDIR)\lex_yy.c - -# cl @<< -# $(CPPFLAGS2) /c $*.c -DUSE_DEFINE -DYY_USE_PROTOS /Fo$@ -# << - -$(COMMDIR)\y_tab.c: $(COMMDIR)\dosyacc.c - copy $(COMMDIR)\dosyacc.c $(COMMDIR)\y_tab.c - -$(COMMDIR)\lex_yy.c: $(COMMDIR)\doslex.c - copy $(COMMDIR)\doslex.c $(COMMDIR)\lex_yy.c - -# $(OBJECTS): $(WXDIR)\include\wx\setup.h - -#${ - $_ = $project{"WXMSWOBJS"}; - my @objs = split; - foreach (@objs) { - $text .= $_ . ": "; - $suffix = $project{"WXCOBJS"} =~ /\Q$_/ ? "c" : '$(SRCSUFF)'; - s/obj$/$suffix/; - $text .= $_ . "\n\n"; - } -#$} - -######################################################## -# Common objects (always compiled) - -#${ - $_ = $project{"WXCOMMONOBJS"}; - my @objs = split; - foreach (@objs) { - $text .= $_ . ": "; - $suffix = $project{"WXCOBJS"} =~ /\Q$_/ ? "c" : '$(SRCSUFF)'; - s/MSWDIR/COMMDIR/; - s/obj$/$suffix/; - $text .= $_ . "\n\n"; - } -#$} - -######################################################## -# Generic objects (not always compiled, depending on -# whether platforms have native implementations) - -#${ - $_ = $project{"WXGENERICOBJS"}; - my @objs = split; - foreach (@objs) { - $text .= $_ . ": "; - s/MSWDIR/GENDIR/; - s/obj$/\$(SRCSUFF)/; - $text .= $_ . "\n\n"; - } -#$} - -all_utils: - cd $(WXDIR)\utils - make -f makefile.bcc - cd $(WXDIR)\src\msw - -all_samples: - cd $(WXDIR)\samples - make -f makefile.bcc - cd $(WXDIR)\src\msw - -all_execs: - cd $(WXDIR)\utils - make -f makefile.bcc all_execs - cd $(WXDIR)\src\msw - -# CONTRIB -png: $(CFG) - cd $(WXDIR)\src\png - make -f makefile.bcc - cd $(WXDIR)\src\msw - -clean_png: - cd $(WXDIR)\src\png - make -f makefile.bcc clean - cd $(WXDIR)\src\msw - -zlib: $(CFG) - cd $(WXDIR)\src\zlib - make -f makefile.bcc - cd $(WXDIR)\src\msw - -clean_zlib: - cd $(WXDIR)\src\zlib - make -f makefile.bcc clean - cd $(WXDIR)\src\msw - -$(CFG): makefile.bcc - copy &&! --H=$(WXDIR)\src\msw\borland.pch --2 --P --d --w-hid --w-par --w-pia --w-aus --w-rch --ml --Od --WE --Fs- --Vf --Ff=4 --I$(WXINC);$(BCCDIR)\include;$(WXDIR)/src/generic;$(WXDIR)/src/png;$(WXDIR)/src/zlib --I$(WXDIR)\include\wx\msw\gnuwin32 --L$(BCCDIR)\lib --D__WXWIN__ --D__WXMSW__ --D__WINDOWS__ --D__WIN16__ -! $(CFG) -!if "$(BOR_VER)" == "3.1" - echo -Ff=4 >>$(CFG) -!elif "$(BOR_VER)" == "4" - echo -Ff=512 >>$(CFG) - echo -dc >>$(CFG) -!else - echo -Ff=512 >>$(CFG) - echo -dc >>$(CFG) -!endif - -# -O was: -Oxt - -clean: $(PERIPH_CLEAN_TARGET) - erase $(LIBTARGET) - erase *.obj - erase *.pch - erase *.csm - erase *.cfg - erase ..\common\y_tab.c - erase ..\common\lex_yy.c - -cleanall: clean - - -MFTYPE=bcc -# Can't use this or we'll have to distribute all tmake files with wxWindows -#makefile.$(MFTYPE) : $(WXWIN)\distrib\msw\tmake\filelist.txt $(WXWIN)\distrib\msw\tmake\$(MFTYPE).t - -self: - cd $(WXWIN)\distrib\msw\tmake - tmake -t $(MFTYPE) wxwin.pro -o makefile.$(MFTYPE) - copy makefile.$(MFTYPE) $(WXWIN)\src\msw diff --git a/distrib/msw/tmake/filelist.t b/distrib/msw/tmake/filelist.t index 5ad041fd2d..c4d9540fa4 100644 --- a/distrib/msw/tmake/filelist.t +++ b/distrib/msw/tmake/filelist.t @@ -97,6 +97,8 @@ $wxGTKINCLUDE{$filename} = $fileflags; } elsif ( $filetype eq "OS2H" ) { $wxOS2PMINCLUDE{$filename} = $fileflags; + } elsif ( $filetype eq "MGLH" ) { + $wxMGLINCLUDE{$filename} = $fileflags; } elsif ( $filetype eq "X11H" ) { $wxX11INCLUDE{$filename} = $fileflags; } elsif ( $filetype eq "UnivH" ) { diff --git a/distrib/msw/tmake/filelist.txt b/distrib/msw/tmake/filelist.txt index e38f4ced4a..4edd61595e 100644 --- a/distrib/msw/tmake/filelist.txt +++ b/distrib/msw/tmake/filelist.txt @@ -30,6 +30,7 @@ # MotifH /include/wx/motif # MSWH /include/wx/msw # OS2H /include/wx/os2 +# MGLH /include/wx/mgl # X11H /include/wx/x11 # GenericH /include/wx/generic # HtmlH /include/wx/html @@ -79,7 +80,7 @@ dirctrlg.cpp Generic dirdlgg.cpp Generic NotWin32 dragimgg.cpp Generic NotOS2 fdrepdlg.cpp Generic NotMSW -filedlgg.cpp Generic NotMSW,NotX,NotOS2,NotMac +filedlgg.cpp Generic Generic,NotX,NotOS2,NotMac fontdlgg.cpp Generic Generic,NotOS2 grid.cpp Generic gridctrl.cpp Generic @@ -90,7 +91,7 @@ imaglist.cpp Generic NotWin32 laywin.cpp Generic listctrl.cpp Generic NotWin32 logg.cpp Generic -mdig.cpp Generic NotWin32,NotGTK,NotOS2,NotMac +mdig.cpp Generic NotWin32,NotGTK,NotMac msgdlgg.cpp Generic Generic notebook.cpp Generic NotWin32,NotGTK,NotOS2,NotMGL,NotX11,NotMac,NotMicro numdlgg.cpp Generic @@ -216,6 +217,7 @@ protocol.cpp Common Socket,Base quantize.cpp Common radiocmn.cpp Common NotMac regex.cpp Common Base +rgncmn.cpp Common resource.cpp Common sckaddr.cpp Common Socket,Base sckfile.cpp Common Socket,Base @@ -282,18 +284,20 @@ dcprint.cpp MSW LowLevel dcscreen.cpp MSW LowLevel dde.cpp MSW LowLevel,Base dialog.cpp MSW -dialup.cpp MSW +dialup.cpp MSW LowLevel dib.cpp MSW LowLevel dibutils.cpp MSW dir.cpp MSW Base -dirdlg.cpp MSW Win32Only +dirdlg.cpp MSW Win32Only,LowLevel dragimag.cpp MSW dropsrc.cpp MSW OLE droptgt.cpp MSW OLE -enhmeta.cpp MSW Win32Only -helpbest.cpp MSW Win32Only +enhmeta.cpp MSW Win32Only,LowLevel +helpbest.cpp MSW Win32Only,LowLevel evtloop.cpp MSW LowLevel fdrepdlg.cpp MSW Win32Only +# FIXME: the generic implementation doesn't work under MSW, so we must +# the native dialog under MSW filedlg.cpp MSW font.cpp MSW LowLevel fontdlg.cpp MSW @@ -304,13 +308,13 @@ gauge95.cpp MSW Win32Only gaugemsw.cpp MSW NotWin32 gdiimage.cpp MSW LowLevel gdiobj.cpp MSW LowLevel -glcanvas.cpp MSW -helpchm.cpp MSW Win32Only -helpwin.cpp MSW +glcanvas.cpp MSW LowLevel +helpchm.cpp MSW Win32Only,LowLevel +helpwin.cpp MSW LowLevel icon.cpp MSW LowLevel imaglist.cpp MSW Win32Only iniconf.cpp MSW -joystick.cpp MSW +joystick.cpp MSW LowLevel listbox.cpp MSW listctrl.cpp MSW Win32Only main.cpp MSW LowLevel,Base @@ -350,21 +354,22 @@ statbr95.cpp MSW Win32Only statline.cpp MSW stattext.cpp MSW tabctrl.cpp MSW -taskbar.cpp MSW Win32Only +taskbar.cpp MSW Win32Only,LowLevel tbar95.cpp MSW Win32Only tbarmsw.cpp MSW NotWin32 textctrl.cpp MSW tglbtn.cpp MSW thread.cpp MSW Win32Only,Base,LowLevel timer.cpp MSW LowLevel -tooltip.cpp MSW Win32Only +tooltip.cpp MSW Win32Only,LowLevel toplevel.cpp MSW LowLevel treectrl.cpp MSW Win32Only utils.cpp MSW Base,LowLevel utilsexc.cpp MSW Base,LowLevel uuid.cpp MSW OLE +uxtheme.cpp MSW volume.cpp MSW Base -wave.cpp MSW +wave.cpp MSW LowLevel window.cpp MSW LowLevel dialup.cpp Unix NotMac @@ -530,7 +535,6 @@ notebmac.cpp Mac palette.cpp Mac pen.cpp Mac pnghand.cpp Mac -print.cpp Mac printdlg.cpp Mac printmac.cpp Mac radiobox.cpp Mac @@ -687,12 +691,10 @@ iniconf.cpp OS2 joystick.cpp OS2 listbox.cpp OS2 main.cpp OS2 -mdi.cpp OS2 menu.cpp OS2 menuitem.cpp OS2 metafile.cpp OS2 mimetype.cpp OS2 -minifram.cpp OS2 msgdlg.cpp OS2 nativdlg.cpp OS2 notebook.cpp OS2 @@ -745,7 +747,6 @@ m_list.cpp HTML m_dflist.cpp HTML m_pre.cpp HTML m_tables.cpp HTML -m_meta.cpp HTML m_style.cpp HTML htmprint.cpp HTML @@ -843,7 +844,7 @@ gdiobj.h WXH geometry.h WXH gifdecod.h WXH xpmdecod.h WXH -dbkeyg.h WXH +dbkeyg.h WXH Base glcanvas.h WXH grid.h WXH gsocket.h WXH Base @@ -915,6 +916,7 @@ progdlg.h WXH prop.h WXH propform.h WXH proplist.h WXH +quantize.h WXH radiobox.h WXH radiobut.h WXH regex.h WXH Base @@ -1230,6 +1232,28 @@ textctrl.h X11H toplevel.h X11H window.h X11H +app.h MGLH +bitmap.h MGLH +brush.h MGLH +clipbrd.h MGLH +colour.h MGLH +cursor.h MGLH +dc.h MGLH +dcclient.h MGLH +dcmemory.h MGLH +dcscreen.h MGLH +font.h MGLH +fontutil.h MGLH +gdiobj.h MGLH +icon.h MGLH +palette.h MGLH +pen.h MGLH +popupwin.h MGLH +private.h MGLH +region.h MGLH +toplevel.h MGLH +window.h MGLH + accel.h MSWH app.h MSWH bitmap.h MSWH @@ -1267,7 +1291,7 @@ fontdlg.h MSWH frame.h MSWH gauge95.h MSWH gaugemsw.h MSWH -gccpriv.h MSWH +gccpriv.h MSWH Base gdiimage.h MSWH gdiobj.h MSWH glcanvas.h MSWH @@ -1392,7 +1416,6 @@ dialog.h OS2H radiobox.h OS2H toolbar.h OS2H checkbox.h OS2H -mdi.h OS2H radiobut.h OS2H tooltip.h OS2H checklst.h OS2H @@ -1479,7 +1502,7 @@ helphtml.h GenericH imaglist.h GenericH laywin.h GenericH listctrl.h GenericH NotWin32 -mdig.h GenericH NotWin32,NotGTK,NotOS2,NotMac +mdig.h GenericH NotWin32,NotGTK,NotMac msgdlgg.h GenericH notebook.h GenericH paletteg.h GenericH NotMSW,NotX,NotX11,NotOS2 diff --git a/distrib/msw/tmake/g95.t b/distrib/msw/tmake/g95.t index 7fb2d7fd44..c4fc4bda3a 100644 --- a/distrib/msw/tmake/g95.t +++ b/distrib/msw/tmake/g95.t @@ -110,7 +110,7 @@ DLL_BASE_LDLIBS = $(DLL_EXTRA_LIBS) -lstdc++ -lwsock32 ifeq ($(wxUSE_GUI),0) DLL_LDLIBS = $(DLL_BASE_LDLIBS) else - DLL_LDLIBS = -mwindows -lcomctl32 -lctl3d32 -lole32 -loleaut32 \ + DLL_LDLIBS = -lcomctl32 -lctl3d32 -lole32 -loleaut32 \ -luuid -lrpcrt4 -lodbc32 -lwinmm -lopengl32 \ $(DLL_BASE_LDLIBS) endif @@ -141,15 +141,12 @@ DOCDIR = $(WXDIR)/docs # Only use the WIN32 wxDirDialog if we have a recent # version of Mingw32 -ifeq ($(MINGW32),1) - ifneq "$(_GCC295)$(_GCC3)" "" +ifeq "$(strip $(RECENT_MINGW))" "yes" DIRDLGOBJ = $(MSWDIR)/dirdlg.$(OBJSUFF) - else - DIRDLGOBJ = $(GENDIR)/dirdlgg.$(OBJSUFF) - endif else DIRDLGOBJ = $(GENDIR)/dirdlgg.$(OBJSUFF) endif + ifeq ($(wxUSE_GUI),0) DIRDLGOBJ = endif @@ -305,12 +302,8 @@ TIFFOBJS = $(TIFFDIR)/tif_aux.o \ $(TIFFDIR)/tif_write.o \ $(TIFFDIR)/tif_zip.o -ifeq ($(MINGW32),1) - ifneq "$(_GCC295)$(_GCC3)" "" - OBJECTS = $(MSWOBJS) $(COMMONOBJS) $(GENERICOBJS) $(HTMLOBJS) $(DIRDLGOBJ) $(ADVANCEDOBJS) - else - OBJECTS = $(MSWOBJS) $(COMMONOBJS) $(GENERICOBJS) $(HTMLOBJS) $(DIRDLGOBJ) - endif +ifeq "$(strip $(RECENT_MINGW))" "yes" + OBJECTS = $(MSWOBJS) $(COMMONOBJS) $(GENERICOBJS) $(HTMLOBJS) $(DIRDLGOBJ) $(ADVANCEDOBJS) else OBJECTS = $(MSWOBJS) $(COMMONOBJS) $(GENERICOBJS) $(HTMLOBJS) $(DIRDLGOBJ) endif @@ -343,9 +336,12 @@ $(ARCHINCDIR)/wx: mkdir $(subst $(PATH_SUBST),$(PATH_SEPARATOR),$(ARCHINCDIR)) mkdir $(subst $(PATH_SUBST),$(PATH_SEPARATOR),$(ARCHINCDIR)/wx) -$(SETUP_H): $(ARCHINCDIR)/wx - $(COPY) $(WXDIR)/include/wx/msw/setup.h $@ +# Copy ALWAYS uses forward slashes now. +$(SETUP_H): $(ARCHINCDIR)/wx $(WXDIR)/include/wx/msw/setup.h + $(COPY) $(WXDIR)/include/wx/msw/setup.h $(subst $(BACKSLASH),/,$@) + +# $(COPY) $(WXDIR)/include/wx/msw/setup.h $@ # $(COPY) $(subst $(PATH_SUBST),$(PATH_SEPARATOR),$(WXDIR)/include/wx/msw/setup.h) $(subst $(PATH_SUBST),$(PATH_SEPARATOR),$@) ifndef WXMAKINGDLL @@ -361,11 +357,12 @@ else ifeq "$(strip $(LD_SUPPORTS_SHARED))" "yes" $(WXDLL): $(OBJECTS) $(EXTRAOBJS) - $(CC) -shared -o $@ \ + $(CXX) -shared -o $@ \ -Wl,--output-def,$(WXDEF) \ -Wl,--out-implib,$(WXLIB) \ $(OBJECTS) $(EXTRAOBJS) \ - $(DLL_LDFLAGS) $(DLL_LDLIBS) + $(DLL_LDFLAGS) $(DLL_LDLIBS) \ + $(ALL_LDFLAGS_DLL) else ifeq ($(MINGW32),1) @@ -386,11 +383,11 @@ $(WXDEF) $(WXLIB): $(OBJECTS) $(EXTRAOBJS) $(OBJECTS) $(EXTRAOBJS) $(DLL_EXTRA_LIBS) $(WXDLL): $(OBJECTS) $(EXTRAOBJS) $(WXDEF) - $(CC) -mdll -Wl,--base-file,wx.base -s -o $@ $(LD_STUFF) + $(CC) -mdll -Wl,--base-file,wx.base -s -o $@ $(LD_STUFF) $(ALL_LDFLAGS_DLL) $(DLLTOOL) $(DLL_STUFF) - $(CC) -mdll -Wl,--base-file,wx.base wx.exp -s -o $@ $(LD_STUFF) + $(CC) -mdll -Wl,--base-file,wx.base wx.exp -s -o $@ $(LD_STUFF) $(ALL_LDFLAGS_DLL) $(DLLTOOL) $(DLL_STUFF) - $(CC) -mdll wx.exp -o $@ $(LD_STUFF) + $(CC) -mdll wx.exp -o $@ $(LD_STUFF) $(ALL_LDFLAGS_DLL) -$(RM) wx.base -$(RM) wx.exp @@ -421,7 +418,7 @@ $(REGEXLIB): $(OBJECTS): $(WXINC)/wx/defs.h $(WXINC)/wx/object.h $(ARCHINCDIR)/wx/setup.h $(COMMDIR)/y_tab.$(OBJSUFF): $(COMMDIR)/y_tab.c $(COMMDIR)/lex_yy.c - $(CCLEX) -c $(CPPFLAGS) -DUSE_DEFINE -DYY_USE_PROTOS -o $@ $(COMMDIR)/y_tab.c + $(CCLEX) -c $(ALL_CPPFLAGS) $(ALL_CFLAGS) -DUSE_DEFINE -DYY_USE_PROTOS -o $@ $(COMMDIR)/y_tab.c $(COMMDIR)/y_tab.c: $(COMMDIR)/dosyacc.c $(COPY) ../common/dosyacc.c ../common/y_tab.c diff --git a/distrib/msw/tmake/gtk.t b/distrib/msw/tmake/gtk.t index 0c2ea827de..798d035553 100644 --- a/distrib/msw/tmake/gtk.t +++ b/distrib/msw/tmake/gtk.t @@ -13,8 +13,6 @@ IncludeTemplate("filelist.t"); #! find all our sources - $project{"COMMONOBJS"} .= "parser.o "; - foreach $file (sort keys %wxGeneric) { next if $wxGeneric{$file} =~ /\bNotGTK\b/; diff --git a/distrib/msw/tmake/mac.t b/distrib/msw/tmake/mac.t index 6e7bd9b304..0315d6af52 100644 --- a/distrib/msw/tmake/mac.t +++ b/distrib/msw/tmake/mac.t @@ -13,7 +13,6 @@ IncludeTemplate("filelist.t"); #! find all our sources - $project{"COMMONOBJS"} .= "parser.o "; #! MoreFiles sources $project{"GUIOBJS"} .= "DirectoryCopy.o "; $project{"GUIOBJS"} .= "FSpCompat.o "; diff --git a/distrib/msw/tmake/makeall.bat b/distrib/msw/tmake/makeall.bat index 5adeb0a694..2f7237e11e 100755 --- a/distrib/msw/tmake/makeall.bat +++ b/distrib/msw/tmake/makeall.bat @@ -48,7 +48,6 @@ echo Generating for Visual C++ 4.0... %TM% -t vc wxwin.pro -o %WXDIR%\src\msw\makefile.vc echo Generating for Borland C++ (32 bits)... %TM% -t b32 wxwin.pro -o %WXDIR%\src\msw\makefile.b32 -%TM% -t b32univ wxwin.pro -o %WXDIR%\src\msw\makeuniv.b32 %TM% -t b32base wxwin.pro -o %WXDIR%\src\msw\makebase.b32 echo Generating for Visual C++ 1.52... %TM% -t dos wxwin.pro -o %WXDIR%\src\msw\makefile.dos diff --git a/distrib/msw/tmake/makeall.sh b/distrib/msw/tmake/makeall.sh index c5c366503c..d0c9a29d4a 100755 --- a/distrib/msw/tmake/makeall.sh +++ b/distrib/msw/tmake/makeall.sh @@ -22,7 +22,6 @@ do b32.t) echo "Generating $mswdir/makefile.b32 for Borland C++ (32 bits)..." ./tmake -t b32 wxwin.pro -o $mswdir/makefile.b32 - ./tmake -t b32univ wxwin.pro -o $mswdir/makeuniv.b32 ./tmake -t b32base wxwin.pro -o $mswdir/makebase.b32 ;; bcc.t) diff --git a/distrib/msw/tmake/mgl.t b/distrib/msw/tmake/mgl.t index af07954f30..56da38c497 100644 --- a/distrib/msw/tmake/mgl.t +++ b/distrib/msw/tmake/mgl.t @@ -13,7 +13,6 @@ IncludeTemplate("filelist.t"); #! find all our sources - $project{"COMMONOBJS"} .= "parser.o "; foreach $file (sort keys %wxGeneric) { next if $wxGeneric{$file} =~ /\bNotMGL\b/; diff --git a/distrib/msw/tmake/motif.t b/distrib/msw/tmake/motif.t index dbca7fc9e5..9cc31f2883 100644 --- a/distrib/msw/tmake/motif.t +++ b/distrib/msw/tmake/motif.t @@ -13,7 +13,6 @@ IncludeTemplate("filelist.t"); #! find all our sources - $project{"COMMONOBJS"} .= "parser.o "; $project{"GUIOBJS"} .= "xmcombo.o "; foreach $file (sort keys %wxGeneric) { diff --git a/distrib/msw/tmake/msw.t b/distrib/msw/tmake/msw.t index cfdd651f73..32681accc9 100644 --- a/distrib/msw/tmake/msw.t +++ b/distrib/msw/tmake/msw.t @@ -13,8 +13,6 @@ IncludeTemplate("filelist.t"); #! find all our sources - $project{"COMMONOBJS"} .= "parser.o "; - foreach $file (sort keys %wxGeneric) { next if $wxGeneric{$file} =~ /\b(PS|G|U|16)\b/; diff --git a/distrib/msw/tmake/vc.t b/distrib/msw/tmake/vc.t index b594d5d854..cabc5cf8fd 100644 --- a/distrib/msw/tmake/vc.t +++ b/distrib/msw/tmake/vc.t @@ -92,7 +92,7 @@ PERIPH_CLEAN_TARGET= # Set to 0 if not using GLCanvas (only affects DLL build) USE_GLCANVAS=1 -# Set to 0 if you are using MSVC 5 +# Set to 1 if you are using MSVC 5 USE_MSVC_5=0 # These are absolute paths, so that the compiler @@ -294,7 +294,7 @@ $(WXDIR)\lib\$(WXLIBNAME).dll: $(DUMMYOBJ) $(OBJECTS) $(link) @<< $(LINKFLAGS) $(INCREMENTAL) -out:$(WXDIR)\lib\$(WXLIBNAME).dll - $(DUMMYOBJ) $(OBJECTS) $(MSLU_LIBS) $(guilibsdll) shell32.lib comctl32.lib ctl3d32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib odbc32.lib advapi32.lib winmm.lib $(GL_LIBS) $(WXDIR)\lib\png$(LIBEXT).lib $(WXDIR)\lib\zlib$(LIBEXT).lib $(WXDIR)\lib\jpeg$(LIBEXT).lib $(WXDIR)\lib\tiff$(LIBEXT).lib $(WXDIR)\lib\regex$(LIBEXT).lib $(DELAY_LOAD) + $(DUMMYOBJ) $(OBJECTS) $(MSLU_LIBS) $(guilibsdll) shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib odbc32.lib advapi32.lib winmm.lib $(GL_LIBS) $(WXDIR)\lib\png$(LIBEXT).lib $(WXDIR)\lib\zlib$(LIBEXT).lib $(WXDIR)\lib\jpeg$(LIBEXT).lib $(WXDIR)\lib\tiff$(LIBEXT).lib $(WXDIR)\lib\regex$(LIBEXT).lib $(DELAY_LOAD) << !endif @@ -589,23 +589,30 @@ $(DOCDIR)/pdf/wx.rtf: $(DOCDIR)/latex/wx/classes.tex $(DOCDIR)/latex/wx/ -start $(WAITFLAG) tex2rtf $(DOCDIR)/latex/wx/manual.tex $(DOCDIR)/pdf/wx.rtf -twice -rtf cd $(THISDIR) +# This target does two sets of HTML: one using a style sheet, for +# the purposes of the CHM file, and one without. $(DOCDIR)\html\wx\wx.htm: $(DOCDIR)\latex\wx\classes.tex $(DOCDIR)\latex\wx\body.tex $(DOCDIR)/latex/wx/topics.tex $(DOCDIR)\latex\wx\manual.tex cd $(DOCDIR)\latex\wx -mkdir $(DOCDIR)\html\wx copy *.gif $(DOCDIR)\html\wx -start $(WAITFLAG) tex2rtf $(DOCDIR)\latex\wx\manual.tex $(DOCDIR)\html\wx\wx.htm -twice -html + -mkdir $(DOCDIR)\mshtml + -mkdir $(DOCDIR)\mshtml\wx + copy *.gif $(DOCDIR)\mshtml\wx + -start $(WAITFLAG) tex2rtf $(DOCDIR)\latex\wx\manual.tex $(DOCDIR)\mshtml\wx\wx.htm -twice -html -macros $(DOCDIR)\latex\wx\tex2rtf_css.ini -erase $(DOCDIR)\html\wx\*.con -erase $(DOCDIR)\html\wx\*.ref -erase $(DOCDIR)\latex\wx\*.con -erase $(DOCDIR)\latex\wx\*.ref cd $(THISDIR) -$(DOCDIR)\htmlhelp\wx.chm : $(DOCDIR)\html\wx\wx.htm $(DOCDIR)\html\wx\wx.hhp - cd $(DOCDIR)\html\wx +$(DOCDIR)\htmlhelp\wx.chm : $(DOCDIR)\html\wx\wx.htm $(DOCDIR)\mshtml\wx\wx.htm $(DOCDIR)\mshtml\wx\wx.hhp + cd $(DOCDIR)\mshtml\wx + copy $(DOCDIR)\latex\wx\wx.css . -hhc wx.hhp - -mkdir ..\..\htmlhelp - -erase $(DOCDIR)\htmlhelp\wx.chm - move wx.chm ..\..\htmlhelp + -mkdir ..\..\htmlhelp + -erase $(DOCDIR)\htmlhelp\wx.chm + move wx.chm ..\..\htmlhelp cd $(THISDIR) $(WXDIR)\docs\latex\wx\manual.dvi: $(DOCDIR)/latex/wx/body.tex $(DOCDIR)/latex/wx/manual.tex diff --git a/distrib/msw/tmake/vc6app.t b/distrib/msw/tmake/vc6app.t index 39ff9c463e..9ceace9bb1 100644 --- a/distrib/msw/tmake/vc6app.t +++ b/distrib/msw/tmake/vc6app.t @@ -49,7 +49,7 @@ } else { $project{"VC_PROJ_TYPE"} = 'Win32 (x86) Console Application'; $project{"VC_PROJ_CODE"} = '0x0103'; - $vc_base_libs = 'kernel32.lib user32.lib advapi32.lib '; + $vc_base_libs = 'kernel32.lib user32.lib advapi32.lib shell32.lib '; if ( Config("wx") ) { $vc_base_libs .= 'wsock32.lib '; } diff --git a/distrib/msw/tmake/vc6base.t b/distrib/msw/tmake/vc6base.t index 959ff69fdc..192edf77ea 100644 --- a/distrib/msw/tmake/vc6base.t +++ b/distrib/msw/tmake/vc6base.t @@ -7,6 +7,8 @@ #! Version: $Id$ #!############################################################################# #${ + use wxVersion qw(GetVersion); + #! include the code which parses filelist.txt file and initializes #! %wxCommon, %wxGeneric and %wxMSW hashes. IncludeTemplate("filelist.t"); @@ -44,7 +46,12 @@ $project{"WXMSWHEADERS"} .= $file . " " } - $project{"WXVERSION"} = "233"; + #! LINK_VERSION is the value of the linker /version switch, + #! DLL_VERSION is the version string for the DLL filename + my %versions = GetVersion(); + my ($verMaj, $verMin) = ( $versions{'MAJOR'}, $versions{'MINOR'} ); + $project{"LINK_VERSION"} = "$verMaj.$verMin"; + $project{"DLL_VERSION"} = "$verMaj$verMin"; #$} # Microsoft Developer Studio Project File - Name="wxBase" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 @@ -106,8 +113,8 @@ BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"../lib/wxbase#$ $text = $project{"WXVERSION"} . 'u.dll"' -# ADD LINK32 kernel32.lib user32.lib advapi32.lib shell32.lib wsock32.lib ../lib/zlib.lib ../lib/regex.lib /nologo /version:2.3 /dll /machine:I386 /out:"../lib/wxbase#$ $text = $project{"WXVERSION"} . 'u.dll"' +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"../lib/wxbase#$ $text = $project{"DLL_VERSION"} . 'u.dll"' +# ADD LINK32 kernel32.lib user32.lib advapi32.lib shell32.lib wsock32.lib ../lib/zlib.lib ../lib/regex.lib /nologo #$ $text = '/version:' . $project{LINK_VERSION} . ' /dll /machine:I386 /out:"../lib/wxbase' . $project{DLL_VERSION} . 'u.dll"' !ELSEIF "$(CFG)" == "wxBase - Win32 Debug Unicode DLL" @@ -132,9 +139,8 @@ BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept /out:"../lib/wxbase#$ $text = $project{"WXVERSION"} . 'ud.dll"' -# ADD LINK32 kernel32.lib user32.lib advapi32.lib shell32.lib wsock32.lib ../lib/zlibd.lib ../lib/regexd.lib /nologo /version:2.2 /dll /debug /machine:I386 /pdbtype:sept /out:"../lib/wxbase#$ $text = $project{"WXVERSION"} . 'ud.dll"' - +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept /out:"../lib/wxbase#$ $text = $project{"DLL_VERSION"} . 'ud.dll"' +# ADD LINK32 kernel32.lib user32.lib advapi32.lib shell32.lib wsock32.lib ../lib/zlibd.lib ../lib/regexd.lib /nologo #$ $text = '/version:' . $project{LINK_VERSION} . ' /dll /machine:I386 /out:"../lib/wxbase' . $project{DLL_VERSION} . 'ud.dll"' !ELSEIF "$(CFG)" == "wxBase - Win32 Release Unicode" # PROP BASE Use_MFC 0 @@ -204,8 +210,8 @@ BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"../lib/wxbase#$ $text = $project{"WXVERSION"} . '.dll"' -# ADD LINK32 kernel32.lib user32.lib advapi32.lib shell32.lib wsock32.lib ../lib/zlib.lib ../lib/regex.lib /nologo /version:2.3 /dll /machine:I386 /out:"../lib/wxbase#$ $text = $project{"WXVERSION"} . '.dll"' +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"../lib/wxbase#$ $text = $project{"DLL_VERSION"} . '.dll"' +# ADD LINK32 kernel32.lib user32.lib advapi32.lib shell32.lib wsock32.lib ../lib/zlib.lib ../lib/regex.lib /nologo #$ $text = '/version:' . $project{LINK_VERSION} . ' /dll /machine:I386 /out:"../lib/wxbase' . $project{DLL_VERSION} . '.dll"' !ELSEIF "$(CFG)" == "wxBase - Win32 Debug DLL" @@ -230,8 +236,8 @@ BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept /out:"../lib/wxbase#$ $text = $project{"WXVERSION"} . 'd.dll"' -# ADD LINK32 kernel32.lib user32.lib advapi32.lib shell32.lib wsock32.lib ../lib/zlibd.lib ../lib/regexd.lib /nologo /version:2.2 /dll /debug /machine:I386 /pdbtype:sept /out:"../lib/wxbase#$ $text = $project{"WXVERSION"} . 'd.dll"' +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept /out:"../lib/wxbase#$ $text = $project{"DLL_VERSION"} . 'd.dll"' +# ADD LINK32 kernel32.lib user32.lib advapi32.lib shell32.lib wsock32.lib ../lib/zlibd.lib ../lib/regexd.lib /nologo #$ $text = '/version:' . $project{LINK_VERSION} . ' /dll /machine:I386 /out:"../lib/wxbase' . $project{DLL_VERSION} . 'd.dll"' !ELSEIF "$(CFG)" == "wxBase - Win32 Release" diff --git a/distrib/msw/tmake/vc6msw.t b/distrib/msw/tmake/vc6msw.t index 84bd19f150..72449a7d31 100644 --- a/distrib/msw/tmake/vc6msw.t +++ b/distrib/msw/tmake/vc6msw.t @@ -9,6 +9,8 @@ #! Version: $Id$ #!############################################################################# #${ + use wxVersion qw(GetVersion); + #! include the code which parses filelist.txt file and initializes #! %wxCommon, %wxGeneric and %wxMSW hashes. IncludeTemplate("filelist.t"); @@ -60,7 +62,12 @@ $project{"WXHTMLHEADERS"} .= $file . " " } - $project{"WXVERSION"} = "233"; + #! LINK_VERSION is the value of the linker /version switch, + #! DLL_VERSION is the version string for the DLL filename + my %versions = GetVersion(); + my ($verMaj, $verMin) = ( $versions{'MAJOR'}, $versions{'MINOR'} ); + $project{"LINK_VERSION"} = "$verMaj.$verMin"; + $project{"DLL_VERSION"} = "$verMaj$verMin"; #$} # Microsoft Developer Studio Project File - Name="wxWindows" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 @@ -122,8 +129,8 @@ BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib ..\lib\jpeg.lib ..\lib\tiff.lib ..\lib\png.lib ..\lib\regex.lib ..\lib\zlib.lib /nologo /dll /machine:I386 /out:"../lib/wxmsw#$ $text = $project{"WXVERSION"} . 'u.dll"' -# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib comdlg32.lib shell32.lib ole32.lib oleaut32.lib odbc32.lib uuid.lib rpcrt4.lib comctl32.lib wsock32.lib winmm.lib ..\lib\jpeg.lib ..\lib\tiff.lib ..\lib\png.lib ..\lib\regex.lib ..\lib\zlib.lib /nologo /version:2.3 /dll /machine:I386 /out:"../lib/wxmsw#$ $text = $project{"WXVERSION"} . 'u.dll"' +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib ..\lib\jpeg.lib ..\lib\tiff.lib ..\lib\png.lib ..\lib\regex.lib ..\lib\zlib.lib /nologo /dll /machine:I386 /out:"../lib/wxmsw#$ $text = $project{"DLL_VERSION"} . 'u.dll"' +# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib comdlg32.lib shell32.lib ole32.lib oleaut32.lib odbc32.lib uuid.lib rpcrt4.lib comctl32.lib wsock32.lib winmm.lib ..\lib\jpeg.lib ..\lib\tiff.lib ..\lib\png.lib ..\lib\regex.lib ..\lib\zlib.lib /nologo #$ $text = '/version:' . $project{LINK_VERSION} . ' /dll /machine:I386 /out:"../lib/wxmsw' . $project{DLL_VERSION} . 'u.dll"' !ELSEIF "$(CFG)" == "wxWindows - Win32 Debug Unicode DLL" @@ -148,8 +155,8 @@ BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib ..\lib\jpegd.lib ..\lib\tiffd.lib ..\lib\pngd.lib ..\lib\regexd.lib ..\lib\zlibd.lib /dll /debug /machine:I386 /pdbtype:sept /out:"../lib/wxmsw#$ $text = $project{"WXVERSION"} . 'ud.dll"' -# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib comdlg32.lib shell32.lib ole32.lib oleaut32.lib odbc32.lib uuid.lib rpcrt4.lib comctl32.lib wsock32.lib winmm.lib ..\lib\jpegd.lib ..\lib\tiffd.lib ..\lib\pngd.lib ..\lib\regexd.lib ..\lib\zlibd.lib /nologo /version:2.3 /dll /debug /machine:I386 /pdbtype:sept /out:"../lib/wxmsw#$ $text = $project{"WXVERSION"} . 'ud.dll"' +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib ..\lib\jpegd.lib ..\lib\tiffd.lib ..\lib\pngd.lib ..\lib\regexd.lib ..\lib\zlibd.lib /dll /debug /machine:I386 /pdbtype:sept /out:"../lib/wxmsw#$ $text = $project{"DLL_VERSION"} . 'ud.dll"' +# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib comdlg32.lib shell32.lib ole32.lib oleaut32.lib odbc32.lib uuid.lib rpcrt4.lib comctl32.lib wsock32.lib winmm.lib ..\lib\jpegd.lib ..\lib\tiffd.lib ..\lib\pngd.lib ..\lib\regexd.lib ..\lib\zlibd.lib /nologo #$ $text = '/version:' . $project{LINK_VERSION} . ' /dll /machine:I386 /out:"../lib/wxmsw' . $project{DLL_VERSION} . 'ud.dll"' !ELSEIF "$(CFG)" == "wxWindows - Win32 Release Unicode" @@ -220,8 +227,8 @@ BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib ..\lib\jpeg.lib ..\lib\tiff.lib ..\lib\png.lib ..\lib\regex.lib ..\lib\zlib.lib /nologo /dll /machine:I386 /out:"../lib/wxmsw#$ $text = $project{"WXVERSION"} . '.dll"' -# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib comdlg32.lib shell32.lib ole32.lib oleaut32.lib odbc32.lib uuid.lib rpcrt4.lib comctl32.lib wsock32.lib winmm.lib ..\lib\jpeg.lib ..\lib\tiff.lib ..\lib\png.lib ..\lib\regex.lib ..\lib\zlib.lib /nologo /version:2.3 /dll /machine:I386 /out:"../lib/wxmsw#$ $text = $project{"WXVERSION"} . '.dll"' +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib ..\lib\jpeg.lib ..\lib\tiff.lib ..\lib\png.lib ..\lib\regex.lib ..\lib\zlib.lib /nologo /dll /machine:I386 /out:"../lib/wxmsw#$ $text = $project{"DLL_VERSION"} . '.dll"' +# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib comdlg32.lib shell32.lib ole32.lib oleaut32.lib odbc32.lib uuid.lib rpcrt4.lib comctl32.lib wsock32.lib winmm.lib ..\lib\jpeg.lib ..\lib\tiff.lib ..\lib\png.lib ..\lib\regex.lib ..\lib\zlib.lib /nologo #$ $text = '/version:' . $project{LINK_VERSION} . ' /dll /machine:I386 /out:"../lib/wxmsw' . $project{DLL_VERSION} . '.dll"' !ELSEIF "$(CFG)" == "wxWindows - Win32 Debug DLL" @@ -246,8 +253,8 @@ BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib ..\lib\jpegd.lib ..\lib\tiffd.lib ..\lib\pngd.lib ..\lib\regexd.lib ..\lib\zlibd.lib /dll /debug /machine:I386 /pdbtype:sept /out:"../lib/wxmsw#$ $text = $project{"WXVERSION"} . 'd.dll"' -# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib comdlg32.lib shell32.lib ole32.lib oleaut32.lib odbc32.lib uuid.lib rpcrt4.lib comctl32.lib wsock32.lib winmm.lib ..\lib\jpegd.lib ..\lib\tiffd.lib ..\lib\pngd.lib ..\lib\regexd.lib ..\lib\zlibd.lib /nologo /version:2.3 /dll /debug /machine:I386 /pdbtype:sept /out:"../lib/wxmsw#$ $text = $project{"WXVERSION"} . 'd.dll"' +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib ..\lib\jpegd.lib ..\lib\tiffd.lib ..\lib\pngd.lib ..\lib\regexd.lib ..\lib\zlibd.lib /dll /debug /machine:I386 /pdbtype:sept /out:"../lib/wxmsw#$ $text = $project{"DLL_VERSION"} . 'd.dll"' +# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib comdlg32.lib shell32.lib ole32.lib oleaut32.lib odbc32.lib uuid.lib rpcrt4.lib comctl32.lib wsock32.lib winmm.lib ..\lib\jpegd.lib ..\lib\tiffd.lib ..\lib\pngd.lib ..\lib\regexd.lib ..\lib\zlibd.lib /nologo #$ $text = '/version:' . $project{LINK_VERSION} . ' /dll /machine:I386 /out:"../lib/wxmsw' . $project{DLL_VERSION} . 'd.dll"' !ELSEIF "$(CFG)" == "wxWindows - Win32 Release" @@ -336,15 +343,46 @@ SOURCE=.\common\dosyacc.c SOURCE=.\msw\dummy.cpp # ADD CPP /Yc"wx/wxprec.h" +# End Source File +# Begin Source File + +SOURCE=.\msw\version.rc + +!IF "$(CFG)" == "wxWindows - Win32 Release Unicode DLL" + +!ELSEIF "$(CFG)" == "wxWindows - Win32 Debug Unicode DLL" + +!ELSEIF "$(CFG)" == "wxWindows - Win32 Release Unicode" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "wxWindows - Win32 Debug Unicode" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "wxWindows - Win32 Release DLL" + +!ELSEIF "$(CFG)" == "wxWindows - Win32 Debug DLL" + +!ELSEIF "$(CFG)" == "wxWindows - Win32 Release" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "wxWindows - Win32 Debug" + +# PROP Exclude_From_Build 1 + +!ENDIF + # End Source File #$ ExpandGlue("WXMSWSRCS", "# Begin Source File\n\nSOURCE=.\\msw\\", "\n# End Source File\n# Begin Source File\n\nSOURCE=.\\msw\\", "\n# End Source File\n"); #$ ExpandGlue("WXMSWCSRCS", "# Begin Source File\n\nSOURCE=.\\msw\\", "\n# SUBTRACT CPP /YX /Yc /Yu\n# End Source File\n# Begin Source File\n\nSOURCE=.\\msw\\", "\n# SUBTRACT CPP /YX /Yc /Yu\n# End Source File\n"); -# End Group # Begin Group "OLE Files" # PROP Default_Filter "" #$ ExpandGlue("WXOLESRCS", "# Begin Source File\n\nSOURCE=.\\msw\\ole\\", "\n# End Source File\n# Begin Source File\n\nSOURCE=.\\msw\\ole\\", "\n# End Source File\n"); # End Group +# End Group # Begin Group "Headers" # PROP Default_Filter "" diff --git a/distrib/msw/tmake/wat.t b/distrib/msw/tmake/wat.t index e6d9f58f73..4248cb2689 100644 --- a/distrib/msw/tmake/wat.t +++ b/distrib/msw/tmake/wat.t @@ -2,13 +2,10 @@ #! File: wat.t #! Purpose: tmake template file from which makefile.wat is generated by running #! tmake -t wat wxwin.pro -o makefile.wat -#! TODO: -#! - extended.c, unzip.c must be compiled with $(CC), not $(CCC). -#! - extended.c, unzip.c targets must be as per b32.t etc. -#! - OLE files not generated correctly (need 'ole/' directory) #! Author: Vadim Zeitlin #! Created: 14.07.99 #! Version: $Id$ +#! Changelist: 2003-02-25 - Juergen Ulbts - update from wxWindows 2.5.x/HEAD branch #!############################################################################# #${ #! include the code which parses filelist.txt file and initializes @@ -49,7 +46,7 @@ #! these files don't compile next if $file =~ /^pnghand\./; -#! next if $wxGeneric{$file} =~ /\b16\b/; + next if $wxMSW{$file} =~ /\b16\b/; my $isOleObj = $wxMSW{$file} =~ /\bO\b/; my $isCFile = $file =~ /\.c$/; @@ -71,25 +68,9 @@ # Created: 1998 # # Makefile : Builds wxWindows library for Watcom C++, WIN32 -# -# NOTE: This file is generated from wat.t by tmake, but not all bugs have -# been removed from this process. If wxWindows doesn't compile, -# check the following and edit this makefile accordingly: -# -# - OLE-related files such as oleutils.cpp should have 'ole\' prepended -# to the path. -# - extended.c, gsocket.c, unzip.c must be compiled using $(CC), not $(CCC). -# They may also be wrongly specified as extended.cpp, etc. +!include ..\makewat.env -WXDIR = ..\.. - -!include $(WXDIR)\src\makewat.env - -WXLIB = $(WXDIR)\lib - -LIBTARGET = $(WXLIB)\wx.lib -DUMMY=dummydll -# ODBCLIB = ..\..\contrib\odbc\odbc32.lib +LIBTARGET = $(WXDIR)\lib\$(LIBNAME).lib EXTRATARGETS = png zlib jpeg tiff regex EXTRATARGETSCLEAN = clean_png clean_zlib clean_jpeg clean_tiff clean_regex @@ -103,44 +84,43 @@ HTMLDIR=$(WXDIR)\src\html DOCDIR = $(WXDIR)\docs -GENERICOBJS= #$ ExpandGlue("WXGENERICOBJS", "", " &\n\t") +GENERICOBJS= #$ ExpandGlue("WXGENERICOBJS", "\$(OUTPUTDIR)\\", " &\n\t\$(OUTPUTDIR)\\") # These are generic things that don't need to be compiled on MSW, # but sometimes it's useful to do so for testing purposes. -NONESSENTIALOBJS= #$ ExpandGlue("WXNONESSENTIALOBJS", "", " &\n\t") +NONESSENTIALOBJS= #$ ExpandGlue("WXNONESSENTIALOBJS", "\$(OUTPUTDIR)\\", " &\n\t\$(OUTPUTDIR)\\") COMMONOBJS = & - y_tab.obj & - #$ ExpandGlue("WXCOMMONOBJS", "", " &\n\t") + $(OUTPUTDIR)\y_tab.obj & + #$ ExpandGlue("WXCOMMONOBJS", "\$(OUTPUTDIR)\\", " &\n\t\$(OUTPUTDIR)\\") -MSWOBJS = #$ ExpandGlue("WXMSWOBJS", "", " &\n\t") +MSWOBJS = #$ ExpandGlue("WXMSWOBJS", "\$(OUTPUTDIR)\\", " &\n\t\$(OUTPUTDIR)\\") -HTMLOBJS = #$ ExpandGlue("WXHTMLOBJS", "", " &\n\t") +HTMLOBJS = #$ ExpandGlue("WXHTMLOBJS", "\$(OUTPUTDIR)\\", " &\n\t\$(OUTPUTDIR)\\") # Add $(NONESSENTIALOBJS) if wanting generic dialogs, PostScript etc. OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS) $(HTMLOBJS) -ARCHINCDIR=$(WXDIR)\lib\msw SETUP_H=$(ARCHINCDIR)\wx\setup.h -all: $(SETUP_H) $(OBJECTS) $(LIBTARGET) $(EXTRATARGETS) .SYMBOLIC +all: $(SETUP_H) $(OUTPUTDIR) $(OBJECTS) $(LIBTARGET) $(EXTRATARGETS) .SYMBOLIC $(ARCHINCDIR)\wx: - mkdir $(ARCHINCDIR) - mkdir $(ARCHINCDIR)\wx + mkdir $(ARCHINCDIR) + mkdir $(ARCHINCDIR)\wx -$(SETUP_H): $(WXDIR)\include\wx\msw\setup.h $(ARCHINCDIR)\wx - copy $(WXDIR)\include\wx\msw\setup.h $@ +$(OUTPUTDIR): + @if not exist $^@ mkdir $^@ +$(SETUP_H): $(ARCHINCDIR)\wx + if not exist $(WXDIR)\include\wx\msw\setup.h copy $(WXDIR)\include\wx\msw\setup0.h $(WXDIR)\include\wx\msw\setup.h + copy $(WXDIR)\include\wx\msw\setup.h $@ + +LBCFILE=wx$(TOOLKIT).lbc $(LIBTARGET) : $(OBJECTS) - %create tmp.lbc - @for %i in ( $(OBJECTS) ) do @%append tmp.lbc +%i - wlib /b /c /n /p=512 $^@ @tmp.lbc - -#test : $(OBJECTS) -# %create tmp.lbc -# @for %i in ( $(OBJECTS) ) do @%append tmp.lbc +%i -# wlib /b /c /n /p=512 $^@ @tmp.lbc + %create $(LBCFILE) + @for %i in ( $(OBJECTS) ) do @%append $(LBCFILE) +%i + wlib /b /c /n $(LIBPAGESIZE) $^@ @$(LBCFILE) clean: .SYMBOLIC $(EXTRATARGETSCLEAN) @@ -156,7 +136,7 @@ cleanall: clean $_ = $project{"WXMSWOBJS"}; my @objs = split; foreach (@objs) { - $text .= $_ . ': $('; + $text .= "\$(OUTPUTDIR)\\" . $_ . ': $('; s/\.obj$//; if ( $project{"WXOLEOBJS"} =~ /\b\Q$_\E\b/ ) { $text .= 'OLEDIR)\\'; @@ -167,13 +147,15 @@ cleanall: clean if ( $project{"WXCOBJS"} =~ /\b\Q$_\E\b/ ) { $suffix = "c"; $cc="CC"; + $flags="CFLAGS"; } else { $suffix = "cpp"; - $cc="CCC"; + $cc="CXX"; + $flags="CXXFLAGS"; } $text .= $_ . ".$suffix\n" . - " *\$($cc) \$(CPPFLAGS) \$(IFLAGS) \$<" . "\n\n"; + " *\$($cc) \$($flags) \$<" . "\n\n"; } #$} @@ -184,27 +166,27 @@ cleanall: clean $_ = $project{"WXCOMMONOBJS"}; my @objs = split; foreach (@objs) { - $text .= $_; + $text .= "\$(OUTPUTDIR)\\" . $_; s/\.obj$//; $text .= ': $(COMMDIR)\\'; my $suffix, $cc; if ( $project{"WXCOBJS"} =~ /\b\Q$_\E\b/ ) { $suffix = "c"; $cc="CC"; + $flags="CFLAGS"; } else { $suffix = "cpp"; - $cc="CCC"; + $cc="CXX"; + $flags="CXXFLAGS"; } $text .= $_ . ".$suffix\n" . - " *\$($cc) \$(CPPFLAGS) \$(IFLAGS) \$<" . "\n\n"; + " *\$($cc) \$($flags) \$<" . "\n\n"; } #$} -y_tab.obj: $(COMMDIR)\y_tab.c $(COMMDIR)\lex_yy.c - *$(CC) $(CPPFLAGS) $(IFLAGS) -DUSE_DEFINE $(COMMDIR)\y_tab.c - -# *$(CC) $(CPPFLAGS) $(IFLAGS) -DUSE_DEFINE -DYY_USE_PROTOS $(COMMDIR)\y_tab.c +$(OUTPUTDIR)\y_tab.obj: $(COMMDIR)\y_tab.c $(COMMDIR)\lex_yy.c + *$(CC) $(CFLAGS) -DUSE_DEFINE $(COMMDIR)\y_tab.c $(COMMDIR)\y_tab.c: $(COMMDIR)\dosyacc.c copy $(COMMDIR)\dosyacc.c $(COMMDIR)\y_tab.c @@ -220,11 +202,11 @@ $(COMMDIR)\lex_yy.c: $(COMMDIR)\doslex.c $_ = $project{"WXGENERICOBJS"}; my @objs = split; foreach (@objs) { - $text .= $_; + $text .= "\$(OUTPUTDIR)\\" . $_; s/\.obj$//; $text .= ': $(GENDIR)\\'; $text .= $_ . ".cpp\n" . - ' *$(CCC) $(CPPFLAGS) $(IFLAGS) $<' . "\n\n"; + ' *$(CXX) $(CXXFLAGS) $<' . "\n\n"; } #$} @@ -236,11 +218,11 @@ $(COMMDIR)\lex_yy.c: $(COMMDIR)\doslex.c $_ = $project{"WXHTMLOBJS"}; my @objs = split; foreach (@objs) { - $text .= $_; + $text .= "\$(OUTPUTDIR)\\" . $_; s/\.obj$//; $text .= ': $(HTMLDIR)\\'; $text .= $_ . ".cpp\n" . - ' *$(CCC) $(CPPFLAGS) $(IFLAGS) $<' . "\n\n"; + ' *$(CXX) $(CXXFLAGS) $<' . "\n\n"; } #$} diff --git a/distrib/msw/tmake/watbase.t b/distrib/msw/tmake/watbase.t new file mode 100644 index 0000000000..40a45a0c71 --- /dev/null +++ b/distrib/msw/tmake/watbase.t @@ -0,0 +1,183 @@ +#!############################################################################# +#! File: wat.t +#! Purpose: tmake template file from which makefile.wat is generated by running +#! tmake -t wat wxwin.pro -o makefile.wat +#! Author: Vadim Zeitlin +#! Created: 14.07.99 +#! Version: $Id$ +#! Changelist: 2003-02-25 - Juergen Ulbts - update from wxWindows 2.5.x/HEAD branch +#!############################################################################# +#${ + #! include the code which parses filelist.txt file and initializes + #! %wxCommon, %wxGeneric and %wxMSW hashes. + IncludeTemplate("filelist.t"); + + #! now transform these hashes into $project tags + foreach $file (sort keys %wxCommon) { + next if $wxCommon{$file} !~ /\bB\b/; + + $isCFile = $file =~ /\.c$/; + $file =~ s/cp?p?$/obj/; + $project{"WXCOMMONOBJS"} .= $file . " "; + $project{"WXCOBJS"} .= $file . " " if $isCFile; + } + + foreach $file (sort keys %wxMSW) { + next if $wxMSW{$file} !~ /\bB\b/; + + my $isCFile = $file =~ /\.c$/; + $file =~ s/cp?p?$/obj/; + $project{"WXMSWOBJS"} .= $file . " "; + $project{"WXCOBJS"} .= $file . " " if $isCFile; + } + + foreach $file (sort keys %wxBase) { + my $isCFile = $file =~ /\.c$/; + $file =~ s/cp?p?$/obj/; + $project{"WXCOMMONOBJS"} .= $file . " "; + $project{"WXCOBJS"} .= $file . " " if $isCFile; + } + +#$} +#! an attempt to embed '#' directly in the string somehow didn't work... +#$ $text = chr(35) . '!/binb/wmake.exe'; + +# This file was automatically generated by tmake +# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE WATBASE.T! + +############################################################################## +# Name: makebase.wat +# Purpose: Builds wxBase library for Watcom C++ under Win32 +# Author: Vadim Zeitlin +# Created: 21.01.03 +# RCS-ID: $Id$ +# Copyright: (c) 2003 Vadim Zeitlin +# Licence: wxWindows licence +############################################################################## + +wxUSE_GUI=0 + +!include ..\makewat.env + +LIBTARGET = $(WXDIR)\lib\$(LIBNAME).lib + +EXTRATARGETS = zlib regex +EXTRATARGETSCLEAN = clean_zlib clean_regex +COMMDIR=$(WXDIR)\src\common +MSWDIR=$(WXDIR)\src\msw +OLEDIR=$(MSWDIR)\ole + +COMMONOBJS = & + #$ ExpandGlue("WXCOMMONOBJS", "\$(OUTPUTDIR)\\", " &\n\t\$(OUTPUTDIR)\\") + +MSWOBJS = & + #$ ExpandGlue("WXMSWOBJS", "\$(OUTPUTDIR)\\", " &\n\t\$(OUTPUTDIR)\\") + +OBJECTS = $(COMMONOBJS) $(MSWOBJS) + +SETUP_H=$(ARCHINCDIR)\wx\setup.h + +all: $(SETUP_H) $(OUTPUTDIR) $(OBJECTS) $(LIBTARGET) $(EXTRATARGETS) .SYMBOLIC + +$(ARCHINCDIR)\wx: + mkdir $(ARCHINCDIR) + mkdir $(ARCHINCDIR)\wx + +$(OUTPUTDIR): + mkdir $(OUTPUTDIR) + +$(SETUP_H): $(WXDIR)\include\wx\msw\setup.h $(ARCHINCDIR)\wx + copy $(WXDIR)\include\wx\msw\setup.h $@ + +LBCFILE=$(OUTPUTDIR)\wx$(TOOLKIT).lbc +$(LIBTARGET) : $(OBJECTS) + %create $(LBCFILE) + @for %i in ( $(OBJECTS) ) do @%append $(LBCFILE) +%i + wlib /q /b /c /n /p=512 $^@ @$(LBCFILE) + + +clean: .SYMBOLIC $(EXTRATARGETSCLEAN) + -erase $(OUTPUTDIR)\*.obj + -erase $(LIBTARGET) + -erase $(OUTPUTDIR)\*.pch + -erase $(OUTPUTDIR)\*.err + -erase $(OUTPUTDIR)\*.lbc + +cleanall: clean + -erase $(LBCFILE) + +#${ + $_ = $project{"WXMSWOBJS"}; + my @objs = split; + foreach (@objs) { + $text .= "\$(OUTPUTDIR)\\" . $_ . ': $('; + s/\.obj$//; + $text .= 'MSWDIR)\\'; + + my $suffix, $cc; + if ( $project{"WXCOBJS"} =~ /\b\Q$_\E\b/ ) { + $suffix = "c"; + $cc="CC"; + $flags="CFLAGS"; + } + else { + $suffix = "cpp"; + $cc="CXX"; + $flags="CXXFLAGS"; + } + $text .= $_ . ".$suffix\n" . + " *\$($cc) \$($flags) \$<" . "\n\n"; + } +#$} + +######################################################## +# Common objects (always compiled) + +#${ + $_ = $project{"WXCOMMONOBJS"}; + my @objs = split; + foreach (@objs) { + $text .= "\$(OUTPUTDIR)\\" . $_; + s/\.obj$//; + $text .= ': $(COMMDIR)\\'; + my $suffix, $cc; + if ( $project{"WXCOBJS"} =~ /\b\Q$_\E\b/ ) { + $suffix = "c"; + $cc="CC"; + $flags="CFLAGS"; + } + else { + $suffix = "cpp"; + $cc="CXX"; + $flags="CXXFLAGS"; + } + $text .= $_ . ".$suffix\n" . + " *\$($cc) \$($flags) \$<" . "\n\n"; + } +#$} + +zlib: .SYMBOLIC + cd $(WXDIR)\src\zlib + wmake -f makefile.wat all + cd $(WXDIR)\src\msw + +clean_zlib: .SYMBOLIC + cd $(WXDIR)\src\zlib + wmake -f makefile.wat clean + cd $(WXDIR)\src\msw + +regex: .SYMBOLIC + cd $(WXDIR)\src\regex + wmake -f makefile.wat all + cd $(WXDIR)\src\msw + +clean_regex: .SYMBOLIC + cd $(WXDIR)\src\regex + wmake -f makefile.wat clean + cd $(WXDIR)\src\msw + +MFTYPE=watbase +self : .SYMBOLIC $(WXDIR)\distrib\msw\tmake\filelist.txt $(WXDIR)\distrib\msw\tmake\$(MFTYPE).t + cd $(WXDIR)\distrib\msw\tmake + tmake -t $(MFTYPE) wxwin.pro -o makebase.wat + copy makebase.wat $(WXDIR)\src\msw diff --git a/distrib/msw/tmake/wxVersion.pm b/distrib/msw/tmake/wxVersion.pm new file mode 100644 index 0000000000..842d0291b2 --- /dev/null +++ b/distrib/msw/tmake/wxVersion.pm @@ -0,0 +1,53 @@ +package wxVersion; + +=head1 NAME + +wxVersion + +=head1 SYNOPSIS + + use wxVersion qw(GetVersion); + +=head1 METHODS + +=cut + +use strict; + +use base 'Exporter'; +use vars qw(@EXPORT_OK); + +@EXPORT_OK = qw(GetVersion); + +sub GetVersion() +{ + my $filename = "../../../include/wx/version.h"; + open(VERSION_H, $filename) or die "Can't open $filename: $!\n"; + + my %versions; + my $numGot = 0; + + while ( defined($_ = ) ) { + chomp; + + if ( /\s*#define\s+wxMAJOR_VERSION\s+(\d+)/ ) { + $versions{'MAJOR'} = $1; + $numGot++; + } + elsif ( /\s*#define\s+wxMINOR_VERSION\s+(\d+)/ ) { + $versions{'MINOR'} = $1; + $numGot++; + } + elsif ( /\s*#define\s+wxRELEASE_NUMBER\s+(\d+)/ ) { + $versions{'MICRO'} = $1; + $numGot++; + } + + last if $numGot == 3 # we've got everything we wanted + } + + $numGot == 3 or die "Failed to read the version from $filename.\n"; + + return %versions; +} + diff --git a/distrib/msw/tmake/x11.t b/distrib/msw/tmake/x11.t index f493412685..fd4ebb3957 100644 --- a/distrib/msw/tmake/x11.t +++ b/distrib/msw/tmake/x11.t @@ -13,8 +13,6 @@ IncludeTemplate("filelist.t"); #! find all our sources - $project{"COMMONOBJS"} .= "parser.o "; - foreach $file (sort keys %wxX11) { ($fileobj = $file) =~ s/cp?p?$/\o/; diff --git a/distrib/msw/vc.rsp b/distrib/msw/vc.rsp index 940fdff5ba..6628de2c5b 100644 --- a/distrib/msw/vc.rsp +++ b/distrib/msw/vc.rsp @@ -51,6 +51,8 @@ samples/db/db.dsw samples/dialogs/dialogs.dsp samples/dialogs/dialogs.dsw +samples/dialogs/dialogsUniv.dsp +samples/dialogs/dialogsUniv.dsw samples/dialup/dialup.dsp samples/dialup/dialup.dsw @@ -204,6 +206,9 @@ samples/scroll/scroll.dsw samples/scrollsub/scrollsub.dsp samples/scrollsub/scrollsub.dsw +samples/shaped/shaped.dsp +samples/shaped/shaped.dsw + samples/sockets/client.dsp samples/sockets/server.dsp samples/sockets/client.dsw @@ -245,6 +250,7 @@ samples/wizard/wizard.dsw samples/widgets/widgets.dsp samples/widgets/widgets.dsw samples/widgets/widgetsUniv.dsp +samples/widgets/widgetsUniv.dsw samples/opengl/cube/cube.dsp samples/opengl/cube/cube.dsw @@ -285,6 +291,8 @@ utils/helpgen/src/HelpGenVC.dsw utils/helpview/src/helpview.dsp utils/helpview/src/helpview.dsw +utils/helpview/src/client.dsp +utils/helpview/src/client.dsw contrib/src/ogl/OglVC.dsp contrib/src/ogl/OglVC.dsw diff --git a/distrib/msw/zipdistinno.bat b/distrib/msw/zipdistinno.bat index 41d5b8e024..411891e4d9 100755 --- a/distrib/msw/zipdistinno.bat +++ b/distrib/msw/zipdistinno.bat @@ -7,7 +7,7 @@ set webfiles=c:\wx2dev\wxWebSite set inno=0 Rem Set this to the required version -set version=2.3.3 +set version=2.4.1 if "%src" == "" goto usage if "%dest" == "" goto usage @@ -45,7 +45,7 @@ if direxist %dest\wx erase /sxyz %dest\wx\ if not direxist %dest mkdir %dest if direxist %dest%\wxWindows-%version% erase /sxyz %dest%\wxWindows-%version% -# Copy FAQ from wxWebSite CVS +Rem Copy FAQ from wxWebSite CVS if not direxist %webfiles% echo Error - %webfiles% does not exist if not direxist %webfiles% goto end echo Copying FAQ and other files from %webfiles @@ -56,6 +56,7 @@ copy %webfiles%\site\i18n.htm %src\docs\html Rem Copy setup0.h files to setup.h copy %src%\include\wx\os2\setup0.h %src%\include\wx\os2\setup.h copy %src%\include\wx\msw\setup0.h %src%\include\wx\msw\setup.h +copy %src%\include\wx\univ\setup0.h %src%\include\wx\univ\setup.h cd %src% echo Zipping... @@ -118,6 +119,8 @@ zip32 -u -@ %dest%\wxMac-%version%.zip < %src%\distrib\msw\stc.rsp zip32 -u -@ %dest%\wxMac-%version%.zip < %src%\distrib\msw\contrib.rsp zip32 -u -@ %dest%\wxMac-%version%.zip < %src%\distrib\msw\makefile.rsp +zip32 -@ %dest%\wxWindows-%version%-CW-Mac.zip < %src%\distrib\msw\cw_mac.rsp + erase /Y %src%\include\wx\setup.h if direxist %dest%\wxWindows-%version% erase /sxyz %dest%\wxWindows-%version% @@ -153,51 +156,71 @@ zip32 -@ -u %dest\wxWindows-%version%-win.zip < %src\distrib\msw\utils.rsp zip32 -@ -u %dest\wxWindows-%version%-win.zip < %src\distrib\msw\utilmake.rsp zip32 -@ -u %dest\wxWindows-%version%-win.zip < %src\distrib\msw\univ.rsp +echo Re-archiving wxWindows-%version%-win.zip call %WXWIN%\distrib\msw\rearchive wxWindows-%version%-win.zip wxWindows-%version% %dest% -zip32 -d %dest%\wxWindows-%version%-win.zip %dest%/src/gtk/descrip.mms %dest%/src/motif/descrip.mms +echo Removing .mms files +zip32 -d %dest%\wxWindows-%version%-win.zip wxWindows-%version%/src/gtk/descrip.mms wxWindows-%version%/src/motif/descrip.mms +echo Creating %dest\wxWindows-%version%-DocSource.zip zip32 -@ %dest\wxWindows-%version%-DocSource.zip < %src\distrib\msw\docsrc.rsp call %WXWIN%\distrib\msw\rearchive wxWindows-%version%-DocSource.zip wxWindows-%version% %dest% +echo Creating %dest\wxWindows-%version%-WinHelp.zip zip32 -@ %dest\wxWindows-%version%-WinHelp.zip < %src\distrib\msw\wx_hlp.rsp call %WXWIN%\distrib\msw\rearchive wxWindows-%version%-WinHelp.zip wxWindows-%version% %dest% +echo Creating %dest\wxWindows-%version%-HTML.zip zip32 -@ %dest\wxWindows-%version%-HTML.zip < %src\distrib\msw\wx_html.rsp call %WXWIN%\distrib\msw\rearchive wxWindows-%version%-HTML.zip wxWindows-%version% %dest% +echo Creating %dest\wxWindows-%version%-PDF.zip zip32 -@ %dest\wxWindows-%version%-PDF.zip < %src\distrib\msw\wx_pdf.rsp call %WXWIN%\distrib\msw\rearchive wxWindows-%version%-PDF.zip wxWindows-%version% %dest% Rem zip32 -@ %dest\wxWindows-%version%-Word.zip < %src\distrib\msw\wx_word.rsp Rem call %WXWIN%\distrib\msw\rearchive wxWindows-%version%-Word.zip wxWindows-%version% %dest% +echo Creating %dest\wxWindows-%version%-HTB.zip zip32 -@ %dest\wxWindows-%version%-HTB.zip < %src\distrib\msw\wx_htb.rsp call %WXWIN%\distrib\msw\rearchive wxWindows-%version%-HTB.zip wxWindows-%version% %dest% +echo Creating %dest\wxWindows-%version%-HTMLHelp.zip zip32 -@ %dest\wxWindows-%version%-HTMLHelp.zip < %src\distrib\msw\wx_chm.rsp call %WXWIN%\distrib\msw\rearchive wxWindows-%version%-HTMLHelp.zip wxWindows-%version% %dest% +Rem Add Linuxy docs to a separate archive to be transported to Linux for the +Rem Linux-based releases +echo Creating %dest\wxWindows-%version%-LinuxDocs.zip +zip32 -@ %dest\wxWindows-%version%-LinuxDocs.zip < %src\distrib\msw\wx_html.rsp +zip32 -@ -u %dest\wxWindows-%version%-LinuxDocs.zip < %src\distrib\msw\wx_pdf.rsp +zip32 -@ -u %dest\wxWindows-%version%-LinuxDocs.zip < %src\distrib\msw\wx_htb.rsp + Rem PDF/HTML docs that should go into the Windows setup because Rem there are no WinHelp equivalents +echo Creating %dest\wxWindows-%version%-ExtraDoc.zip zip32 -@ %dest\wxWindows-%version%-ExtraDoc.zip < %src\distrib\msw\extradoc.rsp call %WXWIN%\distrib\msw\rearchive wxWindows-%version%-ExtraDoc.zip wxWindows-%version% %dest% Rem zip up Univ-specific files +echo Creating %dest\wxWindows-%version%-Univ.zip zip32 -@ %dest\wxWindows-%version%-Univ.zip < %src\distrib\msw\univ.rsp call %WXWIN%\distrib\msw\rearchive wxWindows-%version%-Univ.zip wxWindows-%version% %dest% rem VC++ project files +echo Creating %dest\wxWindows-%version%-VC.zip zip32 -@ %dest\wxWindows-%version%-VC.zip < %src\distrib\msw\vc.rsp -call %WXWIN%\distrib\msw\rearchive wxWindows-%version%-VC.zip wxWindows-%version% %dest% +Rem call %WXWIN%\distrib\msw\rearchive wxWindows-%version%-VC.zip wxWindows-%version% %dest% rem BC++ project files +echo Creating %dest\wxWindows-%version%-BC.zip zip32 -@ %dest\wxWindows-%version%-BC.zip < %src\distrib\msw\bc.rsp -call %WXWIN%\distrib\msw\rearchive wxWindows-%version%-BC.zip wxWindows-%version% %dest% +Rem call %WXWIN%\distrib\msw\rearchive wxWindows-%version%-BC.zip wxWindows-%version% %dest% rem CodeWarrior project files +echo Creating %dest\wxWindows-%version%-CW.zip zip32 -@ %dest\wxWindows-%version%-CW.zip < %src\distrib\msw\cw.rsp -call %WXWIN%\distrib\msw\rearchive wxWindows-%version%-CW.zip wxWindows-%version% %dest% +Rem call %WXWIN%\distrib\msw\rearchive wxWindows-%version%-CW.zip wxWindows-%version% %dest% rem Dialog Editor source and binary Rem erase %dest\dialoged-source.zip @@ -238,11 +261,17 @@ Rem zip32 %dest\tex2rtf-win32-%version%.zip tex2rtf.* cd %dest -rem Unzip the Windows files into 'wxWindows-%version%' +rem Put all archives for transit to Linux in a zip file +echo Creating %dest\wxWindows-%version%-LinuxTransit.zip +erase %dest\wxWindows-%version%-LinuxTransit.zip +zip32 %dest\wxWindows-%version%-LinuxTransit.zip wxWindows-%version%-LinuxDocs.zip wxWindows-%version%-VC.zip wxWindows-%version%-CW-Mac.zip + +echo Unzipping the Windows files into wxWindows-%version% unzip32 -o wxWindows-%version%-win.zip -unzip32 -o wxWindows-%version%-VC.zip -unzip32 -o wxWindows-%version%-BC.zip +unzip32 -o wxWindows-%version%-VC.zip -d wxWindows-%version +unzip32 -o wxWindows-%version%-BC.zip -d wxWindows-%version +unzip32 -o wxWindows-%version%-CW.zip -d wxWindows-%version unzip32 -o wxWindows-%version%-HTMLHelp.zip unzip32 -o wxWindows-%version%-ExtraDoc.zip Rem Need Word file, for Remstar DB classes diff --git a/distrib/msw/zipmac.bat b/distrib/msw/zipmac.bat index 2d18635834..a50770e1af 100755 --- a/distrib/msw/zipmac.bat +++ b/distrib/msw/zipmac.bat @@ -5,7 +5,7 @@ set src=%wxwin% set dest=%src%\deliver Rem Set this to the required version -set version=2.3.1 +set version=2.3.4 if "%src%" == "" goto usage if "%dest%" == "" goto usage diff --git a/distrib/msw/zipwxmac.bat b/distrib/msw/zipwxmac.bat index 2ae9621a16..472d01ccd4 100755 --- a/distrib/msw/zipwxmac.bat +++ b/distrib/msw/zipwxmac.bat @@ -7,7 +7,7 @@ set webfiles=c:\wx2dev\wxWebSite set stuffit="c:\Program Files\Aladdin Systems\StuffIt 7.5\StuffIt.exe" Rem Set this to the required version -set version=2.3.3 +set version=2.3.4 if "%src" == "" goto usage if "%dest" == "" goto usage @@ -47,10 +47,10 @@ zip32 -u -@ %dest%\wxMac-%version%.zip < %src%\distrib\msw\makefile.rsp erase /Y %src%\include\wx\setup.h -if direxist %dest%\wxWindows-%version% erase /sxyz %dest%\wxWindows-%version% +if direxist %dest%\wxMac-%version% erase /sxyz %dest%\wxMac-%version% -mkdir %dest%\wxWindows-%version% -cd %dest%\wxWindows-%version% +mkdir %dest%\wxMac-%version% +cd %dest%\wxMac-%version% unzip32 ..\wxMac-%version%.zip erase /Y src\gtk\descrip.mms src\motif\descrip.mms docs\pdf\*.pdf erase /SXY docs\html\dialoged docs\html\tex2rtf @@ -58,7 +58,9 @@ erase /SXY docs\html\dialoged docs\html\tex2rtf cd %dest% erase wxMac-%version%.zip -zip32 -r wxMac-%version%.zip wxWindows-%version%/* +zip32 -r wxMac-%version%.zip wxMac-%version%/* + +erase /sxyz %dest%\wxMac-%version% Rem echo Making StuffIt archive... Rem set stuffitcmd=%stuffit% -stuff -create wxMac-%version%.sit wxWindows-%version%\* diff --git a/distrib/msw/zipwxos2.bat b/distrib/msw/zipwxos2.bat index 5aeb6a40da..079245d0ff 100755 --- a/distrib/msw/zipwxos2.bat +++ b/distrib/msw/zipwxos2.bat @@ -5,7 +5,7 @@ set dest=%src\deliver set webfiles=c:\wx2dev\wxWebSite Rem Set this to the required version -set version=2.3.3 +set version=2.3.4 if "%src" == "" goto usage if "%dest" == "" goto usage @@ -44,10 +44,10 @@ zip32 -u -@ %dest%\wxOS2-%version%.zip < %src%\distrib\msw\makefile.rsp Rem erase /Y %src%\include\wx\setup.h -if direxist %dest%\wxWindows-%version% erase /sxyz %dest%\wxWindows-%version% +if direxist %dest%\wxOS2-%version% erase /sxyz %dest%\wxOS2-%version% -mkdir %dest%\wxWindows-%version% -cd %dest%\wxWindows-%version% +mkdir %dest%\wxOS2-%version% +cd %dest%\wxOS2-%version% unzip32 ..\wxOS2-%version%.zip echo Overwriting with OS2-specific versions of configure files... unzip32 -o %src%\distrib\os2\os2-specific.zip @@ -64,7 +64,8 @@ call %src%\distrib\msw\lower.bat cd %dest% erase wxOS2-%version%.zip -zip32 -r wxOS2-%version%.zip wxWindows-%version%/* +zip32 -r wxOS2-%version%.zip wxOS2-%version%/* +erase /sxyz wxOS2-%version% echo wxOS2 archived. diff --git a/distrib/os2/os2-specific.zip b/distrib/os2/os2-specific.zip index c1876468ee..1a77d0ed62 100644 Binary files a/distrib/os2/os2-specific.zip and b/distrib/os2/os2-specific.zip differ diff --git a/docs/base/readme.txt b/docs/base/readme.txt index 6f34c9d503..337db34f21 100644 --- a/docs/base/readme.txt +++ b/docs/base/readme.txt @@ -25,20 +25,22 @@ threads, sockets and much more. Some of the other utility classes allow you to parse the command line, limit the number of instances of your program executing simultaneously (portably!) and so on. + 1. Requirements and supported platforms -------------------------------------- wxBase can be compiled and used under Win32, mostly any modern Unix system -(probably including Mac OS X but it wasn't tested there), VMS and BeOS (this -release couldn't be tested under these platforms neither so you might -encounter some problems but they should be easy to solve - please contact us -in this case!) +(including Mac OS X), VMS and BeOS (this release couldn't be tested under +these platforms so you might encounter some problems but they should be easy +to solve -- please contact us in this case!) It is written without using any modern C++ features (such as templates, exceptions, namespaces) for maximal portability and so you shouldn't have problems compiling it with any C++ compiler at all. However, we only provide -the project files for Microsoft Visual C++ 6.0 for Win32 (any contributions -are welcome!) - but our Unix makefiles will work with any compiler. +the project files for Microsoft Visual C++ 6.0 and make files for Borland C++ +for Win32 (any contributions are welcome!) -- but our Unix makefiles should +work with any compiler. + 2. Installing under Win32 ------------------------- @@ -49,17 +51,19 @@ or Unicode mode for a total of 8 possibilities. a) Using Visual C++ 6.0 - Simply open the src/wxBase.dsw file in MSDEV and build it. When it is -done you can also open samples/console/console.dsp project and build it as -well. + Simply open the src/wxBase.dsw file in MSDEV and build it (you may need to +right click on wxBase in the project tree to make it the active project). When +it is done you can also open samples/console/console.dsp project and build it +as well. b) Cygwin Please refer to the Unix section below c) Borland - Please refer to the docs/msw/install.txt. The console sample compiles and runs - but does not pass all tests (04 sept 02) + + Please refer to the docs/msw/install.txt. The console sample compiles and + runs but does not pass all tests (as of Sep 4, 2002) d) Other compilers @@ -67,6 +71,7 @@ d) Other compilers Please contact us if you would like to help us with creating one for the compiler you use. + 3. Installing under Unix/BeOS ----------------------------- @@ -74,12 +79,13 @@ NB: If you're building wxBase from the wxWindows distribution and not from a separate wxBase one you will need to add "--disable-gui" to configure arguments below! -Please note that GNU make is required to build wxBase! +Please note that GNU make may be required to build wxBase, please use it if +you get any errors from the native Unix make. The recommended way to build wxBase is: % cd ..../wxWindows - % mkdir base-release + % mkdir base-release # or any other directory of your liking % cd base-release % ../configure # ignore the error messages about missing samples @@ -120,6 +126,6 @@ namely: Vadim Zeitlin -This file is accurate for the version 2.3.2 of wxBase. It was last modified on -Dec 11, 2001. +This file is accurate for the version 2.4.1 of wxBase. It was last modified on +June 13, 2003. diff --git a/docs/changes.txt b/docs/changes.txt index 56e0b2e446..dd3dc20a84 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -49,6 +49,7 @@ wxBase: must modify YourApp::OnAssert() signature if you were using it to override the default assert handling. + All (GUI): ! the event type constants are not constants any more but are dynamically @@ -112,16 +113,17 @@ All (GUI): wxMessageOutput::Set(new wxMessageOutputLog); to your program (you will need to #include ) + wxMSW: ! build system changed: setup.h is not a static file in include/wx any more - but is created as part of the build process under lib//wx/include + but is created as part of the build process under lib//wx where is of the form (msw|univ)[dll][u][d]. You'll need to update the include path in your make/project files appropriately. Furthermore, xpm.lib is no longer used by wxMSW, it was superseded by the wxXPMDecoder class. You'll need to remove all references to xpm.lib from your make/project files. Finally, the library names have changed as well and now - use the following consistent naming convention: wxmsw[u][d][ver].(lib|dll) + use the following consistent naming convention: wxmsw[ver][u][d].(lib|dll) where 'u' appears for Unicode version, 'd' -- for the debug one and version is only present for the DLLs builds. @@ -170,6 +172,159 @@ wxThread and related classes: OTHER CHANGES ============= +2.4.1 +----- + +All: + +- fixed wxLANGUAGE_CHINESE_TAIWAN to use zh_TW catalogs +- added missing wx/quantize.h to install +- improved wxScrolledWindow/sizer interaction +- fixed assert (and crash in debug) in wxFileConfigGroup::DeleteSubgroupByName +- fix for deleting entries at root level in wxFileConfig +- wxStopWatch::Start() didn't resume it contrary to the docs +- accept '\r' as delimiter when parsing dates +- fixed duplicate wxFontEncoding values +- wxFileConfig now always uses UTF-8 to store settings in Unicode build; + it will be possible to set different charset in wxWindows >= 2.5.0 +- added wxFileName::MakeAbsolute +- bugs in wxCalCtrl fixed (year not being updated) + +Unix (GUI): + +- fixed the "close" button of dialogs under KDE 3.1 +- fixed memory leak in wxMimeTypesManager +- use GNOME2's /usr/share/pixmaps/document-icons in wxMimeTypesManager + +wxBase + +- compilation with wxUSE_ODBC=1 fixed (dbkeyg.h file was missing in the archive) +- bug in wxDateTime with timezones on systems with tm_gmtoff in struct tm fixed +- fixed bug in wxArray::Shrink() (Seth Manley) +- fixed bug with searching in sorted arrays (Jürgen Palm) +- wxFileConfig parse bug fixed + +wxGTK: + +- added wxEVT_MENU_OPEN event generation +- fixed bug in generic file selector causing incomplete file extensions to + be appended to filenames with no extension +- added SetSelection implementation for GTK+ 2 +- fixed a memory leak in generic wxFileDialog +- implemented wxTextCtrl::Remove/Replace() for GTK2 +- improved X11 ShowFullScreen +- added support for GTK2 label mnemonics + +wxMSW: + +- no longer take ampersand into account in wxStaticText::GetBestSize +- set orientation for scrollbar events +- fix for explicit keyword detection (VC++) +- fix for sending event from wxCheckListBox::Check() +- wxCaret::SetSize correction for showing caret +- fix for wxTreeCtrl label editing in wxTR_MULTIPLE mode +- wxFrame::Maximize(FALSE) would maximize the window if + called before showing it +- use ES_DISABLENOSCROLL to work around the vertical scrollbar bug in + wxTE_RICH2 text control +- fixes for wxLocale::Init and Borland C++ +- fix for bug whereby owner-drawn buttons didn't draw multiline labels correctly +- Alt-letter didn't switch focus to a spin ctrl following static control with + hotkey +- fix for multiple consecutive groups of radiobuttons +- fix for incorrect display of tooltips in non English locales (Niki Spahiev) +- fixed memory leak when setting new wxMask for wxBitmap +- improved border handling so it no longer shows a thin and + sunken border under XP +- partial fix for wxNotebook pages looking bad under XP: wxUSE_UXTHEME + enables XP theme engine code, and wxUSE_UXTHEME_AUTO tells + wxWindows to use the theme tab colour for control backgrounds. + Proper XP theme support is planned for 2.6 +- disable wxNB_RIGHT, wxNB_LEFT, wxNB_BOTTOM notebook styles + if the version of CommCtl doesn't support it (XP) + +wxMotif: + +- don't use stipples in DoDrawText + +wxUniv: + +- fixed refresh problem when message box is shown + +wxMac: + +- implement wxExecute with proper callback on Mac OS X + +wxHTML: + +- fixed parsing of CDATA tags (Bill Nalen) +- content of