diff --git a/.cvsignore b/.cvsignore index 7097a7b65b..52baefa7e2 100644 --- a/.cvsignore +++ b/.cvsignore @@ -29,6 +29,8 @@ UnivRelease UnivDebug BaseRelease BaseDebug +BaseReleaseDLL +BaseDebugDLL robert stamp-h.in Makefile 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..a2160cb4a2 100644 --- a/Makefile.in +++ b/Makefile.in @@ -321,10 +321,18 @@ $(build_libdir)/@WX_LIBRARY_NAME_SHARED@: $(OBJECTS) $(SHARED_LD) $@ $(SONAME_FLAGS) $(OBJECTS) $(EXTRALIBS) # NB: we used to have "-L$(build_libdir) @WXCONFIG_LIBS@" in the SHARED_LD line -# but this seems to result in problems with libwx_gtk being linked in twice +# but this seems to result in problems with libwx_gtk being linked in twice. +# RL: This is another example of why sonames exist, and what happens when you +# ignore them. Broken linking like this is now an rc bug in Debian, so we +# add them back again (to SONAME_FLAGS_GL) in configure if --enable-soname +# is used. Removing the explicit -L /usr/lib from LDFLAGS would probably +# help with the above problem, but building without the soname is broken in +# so many other ways that I'm not going to touch that case in 2.4 anymore +# if I can help it. +# $(build_libdir)/@WX_LIBRARY_NAME_SHARED_GL@: glcanvas.o $(build_libdir)/@WX_LIBRARY_NAME_SHARED@ @$(INSTALL) -d $(build_libdir) - $(SHARED_LD) $@ $(SONAME_FLAGS_GL) glcanvas.o $(EXTRALIBS) $(OPENGLLIBS) + $(SHARED_LD) $@ glcanvas.o $(SONAME_FLAGS_GL) $(LDFLAGS_GL) $(OPENGLLIBS) $(EXTRALIBS) $(build_libdir)/@WX_RESOURCES_MACOSX_DATA@: $(MACRESOURCES) @$(INSTALL) -d $(build_libdir) @@ -383,19 +391,18 @@ CREATE_INSTALLED_LINKS_GL: preinstall_gl && $(LN_S) @WX_LIBRARY_NAME_SHARED_GL@ @WX_LIBRARY_LINK1_GL@ \ && $(LN_S) @WX_LIBRARY_NAME_SHARED_GL@ @WX_LIBRARY_LINK2_GL@ -afminstall: preinstall - @if test ! -d $(datadir); then $(INSTALL) -d $(datadir); fi - $(INSTALL) -d $(datadir)/wx - $(INSTALL) -d $(datadir)/wx/$(VER_MAJMIN) - $(INSTALL) -d $(datadir)/wx/$(VER_MAJMIN)/afm - $(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_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 + # 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 +469,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: @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" @@ -491,17 +498,14 @@ uninstall: @$(RM) $(libdir)/wx/include/@TOOLCHAIN_NAME@/wx/setup.h @$(RM) $(bindir)/wx-config @$(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. - @-rmdir $(datadir)/wx/$(VER_MAJMIN)/gs_afm - @-rmdir $(datadir)/wx/$(VER_MAJMIN)/afm + # FIXME: wxBase doesnt install these next 3 dirs. @-rmdir $(datadir)/wx/$(VER_MAJMIN) @-rmdir $(datadir)/wx @echo " Removing headers..." @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 +540,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 +585,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) @@ -732,19 +738,12 @@ MACX_DIST: ALL_GUI_DIST MSW_DIST: ALL_GUI_DIST cp $(WXDIR)/wxWINE.spec $(DISTDIR) - mkdir $(DISTDIR)/include/wx/msw/ctl3d - mkdir $(DISTDIR)/include/wx/msw/gnuwin32 - mkdir $(DISTDIR)/include/wx/msw/gnuwin32/gl mkdir $(DISTDIR)/include/wx/msw/ole cp $(INCDIR)/wx/msw/*.h $(DISTDIR)/include/wx/msw cp $(INCDIR)/wx/msw/*.cur $(DISTDIR)/include/wx/msw cp $(INCDIR)/wx/msw/*.ico $(DISTDIR)/include/wx/msw cp $(INCDIR)/wx/msw/*.bmp $(DISTDIR)/include/wx/msw cp $(INCDIR)/wx/msw/*.rc $(DISTDIR)/include/wx/msw - cp $(INCDIR)/wx/msw/ctl3d/*.h $(DISTDIR)/include/wx/msw/ctl3d - cp $(INCDIR)/wx/msw/gnuwin32/*.h $(DISTDIR)/include/wx/msw/gnuwin32 - cp $(INCDIR)/wx/msw/gnuwin32/gl/*.h $(DISTDIR)/include/wx/msw/gnuwin32/gl - cp $(INCDIR)/wx/msw/gnuwin32/gl/*.def $(DISTDIR)/include/wx/msw/gnuwin32/gl cp $(INCDIR)/wx/msw/ole/*.h $(DISTDIR)/include/wx/msw/ole mkdir $(DISTDIR)/src/msw/ole cp $(MSWDIR)/files.lst $(DISTDIR)/src/msw @@ -756,16 +755,9 @@ MSW_DIST: ALL_GUI_DIST MSW_ZIP_TEXT_DIST: ALL_GUI_DIST cp $(WXDIR)/wxWINE.spec $(DISTDIR) mkdir $(DISTDIR)/include/wx/msw - mkdir $(DISTDIR)/include/wx/msw/ctl3d - mkdir $(DISTDIR)/include/wx/msw/gnuwin32 - mkdir $(DISTDIR)/include/wx/msw/gnuwin32/gl mkdir $(DISTDIR)/include/wx/msw/ole cp $(INCDIR)/wx/msw/*.h $(DISTDIR)/include/wx/msw cp $(INCDIR)/wx/msw/*.rc $(DISTDIR)/include/wx/msw - cp $(INCDIR)/wx/msw/ctl3d/*.h $(DISTDIR)/include/wx/msw/ctl3d - cp $(INCDIR)/wx/msw/gnuwin32/*.h $(DISTDIR)/include/wx/msw/gnuwin32 - cp $(INCDIR)/wx/msw/gnuwin32/gl/*.h $(DISTDIR)/include/wx/msw/gnuwin32/gl - cp $(INCDIR)/wx/msw/gnuwin32/gl/*.def $(DISTDIR)/include/wx/msw/gnuwin32/gl cp $(INCDIR)/wx/msw/ole/*.h $(DISTDIR)/include/wx/msw/ole mkdir $(DISTDIR)/src/msw mkdir $(DISTDIR)/src/msw/ole @@ -777,16 +769,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 +846,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 +1029,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 +1064,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 +1125,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 @@ -1162,7 +1182,6 @@ SAMPLES_DIST: ALL_GUI_DIST cp $(SAMPDIR)/printing/*.cpp $(DISTDIR)/samples/printing cp $(SAMPDIR)/printing/*.h $(DISTDIR)/samples/printing cp $(SAMPDIR)/printing/*.xpm $(DISTDIR)/samples/printing - cp $(SAMPDIR)/printing/*.xbm $(DISTDIR)/samples/printing mkdir $(DISTDIR)/samples/resource cp $(SAMPDIR)/resource/Makefile.in $(DISTDIR)/samples/resource @@ -1175,7 +1194,7 @@ SAMPLES_DIST: ALL_GUI_DIST cp $(SAMPDIR)/rotate/Makefile.in $(DISTDIR)/samples/rotate cp $(SAMPDIR)/rotate/makefile.unx $(DISTDIR)/samples/rotate cp $(SAMPDIR)/rotate/*.cpp $(DISTDIR)/samples/rotate - cp $(SAMPDIR)/rotate/*.bmp $(DISTDIR)/samples/rotate + cp $(SAMPDIR)/rotate/*.png $(DISTDIR)/samples/rotate mkdir $(DISTDIR)/samples/richedit cp $(SAMPDIR)/richedit/Makefile.in $(DISTDIR)/samples/richedit @@ -1214,6 +1233,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 +1330,19 @@ 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/*.xpm $(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,14 +1357,31 @@ 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 - mkdir $(DISTDIR)/misc/afm - cp $(MISCDIR)/afm/*.afm $(DISTDIR)/misc/afm - mkdir $(DISTDIR)/misc/gs_afm - cp $(MISCDIR)/gs_afm/*.afm $(DISTDIR)/misc/gs_afm INTL_DIST: mkdir $(DISTDIR)/locale @@ -1347,62 +1402,78 @@ 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/distrib \ + wxPython/distutils \ + wxPython/distutils/command \ + wxPython/docs \ + wxPython/docs/screenshots \ + wxPython/samples/StyleEditor \ + wxPython/samples/doodle \ + wxPython/samples/embedded \ + wxPython/samples/frogedit \ + wxPython/samples/hangman \ + 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/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/wx/tools \ + wxPython/wx/tools/XRCed \ + 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 -p $(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 +1497,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); \ @@ -1491,20 +1567,32 @@ debian-dist: debian-native-dist debian-msw-dirs MSW_DIST @# in other dist targets. Ugly and hardly portable but it @# will run on any Debian box and that's enough for now. - 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 + + find $(DISTDIR) \( -name "CVS" -o -name ".cvsignore" -o -name "*.dsp" \ + -o -name "*.dsw" -o -name "*.hh*" -o -name "*.mms" \ + -o -name "*.mcp" -o -name "*M*.xml" -o -name "*.r" \ + -o -name "*.bkl" -o -name "*.pro" -o -name "*.def" \ + -o -name "*.vpj" -o -name "*.sc" \ + -o \( -name "makefile.*" -a ! -name "makefile.unx" \) \ + \) -print0 | xargs -0 rm -rf rm -rf $(WXDIR)/../wxwindows$(WX_MAJOR_VERSION_NUMBER).$(WX_MINOR_VERSION_NUMBER)-$(WX_MAJOR_VERSION_NUMBER).$(WX_MINOR_VERSION_NUMBER).$(WX_RELEASE_NUMBER) 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 + +@IF_GNU_MAKE@debian-native-dist: $(filter-out DEMOS_DIST,@GUIDIST@) MANUAL_DIST PYTHON_DIST + cp $(SRCDIR)/files.lst $(DISTDIR)/src debian-msw-dirs: mkdir $(DISTDIR)/include/wx/msw mkdir $(DISTDIR)/src/msw +# This is to keep non-gnu make's happy. +# ... but is of course stupid and useless here, so make it a noop at least. +@IF_NOT_GNU_MAKE@debian-native-dist: + + clean: $(RM) *.o $(RM) *.d 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/addbookm.xpm b/art/addbookm.xpm index 40b67457bb..18851bcdf4 100644 --- a/art/addbookm.xpm +++ b/art/addbookm.xpm @@ -1,21 +1,24 @@ /* XPM */ -static char * addbookm_xpm[] = { +static char *addbookm_xpm[] = { +/* columns rows colors chars-per-pixel */ "16 15 3 1", -" c None", -". c #000000", -"+ c #C3F9BD", -" .. ", -" .. ", -" .. . ", -"........ .+. ", -"........ .+++. ", -" .. .+++++. ", -" .. .+++++. ", -" .. .+++++. ", -" .+++++. ", -" .+++++. ", -" .+++++. ", -" ....++. ", -" .+. ", -" .. ", -" . "}; +". c Black", +"X c #00C000", +" c None", +/* pixels */ +" ....... ", +" .XXXXX. ", +" .. .XXXXX. ", +" .. .XXXXX. ", +" ...... .XXXXX. ", +" ...... .XXXXX. ", +" .. .XXXXX. ", +" .. .XXXXX. ", +" .XXXXX. ", +" .XXXXX. ", +" .XXXXX. ", +" .XXXXX. ", +" .XX.XX. ", +" .X. .X. ", +" .. .. " +}; diff --git a/art/back.xpm b/art/back.xpm index fbb4378bf6..944e117801 100644 --- a/art/back.xpm +++ b/art/back.xpm @@ -1,24 +1,21 @@ -/* XPM */ -static char * back_xpm[] = { -"16 16 5 1", -" c None", -". c #000000", -"+ c #C0E4CB", -"@ c #77C490", -"# c #808080", -" ", -" ", -" . ", -" .. ", -" .+. ", -" .++........ ", -" .++@+++++++. ", -" .++@@@@@@@@@. ", -" .+@@@@@@@@@. ", -" #.+@........ ", -" #.+.####### ", -" #..# ", -" #.# ", -" ## ", -" # ", -" "}; +/* XPM */ +static char * back_xpm[] = { +"16 15 3 1", +" c None", +". c Black", +"X c Gray100", +" ", +" ", +" . ", +" .. ", +" .X. ", +" .XX........ ", +" .XXXXXXXXXX. ", +" .XXXXXXXXXXX. ", +" .XXXXXXXXXXX. ", +" .XXXXXXXXXX. ", +" .XX........ ", +" .X. ", +" .. ", +" . ", +" "}; diff --git a/art/deffile.xpm b/art/deffile.xpm index f27bbc7e50..91e8ed3b80 100644 --- a/art/deffile.xpm +++ b/art/deffile.xpm @@ -1,31 +1,51 @@ /* XPM */ -static char * deffile_xpm[] = { -"16 16 12 1", -" c None", -". c #000000", -"+ c #808080", -"@ c #FFFFFF", -"# c #282829", -"$ c #505052", -"% c #78787B", -"& c #A0A0A4", -"* c #404040", -"= c #1F1F1F", -"- c #3F3F3F", -"; c #2F2F2F", -" ", -" ....... ", -" .+@@@@@@# ", -" .+@@@@@@$% ", -" .+@@@@@@$&% ", -" .+@@@@@@#$$# ", -" .+@@@@@@@@@@. ", -" .+@@@@@@@@@@. ", -" .+@@@@@@@@@@. ", -" .+@@@@@@@@@@. ", -" .+@@@@@@@@@@. ", -" .+@@@@@@@@@@. ", -" .*++++++++++. ", -" .=---=;-----. ", -" ", -" "}; +static char *deffile_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 16 29 1", +"$ c #7198D9", +"5 c #DCE6F6", +"< c #FFFFFF", +"= c #9AB6E4", +"6 c #EAF0FA", +"1 c #6992D7", +"9 c #5886D2", +"3 c #F7F9FD", +"8 c #F0F5FC", +"* c #A8C0E8", +" c None", +"0 c #FDFEFF", +"% c #C4D5F0", +"2 c #E2EAF8", +"O c #4377CD", +"o c #487BCE", +": c #6B94D7", +"- c #89A9DF", +"; c #5584D1", +"@ c #3569BF", +"+ c #3A70CA", +"> c #D2DFF4", +"# c #2E5CA8", +"7 c #FAFCFE", +"4 c #F5F8FD", +", c #638ED5", +"X c #5282D0", +"& c #B8CCEC", +". c #376EC9", +/* pixels */ +" ..XoO+@#$ ", +" .%%&*=-;:; ", +" .>>%&*=,<=X ", +" $%%%%&*1<<=X ", +" $2-----,oXO+ ", +" $2345>%&*=-+ ", +" $2--------=+ ", +" $244625>%&*O ", +" $2--------&o ", +" $27348625>%X ", +" $2-------->9 ", +" $2<073486259 ", +" $2--------2, ", +" $2<<<0734861 ", +" $$$$$$$$$$1$ ", +" " +}; diff --git a/art/delbookm.xpm b/art/delbookm.xpm index 8884d48e13..80a83897c4 100644 --- a/art/delbookm.xpm +++ b/art/delbookm.xpm @@ -1,23 +1,24 @@ /* XPM */ -static char * delbookm_xpm[] = { -"16 15 5 1", -" c None", -". c #808080", -"+ c #000000", -"@ c #FFFFFF", -"# c #F4D4D6", -" .+++++. ", -".+@+++@+. ", -"+@@@+@@@+ + ", -"++@@@@@++ +#+ ", -"+++@@@++++###+ ", -"++@@@@@++#####+ ", -"+@@@+@@@+####+ ", -".+@+++@+.###+ ", -" .+++++.###+ ", -" +#####+ ", -" +#####+ ", -" ++++##+ ", -" +#+ ", -" ++ ", -" + "}; +static char *delbookm_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 3 1", +". c Black", +" c None", +"X c #FF4040", +/* pixels */ +" ....... ", +" .XXXXX. ", +" . . .XXXXX. ", +" .. .. .XXXXX. ", +" ... .XXXXX. ", +" . .XXXXX. ", +" ... .XXXXX. ", +" .. .. .XXXXX. ", +" . . .XXXXX. ", +" .XXXXX. ", +" .XXXXX. ", +" .XXXXX. ", +" .XX.XX. ", +" .X. .X. ", +" .. .. " +}; diff --git a/art/dir_up.xpm b/art/dir_up.xpm index 610339e2a2..a1cfca9090 100644 --- a/art/dir_up.xpm +++ b/art/dir_up.xpm @@ -1,42 +1,56 @@ /* XPM */ static char *dir_up_xpm[] = { /* columns rows colors chars-per-pixel */ -"20 20 16 1", -" c Gray0", -". c #800000", -"X c #008000", -"o c #808000", -"O c #000080", -"+ c #800080", -"@ c #008080", -"# c None", -"$ c #808080", -"% c Red", -"& c Green", -"* c Yellow", -"= c Blue", -"- c Magenta", -"; c Cyan", -": c Gray100", +"20 20 30 1", +"X c #4E7FD0", +"= c #AAC1E8", +"o c #9AEA53", +"@ c #295193", +": c #C6D6F0", +"6 c #779DDB", +"1 c #EAF0FA", +"& c #2D59A3", +"O c #6E96D8", +"$ c #356AC1", +"9 c #214279", +"; c #BED0EE", +"5 c #85A7DF", +"2 c #F0F5FC", +", c #DAE5F6", +" c None", +". c #274D8B", +"* c #9FB9E5", +"q c #5584D1", +"0 c #3A70CA", +"% c #305FAC", +"8 c #5D89D3", +"> c #D2DFF4", +"7 c #3366B9", +"3 c #F5F8FD", +"+ c #4075CC", +"# c #638ED5", +"4 c #90AFE2", +"- c #B3C8EB", +"< c #E5EDF9", /* pixels */ -"####################", -"####################", -"####################", -"#### ###########", -"### *:*:* ##########", -"## ####", -"## :*:*:*:*:*:*: ###", -"## *:*: :*:*:*:* ###", -"## :*: :*:*:*: ###", -"## *: :*:*:* ###", -"## :*:* *:*:*:*: ###", -"## *:*: :*:*:*:* ###", -"## :*:* :*: ###", -"## *:*:*:*:*:*:* ###", -"## :*:*:*:*:*:*: ###", -"## ###", -"####################", -"####################", -"####################", -"####################", +" ", +" ", +" ", +" .. ", +" X.o. ", +" .... X.ooo. ", +" .OO+....ooooo. ", +" .OOOOOO@@ooo.. ", +" .OOOO#OO@ooo.$ ", +" .OOOOOOO@ooo.$ ", +" .O%............& ", +" .O&*=-;:>,<1231. ", +" .+.4*=-;:>,<12$. ", +" ..#54*=-;:>,<1. ", +" .@O654*=-;:>,<. ", +" .78O654*=-;:>$$ ", +" 90q8O654*=-;:. ", +" 9............. ", +" ", +" " }; diff --git a/art/down.xpm b/art/down.xpm index 055540b649..15a09e4bfb 100644 --- a/art/down.xpm +++ b/art/down.xpm @@ -1,24 +1,21 @@ -/* XPM */ -static char * down_xpm[] = { -"16 16 5 1", -" c None", -". c #000000", -"+ c #808080", -"@ c #C0E4CB", -"# c #77C490", -" ", -" .....+ ", -" .@##.+ ", -" .@##.+ ", -" .@##.+ ", -" .@##.+ ", -" .@##.+ ", -" .@##.+++++ ", -" ....@##....+ ", -" .@@####@.+ ", -" .@@##@.+ ", -" .@@@.+ ", -" .@.+ ", -" . ", -" ", -" "}; +/* XPM */ +static char * down_xpm[] = { +"16 15 3 1", +" c None", +". c Black", +"X c Gray100", +" ", +" ...... ", +" .XXXX. ", +" .XXXX. ", +" .XXXX. ", +" .XXXX. ", +" .XXXX. ", +" .XXXX. ", +" ....XXXX.... ", +" .XXXXXXXX. ", +" .XXXXXX. ", +" .XXXX. ", +" .XX. ", +" .. ", +" "}; diff --git a/art/exefile.xpm b/art/exefile.xpm index e93f223ed0..4defb732e3 100644 --- a/art/exefile.xpm +++ b/art/exefile.xpm @@ -1,76 +1,73 @@ /* XPM */ -static char * exefile_xpm[] = { -"16 16 57 1", -" c None", -". c #000000", -"+ c #808080", -"@ c #650000", -"# c #CB0000", -"$ c #700000", -"% c #CDCDCD", -"& c #D2D2D2", -"* c #D7D7D7", -"= c #282829", -"- c #FF0000", -"; c #E60000", -"> c #FFFFFF", -", c #505052", -"' c #78787B", -") c #CC0000", -"! c #F70000", -"~ c #A0A0A4", -"{ c #8C4848", -"] c #FFA0A0", -"^ c #A95959", -"/ c #DBDBDB", -"( c #F7F7F7", -"_ c #0000C8", -": c #0000F4", -"< c #ECECEC", -"[ c #1010BC", -"} c #1313E8", -"| c #EDEDED", -"1 c #8B8B8B", -"2 c #AFAFAF", -"3 c #C4C4C4", -"4 c #FDFDFD", -"5 c #E8E8E8", -"6 c #FFFF00", -"7 c #007300", -"8 c #00B200", -"9 c #BFBFBF", -"0 c #CBCBCB", -"a c #DEDEDE", -"b c #00A800", -"c c #00FF00", -"d c #BEBEBE", -"e c #FCFCFC", -"f c #7D7D7D", -"g c #F8F8F8", -"h c #888888", -"i c #F8F800", -"j c #F7F700", -"k c #006200", -"l c #00A100", -"m c #757575", -"n c #959595", -"o c #404040", -"p c #1F1F1F", -"q c #3F3F3F", -"r c #2F2F2F", -" ", -" ........ ", -" .+@#$%&*= ", -" .+#-;>>>,' ", -" .+)-!>>>,~' ", -" .+{]^>>>=,,= ", -" .+/>(>>>>>_:. ", -" .+<>>>>>>>[}. ", -" .+|>>>>>>>12. ", -" .+|>>>>>>>34. ", -" .+/>56667894. ", -" .+0>a666bcde. ", -" .+fghiijklmn. ", -" .o++++++++++. ", -" .pqqqpprqqqq. ", -" "}; +static char *exefile_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 16 51 1", +"% c #E8E8EC", +"= c #E8E8ED", +"z c #CACAD4", +"8 c #D9D9E1", +"p c #D2D2DA", +"u c #E1E1E7", +"a c #D2D2DB", +"< c #E9E9ED", +"q c #DADAE1", +"+ c #F1F1F4", +"g c #D3D3DB", +"1 c #E2E2E8", +"x c #D3D3DC", +"5 c #00A5FF", +"$ c #EAEAEE", +"4 c #DBDBE2", +"h c #CCCCD6", +"y c #D4D4DC", +"r c #E3E3E9", +"d c #D4D4DD", +"7 c #DCDCE2", +": c #EBEBEF", +"0 c #DCDCE3", +" c None", +"O c #F3F3F5", +"> c #E4E4E9", +"& c #F3F3F6", +"j c #D5D5DD", +"6 c #E4E4EA", +". c #C6C6D5", +"# c #ECECF0", +"f c #CECED7", +"l c #CECED8", +"e c #D6D6DE", +"; c #EDEDF0", +"3 c #DEDEE4", +", c #EDEDF1", +"c c #CFCFD8", +"o c #F5F5F7", +"- c #E6E6EB", +"w c #D7D7DF", +"v c #C8C8D3", +"i c #DFDFE5", +"@ c #EEEEF2", +"s c #D0D0D9", +"X c #9494AD", +"9 c #D8D8DF", +"t c #D8D8E0", +"* c #EFEFF2", +"2 c #E0E0E6", +"k c #D1D1DA", +/* pixels */ +" ........X ", +" .oO+@#$%XX ", +" .&+*#$=-XXX ", +" .+*;:=->XXXX ", +" .*,:<->1234X ", +" .,5:5612378X ", +" 5,5559530qwX ", +" 55555550q9eX ", +" 5555r5555teyX ", +" 55rui559eypX ", +" 5555i5555yasX ", +" 5555555dasfX ", +" 5355595gsfhX ", +" .3595jgklhzX ", +" .0qwjxkchzvX ", +" XXXXXXXXXXXX " +}; diff --git a/art/fileopen.xpm b/art/fileopen.xpm index 740983e709..e45e11f6d7 100644 --- a/art/fileopen.xpm +++ b/art/fileopen.xpm @@ -1,26 +1,78 @@ /* XPM */ static char *fileopen_xpm[] = { /* columns rows colors chars-per-pixel */ -"16 15 5 1", +"16 15 57 1", +"u c #83A5DD", +"h c #83A5DE", +"> c #DAE3F2", +": c #F3F7FC", +"t c #4A79C6", +"s c #274E8F", +"n c #4D71AB", +"5 c #C2D0E8", +"9 c #84A6DE", +"x c #3761A5", +"p c #ACC3E8", +"$ c #ACC3E9", +"= c #D9E4F5", +"o c #91AFE2", +"f c #5886D1", +"2 c #B9CCEC", +"& c #C3D4EF", +"; c #EBF1FA", +"7 c #4270BC", +"# c #9EB8E5", +"0 c #ADC4E9", +"y c #658FD5", " c None", -". c Black", -"X c Yellow", -"o c Gray100", -"O c #bfbf00", +"@ c #688DCA", +"< c #779CDA", +"r c #2A5498", +"l c #254A87", +"g c #6690D5", +"M c #5778AE", +"m c #5274AD", +"a c #D6E2F4", +", c #4672BA", +"v c #4168A8", +"c c #3C64A7", +". c #416BB2", +"- c #E3EBF8", +"z c #305CA3", +"X c #446CAE", +"O c #5882C8", +"N c #5D7DB0", +"3 c #C3D3EF", +"b c #476DAA", +"k c #ADC3E9", +"e c #E4ECF8", +"d c #4576C7", +"q c #C4D4EF", +"* c #CEDCF2", +"i c #90AFE1", +"4 c #ECF1FA", +"B c #4D72AE", +"% c #B8CCEC", +"8 c #759BDA", +"+ c #617FB1", +"1 c #9DB8E4", +"j c #9DB8E5", +"6 c #3762AA", +"w c #CFDDF2", /* pixels */ " ", -" ... ", -" . . .", -" ..", -" ... ...", -" .XoX....... ", -" .oXoXoXoXo. ", -" .XoXoXoXoX. ", -" .oXoX..........", -" .XoX.OOOOOOOOO.", -" .oo.OOOOOOOOO. ", -" .X.OOOOOOOOO. ", -" ..OOOOOOOOO. ", -" ........... ", +" ", +" .... ", +" Xooo. ", +" Xoooo....... ", +" Xoooooooooo. ", +" XoOOOOOOOOOOO+ ", +" Xo@#$%&*=-;:>+ ", +" X,. c #4C73B5", +"@. c #5B7FBA", +"` c #4F80CF", +"*. c #3B67B0", +"O c #406BB2", +"N c #406BB3", +"R c #6891D6", +"j c #6888BD", +"( c #D8E3F5", +"$ c #3460A9", +"& c #4873BA", +"' c #5C89D3", +"-. c #436CB2", +"u c #4870B4", +"[ c #B8CBEC", +"7 c #C2D3EF", +"H c #3C68B1", +"a c #A2BBE6", +"+ c #6E96D8", +": c #698FCE", +"9 c #D4E0F4", +"t c #FCFDFE", +":. c #4971B4", +"3 c #4E75B6", +"< c #6C93D1", +"6 c #B9CCEC", +"c c #C3D4EF", +"l c #80A3DD", +"| c #4276CC", +"q c #E6EDF9", +"e c #F0F5FC", +"#. c #2E5AA6", +"x c #A3BCE6", +"s c #ADC4E9", +"B c #749BDA", +"1. c #567AB7", +", c #6A90D0", +"# c #6589C5", +"G c #6586BD", +"8 c #CBD9F1", +"g c #D5E1F4", +"z c #8DACE0", +"p c #97B4E3", +" c None", +"* c #4A75BC", +"+. c #C4D5EF", +"V c #81A4DD", +"m c #ECF2FA", +"n c #E7EEF9", +"Y c #3966B1", +"Z c #A4BDE6", +"A c #AEC5E9", +"o c #436BAD", +"T c #5C88D2", +"J c #6690D5", +"<. c #5277B6", +") c #6183BC", +"f c #CCDAF1", +"v c #D6E2F5", +"o. c #98B5E3", +"Q c #8EADE1", +" . c #5080CF", +"= c #4B76BE", +"I c #B6CAEC", +"S c #BBCEED", +"_ c #3563AF", +"! c #A5BEE6", +"/ c #CDDBF2", +"X. c #8FAEE1", +"0 c #DFE8F7", +"$. c #3160AE", +"} c #3160AF", +"4 c #A1BBE5", +"1 c #6D93D1", +"{ c #5E81BB", +"U c #6385BC", +"^ c #C4D4EF", +"2 c #597DBC", +"K c #81A3DD", +"i c #8BABE0", +"w c #ECF1FA", +"h c #F1F5FC", +"&. c #3965B0", +"X c #3E69B1", +"P c #AEC4E9", +"~ c #B8CCEC", +"; c #5C84C6", +"E c #759BDA", +"y c #6B8ABE", +"b c #E0E9F7", +"C c #98B4E3", +". c #325EA7", +"> c #6990CE", +",. c #5076B6", +"W c #82A4DD", +"L c #8CACE0", /* pixels */ -" ", -" @@@@@ ", -" @#+#+#@ ", -" @#+#+#+#@@@@@@ ", -" @$$$$$$$$$$$$@.", -" @$#+#+#+#+#+#@.", -" @$+#+#+#+#+#+@.", -" @$#+#+#+#+#+#@.", -" @$+#+#+#+#+#+@.", -" @$#+#+#+#+#+#@.", -" @$+#+#+#+#+#+@.", -" @$#+#+#+#+#+#@.", -" @@@@@@@@@@@@@@.", -" ..............", -" ", -" "}; +" ", +" ", +" . X X X o ", +" O + + + @ # ", +" $ % & * = - ; : : > , < 1 2 ", +" 3 4 5 6 7 8 9 0 q w e r t y ", +" u i p a s d 7 f g 0 q w h j ", +" k l z p x 5 6 c f v b n m M ", +" N B V z C Z A S c D F b n G ", +" H J B K L C x P I c f v b U ", +" Y T R E W Q C ! P ~ ^ / ( ) ", +" _ ` ' R E W z ] Z P [ ^ / { ", +" } | .' R ..V X.o.O.P [ +.@. ", +" #.$.%.&.*.=.-.;.:.>.,.<.1.*. ", +" ", +" " +}; diff --git a/art/forward.xpm b/art/forward.xpm index 6e3de64511..3c5c5d026d 100644 --- a/art/forward.xpm +++ b/art/forward.xpm @@ -1,24 +1,21 @@ -/* XPM */ -static char * forward_xpm[] = { -"16 16 5 1", -" c None", -". c #000000", -"+ c #C0E4CB", -"@ c #77C490", -"# c #808080", -" ", -" ", -" . ", -" .. ", -" .+. ", -" ........++. ", -" .+++++++@++. ", -" .@@@@@@@@@++. ", -" .@@@@@@@@@+. ", -" ........@+.# ", -" #######.+.# ", -" #..# ", -" #.# ", -" ## ", -" # ", -" "}; +/* XPM */ +static char * forward_xpm[] = { +"16 15 3 1", +" c None", +". c Black", +"X c Gray100", +" ", +" ", +" . ", +" .. ", +" .X. ", +" ........XX. ", +" .XXXXXXXXXX. ", +" .XXXXXXXXXXX. ", +" .XXXXXXXXXXX. ", +" .XXXXXXXXXX. ", +" ........XX. ", +" .X. ", +" .. ", +" . ", +" "}; diff --git a/art/gtk/error.xpm b/art/gtk/error.xpm index a883591aa8..e77c8e9fb6 100644 --- a/art/gtk/error.xpm +++ b/art/gtk/error.xpm @@ -1,522 +1,58 @@ /* XPM */ -static char * error_xpm[] = { -"48 48 471 2", -" c None", -". c #FD3819", -"+ c #FD3319", -"@ c #FA3019", -"# c #F33119", -"$ c #EE301A", -"% c #EB311B", -"& c #E9301A", -"* c #E9321C", -"= c #EB331E", -"- c #FF3A1A", -"; c #FF3318", -"> c #ED2E17", -", c #D32914", -"' c #C32714", -") c #BA2614", -"! c #B52514", -"~ c #B22514", -"{ c #B12615", -"] c #B42717", -"^ c #BC2A18", -"/ c #C62C1A", -"( c #CD2E1C", -"_ c #CF2F1C", -": c #FF3216", -"< c #DD2A14", -"[ c #C32613", -"} c #B32311", -"| c #AE2312", -"1 c #AB2313", -"2 c #A82212", -"3 c #A52212", -"4 c #961F11", -"5 c #952011", -"6 c #A22314", -"7 c #A72516", -"8 c #A92718", -"9 c #AB2719", -"0 c #B32A1A", -"a c #BD2C1D", -"b c #B52A1C", -"c c #FD3518", -"d c #EB2D14", -"e c #C32512", -"f c #B12311", -"g c #AC2211", -"h c #A92211", -"i c #A82312", -"j c #A62212", -"k c #9F2112", -"l c #A32313", -"m c #A72415", -"n c #A62617", -"o c #A32518", -"p c #A62718", -"q c #A62719", -"r c #A8291B", -"s c #AD2A1B", -"t c #AB291C", -"u c #FE3317", -"v c #D82914", -"w c #B92311", -"x c #A92111", -"y c #A72212", -"z c #962011", -"A c #A02214", -"B c #A72517", -"C c #A62618", -"D c #A2271A", -"E c #A5281B", -"F c #A5291B", -"G c #A82A1D", -"H c #A5291D", -"I c #FF3417", -"J c #D02813", -"K c #B32310", -"L c #A92110", -"M c #A82211", -"N c #A82313", -"O c #A42313", -"P c #9B2013", -"Q c #A62517", -"R c #AB3326", -"S c #A5281A", -"T c #A2281C", -"U c #A42A1D", -"V c #98271C", -"W c #FD3517", -"X c #D52913", -"Y c #A82314", -"Z c #A72414", -"` c #A42415", -" . c #9D2214", -".. c #A02416", -"+. c #A52516", -"@. c #A52719", -"#. c #AA3427", -"$. c #AA3428", -"%. c #A4291C", -"&. c #9B281C", -"*. c #A1291D", -"=. c #A1291E", -"-. c #9E2A1E", -";. c #852319", -">. c #FC391A", -",. c #E22B15", -"'. c #B62412", -"). c #AC3021", -"!. c #AC3022", -"~. c #9C2316", -"{. c #992416", -"]. c #A22618", -"^. c #A5271A", -"/. c #AA3529", -"(. c #A93529", -"_. c #A9362A", -":. c #A42A1E", -"<. c #A42B1E", -"[. c #A02A1F", -"}. c #A02A20", -"|. c #99291E", -"1. c #671C16", -"2. c #FC3017", -"3. c #BE2512", -"4. c #AA2F20", -"5. c #A92F20", -"6. c #AC3123", -"7. c #A02518", -"8. c #962417", -"9. c #9C2518", -"0. c #A5291C", -"a. c #A9362B", -"b. c #A9372B", -"c. c #A32B1F", -"d. c #A32C20", -"e. c #A02B20", -"f. c #9E2A20", -"g. c #8C271D", -"h. c #FA3619", -"i. c #AE2212", -"j. c #A82414", -"k. c #941F12", -"l. c #9E2E20", -"m. c #AB3224", -"n. c #AB3225", -"o. c #A3271A", -"p. c #942417", -"q. c #962418", -"r. c #A1281C", -"s. c #A42B1F", -"t. c #A8372C", -"u. c #A8382D", -"v. c #A32C21", -"w. c #A02C20", -"x. c #A02C21", -"y. c #962920", -"z. c #5B1A13", -"A. c #FA3118", -"B. c #BB2513", -"C. c #A42212", -"D. c #981F11", -"E. c #9D2314", -"F. c #AA3326", -"G. c #A3281B", -"H. c #922519", -"I. c #902419", -"J. c #9D271B", -"K. c #A8382E", -"L. c #A8392E", -"M. c #A22D22", -"N. c #A02D22", -"O. c #9B2C21", -"P. c #7D231C", -"Q. c #DD2D17", -"R. c #AF2413", -"S. c #A62213", -"T. c #9C2112", -"U. c #AA3327", -"V. c #AF3F33", -"W. c #A2291C", -"X. c #99271B", -"Y. c #92251B", -"Z. c #9B281D", -"`. c #A22D21", -" + c #A7392F", -".+ c #A93F2F", -"++ c #A12F22", -"@+ c #A02E23", -"#+ c #88281F", -"$+ c #300E0B", -"%+ c #F6361B", -"&+ c #C72816", -"*+ c #A92413", -"=+ c #D48D1D", -"-+ c #E4AF21", -";+ c #E3AF22", -">+ c #E1AE24", -",+ c #E0AD25", -"'+ c #DFAE28", -")+ c #DEAD29", -"!+ c #DDA82A", -"~+ c #DDAC2A", -"{+ c #DEB139", -"]+ c #DFB445", -"^+ c #DDB03A", -"/+ c #DAAC2F", -"(+ c #D9A832", -"_+ c #D9AC32", -":+ c #D8A733", -"<+ c #D2A332", -"[+ c #C89B30", -"}+ c #D1A333", -"|+ c #D4A637", -"1+ c #D3A638", -"2+ c #C1782E", -"3+ c #A12D22", -"4+ c #9F2E24", -"5+ c #902B22", -"6+ c #41130F", -"7+ c #F7321B", -"8+ c #BD2716", -"9+ c #DCAD2D", -"0+ c #DBAC2E", -"a+ c #DAAE39", -"b+ c #DBAF3A", -"c+ c #DBAD3E", -"d+ c #D7A734", -"e+ c #D5A634", -"f+ c #D2A436", -"g+ c #D3A63A", -"h+ c #D2A539", -"i+ c #A12F25", -"j+ c #9F2F25", -"k+ c #952C23", -"l+ c #4D1712", -"m+ c #F1321B", -"n+ c #B52615", -"o+ c #E2B232", -"p+ c #DAA82F", -"q+ c #D5A82E", -"r+ c #D1A230", -"s+ c #D9AB3E", -"t+ c #DAAC3F", -"u+ c #D6A735", -"v+ c #D1A53C", -"w+ c #A13026", -"x+ c #9F2F26", -"y+ c #962E24", -"z+ c #571B15", -"A+ c #020303", -"B+ c #EE321B", -"C+ c #E0B234", -"D+ c #DFB135", -"E+ c #D3A332", -"F+ c #D0A131", -"G+ c #D5A533", -"H+ c #D8AC40", -"I+ c #C79D37", -"J+ c #C59C39", -"K+ c #C49C3A", -"L+ c #A13027", -"M+ c #9E3026", -"N+ c #942D25", -"O+ c #581B16", -"P+ c #010202", -"Q+ c #E4311B", -"R+ c #B12617", -"S+ c #DFAD36", -"T+ c #DFB036", -"U+ c #D3A433", -"V+ c #CC9F32", -"W+ c #D2A435", -"X+ c #D6AB42", -"Y+ c #D5AB43", -"Z+ c #D0A53D", -"`+ c #D0A53F", -" @ c #A03127", -".@ c #9E3027", -"+@ c #912D25", -"@@ c #4E1814", -"#@ c #000101", -"$@ c #DF301C", -"%@ c #B12718", -"&@ c #CC9D30", -"*@ c #D1A436", -"=@ c #CA9E34", -"-@ c #CFA337", -";@ c #D4AA44", -">@ c #D3AA47", -",@ c #CFA53E", -"'@ c #CFA540", -")@ c #A03128", -"!@ c #9E3128", -"~@ c #892B24", -"{@ c #3D130F", -"]@ c #D02E1B", -"^@ c #B62819", -"/@ c #CD8622", -"(@ c #DCB03B", -"_@ c #CB9D31", -":@ c #D1A437", -"<@ c #CBA037", -"[@ c #CFA338", -"}@ c #D2AA48", -"|@ c #C18138", -"1@ c #A03229", -"2@ c #9A3029", -"3@ c #7F2821", -"4@ c #240B0A", -"5@ c #B72819", -"6@ c #BA2B1A", -"7@ c #A32618", -"8@ c #9C271B", -"9@ c #9A261B", -"0@ c #A9372C", -"a@ c #9A2B1F", -"b@ c #992B20", -"c@ c #A22E23", -"d@ c #992C21", -"e@ c #992C22", -"f@ c #A02E24", -"g@ c #9C2D23", -"h@ c #A53D34", -"i@ c #9D3129", -"j@ c #953028", -"k@ c #6C221D", -"l@ c #0D0404", -"m@ c #C72E1D", -"n@ c #AB281A", -"o@ c #98271B", -"p@ c #95261B", -"q@ c #9F291E", -"r@ c #A6362B", -"s@ c #A32D21", -"t@ c #902A1F", -"u@ c #A22F24", -"v@ c #982D23", -"w@ c #A02F25", -"x@ c #9D2F26", -"y@ c #9F3026", -"z@ c #A53E35", -"A@ c #9F332A", -"B@ c #9D322A", -"C@ c #8B2C26", -"D@ c #4E1915", -"E@ c #010101", -"F@ c #AE281A", -"G@ c #AD291B", -"H@ c #A2271B", -"I@ c #99281C", -"J@ c #9E291F", -"K@ c #9A291E", -"L@ c #A2362C", -"M@ c #A22E24", -"N@ c #87281E", -"O@ c #8A291F", -"P@ c #982D24", -"Q@ c #9C2F26", -"R@ c #9F3128", -"S@ c #A23E36", -"T@ c #983129", -"U@ c #752620", -"V@ c #1D0908", -"W@ c #020202", -"X@ c #6B1B12", -"Y@ c #B42C1D", -"Z@ c #A8291C", -"`@ c #9A2A1E", -" # c #A22B20", -".# c #A3382E", -"+# c #A1372D", -"@# c #9C2C21", -"## c #9F2D23", -"$# c #A12F24", -"%# c #9A2C23", -"&# c #9D2F25", -"*# c #972D25", -"=# c #9D3027", -"-# c #9E3129", -";# c #9F332B", -"># c #9F3E36", -",# c #8F3832", -"'# c #4E1A16", -")# c #8A2216", -"!# c #AD2B1D", -"~# c #A4291D", -"{# c #A73A2F", -"]# c #A02D23", -"^# c #9D2E23", -"/# c #972E26", -"(# c #9F322A", -"_# c #9E3229", -":# c #9D332B", -"<# c #8F2F28", -"[# c #66221D", -"}# c #100605", -"|# c #A12A1F", -"1# c #A63B31", -"2# c #972F27", -"3# c #9C322A", -"4# c #94302A", -"5# c #722620", -"6# c #270D0B", -"7# c #3A0F0B", -"8# c #9C281C", -"9# c #9F3930", -"0# c #8F2A22", -"a# c #982E25", -"b# c #963028", -"c# c #963029", -"d# c #772822", -"e# c #361210", -"f# c #030303", -"g# c #330D09", -"h# c #8B251C", -"i# c #9B2A1F", -"j# c #A23B32", -"k# c #90362F", -"l# c #982E26", -"m# c #A0322A", -"n# c #9D332A", -"o# c #9A322A", -"p# c #8D2E28", -"q# c #6D241F", -"r# c #33100E", -"s# c #1D0907", -"t# c #6E1E16", -"u# c #96291F", -"v# c #9D2B21", -"w# c #9F2E23", -"x# c #9D3A32", -"y# c #943029", -"z# c #832C25", -"A# c #5C1F1B", -"B# c #1E0A08", -"C# c #000000", -"D# c #41130E", -"E# c #85251C", -"F# c #912920", -"G# c #972C22", -"H# c #9C2D24", -"I# c #9E3127", -"J# c #A23D35", -"K# c #9D3229", -"L# c #9A312A", -"M# c #933028", -"N# c #832B24", -"O# c #6B241E", -"P# c #401512", -"Q# c #070302", -"R# c #0C0403", -"S# c #37100D", -"T# c #681E17", -"U# c #81261E", -"V# c #8B2921", -"W# c #8F2B23", -"X# c #942E26", -"Y# c #902D26", -"Z# c #842A24", -"`# c #5C1E1A", -" $ c #36120F", -".$ c #0D0504", -"+$ c #170706", -"@$ c #2D0E0B", -"#$ c #401310", -"$$ c #4E1813", -"%$ c #581C17", -"&$ c #401411", -"*$ c #2B0E0C", -"=$ c #140706", -"-$ c #030202", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" . + @ # $ % & * = ", -" - ; > , ' ) ! ~ ~ { ] ^ / ( _ ", -" : < [ } | 1 2 3 4 5 6 7 7 8 9 0 a b ", -" c d e f g h 2 i j k l m 7 7 n o p q r s t ", -" u v w g x h 2 y j z A m 7 B n C q q D E F G H ", -" I J K L x M 2 N N O P O 7 Q n C R R S E F T U U V ", -" W X f L h 2 2 N Y Z m ` ...+.C q @.#.$.F %.&.*.=.-.;. ", -" >.,.'.L h 2 i N Y ).!.7 7 +.~.{.].^.S E /.(._.:.<.[.}.|.1. ", -" 2.3.g h 2 i N 4.5.m 6.6.n C p 7.8.9.E 0.%.U a.b.c.d.e.f.g. ", -" h., i.M 2 N N j.k.l.6.B m.n.q q S o.p.q.r.U :.s.t.u.v.w.x.y.z. ", -" A.B.M 2 C.D.Z m E.7 Q m.n.R F.S E F G.H.I.J.s.c.d.K.L.M.N.O.P. ", -" Q.R.y N S.T.m 7 7 n C C R U.V.$.0.%.U W.X.Y.Z.d.v.`. +.+++@+#+$+ ", -" %+&+*+=+-+-+;+>+>+,+'+'+)+!+~+{+]+^+/+(+_+:+<+[+}+|+|+1+2+3+4+5+6+ ", -" 7+8+N -+;+;+>+>+,+'+'+)+~+~+9+0+a+b+c+_+:+d+d+e+f+|+1+g+h+i+j+k+l+ ", -" m+n+Z ;+;+>+o+,+'+)+)+~+9+9+0+p+q+r+s+t+d+u+u+|+1+1+g+v+v+w+x+y+z+A+ ", -" B+{ m ;+>+,+,+C+D+)+~+9+9+0+/+/+(+E+F+G+H+H+|+1+1+I+J+J+K+L+M+N+O+P+ ", -" Q+R+7 >+,+'+'+)+S+T+9+0+0+/+(+_+:+d+U+V+W+X+Y+Y+g+v+v+Z+`+ @.@+@@@#@ ", -" $@%@7 ,+'+'+)+~+~+{+^+0+/+(+_+&@d+d+u+*@=@-@g+;@>@Z+Z+,@'@)@!@~@{@#@ ", -" ]@^@n /@)+)+~+~+9+0+^+(@(+_+:+_@_@u+|+|+:@<@[@v+}@}@,@'@|@1@2@3@4@#@ ", -" 5@6@C 7@q S E F 8@9@U a.0@c.d.v.a@b@c@d@e@f@g@j+L+ @h@1@1@i@j@k@l@P+ ", -" m@n@@.S E F %.U o@p@q@r@d.v.s@M.t@t@u@v@i+w@x@y@)@1@z@A@B@C@D@E@A+ ", -" F@G@S H@0.%.U :.<.I@J@K@L@x.M.c@M@N@O@P@P@L+y@Q@R@1@A@S@T@U@V@W@ ", -" X@Y@Z@0.%.U :.<.c.d.`@ #.#+#@###$#%#&#w+*#)@)@=#-#A@;#>#,#'#E@A+ ", -" )#!#~#*.:.<.c.d.d.a@b@M.{#]#^#f@w+w+ @/#/#1@(#_#;#:#<#[#}#W@A+ ", -" 8@U =.|#c.d.v.s@M.d@d@M@1#i+w+L+ @)@1@2#(#;#;#3#4#5#6#E@A+ ", -" 7#8#[.[.e.v.s@M.c@c@u@i+1#9#0#a#)@1@1@b#c#;#:#4#d#e#E@W@f# ", -" g#h#i#e.x.x.c@M@$#i+w+P@j#k#l#1@m#A@;#n#o#p#q#r#E@W@A+ ", -" s#t#u#v#N.]#w#i+w+w+ @/#x#z@(#A@B@o#y#z#A#B#E@W@A+ ", -" C#D#E#F#G#H#j+j+M+.@I#!@J#K#L#M#N#O#P#Q#W@W@A+ ", -" C#R#S#T#U#V#W#N+X#X#Y#C@Z#U@`# $.$E@W@W@f# ", -" f#W@+$@$#$$$O+%$D@&$*$=$-$W@W@W@A+ ", -" f#f#W@W@W@W@W@W@W@W@W@W@W@A+f# ", -" f#f#E@E@A+#@f#f#f# ", -" ", -" ", -" ", -" ", -" ", -" ", -" "}; +static char *error_xpm[] = { +/* columns rows colors chars-per-pixel */ +"48 48 4 1", +" c None", +"X c #242424", +"o c #DCDF00", +". c #C00000", +/* pixels */ +" ", +" ", +" ", +" ", +" ", +" ..... ", +" ............. ", +" ................. ", +" ................... ", +" ....................... ", +" ......................... ", +" ........................... ", +" ...........................X ", +" .............................X ", +" ............................... ", +" ...............................X ", +" .................................X ", +" .................................X ", +" .................................XX ", +" ...ooooooooooooooooooooooooooo...XX ", +" ....ooooooooooooooooooooooooooo....X ", +" ....ooooooooooooooooooooooooooo....X ", +" ....ooooooooooooooooooooooooooo....XX ", +" ....ooooooooooooooooooooooooooo....XX ", +" ....ooooooooooooooooooooooooooo....XX ", +" ...ooooooooooooooooooooooooooo...XXX ", +" ...ooooooooooooooooooooooooooo...XXX ", +" .................................XX ", +" .................................XX ", +" ...............................XXX ", +" ...............................XXX ", +" .............................XXX ", +" ...........................XXXX ", +" ...........................XXX ", +" .........................XXX ", +" .......................XXXX ", +" X...................XXXXX ", +" X.................XXXXX ", +" X.............XXXXX ", +" XXXX.....XXXXXXXX ", +" XXXXXXXXXXXXX ", +" XXXXX ", +" ", +" ", +" ", +" ", +" ", +" " +}; diff --git a/art/gtk/info.xpm b/art/gtk/info.xpm index 0502a97872..8892f504c1 100644 --- a/art/gtk/info.xpm +++ b/art/gtk/info.xpm @@ -1,474 +1,63 @@ /* XPM */ -static char * info_xpm[] = { -"48 48 423 2", -" c None", -". c #FEFEFE", -"+ c #FFFFFF", -"@ c #F1F1F1", -"# c #CACACA", -"$ c #CBCBCB", -"% c #EDEDED", -"& c #999999", -"* c #4B4B4B", -"= c #131313", -"- c #2E2E2E", -"; c #393732", -"> c #423F36", -", c #242119", -"' c #282828", -") c #626262", -"! c #C2C2C2", -"~ c #FAFAFA", -"{ c #2D2D2D", -"] c #736F61", -"^ c #E0CE8A", -"/ c #EFDD8F", -"( c #F4E298", -"_ c #F4E191", -": c #F3E093", -"< c #ECD78C", -"[ c #D8C78E", -"} c #B7AA7C", -"| c #9B8C5A", -"1 c #5F5C4F", -"2 c #B6B6B6", -"3 c #FEFEFD", -"4 c #A1A1A1", -"5 c #1E1E1E", -"6 c #C2BEAF", -"7 c #F1DC92", -"8 c #F5E190", -"9 c #F7E7A5", -"0 c #F8EAAE", -"a c #F9E9A7", -"b c #F8E795", -"c c #F8E796", -"d c #F5E49C", -"e c #EBDB99", -"f c #E2CD7F", -"g c #D7C480", -"h c #21201E", -"i c #838383", -"j c #F9F9F9", -"k c #DDD9CA", -"l c #EFD986", -"m c #EFDA8E", -"n c #F8EAAF", -"o c #F9F0C7", -"p c #FAF5DE", -"q c #FAF3D0", -"r c #FAEAA6", -"s c #F9E89E", -"t c #F8E793", -"u c #F7E493", -"v c #EFDD93", -"w c #E5D187", -"x c #DFD2A9", -"y c #595958", -"z c #939393", -"A c #474747", -"B c #BAB6A9", -"C c #F5E4A3", -"D c #F4DE87", -"E c #F4E7B2", -"F c #F9F5E3", -"G c #FAF6E6", -"H c #FBF8ED", -"I c #FBF9EF", -"J c #FAF8EC", -"K c #FAF3DA", -"L c #F9E99B", -"M c #F8E791", -"N c #F6E38F", -"O c #EFDD92", -"P c #DFCB80", -"Q c #D7C896", -"R c #333333", -"S c #C9C9C9", -"T c #B4B4B4", -"U c #545454", -"V c #F0DD9C", -"W c #F3DF8D", -"X c #F7E69F", -"Y c #F8EFCF", -"Z c #FAF5E5", -"` c #F9F4E2", -" . c #FBF6E7", -".. c #FAF5E7", -"+. c #FAF6E9", -"@. c #FAEDB7", -"#. c #F9E89B", -"$. c #F8E691", -"%. c #F5E391", -"&. c #E8D68B", -"*. c #D1BC70", -"=. c #A29C84", -"-. c #525252", -";. c #848484", -">. c #989585", -",. c #EED681", -"'. c #F5E293", -"). c #F8E8A9", -"!. c #FAF4E1", -"~. c #FAF6E7", -"{. c #F9F5E4", -"]. c #F9F5E6", -"^. c #F7EEC3", -"/. c #F7E7A0", -"(. c #F7E691", -"_. c #F7E58F", -":. c #F1E08E", -"<. c #DBC878", -"[. c #C6B677", -"}. c #2A2A27", -"|. c #DADADA", -"1. c #646464", -"2. c #C1B999", -"3. c #EFD882", -"4. c #F6E499", -"5. c #F8EDBA", -"6. c #FAF5E4", -"7. c #FBF5E6", -"8. c #FAF5E6", -"9. c #F9F1DB", -"0. c #F9F4E3", -"a. c #F8F2DB", -"b. c #F6EBBE", -"c. c #F6E6A0", -"d. c #F3E290", -"e. c #E4D07E", -"f. c #C1AE67", -"g. c #646159", -"h. c #A0A0A0", -"i. c #EFD881", -"j. c #F6E498", -"k. c #FAF6E8", -"l. c #F9F5E5", -"m. c #F8F2DE", -"n. c #F7EFD0", -"o. c #F5E9C2", -"p. c #F4E5A0", -"q. c #F7E695", -"r. c #F3E295", -"s. c #E6D27E", -"t. c #C6B36A", -"u. c #79766C", -"v. c #7B7B7B", -"w. c #636363", -"x. c #B8B095", -"y. c #FBF8EE", -"z. c #FAF7EB", -"A. c #F9F6E5", -"B. c #F9F6EA", -"C. c #F9F4E0", -"D. c #F4EAC9", -"E. c #F7EBB1", -"F. c #F5E7A2", -"G. c #F6E697", -"H. c #F6E59B", -"I. c #F2E093", -"J. c #E7D480", -"K. c #CCB96E", -"L. c #797157", -"M. c #949494", -"N. c #818181", -"O. c #898782", -"P. c #F0DC91", -"Q. c #F6E496", -"R. c #F7EAAF", -"S. c #FBF7EC", -"T. c #F9F6E7", -"U. c #FAF5E8", -"V. c #FBF7ED", -"W. c #FAEEBB", -"X. c #F8ECB8", -"Y. c #F4EACA", -"Z. c #F3E6A3", -"`. c #F6E593", -" + c #F6E493", -".+ c #F2E090", -"++ c #E4D17E", -"@+ c #C4B269", -"#+ c #6D664D", -"$+ c #A5A5A5", -"%+ c #BFBFBF", -"&+ c #464646", -"*+ c #EDD990", -"=+ c #F2DC8A", -"-+ c #F7E8A6", -";+ c #FAF4D9", -">+ c #F8F1DB", -",+ c #F9F4E7", -"'+ c #F9EFCB", -")+ c #FAECAF", -"!+ c #F5E7B2", -"~+ c #EDE7BA", -"{+ c #F2E29A", -"]+ c #F6E591", -"^+ c #F5E393", -"/+ c #EFDC8B", -"(+ c #D9C677", -"_+ c #AB9B5B", -":+ c #201D13", -"<+ c #D5D5D5", -"[+ c #FCFCFC", -"}+ c #FDFDFC", -"|+ c #6F6F6F", -"1+ c #9B9584", -"2+ c #F1DC86", -"3+ c #F6E59D", -"4+ c #FAF2D3", -"5+ c #FBF7EA", -"6+ c #F9F4E5", -"7+ c #FAF3E5", -"8+ c #F8ECB9", -"9+ c #F6E7A7", -"0+ c #F3E7AD", -"a+ c #F1E3A4", -"b+ c #F4E395", -"c+ c #EADA91", -"d+ c #E4D07F", -"e+ c #CDBC70", -"f+ c #817959", -"g+ c #4E4E4E", -"h+ c #DEDEDD", -"i+ c #3E3E3E", -"j+ c #EEDA8D", -"k+ c #F7E8A7", -"l+ c #FAF2D2", -"m+ c #FAF7EA", -"n+ c #F9F4E6", -"o+ c #F7EED9", -"p+ c #F1E6AD", -"q+ c #F4E49D", -"r+ c #F2E4A1", -"s+ c #F1E19B", -"t+ c #F0DF92", -"u+ c #E5D48D", -"v+ c #DBC97E", -"w+ c #D9C577", -"x+ c #B9A964", -"y+ c #4F4938", -"z+ c #A7A7A7", -"A+ c #FDFDFD", -"B+ c #262626", -"C+ c #F2E097", -"D+ c #F9EBB1", -"E+ c #FAF3DB", -"F+ c #F8F1DC", -"G+ c #F7EFD8", -"H+ c #F4E9C4", -"I+ c #F3E4A1", -"J+ c #F3E296", -"K+ c #F1E195", -"L+ c #E9DA96", -"M+ c #E6D68C", -"N+ c #DAC87E", -"O+ c #DAC777", -"P+ c #C4B36B", -"Q+ c #958857", -"R+ c #353535", -"S+ c #F4F4F4", -"T+ c #E4E4E4", -"U+ c #434032", -"V+ c #F3DE87", -"W+ c #F8EBB1", -"X+ c #F9F2DB", -"Y+ c #F3EAC1", -"Z+ c #F4E9C1", -"`+ c #F3E6AD", -" @ c #EEDB8B", -".@ c #DCCB84", -"+@ c #D1C076", -"@@ c #D1BF73", -"#@ c #C9B76D", -"$@ c #9D9164", -"%@ c #43433D", -"&@ c #C2C2C1", -"*@ c #4D493C", -"=@ c #EFD782", -"-@ c #F4E9BB", -";@ c #F4E7BB", -">@ c #F1DFA1", -",@ c #F3E3A7", -"'@ c #E3D186", -")@ c #D9C679", -"!@ c #CAB871", -"~@ c #C1B372", -"{@ c #AEA475", -"]@ c #7F7A64", -"^@ c #0B0B0B", -"/@ c #7D7D7D", -"(@ c #6D6D64", -"_@ c #121211", -":@ c #383526", -"<@ c #5F5E59", -"[@ c #5A594C", -"}@ c #A9A077", -"|@ c #E8D48D", -"1@ c #E7D180", -"2@ c #DBC77C", -"3@ c #DBC97C", -"4@ c #BAA864", -"5@ c #8F8255", -"6@ c #3B3724", -"7@ c #0F0E0C", -"8@ c #494949", -"9@ c #BBBBBB", -"0@ c #35352E", -"a@ c #9D9D99", -"b@ c #B4B4B2", -"c@ c #EFEFEE", -"d@ c #DADAD8", -"e@ c #696964", -"f@ c #1D1D16", -"g@ c #928963", -"h@ c #C2B071", -"i@ c #B3A05E", -"j@ c #A99959", -"k@ c #474439", -"l@ c #DCDCDC", -"m@ c #F5F5F5", -"n@ c #050504", -"o@ c #161614", -"p@ c #55554E", -"q@ c #8D8D85", -"r@ c #D4D4D1", -"s@ c #F6F6F6", -"t@ c #CACAC4", -"u@ c #585851", -"v@ c #4D4C47", -"w@ c #80795F", -"x@ c #716D5B", -"y@ c #2A2A2A", -"z@ c #D9D9D9", -"A@ c #585858", -"B@ c #23231F", -"C@ c #C7C7C5", -"D@ c #A9A9A4", -"E@ c #3D3D35", -"F@ c #131311", -"G@ c #8D8D87", -"H@ c #C3C3C1", -"I@ c #7B7B7A", -"J@ c #5C5C5B", -"K@ c #0D0D0A", -"L@ c #3B3B3B", -"M@ c #BABABA", -"N@ c #191919", -"O@ c #525248", -"P@ c #D7D7D3", -"Q@ c #F7F7F7", -"R@ c #CFCFC8", -"S@ c #2F2F29", -"T@ c #474742", -"U@ c #71716F", -"V@ c #757571", -"W@ c #0F0F0F", -"X@ c #ECECEC", -"Y@ c #000000", -"Z@ c #080807", -"`@ c #96968E", -" # c #DFDFDE", -".# c #FBFBFB", -"+# c #B3B3B1", -"@# c #70706B", -"## c #4F4F4E", -"$# c #42423A", -"%# c #434343", -"&# c #BCBCB9", -"*# c #AEAEA9", -"=# c #4B4B44", -"-# c #0F0F0E", -";# c #92928D", -"># c #929292", -",# c #696968", -"'# c #141412", -")# c #878787", -"!# c #75756C", -"~# c #C3C3C2", -"{# c #F0F0F0", -"]# c #B9B9B1", -"^# c #525249", -"/# c #464644", -"(# c #7F7F7B", -"_# c #6D6D6D", -":# c #050505", -"<# c #44443B", -"[# c #333331", -"}# c #B3B3B0", -"|# c #EFEFEF", -"1# c #CFCFCE", -"2# c #434342", -"3# c #56564F", -"4# c #272727", -"5# c #161613", -"6# c #12120F", -"7# c #2C2C2A", -"8# c #9E9E9A", -"9# c #6B6B6A", -"0# c #10100E", -"a# c #21211D", -"b# c #20201C", -"c# c #383837", -"d# c #737373", -"e# c #141411", -"f# c #090908", -"g# c #0B0B09", -"h# c #31312B", -"i# c #33332F", -"j# c #30302F", -"k# c #101010", -"l# c #4E4E45", -"m# c #010101", -"n# c #1A1A17", -"o# c #0C0C0B", -"p# c #020202", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" . . + + . . . ", -" . . . . . . . . . . . . ", -" + . . . . . . . . . . . . . . . ", -" . . . . . . @ # $ $ % . . . . . . . ", -" . . . . % & * = - ; > , ' ) ! ~ . . . . ", -" . . . . ! { ] ^ / ( _ : < [ } | 1 2 . . . . ", -" 3 . . . 4 5 6 7 8 9 0 a b c d e f g h i j . . + ", -" . . . ! 5 k l m n o p q r s t u v w x y z . . . . ", -" . . ~ A B C D E F G H I J K L M N O P Q R S . . . ", -" . . . T U V W X Y Z ` ...+.G @.#.$.%.&.*.=.-.. . . ", -" . . . ;.>.,.'.).!.~.` {.` ]...^./.(._.:.<.[.}.|.. . . ", -" . . . 1.2.3.4.5.6.Z 7.8.9.0.a.b.c.$.$.d.e.f.g.h.. . . ", -" . . . 1.2.i.j.5.{.k.k.l.` m.n.o.p.q.q.r.s.t.u.v.. . + ", -" . . . w.x.i.'.5...y.z.A.B.C.D.E.F.G.H.I.J.K.L.M.. + + ", -" . . . N.O.P.Q.R.Z S.T.U.V.W.X.Y.Z.`. +.+++@+#+$+. . + ", -" . . %+&+*+=+-+;+y.>+,+'+)+!+~+{+]+^+/+(+_+:+<+. . . ", -" [+}+j |+1+2+3+4+5+6+7+8+9+0+a+b+%.c+d+e+f+g+j . . ", -" [+}+}+h+i+j+k+l+m+n+o+p+q+r+s+t+u+v+w+x+y+z+. . . ", -" }+}+A+B+C+D+E+F+G+H+I+J+K+L+M+N+O+P+Q+R+S+. . . ", -" [+}+T+U+V+W+X+Y+Z+`+s+/ @.@+@@@#@$@%@4 . . . ", -" [+&@*@=@-@;@>@,@C+/ '@)@!@~@{@]@^@/@~ . . . ", -" (@_@:@<@[@}@|@1@2@3@4@5@6@7@8@9@. . + + ", -" 0@a@b@c@d@e@f@g@h@i@j@k@) l@m@. . . + ", -" n@o@p@q@r@s@t@u@v@w@x@y@z@}+}+. . . ", -" A@B@C@D@E@F@G@H@I@J@K@L@M@}+}+}+. ", -" N@O@P@A+Q@R@S@T@U@V@W@X@[+[+[+ ", -" Y@Z@S@`@ #.#+#@###$#%# ", -" N@Y@&#*#=#-#;#>#|+,#'#)# ", -" Y@!#~#{#{#]#^#/#(#_#:# ", -" Y@Y@<#[#}#|#1#,#2#3#4# ", -" Y@5#6#S@7#8#|+9#Y@ ", -" Y@Y@0#a#b#c#,#d#Y@ ", -" e#f#5#F@g#h#i#j#k# ", -" l#m#e#n#o#0#Y@ ", -" m#p# ", -" ", -" ", -" ", -" ", -" ", -" "}; +static char *info_xpm[] = { +/* columns rows colors chars-per-pixel */ +"48 48 9 1", +"$ c Black", +"O c #FFFFFF", +"@ c #808080", +"+ c #000080", +"o c #E8EB01", +" c None", +"X c #FFFF40", +"# c #C0C0C0", +". c #ABAD01", +/* pixels */ +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ..... ", +" ..XXXXX.. ", +" ..XXXXXXXXo.. ", +" .XXXOXXXXXXXoo. ", +" .XOOXXX+XXXXXo. ", +" .XOOOXX+++XXXXoo. ", +" .XOOXXX+++XXXXXo. ", +" .XOOOXXX+++XXXXXXo. ", +" .XOOXXXX+++XXXXXXo. ", +" .XXXXXXX+++XXXXXXX. ", +" .XXXXXXX+++XXXXXXo. ", +" .XXXXXXX+++XXXXXoo. ", +" .XXXXXX+++XXXXXo. ", +" .XXXXXXX+XXXXXXo. ", +" .XXXXXXXXXXXXo. ", +" .XXXXX+++XXXoo. ", +" .XXXX+++XXoo. ", +" .XXXXXXXXo. ", +" ..XXXXXXo.. ", +" .XXXXXo.. ", +" @#######@ ", +" @@@@@@@@@ ", +" @#######@ ", +" @@@@@@@@@ ", +" @#######@ ", +" @@@@@@@ ", +" ### ", +" $$$ ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" " +}; diff --git a/art/gtk/question.xpm b/art/gtk/question.xpm index e8e710eead..8b3cb01ef5 100644 --- a/art/gtk/question.xpm +++ b/art/gtk/question.xpm @@ -1,125 +1,75 @@ /* XPM */ -static char * question_xpm[] = { -"48 48 74 1", -" c None", -". c #000000", -"+ c #A27F3B", -"@ c #B89243", -"# c #D8AB4E", -"$ c #9D7D3A", -"% c #A6823C", -"& c #7C622D", -"* c #F7D899", -"= c #F7E2B8", -"- c #D8BA7B", -"; c #BE9B53", -"> c #F7C35A", -", c #F7DFAF", -"' c #F7E5C0", -") c #F7D48C", -"! c #F7CF7E", -"~ c #D8B15F", -"{ c #6E5526", -"] c #F7DCA5", -"^ c #A8843D", -"/ c #937435", -"( c #AA863E", -"_ c #D8B66E", -": c #BEA363", -"< c #947536", -"[ c #927335", -"} c #F7C96D", -"| c #80632D", -"1 c #C39F57", -"2 c #A38E55", -"3 c #A48B5A", -"4 c #D2A64D", -"5 c #82662F", -"6 c #654F24", -"7 c #DCB463", -"8 c #BE9544", -"9 c #C3A466", -"0 c #8C6D31", -"a c #D2B06C", -"b c #D8BE86", -"c c #715929", -"d c #B99344", -"e c #B38D40", -"f c #D8B56E", -"g c #D8AC58", -"h c #997A3B", -"i c #000001", -"j c #6B5527", -"k c #C39F55", -"l c #DCC494", -"m c #DAB872", -"n c #C9AC73", -"o c #BFA16A", -"p c #19150D", -"q c #876A31", -"r c #C9A45B", -"s c #C6A76A", -"t c #7F6941", -"u c #977737", -"v c #D8B165", -"w c #D8AC5B", -"x c #BEA272", -"y c #C09745", -"z c #D8B163", -"A c #927C52", -"B c #735F3B", -"C c #A68748", -"D c #1A1A1A", -"E c #393939", -"F c #221C12", -"G c #DDBC74", -"H c #D2A64C", -"I c #705627", -" ", -" ", -" ", -" ", +static char *question_xpm[] = { +/* columns rows colors chars-per-pixel */ +"48 48 21 1", +". c Black", +"> c #696969", +"O c #1F1F00", +"+ c #181818", +"o c #F6F900", +"; c #3F3F00", +"$ c #111111", +" c None", +"& c #202020", +"X c #AAAA00", +"@ c #949400", +": c #303030", +"1 c #383838", +"% c #2A2A00", +", c #404040", +"= c #B4B400", +"- c #484848", +"# c #151500", +"< c #9F9F00", +"2 c #6A6A00", +"* c #353500", +/* pixels */ " ", " ", " ", " ", +" ......... ", +" ...XXXXXXX.. ", +" ..XXXXoooooXXXO+ ", +" ..XXooooooooooooX@.. ", +" ..XoooooooooooooooXX#. ", +" $%XoooooooooooooooooXX#. ", +" &.XoooooooXXXXXXooooooXX.. ", +" .XooooooXX.$...$XXoooooX*. ", +" $.XoooooX%.$ .*oooooo=.. ", +" .XooooooX.. -.XoooooX.. ", +" .XoooooX..+ .XoooooX;. ", +" ...XXXX..: .XoooooX;. ", +" ........ >.XoooooX;. ", +" +.XoooooX.. ", +" ,.Xoooooo<.. ", +" 1#XooooooXO.. ", +" &#XooooooX2.. ", +" $%XooooooXX.. ", +" $%XooooooXX.. ", +" $%XooooooXX.. ", +" &.XooooooXX.. ", +" .XooooooXX.. ", +" &.XoooooXX.. ", +" ..XooooXX.. ", +" ..XooooX... ", +" ..XXooXX..& ", +" ...XXXXX.. ", " ........ ", -" ...+@#$%&... ", -" ..#**=*---;%... ", -" ..>,'*)>>>!-~%{.. ", -" .>,]>^//(>>!_~%.. ", -" .:*=><....[>>}~~|.. ", -" .}'!<.. .1>!#~%.. ", -" .2),#.. .3>}~#%.. ", -" .4!>%.. .3}}_#5.. ", -" .>!>%.. .3>__#6.. ", -" .7~85.. .9}-#%... ", -" ....... 0ab~#c.. ", -" ..... .d)b#8... ", -" .e}b##... ", -" ..>)fgh..i ", -" jklmnop.. ", -" .qafrst.. ", -" .u-vwx.. ", -" .y-zwA.. ", -" .#b~#B.. ", -" .;-#8.. ", -" .CC%|.. ", -" .DE... ", -" .... ", " ", -" F.... ", -" .G!)8.. ", -" .!**#.. ", -" .))~8.. ", -" .)_#8.. ", -" .H~8I.. ", -" ...... ", -" .... ", +" ", +" ....... ", +" ..XXXXX.. ", +" ..XXoooXX.. ", +" ..XoooooX.. ", +" ..XoooooX.. ", +" ..XXoooXX.. ", +" ..XXXXX.. ", +" ....... ", " ", " ", " ", " ", " ", -" ", -" "}; +" " +}; diff --git a/art/gtk/warning.xpm b/art/gtk/warning.xpm index 9f0e057b31..92b7a70860 100644 --- a/art/gtk/warning.xpm +++ b/art/gtk/warning.xpm @@ -1,291 +1,63 @@ /* XPM */ -static char * warning_xpm[] = { -"48 48 240 2", -" c None", -". c #F42A14", -"+ c #C62210", -"@ c #F62B14", -"# c #D22411", -"$ c #A91D0F", -"% c #85170C", -"& c #F62913", -"* c #D52511", -"= c #A71D0E", -"- c #A11C0E", -"; c #9B1B0E", -"> c #641209", -", c #F72913", -"' c #E02712", -") c #B31F0F", -"! c #A41C0E", -"~ c #8A180C", -"{ c #EC2913", -"] c #B9200F", -"^ c #B14010", -"/ c #9A1C0F", -"( c #631109", -"_ c #F52A13", -": c #CA2310", -"< c #BB5B11", -"[ c #C26F12", -"} c #A31D0F", -"| c #A01D0F", -"1 c #921A0E", -"2 c #F52913", -"3 c #DB2612", -"4 c #A61D0F", -"5 c #E0AD11", -"6 c #DFB112", -"7 c #77150C", -"8 c #B72010", -"9 c #A31C0E", -"0 c #E1AE12", -"a c #D28814", -"b c #9F1D10", -"c c #911A0F", -"d c #4D0D07", -"e c #C56B12", -"f c #A11D10", -"g c #A21D10", -"h c #73150C", -"i c #DE2612", -"j c #DCAE11", -"k c #B9930E", -"l c #DEAC13", -"m c #CF8812", -"n c #901A0F", -"o c #490D07", -"p c #EF2914", -"q c #BA2010", -"r c #D18912", -"s c #C39B0F", -"t c #010100", -"u c #0E0B00", -"v c #403105", -"w c #A11D11", -"x c #9E1D11", -"y c #F32912", -"z c #D12412", -"A c #7A6109", -"B c #070400", -"C c #130F00", -"D c #020200", -"E c #CD8713", -"F c #490E09", -"G c #E82814", -"H c #B21F10", -"I c #E0B213", -"J c #2C2303", -"K c #030100", -"L c #010000", -"M c #191300", -"N c #DCAB15", -"O c #9D1E12", -"P c #72150D", -"Q c #C82312", -"R c #251D02", -"S c #000000", -"T c #040300", -"U c #292003", -"V c #A01E12", -"W c #8F1B10", -"X c #DC2613", -"Y c #271E02", -"Z c #1D1602", -"` c #423305", -" . c #71150D", -".. c #ED2914", -"+. c #BD2111", -"@. c #D08C13", -"#. c #4E3D06", -"$. c #403104", -"%. c #453506", -"&. c #DBAA16", -"*. c #CC8614", -"=. c #891A11", -"-. c #470E09", -";. c #F42914", -">. c #D92613", -",. c #1E1702", -"'. c #251D03", -"). c #413206", -"!. c #9F1E13", -"~. c #991D13", -"{. c #5E110A", -"]. c #EA2915", -"^. c #A21D0F", -"/. c #090700", -"(. c #0B0900", -"_. c #CC8615", -":. c #9C1E13", -"<. c #861910", -"[. c #2C0805", -"}. c #D42513", -"|. c #050400", -"1. c #100D01", -"2. c #0A0800", -"3. c #332704", -"4. c #DAAA17", -"5. c #981D14", -"6. c #5E120C", -"7. c #130F01", -"8. c #524007", -"9. c #9E1E14", -"0. c #9B1E14", -"a. c #7A1710", -"b. c #382C05", -"c. c #513F07", -"d. c #151001", -"e. c #71570A", -"f. c #D8A919", -"g. c #8D1B12", -"h. c #490E0A", -"i. c #BD9312", -"j. c #675009", -"k. c #312604", -"l. c #C79A14", -"m. c #CB8617", -"n. c #9A1F15", -"o. c #6D160E", -"p. c #9D1F15", -"q. c #871B12", -"r. c #440E09", -"s. c #B62111", -"t. c #CB9E13", -"u. c #241C03", -"v. c #C49813", -"w. c #D7A81A", -"x. c #C16916", -"y. c #971E15", -"z. c #5C120D", -"A. c #D22614", -"B. c #CF8C12", -"C. c #4B3A07", -"D. c #020100", -"E. c #69520A", -"F. c #C98517", -"G. c #991F16", -"H. c #7B1912", -"I. c #2B0A07", -"J. c #EC2A16", -"K. c #3C2E05", -"L. c #090701", -"M. c #745A0C", -"N. c #9C1F16", -"O. c #8C1C14", -"P. c #460E0A", -"Q. c #D82715", -"R. c #C87E14", -"S. c #E0AE14", -"T. c #DFAD13", -"U. c #312605", -"V. c #7C610C", -"W. c #D7A816", -"X. c #BF6F16", -"Y. c #61130E", -"Z. c #EA2A16", -"`. c #BF2212", -" + c #B95B13", -".+ c #C16F14", -"++ c #C77E14", -"@+ c #CB8914", -"#+ c #DAAA16", -"$+ c #DBAB17", -"%+ c #D9AA19", -"&+ c #D8A91A", -"*+ c #D8A51C", -"=+ c #C57E16", -"-+ c #AB4216", -";+ c #781812", -">+ c #260806", -",+ c #CD2513", -"'+ c #9B1F17", -")+ c #8B1C15", -"!+ c #440E0A", -"~+ c #78150B", -"{+ c #520E07", -"]+ c #6A130B", -"^+ c #6F140B", -"/+ c #78150C", -"(+ c #86180D", -"_+ c #8A190F", -":+ c #931B10", -"<+ c #981F17", -"[+ c #5A120D", -"}+ c #020202", -"|+ c #0E0302", -"1+ c #230704", -"2+ c #2E0906", -"3+ c #410C07", -"4+ c #420C07", -"5+ c #571109", -"6+ c #5D110B", -"7+ c #60120B", -"8+ c #6E150C", -"9+ c #73160E", -"0+ c #801810", -"a+ c #881A11", -"b+ c #861B13", -"c+ c #851B14", -"d+ c #801A13", -"e+ c #731711", -"f+ c #4D100C", -"g+ c #0D0403", -"h+ c #220705", -"i+ c #210705", -"j+ c #230705", -"k+ c #420D08", -"l+ c #3E0C08", -"m+ c #3D0C09", -"n+ c #3C0C09", -"o+ c #3B0C09", -"p+ c #2E0A08", -"q+ c #1C0705", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" . + ", -" @ # $ % ", -" & * = - ; > ", -" , ' ) ! ! - ~ ", -" { ] ! ! ^ ! / ( ", -" _ : ! ! < [ } | 1 ", -" 2 3 4 ! ! 5 6 } } | 7 ", -" { 8 ! 9 0 6 6 a } b c d ", -" _ : ! ! e 6 6 6 6 f g b h ", -" i 4 ! ! 5 j k j l m g b n o ", -" p q ! ! r s t u v l l g w x h ", -" y z ! ! ! 6 A B C D l l E w x n F ", -" G H ! ! I 6 J K L M l l N w w O P ", -" _ Q ! ! a 6 6 R S T U l N N E V O W F ", -" X 4 ! } 6 6 6 Y S Z ` N N N N V V O . ", -" ..+.! ! @.6 6 l #.S $.%.N N N &.*.V O =.-. ", -" ;.>.4 ! } 6 6 6 l ,.t '.).N N &.&.&.V !.~.{. ", -" ].8 ! ^.I 6 6 l l /.t (.'.N &.&.&.&._.!.:.<.[. ", -" p }.! } a 6 6 l l l |.1.2.3.&.&.&.&.4.4.!.!.5.6. ", -" ].8 } } 6 6 l l l l |.7.T 8.&.&.&.4.4.4._.9.0.a. ", -" p }.} } @.6 l l l l N b.c.d.e.&.&.4.4.4.4.f.9.9.g.h. ", -" ].8 } } 6 l l l l N N i.j.k.l.&.&.4.4.4.f.f.m.9.n.o. ", -" p }.} } @.6 l l l N N N N &.&.&.&.4.4.4.4.f.f.f.p.n.q.r. ", -" ].s.} } 6 l l l N N N N t.'.u.v.4.4.4.4.f.f.f.w.x.p.y.z. ", -" p A.} } B.l l l l N N N &.C.D.D.E.4.4.4.f.f.f.f.w.F.p.G.H.I. ", -" J.s.} } l l l l N N N N &.K.T L.M.4.4.f.f.f.f.w.w.w.p.N.O.P. ", -" Q.} } R.S.T.l N N N N &.&.i.U.V.W.4.f.f.f.f.w.w.w.w.X.N.G.Y. ", -" Z.`.} g g g g w w w +.+++@+#+$+$+$+%+%+%+%+&+&+&+&+*+=+-+G.;+>+ ", -" ,+} | g g g w w w w V V V V !.!.!.!.9.9.9.p.p.p.p.N.N.N.N.'+)+!+ ", -" ~+{+]+^+/+(+_+:+x O V V V !.!.!.!.9.9.9.p.p.p.p.N.N.N.N.'+'+<+[+ ", -" }+}+|+1+2+3+4+5+6+7+8+9+9+9+0+a+a+a+a+q.q.q.b+b+b+b+c+c+d+e+f+}+ ", -" }+}+}+}+}+}+}+}+}+g+h+i+i+j+k+l+l+l+l+l+l+m+m+m+n+n+n+o+p+q+}+ ", -" }+}+}+}+}+}+}+}+}+}+}+}+}+}+}+}+}+}+}+}+}+}+}+}+}+S ", -" }+}+}+}+}+}+}+}+}+}+}+}+}+}+ ", -" ", -" ", -" ", -" ", -" ", -" ", -" "}; +static char *warning_xpm[] = { +/* columns rows colors chars-per-pixel */ +"48 48 9 1", +"@ c Black", +"o c #A6A800", +"+ c #8A8C00", +"$ c #B8BA00", +" c None", +"O c #6E7000", +"X c #DCDF00", +". c #C00000", +"# c #373800", +/* pixels */ +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" . ", +" ... ", +" ... ", +" ..... ", +" ...X.. ", +" ..XXX.. ", +" ...XXX... ", +" ..XXXXX.. ", +" ..XXXXXX... ", +" ...XXoO+XX.. ", +" ..XXXO@#XXX.. ", +" ..XXXXO@#XXX... ", +" ...XXXXO@#XXXX.. ", +" ..XXXXXO@#XXXX... ", +" ...XXXXXo@OXXXXX.. ", +" ...XXXXXXo@OXXXXXX.. ", +" ..XXXXXXX$@OXXXXXX... ", +" ...XXXXXXXX@XXXXXXXX.. ", +" ...XXXXXXXXXXXXXXXXXX... ", +" ..XXXXXXXXXXOXXXXXXXXX.. ", +" ...XXXXXXXXXO@#XXXXXXXXX.. ", +" ..XXXXXXXXXXX#XXXXXXXXXX... ", +" ...XXXXXXXXXXXXXXXXXXXXXXX.. ", +" ...XXXXXXXXXXXXXXXXXXXXXXXX... ", +" .............................. ", +" .............................. ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" " +}; diff --git a/art/home.xpm b/art/home.xpm index 2a16ace29e..0f73ef92e2 100644 --- a/art/home.xpm +++ b/art/home.xpm @@ -1,26 +1,94 @@ /* XPM */ -static char * home_xpm[] = { -"20 20 3 1", -" c None", -". c #000000000000", -"X c #FFFFFFFFFFFF", +static char *home_xpm[] = { +/* columns rows colors chars-per-pixel */ +"20 20 68 1", +". c Black", +"8 c #AFC5EA", +"< c #B4C9EB", +"= c #B9CDED", +"O c #BED1EE", +"e c #99B5E4", +"4 c #9EB9E5", +"Z c #A3BDE7", +"B c #A8C1E8", +"5 c #C1D2EF", +"% c #C6D6F0", +"A c #88A9E0", +"V c #8DADE1", +"M c #92B1E2", +"- c #B0C6EA", +"# c #B5CAEC", +"S c #7299DA", +"C c #779DDB", +"N c #7CA1DC", +"D c #9AB6E4", +"& c #C2D3EF", +"@ c #C7D7F0", +"; c #ACC3E9", +"$ c #B1C7EA", +"j c #A0BBE6", +"p c #A5BFE7", +", c #B9CCED", +"* c #BED0EE", +"o c #C3D4EF", +"x c #8AABE0", +"s c #8FAFE1", +"m c #ADC4E9", +"3 c #A3BCE7", +": c #A8C0E8", +"f c #B2C8EB", +"b c #97B4E4", +"k c #9CB8E5", +" c None", +"+ c #BACDED", +"n c #81A4DE", +"c c #86A8DF", +"g c #AEC5EA", +"l c #98B5E4", +"h c #A5BEE7", +"9 c #AAC2E9", +"X c #C8D7F1", +"z c #8FAEE1", +"r c #94B2E3", +"v c #B2C7EB", +"u c #B7CBEC", +"y c #BCCFED", +"6 c #BCCFEE", +"J c #83A6DE", +"a c #A1BBE6", +"0 c #A6BFE8", +"1 c #ABC3E9", +"K c #6D96D8", +"d c #8BABE0", +"F c #95B3E3", +"t c #90AFE2", +"i c #B3C8EB", +"7 c #B8CCEC", +"> c #BDD0EE", +"w c #9DB8E5", +"q c #A2BCE6", +"2 c #A7C0E8", +"H c #8CACE1", +"G c #91B0E2", +/* pixels */ " ", " ", -" .. ", -" . .... ", -" . .XX . ", -" . .XXXX . ", -" ..XXXXXX . ", -" .XXXXXXXX . ", -" .XXXXXXXXX . ", -" ...XXXXXXXX ... ", -" .XXXXXXXX . ", -" .XXX...XX . ", -" .XXX. .XX . ", -" .XXX. .XX . ", -" .XXX. .XX . ", -" .XXX. .XX . ", -" ..... ...... ", " ", +" .... ", +" .XoO+. ", +" .@oO+#$. ", +" .%&*=#-;:. ", +" .%&>,<-1234. ", +" .............. ", +" .567<890qwert. ", +" .yui89pawersd. ", +" .ufg9hjklrzxc. ", +" .v.....b....n. ", +" .m. .M. .N. ", +" .B. .V. .C. ", +" .Z.....A. .S. ", +" .4DFGHAJ. .K. ", +" ......... ... ", " ", -" "}; +" " +}; diff --git a/art/htmbook.xpm b/art/htmbook.xpm index 8ac1fb4d7b..56c9c3339b 100644 --- a/art/htmbook.xpm +++ b/art/htmbook.xpm @@ -1,40 +1,25 @@ -/* XPM */ -static char * htmbook_xpm[] = { -"16 16 21 1", -" c None", -". c #007F7F", -"+ c #660000", -"@ c #CC0000", -"# c #E50000", -"$ c #FF0000", -"% c #F20000", -"& c #D80000", -"* c #720000", -"= c #7F0000", -"- c #BFBFBF", -"; c #E57F7F", -"> c #7F7F7F", -", c #FFFFFF", -"' c #F2BFBF", -") c #723F3F", -"! c #A5A5A5", -"~ c #E5E5E5", -"{ c #B2B2B2", -"] c #003F3F", -"^ c #000000", -" ", -" ......... ", -" +@#$$$$$%&+ ", -" +##$$$$$$$* ", -" +##$$$$$$$=- ", -" +##$$$$$$$=;> ", -" +##$$$$$$$=;,. ", -" +##$$$$$$$=;,. ", -" +##$$$$$$$=''. ", -" +##$$$$$$$=,;. ", -" +##$$$$$$%+,;. ", -" +&++++++++),;. ", -" ++!~~~~~~~~~,. ", -" ++!~~~~~~~~~{. ", -" ]^^^^^^^^^^^ ", -" "}; +/* XPM */ +static char * htmbook_xpm[] = { +"16 16 6 1", +" c None", +". c Black", +"X c #000080", +"o c #c0c0c0", +"O c #808080", +"+ c Gray100", +" ", +" .. ", +" ..XX. ", +" ..XXXXX. ", +" ..XXXXXXXX. ", +".oXXXXXXXXXX. ", +".XoXXXXXXXXXX. ", +".XXoXXXXXXXXXX. ", +".XXXoXXXXXXXXX..", +".XXXXoXXXXXX..O ", +" .XXXXoXXX..O+O ", +" .XXXXo..O++o..", +" .XXX.O+++o.. ", +" .XX.o+o.. ", +" .X.o.. ", +" ... "}; diff --git a/art/htmfoldr.xpm b/art/htmfoldr.xpm index c1e22f165f..e99dea7282 100644 --- a/art/htmfoldr.xpm +++ b/art/htmfoldr.xpm @@ -1,28 +1,25 @@ -/* XPM */ -static char * htmfoldr_xpm[] = { -/* width height ncolors chars_per_pixel */ -"16 16 6 1", -/* colors */ -" s None c None", -". c #000000", -"+ c #c0c0c0", -"@ c #808080", -"# c #ffff00", -"$ c #ffffff", -/* pixels */ -" ", -" @@@@@ ", -" @#+#+#@ ", -" @#+#+#+#@@@@@@ ", -" @$$$$$$$$$$$$@.", -" @$#+#+#+#+#+#@.", -" @$+#+#+#+#+#+@.", -" @$#+#+#+#+#+#@.", -" @$+#+#+#+#+#+@.", -" @$#+#+#+#+#+#@.", -" @$+#+#+#+#+#+@.", -" @$#+#+#+#+#+#@.", -" @@@@@@@@@@@@@@.", -" ..............", -" ", -" "}; +/* XPM */ +static char * htmfoldr_xpm[] = { +"16 16 6 1", +" c None", +". c Black", +"X c #000080", +"o c #c0c0c0", +"O c #808080", +"+ c Gray100", +" ", +" .. ", +" ..XX. ", +" ..XXXXX. ", +" ..XXXXXXXX. ", +".oXXXXXXXXXX. ", +".XoXXXXXXXXXX. ", +".XXoXXXXXXXXXX. ", +".XXXoXXXXXXXXX..", +".XXXXoXXXXXX..O ", +" .XXXXoXXX..O+O ", +" .XXXXo..O++o..", +" .XXX.O+++o.. ", +" .XX.o+o.. ", +" .X.o.. ", +" ... "}; diff --git a/art/htmoptns.xpm b/art/htmoptns.xpm index 266a8df2ea..0d055968e2 100644 --- a/art/htmoptns.xpm +++ b/art/htmoptns.xpm @@ -1,21 +1,20 @@ -/* XPM */ -static char * htmoptns_xpm[] = { -"16 16 2 1", -" c None", -". c #000000", -" ", -" .. ", -" ... ", -" .... ", -" . ... ", -" .. ... ", -" . .. ", -" .. ... ", -" . .. ", -" ......... ", -" .. ... ", -" . ... ", -" .. ... ", -" .... ....... ", -" ", -" "}; +/* XPM */ +static char * htmoptns_xpm[] = { +"16 15 2 1", +" c None", +". c #000000", +" ", +" .. ", +" ... ", +" .... ", +" . ... ", +" .. ... ", +" . .. ", +" .. ... ", +" . .. ", +" ......... ", +" .. ... ", +" . ... ", +" .. ... ", +" .... ....... ", +" "}; diff --git a/art/htmpage.xpm b/art/htmpage.xpm index fcee703d11..644ee7f14b 100644 --- a/art/htmpage.xpm +++ b/art/htmpage.xpm @@ -1,25 +1,23 @@ -/* XPM */ -static char * htmpage_xpm[] = { -/* width height ncolors chars_per_pixel */ -"16 16 3 1", -/* colors */ -" s None c None", -". c #000000", -"+ c #ffffff", -/* pixels */ -" ", -" ........ ", -" .++++++.. ", -" .+.+.++.+. ", -" .++++++.... ", -" .+.+.+++++. ", -" .+++++++++. ", -" .+.+.+.+.+. ", -" .+++++++++. ", -" .+.+.+.+.+. ", -" .+++++++++. ", -" .+.+.+.+.+. ", -" .+++++++++. ", -" ........... ", -" ", -" "}; +/* XPM */ +static char * htmpage_xpm[] = { +"16 16 4 1", +" c None", +". c #808080", +"X c Gray100", +"o c Black", +" ", +" .......... ", +" .XXXXXXXX.. ", +" .XXXXXXXXooo ", +" .X......XXXo ", +" .XXXXXXXXXXo ", +" .X........Xo ", +" .XXXXXXXXXXo ", +" .X........Xo ", +" .XXXXXXXXXXo ", +" .X........Xo ", +" .XXXXXXXXXXo ", +" .X........Xo ", +" .XXXXXXXXXXo ", +" .XXXXXXXXXXo ", +" oooooooooooo "}; diff --git a/art/htmsidep.xpm b/art/htmsidep.xpm index fe6fc14572..f7d77bf347 100644 --- a/art/htmsidep.xpm +++ b/art/htmsidep.xpm @@ -1,35 +1,28 @@ /* XPM */ -static char * htmsidep_xpm[] = { -"16 15 17 1", -" c None", -". c #000000", -"+ c #800000", -"@ c #008000", -"# c #808000", -"$ c #000080", -"% c #800080", -"& c #008080", -"* c #C0C0C0", -"= c #808080", -"- c #FF0000", -"; c #00FF00", -"> c #FFFF00", -", c #0000FF", -"' c #FF00FF", -") c #00FFFF", -"! c #FFFFFF", -"****************", -"*..............*", -"*.************.*", -"*..............*", -"*.****.!!!!!!!.*", -"*.****.!====*!.*", -"*.****.!!!!!!!.*", -"*.****.!===*!!.*", -"*.****.!!!!!!!.*", -"*.****.!====*!.*", -"*.****.!!!!!!!.*", -"*.****.!===*!!.*", -"*.****.!!!!!!!.*", -"*..............*", -"****************"}; +static char *htmsidep_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 16 6 1", +". c Black", +"X c #FFFFFF", +"+ c #808080", +" c None", +"O c #0000C0", +"o c #C0C0C0", +/* pixels */ +" ", +" .............. ", +" .XXXX.ooooooo. ", +" .XOXX.oo...oo. ", +" .XXOX.ooooooo. ", +" .OOOO.o...+.o. ", +" .XXOX.ooooooo. ", +" .XOXX.ooooooo. ", +" .XXXX.o..+ooo. ", +" .XXOX.ooooooo. ", +" .XOXX.o...+.o. ", +" .OOOO.ooooooo. ", +" .XOXX.o.+...o. ", +" .XXOX.ooooooo. ", +" .............. ", +" " +}; diff --git a/art/listview.xpm b/art/listview.xpm index 5cc4ba1c8d..a03015d8f5 100644 --- a/art/listview.xpm +++ b/art/listview.xpm @@ -1,28 +1,31 @@ /* XPM */ -static char * listview_xpm[] = { +static char *listview_xpm[] = { +/* columns rows colors chars-per-pixel */ "20 20 5 1", -" c None", -". c #000000", -"+ c #FFFFFF", -"@ c #000083", -"# c #838183", +". c Black", +"X c #FFFFFF", +"o c #000084", +" c None", +"O c #848484", +/* pixels */ " ", " ", " ................ ", -" .++++++++++++++. ", -" .+@@+++++@@++++. ", -" .+@+@+.#+@+@+.+. ", -" .+@@@++++@@@+++. ", -" .++++++++++++++. ", -" .++++++++++++++. ", -" .+@@+++++@@++++. ", -" .+@+@+.#+@+@+.+. ", -" .+@@@++++@@@+++. ", -" .++++++++++++++. ", -" .++++++++++++++. ", -" .+@@+++++@@++++. ", -" .+@+@+.#+@+@+.+. ", -" .+@@@++++@@@+++. ", +" .XXXXXXXXXXXXXX. ", +" .XoooXXXXXXXXXX. ", +" .XoooX..O...O.X. ", +" .XoooXXXXXXXXXX. ", +" .XXXXXXXXXXXXXX. ", +" .XXXXXXXXXXXXXX. ", +" .XoooXXXXXXXXXX. ", +" .XoooX...O....X. ", +" .XoooXXXXXXXXXX. ", +" .XXXXXXXXXXXXXX. ", +" .XXXXXXXXXXXXXX. ", +" .XoooXXXXXXXXXX. ", +" .XoooX.O....O.X. ", +" .XoooXXXXXXXXXX. ", " ................ ", " ", -" "}; +" " +}; diff --git a/art/motif/error.xpm b/art/motif/error.xpm index 4e9f8b0c22..e77c8e9fb6 100644 --- a/art/motif/error.xpm +++ b/art/motif/error.xpm @@ -1,129 +1,58 @@ /* XPM */ -static char * error_xpm[] = { -"48 48 78 1", -" c None", -". c #000000", -"+ c #200000", -"@ c #4A0000", -"# c #6B0000", -"$ c #8F0000", -"% c #890000", -"& c #5F0000", -"* c #380000", -"= c #0E0000", -"- c #030000", -"; c #480000", -"> c #9C0000", -", c #E40000", -"' c #FE0000", -") c #FF0000", -"! c #C90000", -"~ c #7E0000", -"{ c #250000", -"] c #090000", -"^ c #700000", -"/ c #DE0000", -"( c #FB0000", -"_ c #BB0000", -": c #410000", -"< c #500000", -"[ c #DF0000", -"} c #B00000", -"| c #0D0000", -"1 c #AB0000", -"2 c #F60000", -"3 c #600000", -"4 c #010000", -"5 c #220000", -"6 c #DA0000", -"7 c #950000", -"8 c #070000", -"9 c #350000", -"0 c #F00000", -"a c #BD0000", -"b c #080000", -"c c #B10000", -"d c #880000", -"e c #FD0000", -"f c #4D0000", -"g c #0B0000", -"h c #F50000", -"i c #1A0000", -"j c #820000", -"k c #E30000", -"l c #040000", -"m c #3C0000", -"n c #FEAFAF", -"o c #FFFEFE", -"p c #FEFEFE", -"q c #FF7F7F", -"r c #840000", -"s c #FFAFAF", -"t c #FFFFFF", -"u c #C00000", -"v c #EA0000", -"w c #2F0000", -"x c #290000", -"y c #D80000", -"z c #AE0000", -"A c #FE6D6D", -"B c #FF9F9F", -"C c #FE9F9F", -"D c #FF4F4F", -"E c #690000", -"F c #C10000", -"G c #5B0000", -"H c #050000", -"I c #B70000", -"J c #E50000", -"K c #F40000", -"L c #420000", -"M c #650000", +static char *error_xpm[] = { +/* columns rows colors chars-per-pixel */ +"48 48 4 1", +" c None", +"X c #242424", +"o c #DCDF00", +". c #C00000", +/* pixels */ " ", " ", -" ..+@#$$$%&*=. ", -" -;>,''''''))))!~{. ", -" ]^/'''''''''))))))(_:. ", -" .<['''''''''''))))))))'}+. ", -" |1'''''''''''''))))))))))234 ", -" 56)'''''''''''''))))))))))))78 ", -" 90))''''''''''''')))))))))))))ab ", -" 50)))'''''''''''''))))))))))))))c4 ", -" |6))))''''''''''''')))))))))))))))d. ", -" .1'))))''''''''''''')))))))))))))))ef ", -" <''))))''''''''''''')))))))))))))))),g ", -" ][')))))''''''''''''')))))))))))))))))%. ", -" ^'''))))''''''''''''')))))))))))))))))hi ", -" -/'''))))'''''''''''''))))))))))))))))))j ", -" ;)'')))))'''''''''''''))))))))))))))))))kl ", -" >''''))))''''''''''''')))))))))))))))))))m ", -" .,'''noooopppppppppppppoooooooooooooooq)))r ", -" +))')sttttppppppppppppptttttttttttttttq)))u. ", -" @''''nttttppppppppppppptttttttttttttttq)))v. ", -" #))''nttttppppppppppppptttttttttttttttq))))g ", -" $)'''nttttppppppppppppptttttttttttttttq))))w ", -" $''''nttttppppppppppppptttttttttttttttq))))w ", -" $)'''nttttppppppppppppptttttttttttttttq))))w ", -" %)'''nttttppppppppppppptttttttttttttttq))))x ", -" &''''nttttppppppppppppptttttttttttttttq)))). ", -" *)'''nttttppppppppppppptttttttttttttttq)))y. ", -" =))''sttttppppppppppppptttttttttttttttq)))z ", -" .!'''ABBBBCCCCCCCCCCCCCBBBBBBBBBBBBBBBD)))E ", -" ~''''))))'''''''''''''))))))))))))))))))e+ ", -" {('))))))'''''''''''''))))))))))))))))))F. ", -" ._'''))))'''''''''''''))))))))))))))))))G ", -" :'''))))''''''''''''')))))))))))))))))6H ", -" .}))))))''''''''''''')))))))))))))))))< ", -" +2'))))'''''''''''''))))))))))))))))I. ", -" .3)))))''''''''''''')))))))))))))))Ji ", -" 47))))'''''''''''''))))))))))))))KL ", -" 8a)))'''''''''''''))))))))))))))M. ", -" bc))'''''''''''''))))))))))))KM. ", -" 4de''''''''''''')))))))))))JL. ", -" .f,''''''''''''))))))))))Ii ", -" g%h''''''''''))))))))6<. ", -" .ijk'''''''')))))eFGH ", -" .lmruv''''))yzE+. ", -" ..gwwwx... ", " ", -" "}; +" ", +" ", +" ..... ", +" ............. ", +" ................. ", +" ................... ", +" ....................... ", +" ......................... ", +" ........................... ", +" ...........................X ", +" .............................X ", +" ............................... ", +" ...............................X ", +" .................................X ", +" .................................X ", +" .................................XX ", +" ...ooooooooooooooooooooooooooo...XX ", +" ....ooooooooooooooooooooooooooo....X ", +" ....ooooooooooooooooooooooooooo....X ", +" ....ooooooooooooooooooooooooooo....XX ", +" ....ooooooooooooooooooooooooooo....XX ", +" ....ooooooooooooooooooooooooooo....XX ", +" ...ooooooooooooooooooooooooooo...XXX ", +" ...ooooooooooooooooooooooooooo...XXX ", +" .................................XX ", +" .................................XX ", +" ...............................XXX ", +" ...............................XXX ", +" .............................XXX ", +" ...........................XXXX ", +" ...........................XXX ", +" .........................XXX ", +" .......................XXXX ", +" X...................XXXXX ", +" X.................XXXXX ", +" X.............XXXXX ", +" XXXX.....XXXXXXXX ", +" XXXXXXXXXXXXX ", +" XXXXX ", +" ", +" ", +" ", +" ", +" ", +" " +}; diff --git a/art/motif/info.xpm b/art/motif/info.xpm index 8fb53a9db8..8892f504c1 100644 --- a/art/motif/info.xpm +++ b/art/motif/info.xpm @@ -1,210 +1,63 @@ /* XPM */ -static char * info_xpm[] = { -"48 48 159 2", -" c None", -". c #12165C", -"+ c #9E9EC4", -"@ c #565294", -"# c #2E3274", -"$ c #1A227C", -"% c #16229C", -"& c #262274", -"* c #362E8C", -"= c #262A9C", -"- c #121E7C", -"; c #1A2AAC", -"> c #162284", -", c #262EA4", -"' c #2A2A84", -") c #1E1E6C", -"! c #3E3A84", -"~ c #7A72B4", -"{ c #121E74", -"] c #1E2284", -"^ c #2A2E9C", -"/ c #362E9C", -"( c #D2D2E4", -"_ c #62669C", -": c #1E269C", -"< c #1A2AB4", -"[ c #6A6EAC", -"} c #121A6C", -"| c #2E2A84", -"1 c #26268C", -"2 c #3E328C", -"3 c #322E9C", -"4 c #B6B6CC", -"5 c #1626AC", -"6 c #1E268C", -"7 c #2E267C", -"8 c #363294", -"9 c #1A2694", -"0 c #22226C", -"a c #26267C", -"b c #2E2A9C", -"c c #1A1E7C", -"d c #222A9C", -"e c #162294", -"f c #1E2EBC", -"g c #2A2EAC", -"h c #6A6A9C", -"i c #2E2A94", -"j c #CACADC", -"k c #1A1A64", -"l c #16269C", -"m c #262AAC", -"n c #161E8C", -"o c #464294", -"p c #8286C4", -"q c #1A1E64", -"r c #222AB4", -"s c #6A6EB4", -"t c #1A1A6C", -"u c #BABAD4", -"v c #1E2694", -"w c #121A64", -"x c #2E2E94", -"y c #3A2E8C", -"z c #2A2A9C", -"A c #161E7C", -"B c #1A2284", -"C c #262A94", -"D c #2E2E9C", -"E c #36329C", -"F c #FEFEFC", -"G c #666AA4", -"H c #1E2AB4", -"I c #161A6C", -"J c #322A84", -"K c #2A267C", -"L c #262EB4", -"M c #1A269C", -"N c #1E2274", -"O c #1E2AA4", -"P c #221E6C", -"Q c #423E8C", -"R c #222284", -"S c #E6E6EC", -"T c #22269C", -"U c #6E6EA4", -"V c #3232A4", -"W c #BAB6D4", -"X c #1A26AC", -"Y c #222684", -"Z c #3A328C", -"` c #22227C", -" . c #222AAC", -".. c #222EB4", -"+. c #8A86BC", -"@. c #1A1E74", -"#. c #161A5C", -"$. c #322E8C", -"%. c #3A329C", -"&. c #A29ECC", -"*. c #26227C", -"=. c #362E94", -"-. c #262AA4", -";. c #121E84", -">. c #16228C", -",. c #262EAC", -"'. c #2A2A8C", -"). c #1E1E74", -"!. c #7A76B4", -"~. c #161E74", -"{. c #1E228C", -"]. c #2A2EA4", -"^. c #6266A4", -"/. c #1E26A4", -"(. c #1A2ABC", -"_. c #121A74", -":. c #2E2A8C", -"<. c #262694", -"[. c #3E3294", -"}. c #322EA4", -"|. c #B6B6D4", -"1. c #222274", -"2. c #262684", -"3. c #222AA4", -"4. c #1A2294", -"5. c #2E2EAC", -"6. c #6E6AA4", -"7. c #322A94", -"8. c #1626A4", -"9. c #8E8ABC", -"0. c #4A429C", -"a. c #6E6EBC", -"b. c #222694", -"c. c #2A2A94", -"d. c #1A1E6C", -"e. c #BABADC", -"f. c #3A2E94", -"g. c #2A2AA4", -"h. c #161E84", -"i. c #1A228C", -"j. c #2E2EA4", -"k. c #3632A4", -"l. c #666AAC", -"m. c #1E2ABC", -"n. c #161A74", -"o. c #322A8C", -"p. c #2A2684", -"q. c #1A26A4", -"r. c #1E227C", -"s. c #1E2AAC", -"t. c #423E94", -"u. c #E6E6F4", -"v. c #6E6EAC", -"w. c #1A26B4", -"x. c #22268C", -"y. c #3A3294", -"z. c #222EBC", -"A. c #161A64", -"B. c #322E94", -" ", -" ", -" ", -" ", -" 7 7 7 7 7 7 7 7 & ", -" 2 2 2 2 2 2 y y y f.f.[.y 7 *. ", -" J y 2 2 2 2 2 [.[.[.[.y.=.=.f.=./ B.p. ", -" 2 2 2 2 [.2 [.[.f.y y y * * =.=.B./ B.3 o.*.*. ", -" y 2 2 [.2 [.2 2 y [.[.f.f.o.* $.$.B.B.7.D 3 D }.D ", -" 2 2 [.[.2 [.2 [.f.[.y ~ ( F F W 0.$.:.i x 7.3 D D <.R ", -" y 2 [.[.[.2 [.2 2 y y ~ F F F F F u.o :.:.c.c.b b D }.}.g. ", -" 2 [.[.2 [.2 [.2 [.y 2 Z ( F F F F F F +.7 '.:.:.i D b ].].z R ", -" y 2 2 [.[.[.[.[.2 f.y y y F F F F F F F |.p.p.'.'.<.z z g.].].5.m ", -" 2 2 [.t.[.[.2 2 2 f.2 f.* * u.F F F F F F + *.2.2.C '.c.z ^ ].g m = n ", -" y 2 [.2 [.[.[.[.2 f.2 f.* * &.F F F F F F @ a *.2.2.C C z = g.].,.g. . ", -" 2 2 [.[.[.[.[.2 [.[.[.f.* o.J $.u F F F u.U 1.0 Y *.2.1 <.C ^ -.m g.L = n ", -" 2 2 2 [.2 t.[.[.f.[.Z y.* $.J 7 | Q U 6.P 1.P P ` ` 2.1 <.= = , ,.,.m m . ", -" 2 [.[.[.[.[.[.2 f.2 f.f.* =.o.:.| K & & 0 0 P N 1.1.` R 2.d <.= -.-.m ..../.n ", -" 2 2 [.2 [.2 [.[.[.[.y.=.=.* o.:.p.K ! 6.h 4 4 ) ) ).r.6 Y b.= = , ,.,.m ..r r ", -" [.2 t.[.[.[.[.[.f.y.8 y.* B.9.W S F F F F F F ) ) N 1.R R x.b.= 3.m m ..m ..s. ", -" 7 [.2 [.2 [.[.[.[.[.f.=.=.=.o.e.F F F F F F F F ) ) ).N R x.b.T 3.3. .m ..r H m.H ", -" 2 [.[.[.[.[.[.[.[.f.%.=.=.$.B.:.o W F F F F F F k q N r.] R b.d T , . .r ....s.n ", -" y 2 2 [.[.[.[.[.%.f.%.=.=.B.$.:.'.v.F F F F F F t k ) N ] 6 x.d T 3... .H r H m.< ", -" 2 [.[.[.[.[.[.%.y.%.=.E / 7.7.p.p.v.F F F F F F q d.t @.r.R v T O . .....f r X n ", -" y 2 2 [.[.[.[.%.=.%.=.B.B.x B.:.| v.F F F F F F k d.d.c $ {.6 T d O .r r f f m.(. ", -" 2 [.[.[.[.[.%.%.%./ E / 3 7.i '.2.v.F F F F F F A.A.t @.r.] b.: /. .s.H H H m.5 ;. ", -" J 2 [.[.[.[.f.%.8 / E 8 3 i i :.p.v.F F F F F F k A.d.~.$ B 6 : : /.s.H m.m.f (.(. ", -" [.[.[.%.[.%.%./ f.E / 3 3 B.i p.1 v.F F F F F F . A.I @.c {.{.: O s. .H H m.(.w.;. ", -" 7 [.[.%.f.%.%.E / V =.3 D D ^ '.1 v.F F F F F F #.A.I @.A i.9 : O s.s.H f m.(.(.w. ", -" [.[.[.[.%.%.E E E / 3 3 7.i i c.2.v.F F F F F F . . A.~.c B {.M /.X H H (.(.(.w.;. ", -" [.%.%./ %.f./ V 3 3 D D c.c.<.Y v.F F F F F F #.A.A.~.A B 4.9 /.X ; < f f (.(. ", -" %.f.E %./ k.k./ V }.}.D D c.'.1 [ F F F F F F . . } I c >.i.M q.; H < (.(.(.5 ", -" J f.k.E E E / / 3 V 3 D b z 1 x.v.F F F F F F #.. A.} c B 4.M /.X < (.(.(.(.(. ", -" %.%.%.E / V }.V D j.z z c.C 1 [ F F F F F F . A.} ~.A h.4.4.q.; w.(.(.(.5 ", -" 7 k./ V / V D }.j.j.^ z z <.x.[ F F F F F F . . . _.A h.4.% q.; 5 w.w.(.(. ", -" / k./ V }.}.j.j.j.b z C C R l.F F F F F F . } I ~.A >.e M 5 5 (.(.(.5 ", -" 7 V 3 V V V }.j.].].g.= C <.s F F F F F F # w } n.A >.e 4.X 5 < (.w.(. ", -" / k.}.}.j.j.j.j.g.z = a.p u.F F F F F F j _ _ - - n e 8.5 5 w.w.5 ", -" V V j.j.j.].].].z = F F F F F F F F F F F F n.;.n e % X 5 (.(. ", -" j.V j.j.j.].-.-.<.a.a.s [ l.G G _ _ _ ^.^.- h.e % 8.5 < 5 ", -" 5.].g j.]., , d T b.{.{.c A ~._.} } _.n.;.;.e % % 5 5 ", -" 5.j.].g g.-.-.d : v i.> A A ~._.- - - >.e e % 5 % ", -" g g.g -., 3.d : v v i.B h.A n.h.;.;.;.n % 8.% ", -" -.,. .-.3.T : 4.{.>.>.>.>.;.>.n % % % ", -" 3.-.3.3.O M 4.4.i.n e n e e e ", -" : : : /.4.% e n ;. ", -" ", -" "}; +static char *info_xpm[] = { +/* columns rows colors chars-per-pixel */ +"48 48 9 1", +"$ c Black", +"O c #FFFFFF", +"@ c #808080", +"+ c #000080", +"o c #E8EB01", +" c None", +"X c #FFFF40", +"# c #C0C0C0", +". c #ABAD01", +/* pixels */ +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ..... ", +" ..XXXXX.. ", +" ..XXXXXXXXo.. ", +" .XXXOXXXXXXXoo. ", +" .XOOXXX+XXXXXo. ", +" .XOOOXX+++XXXXoo. ", +" .XOOXXX+++XXXXXo. ", +" .XOOOXXX+++XXXXXXo. ", +" .XOOXXXX+++XXXXXXo. ", +" .XXXXXXX+++XXXXXXX. ", +" .XXXXXXX+++XXXXXXo. ", +" .XXXXXXX+++XXXXXoo. ", +" .XXXXXX+++XXXXXo. ", +" .XXXXXXX+XXXXXXo. ", +" .XXXXXXXXXXXXo. ", +" .XXXXX+++XXXoo. ", +" .XXXX+++XXoo. ", +" .XXXXXXXXo. ", +" ..XXXXXXo.. ", +" .XXXXXo.. ", +" @#######@ ", +" @@@@@@@@@ ", +" @#######@ ", +" @@@@@@@@@ ", +" @#######@ ", +" @@@@@@@ ", +" ### ", +" $$$ ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" " +}; diff --git a/art/motif/question.xpm b/art/motif/question.xpm index da37081123..8b3cb01ef5 100644 --- a/art/motif/question.xpm +++ b/art/motif/question.xpm @@ -1,216 +1,75 @@ /* XPM */ -static char * question_xpm[] = { -"48 48 165 2", -" c None", -". c #000000", -"+ c #080808", -"@ c #2A2A2A", -"# c #434343", -"$ c #545454", -"% c #626262", -"& c #6A6A6A", -"* c #6E6E6E", -"= c #424242", -"- c #525252", -"; c #898989", -"> c #DCDCDC", -", c #E5E5E5", -"' c #EDEDED", -") c #F4F4F4", -"! c #F9F9F9", -"~ c #FCFCFC", -"{ c #FFFFFF", -"] c #888888", -"^ c #4F4F4F", -"/ c #050505", -"( c #0F0F0F", -"_ c #9C9C9C", -": c #E6E6E6", -"< c #9B9B9B", -"[ c #1F1F1F", -"} c #A1A1A1", -"| c #E3E3E3", -"1 c #4D4D4D", -"2 c #D6D6D6", -"3 c #ECECEC", -"4 c #D9D9D9", -"5 c #C6C6C6", -"6 c #B0B0B0", -"7 c #848484", -"8 c #D3D3D3", -"9 c #010101", -"0 c #8B8B8B", -"a c #F2F2F2", -"b c #F3F3F3", -"c c #A6A6A6", -"d c #5E5E5E", -"e c #2F2F2F", -"f c #272727", -"g c #202020", -"h c #4E4E4E", -"i c #8A8A8A", -"j c #0B0B0B", -"k c #B6B6B6", -"l c #5D5D5D", -"m c #131313", -"n c #9A9A9A", -"o c #C9C9C9", -"p c #878787", -"q c #0A0A0A", -"r c #373737", -"s c #DADADA", -"t c #B4B4B4", -"u c #B1B1B1", -"v c #030303", -"w c #767676", -"x c #FDFDFD", -"y c #FAFAFA", -"z c #383838", -"A c #F8F8F8", -"B c #AFAFAF", -"C c #070707", -"D c #818181", -"E c #555555", -"F c #BDBDBD", -"G c #7D7D7D", -"H c #3C3C3C", -"I c #F6F6F6", -"J c #535353", -"K c #242424", -"L c #ABABAB", -"M c #393939", -"N c #BBBBBB", -"O c #EAEAEA", -"P c #A3A3A3", -"Q c #4B4B4B", -"R c #616161", -"S c #CFCFCF", -"T c #060606", -"U c #EFEFEF", -"V c #B9B9B9", -"W c #303030", -"X c #161616", -"Y c #2C2C2C", -"Z c #C0C0C0", -"` c #2E2E2E", -" . c #858585", -".. c #E4E4E4", -"+. c #1C1C1C", -"@. c #D4D4D4", -"#. c #828282", -"$. c #C7C7C7", -"%. c #3A3A3A", -"&. c #090909", -"*. c #151515", -"=. c #8E8E8E", -"-. c #F7F7F7", -";. c #C4C4C4", -">. c #EBEBEB", -",. c #CECECE", -"'. c #3D3D3D", -"). c #676767", -"!. c #F1F1F1", -"~. c #FBFBFB", -"{. c #353535", -"]. c #212121", -"^. c #EEEEEE", -"/. c #444444", -"(. c #DEDEDE", -"_. c #020202", -":. c #6B6B6B", -"<. c #E1E1E1", -"[. c #575757", -"}. c #111111", -"|. c #939393", -"1. c #ADADAD", -"2. c #6C6C6C", -"3. c #929292", -"4. c #4A4A4A", -"5. c #1E1E1E", -"6. c #3B3B3B", -"7. c #A0A0A0", -"8. c #696969", -"9. c #FEFEFE", -"0. c #CBCBCB", -"a. c #F0F0F0", -"b. c #0E0E0E", -"c. c #DFDFDF", -"d. c #808080", -"e. c #D0D0D0", -"f. c #636363", -"g. c #323232", -"h. c #D2D2D2", -"i. c #333333", -"j. c #292929", -"k. c #484848", -"l. c #646464", -"m. c #F5F5F5", -"n. c #B2B2B2", -"o. c #494949", -"p. c #E2E2E2", -"q. c #3F3F3F", -"r. c #0D0D0D", -"s. c #E0E0E0", -"t. c #2D2D2D", -"u. c #3E3E3E", -"v. c #C8C8C8", -"w. c #D1D1D1", -"x. c #7C7C7C", -"y. c #141414", -"z. c #A4A4A4", -"A. c #C2C2C2", -"B. c #262626", -"C. c #191919", -"D. c #999999", -"E. c #0C0C0C", -"F. c #101010", -"G. c #787878", -"H. c #797979", -" ", -" ", -" ", -" ", -" ", -" ", -" . . . . . . . . . . . . . . . . ", -" . . . . + @ # $ % & * * & % $ = @ + . . . . ", -" . . . . - ; > , ' ) ! ~ { { ~ ! ) ' , > ] ^ . . . . ", -" . . / ( _ : { { { { { { { { { { { { { { { { { { : < ( / . . ", -" . . [ } | { { { { { { { { { { { { { { { { { { { { { { | } [ . . ", -" . . 1 2 { { { { { { { { 3 4 5 6 7 7 7 < 5 8 : ! { { { { { { 2 1 . . . ", -" . . 9 0 a { { { { { { { b c d e 9 9 9 f 9 9 9 g h i 4 { { { { { { a ; 9 . . ", -" . . j k { { { { { { { { ' l m 9 9 9 9 n o p 9 9 9 9 q r s { { { { { { { t q . . ", -" . . + u { { { { { { { { { # v 9 9 9 9 w x { y z 9 9 9 9 9 @ A { { { { { { { B C . . ", -" . . . D y { { { { { { { { { 9 9 9 9 9 j ' { { { E 9 9 9 9 9 9 F { { { { { { { y G . . . ", -" . . H I { { { { { { { { { { J 9 9 9 9 ^ { { { { K 9 9 9 9 9 9 L { { { { { { { { I M . . . ", -" . . . N { { { { { { { { { { { O P Q Q R S { { { } 9 9 9 9 9 9 T U { { { { { { { { { V . . . ", -" . . W ! { { { { { { { { { { { { { { { { { { A 6 X 9 9 9 9 9 Y Z { { { { { { { { { { ! ` . . ", -" . . .{ { { { { { { { { { { { { { { { { { ..7 ( 9 9 9 9 +.* @.{ { { { { { { { { { { { #.. . . ", -". . . $.{ { { { { { { { { { { { { { { { { < %.&.9 9 9 *.=.5 -.{ { { { { { { { { { { { { ;.. . . ", -". . . >.{ { { { { { { { { { { { { { { ,.'.+ . . . . ).!.~ { { { { { { { { { { { { { { { O . . . ", -". . . ~.{ { { { { { { { { { { { { { O {.. . . . . ].^.{ { { { { { { { { { { { { { { { { ~.. . . ", -". . . A { { { { { { { { { { { { { { k 9 9 9 9 9 9 /.{ { { { { { { { { { { { { { { { { { A . . . ", -". . . (.{ { { { { { { { { { { { { { 5 _.. . . . . q :.4 U U <.{ { { { { { { { { { { { { > . . . ", -". . . 6 { { { { { { { { { { { { { { { [.&.. . . . . . . . }.|.{ { { { { { { { { { { { { 1.. . . ", -". . . 2.{ { { { { { { { { { { { { { { a 3.4.5.9 9 9 5.6.).7.a { { { { { { { { { { { { { 8.. . . ", -" . . ( !.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.<.0.F F F 0.s a.9.9.9.9.9.9.9.9.9.9.9.9.9.9.!.b.. . . ", -" . . . D { { { { { { { { { { { { { { { { { U c.c.c.U { { { { { { { { { { { { { { { { d.. . . ", -" . . . ( 8 { { { { { { { { { { { { { { { e.f.g.g.g.f.;.{ { { { { { { { { { { { { { h.b.. . . ", -" . . . 4.) { { { { { { { { { { { { { ' i.9 9 9 9 9 j.' { { { { { { { { { { { { ) k.. . . ", -" . . . l.m.{ { { { { { { { { { { { n.. . . . . . . n.{ { { { { { { { { { { m.f.. . . . ", -" . . . o.p.{ { { { { { { { { { { F 9 9 9 9 9 9 9 5 { { { { { { { { { { p.k.. . . . ", -" . . . @ 0.{ { { { { { { { { { b q.. . . . . d { { { { { { { { { { b j.. . . . ", -" . . . r.7.{ { { { { { { { { { s.* = t.= < 3 { { { { { { { { { { A e . . . ", -" . . . . u._ >.y { { { { { { { { { { { { { { { { { { { { { { { { a - . . ", -" . . . . . W % v., { { { { { { { { { { { { { { , w.e.>.{ { { { { U x.T ", -" . . . . . y.f D z.A.4 >.-.x x -.>.4 A.z.d.B.C.C.Y i c h.{ { { ) D.. ", -" . . . . . . / &.E.( F.}.}.F.b.E.&./ . . . . . 9 T E.}.] 5 ' ) G.. ", -" . . . . . . . . . . . . . . . . . . . . . . . . . . . . M H.H.. ", -" . . . . . . . . . . . . . . . . . . . . . . . . ", -" . . . . ", -" ", -" ", -" ", -" ", -" ", -" "}; +static char *question_xpm[] = { +/* columns rows colors chars-per-pixel */ +"48 48 21 1", +". c Black", +"> c #696969", +"O c #1F1F00", +"+ c #181818", +"o c #F6F900", +"; c #3F3F00", +"$ c #111111", +" c None", +"& c #202020", +"X c #AAAA00", +"@ c #949400", +": c #303030", +"1 c #383838", +"% c #2A2A00", +", c #404040", +"= c #B4B400", +"- c #484848", +"# c #151500", +"< c #9F9F00", +"2 c #6A6A00", +"* c #353500", +/* pixels */ +" ", +" ", +" ", +" ", +" ......... ", +" ...XXXXXXX.. ", +" ..XXXXoooooXXXO+ ", +" ..XXooooooooooooX@.. ", +" ..XoooooooooooooooXX#. ", +" $%XoooooooooooooooooXX#. ", +" &.XoooooooXXXXXXooooooXX.. ", +" .XooooooXX.$...$XXoooooX*. ", +" $.XoooooX%.$ .*oooooo=.. ", +" .XooooooX.. -.XoooooX.. ", +" .XoooooX..+ .XoooooX;. ", +" ...XXXX..: .XoooooX;. ", +" ........ >.XoooooX;. ", +" +.XoooooX.. ", +" ,.Xoooooo<.. ", +" 1#XooooooXO.. ", +" &#XooooooX2.. ", +" $%XooooooXX.. ", +" $%XooooooXX.. ", +" $%XooooooXX.. ", +" &.XooooooXX.. ", +" .XooooooXX.. ", +" &.XoooooXX.. ", +" ..XooooXX.. ", +" ..XooooX... ", +" ..XXooXX..& ", +" ...XXXXX.. ", +" ........ ", +" ", +" ", +" ....... ", +" ..XXXXX.. ", +" ..XXoooXX.. ", +" ..XoooooX.. ", +" ..XoooooX.. ", +" ..XXoooXX.. ", +" ..XXXXX.. ", +" ....... ", +" ", +" ", +" ", +" ", +" ", +" " +}; diff --git a/art/motif/warning.xpm b/art/motif/warning.xpm index f030fa3313..92b7a70860 100644 --- a/art/motif/warning.xpm +++ b/art/motif/warning.xpm @@ -1,202 +1,63 @@ /* XPM */ -static char * warning_xpm[] = { -"48 48 151 2", -" c None", -". c #C70707", -"+ c #F80808", -"@ c #EA0808", -"# c #A50505", -"$ c #E10808", -"% c #F70808", -"& c #E85959", -"* c #F80909", -"= c #F90909", -"- c #CD0707", -"; c #EE0808", -"> c #F12B2B", -", c #F5F4F4", -"' c #DE5F5F", -") c #AE0606", -"! c #D2ACAC", -"~ c #FEFEFE", -"{ c #E5DFDF", -"] c #F91717", -"^ c #E30808", -"/ c #DC4C4C", -"( c #FCFCFC", -"_ c #D68585", -": c #DB0707", -"< c #F80C0C", -"[ c #DECDCD", -"} c #F6F5F5", -"| c #ED2B2B", -"1 c #F50808", -"2 c #D66D6D", -"3 c #FFFFFF", -"4 c #D2A9A9", -"5 c #BB0606", -"6 c #E70808", -"7 c #F11A1A", -"8 c #EDE9E9", -"9 c #E84646", -"0 c #D59696", -"a c #DDCCCC", -"b c #F90E0E", -"c c #CE0707", -"d c #EA3030", -"e c #F8F8F8", -"f c #383838", -"g c #000000", -"h c #555555", -"i c #DE6D6D", -"j c #B20606", -"k c #DAB9B9", -"l c #A9A9A9", -"m c #AAAAAA", -"n c #EAE6E6", -"o c #F81919", -"p c #F30808", -"q c #E05252", -"r c #D58D8D", -"s c #E00808", -"t c #F81111", -"u c #E1D5D5", -"v c #C6C6C6", -"w c #C7C7C7", -"x c #F22F2F", -"y c #CF7979", -"z c #D4B4B4", -"A c #F90A0A", -"B c #C60707", -"C c #EF0808", -"D c #EF2222", -"E c #EEEBEB", -"F c #E14E4E", -"G c #D69E9E", -"H c #E0D2D2", -"I c #F91111", -"J c #D40707", -"K c #E93A3A", -"L c #545454", -"M c #D97373", -"N c #C80707", -"O c #F80A0A", -"P c #DAC3C3", -"Q c #717171", -"R c #727272", -"S c #EFEDED", -"T c #F91F1F", -"U c #E45757", -"V c #CE9999", -"W c #E40808", -"X c #F81313", -"Y c #E3DADA", -"Z c #F9F9F9", -"` c #F13737", -" . c #F60808", -".. c #D37979", -"+. c #D8BDBD", -"@. c #F90B0B", -"#. c #C90707", -"$. c #F12424", -"%. c #F0EFEF", -"&. c #DB5656", -"*. c #D39F9F", -"=. c #1C1C1C", -"-. c #E7E0E0", -";. c #D50707", -">. c #F40808", -",. c #E93F3F", -"'. c #FBFBFB", -"). c #D77575", -"!. c #F90C0C", -"~. c #D9C5C5", -"{. c #F1EEEE", -"]. c #F42121", -"^. c #E60808", -"/. c #F90808", -"(. c #DC5F5F", -"_. c #E2E2E2", -":. c #D19D9D", -"<. c #F91616", -"[. c #E9E3E3", -"}. c #FAFAFA", -"|. c #E33D3D", -"1. c #D58383", -"2. c #8D8D8D", -"3. c #E3E3E3", -"4. c #D9C0C0", -"5. c #F70909", -"6. c #F02C2C", -"7. c #DA5D5D", -"8. c #BC0606", -"9. c #D0A9A9", -"0. c #E8DFDF", -"a. c #F51414", -"b. c #DF0808", -"c. c #E34646", -"d. c #FDFDFD", -"e. c #393939", -"f. c #D57E7E", -"g. c #F80B0B", -"h. c #DDCDCD", -"i. c #F4F3F3", -"j. c #F12626", -"k. c #ED0808", -"l. c #E35D5D", -"m. c #EBE9E9", -"n. c #ECEAEA", -"o. c #D99292", -"p. c #A10505", -"q. c #F80E0E", -"r. c #F80D0D", -"s. c #F90F0F", -"t. c #F20808", -" ", -" ", -" ", -" ", -" ", -" ", -" . + @ ", -" + + + # ", -" $ + + + % ", -" + % & * = - ", -" ; % > , ' = = ", -" ) + + ! ~ { ] = ^ ", -" + + / ( ~ ~ _ * = ", -" : + < [ ~ ~ ~ } | = 1 ", -" + % 2 ~ ~ ~ ~ 3 4 = = 5 ", -" 6 + 7 8 ~ ~ ~ ~ 3 3 9 = = ", -" + % 0 ~ ~ ~ ~ ~ 3 3 a b = c ", -" % % d e ~ f g g g h 3 3 i = = ", -" j + * k ~ l g g g g g m 3 n o = p ", -" + + q ~ ~ l g g g g g m 3 3 r = = ", -" s + t u ~ ~ v g g g g g w 3 3 e x = = ", -" + + y ~ ~ ~ ~ g g g g g 3 3 3 3 z A = B ", -" C + D E ~ ~ ~ ~ g g g g g 3 3 3 3 ~ F = % ", -" + % G ~ ~ ~ ~ ~ f g g g h 3 3 3 3 3 H I = J ", -" + % K ( ~ ~ ~ ~ ~ L g g g h 3 3 3 3 3 3 M = = ", -" N + O P ~ ~ ~ ~ ~ ~ Q g g g R 3 3 3 3 3 3 S T = @ ", -" = % U ~ ~ ~ ~ ~ ~ ~ l g g g m 3 3 3 3 3 3 3 V * = ", -" W = X Y ~ ~ ~ ~ ~ ~ ~ l g g g m 3 3 3 3 3 3 3 Z ` = . ", -" = = ..~ ~ ~ ~ ~ ~ ~ ~ ~ g g g 3 3 3 3 3 3 3 3 3 +.@.= #. ", -" .= $.%.~ ~ ~ ~ ~ ~ ~ ~ ~ g g g 3 3 3 3 3 3 3 3 3 3 &.= = ", -" = * *.~ ~ ~ ~ ~ ~ ~ ~ ~ ~ =.g f 3 3 3 3 3 3 3 3 3 3 -.I = ;. ", -" >.= ,.'.~ ~ ~ ~ ~ ~ ~ ~ ~ ~ L g L 3 3 3 3 3 3 3 3 3 3 3 ).= = ", -" N = !.~.3 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ v l v 3 3 3 3 3 3 3 3 3 3 3 {.].= ^. ", -" /.= (.3 3 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ v l _.3 3 3 3 3 3 3 3 3 3 3 3 :.= = ", -" : + <.[.3 3 ~ ~ ~ ~ ~ ~ ~ ~ ~ L g g g m 3 3 3 3 3 3 3 3 3 3 3 }.|.= = ", -" = + 1.3 3 3 ~ ~ ~ ~ ~ ~ ~ ~ 2.g g g g g 3.3 3 3 3 3 3 3 3 3 3 3 4.A = - ", -" p 5.6.} 3 3 3 ~ ~ ~ ~ ~ ~ ~ ~ L g g g g g m 3 3 3 3 3 3 3 3 3 3 3 3 7.= = ", -" 8.+ * 9.3 3 3 3 ~ ~ ~ ~ ~ ~ ~ ~ Q g g g g g w 3 3 3 3 3 3 3 3 3 3 3 3 0.a.= b. ", -" % % c.d.3 3 3 3 ~ ~ ~ ~ ~ ~ ~ ~ _.=.g g g e.3 3 3 3 3 3 3 3 3 3 3 3 3 3 f.= = ", -" - * g.h.~ 3 3 3 3 ~ ~ ~ ~ ~ ~ ~ ~ ~ _.Q L Q 3.3 3 3 3 3 3 3 3 3 3 3 3 3 3 i.j.= k. ", -" = = l.m.m.n.n.n.n.m.m.m.m.m.m.m.m.m.m.m.m.m.n.n.n.n.n.n.n.n.n.n.n.n.n.n.n.n.o.* = p. ", -" ^.* + g.q.r.b s.b s.r.< r.< r.r.< r.< r.< r.r.b s.b s.s.b s.b s.s.b s.b s.s.b b A = = ", -" t.= * + * + = = = = + + + + + + + + + + + + + = = = = = = = = = = = = = = = = = = = = ", -" ", -" ", -" ", -" ", -" "}; +static char *warning_xpm[] = { +/* columns rows colors chars-per-pixel */ +"48 48 9 1", +"@ c Black", +"o c #A6A800", +"+ c #8A8C00", +"$ c #B8BA00", +" c None", +"O c #6E7000", +"X c #DCDF00", +". c #C00000", +"# c #373800", +/* pixels */ +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" . ", +" ... ", +" ... ", +" ..... ", +" ...X.. ", +" ..XXX.. ", +" ...XXX... ", +" ..XXXXX.. ", +" ..XXXXXX... ", +" ...XXoO+XX.. ", +" ..XXXO@#XXX.. ", +" ..XXXXO@#XXX... ", +" ...XXXXO@#XXXX.. ", +" ..XXXXXO@#XXXX... ", +" ...XXXXXo@OXXXXX.. ", +" ...XXXXXXo@OXXXXXX.. ", +" ..XXXXXXX$@OXXXXXX... ", +" ...XXXXXXXX@XXXXXXXX.. ", +" ...XXXXXXXXXXXXXXXXXX... ", +" ..XXXXXXXXXXOXXXXXXXXX.. ", +" ...XXXXXXXXXO@#XXXXXXXXX.. ", +" ..XXXXXXXXXXX#XXXXXXXXXX... ", +" ...XXXXXXXXXXXXXXXXXXXXXXX.. ", +" ...XXXXXXXXXXXXXXXXXXXXXXXX... ", +" .............................. ", +" .............................. ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" " +}; diff --git a/art/new_dir.xpm b/art/new_dir.xpm index 86a1085e53..71b404f1cf 100644 --- a/art/new_dir.xpm +++ b/art/new_dir.xpm @@ -1,42 +1,162 @@ /* XPM */ static char *new_dir_xpm[] = { /* columns rows colors chars-per-pixel */ -"20 20 16 1", -" c Gray0", -". c #800000", -"X c #008000", -"o c #808000", -"O c #000080", -"+ c #800080", -"@ c #008080", -"# c None", -"$ c #808080", -"% c Red", -"& c Green", -"* c Yellow", -"= c Blue", -"- c Magenta", -"; c Cyan", -": c Gray100", +"20 20 136 2", +"5. c #305EAA", +"q. c #305EAB", +"e. c #3562AD", +"; c #4471BA", +"3 c #A0B9E2", +",. c #AAC1E8", +"L c #B4C9EB", +"=. c #6C94D7", +"T c #5377B4", +"3. c #CDDAF2", +"&. c #5684D1", +"M c #3D67AE", +" . c #608CD4", +"1. c #BCCEED", +"i c #C6D6F0", +"* c #7997CB", +"%. c #4A7CCE", +"h. c #3663AF", +"J c #A1BAE5", +": c #4572BE", +"O. c #ABC2E8", +"<. c #B0C6EA", +"W c #B5CAEB", +"#. c #4F74B3", +"E c #6D95D7", +"D c #5478B4", +") c #779DDB", +"@ c #5E80B9", +"9 c #CEDBF0", +"p c #CEDBF2", +"a c #D8E3F5", +"| c #5785D1", +"R c #3964AD", +"u. c #3E68AF", +"p. c #436CB1", +"& c #5C86CC", +"N c #84A6DE", +"U c #E0E8F7", +"w. c #3260AC", +"Y c #EAF0FA", +"b c #EFF4FB", +"k c #A2BBE5", +"r c #A2BBE6", +"+. c #B1C7EA", +"` c #ACC3E9", +"y c #B6CBEC", +"$ c #6E96D8", +"x c #CFDCF2", +":. c #8CABE0", +"o. c #96B3E3", +"- c #4470B9", +"# c #3A65AD", +"d. c #4971B2", +"5 c #AFC4E7", +"Z c #BED0EE", +"v c #EBF1FA", +"c c #E6EDF9", +"C c #A3BCE6", +"9. c #4C72B2", +"{ c #5176B3", +"X c #FFFF00", +"! c #C6D5EF", +"X. c #8DACE0", +"V c #97B4E3", +" c None", +"O c #3B66AE", +"-. c #779CDA", +";. c #81A4DD", +"S c #E7EEF9", +". c #3969B7", +"2 c #95B1DF", +"o c #2F5BA5", +"7. c #618CD4", +"4. c #4D73B2", +"s. c #486FB2", +".. c #6B94D7", +"7 c #BDCEEC", +"I c #D6E2F5", +"_ c #84A5DE", +"B c #8EADE1", +"$. c #325FAB", +"r. c #3763AD", +"n c #F4F7FC", +"i. c #416BB0", +"y. c #3C67AF", +"f c #F9FBFE", +"@. c #BBCEED", +"z c #B6CAEC", +", c #698ECA", +"m c #5578B5", +"F c #789DDB", +"< c #789AD3", +"6. c #3F74CB", +">. c #A0BAE5", +"K c #AAC2E8", +"+ c #3A64AC", +"( c #628DD4", +"g. c #4E74B3", +"% c #6C95D7", +"A c #C8D7F0", +"0 c #D2DFF2", +"P c #CDDBF2", +"~ c #D7E3F5", +"j c #8FAEE1", +"d c #EBF0FA", +"4 c #A8BFE5", +"l c #ADC3E9", +"' c #B2C7EB", +"Q c #BCCFED", +"g c #5679B5", +"[ c #DFE8F7", +"> c #4573BE", +"= c #315DA7", +"h c #4069AF", +"a. c #456DB1", +"u c #BFD0EE", +"] c #CEDCF2", +"8. c #81A3DD", +"} c #3461AC", +"t. c #3965AE", +"t c #AEC4E9", +"q c #5276B4", +"^ c #E5EDF8", +"s c #E0E9F7", +"0. c #2D5AA4", +"e c #98B4E3", +"/ c #3762AC", +"1 c #416AAE", +"*. c #5F8BD3", +"w c #416AAF", +"f. c #4B72B3", +"6 c #B6C9E9", +"8 c #C5D5EE", +"2. c #C5D5EF", +"G c #82A4DD", +"H c #8CACE0", /* pixels */ -"####################", -"####################", -"############# ######", -"####################", -"############# ######", -"########## ##### ###", -"##### ## # # ####", -"#### *:*: ## # #####", -"### ## # ##", -"### :*:*:*:*: #####", -"### *:*:*:*:* # ####", -"### :*:*:*:*: ## ###", -"### *:*:*:*:* ######", -"### :*:*:*:*: ######", -"### *:*:*:*:* ######", -"### ######", -"####################", -"####################", -"####################", -"####################" +" ", +" . X ", +" X . X . X . ", +" o O O O + @ . . X X X . ", +" # $ $ $ % & * X X X X X X X ", +" = - ; ; : > . , < . . X X X . . ", +" 1 2 3 4 5 6 7 8 9 0 X . X . X q ", +" w e r t y u i p a s . d X . f g ", +" h j e k l z u i x a s c v b n m ", +" M N B V C l z Z A x a s S v b D ", +" O F G H V J K L Z i P I U c Y T ", +" R E F G B V J K W Q ! P ~ U ^ q ", +" / ( % ) _ B V J ` ' Q i ] ~ [ { ", +" } | ...F G X.o.J O.+.@.i P I #. ", +" $.%.&.*.=.-.;.:.o.>.,.<.1.2.3.4. ", +" 5.6.%.&.7...-.8.X.o.>.,.+.@.2.9. ", +" 0.q.w.e.r.t.y.u.i.p.a.s.d.f.g.h. ", +" ", +" ", +" " }; diff --git a/art/print.xpm b/art/print.xpm index 3c2e2be781..a090f99931 100644 --- a/art/print.xpm +++ b/art/print.xpm @@ -1,26 +1,60 @@ /* XPM */ static char *print_xpm[] = { /* columns rows colors chars-per-pixel */ -"16 15 5 1", +"16 15 39 1", +"< c #E3E4E6", +"+ c #C3C3C4", +"i c #FFFFFF", +": c #74879B", +"# c #5A89A6", +"a c #F1F4F7", +"r c #5A809C", +"@ c #BDCCD9", +"e c #7A92A4", +"% c #3F6F93", +"t c #9FA2A6", +"3 c #939495", +"w c #5F666D", +"9 c #65839E", +"5 c #4A7291", +"$ c #4B7F9E", " c None", -". c Black", -"X c Gray100", -"o c #808000", -"O c Yellow", +"O c #DFE0E2", +"o c #F3F3F3", +"; c #84A5BB", +"& c #467291", +". c #7897AD", +"* c #407598", +"4 c #CFCFD0", +"7 c #6F90A6", +"y c #6A89A2", +"0 c #AAADB2", +"1 c #D2D3D4", +"u c #4F7592", +", c #BCBDBE", +"p c #57778E", +"q c #979BA0", +"2 c #ABABAC", +"- c #E7E7E7", +"= c #D6DEE6", +"> c #9FA0A0", +"8 c #829EB5", +"X c #8FB0C3", +"6 c #5D7C93", /* pixels */ -" ", -" ......... ", -" .XXXXXXXX. ", -" .X.....X. ", -" .XXXXXXXX. ", -" .X.....X.... ", -" .XXXXXXXX. . .", -" .......... . ..", -". . . .", -"............. .", -". ooo . . ", -". OOO ... ", -"............. . ", -" . . . ", -" ........... " +" .XXXXXXXX ", +" .oooooooX ", +" .OOOOOOOX ", +" .+++++++X ", +"@##$%&&&&&%*##@ ", +"$=-;:>,<123$-=$ ", +".44.5678.96$44. ", +"7,,,,,,,,,,,,,7 ", +"900qwwwwwwwe009 ", +"rtt9ryyyyyyuttr ", +"6qq6iiiiiii%qq6 ", +"633paiiiiii%336 ", +"XXX*iiiiiii%XXX ", +" 6iiiiiii% ", +" $XXXXXXX# " }; diff --git a/art/tick.xpm b/art/tick.xpm index 630eaf460f..03e050f047 100644 --- a/art/tick.xpm +++ b/art/tick.xpm @@ -1,32 +1,18 @@ /* XPM */ static char *tick_xpm[] = { /* columns rows colors chars-per-pixel */ -"10 10 16 1", -" c Gray0", -". c #bf0000", -"X c #00bf00", -"o c #bfbf00", -"O c #0000bf", -"+ c #bf00bf", -"@ c #00bfbf", -"# c None", -"$ c #808080", -"% c Red", -"& c Green", -"* c Yellow", -"= c Blue", -"- c Magenta", -"; c Cyan", -": c Gray100", +"10 10 2 1", +". c Gray0", +" c None", /* pixels */ -"##########", -"######## #", -"####### ", -"###### ", -"##### #", -" ## ##", -" ###", -"# ####", -"## #####", -"### ######" +" ", +" ..", +" ...", +" ... ", +".. ... ", +"... ... ", +" ..... ", +" ... ", +" . ", +" ", }; diff --git a/art/tipicon.xpm b/art/tipicon.xpm index e38c899255..687fc6c390 100644 --- a/art/tipicon.xpm +++ b/art/tipicon.xpm @@ -1,45 +1,47 @@ /* XPM */ static char *tipicon_xpm[] = { /* columns rows colors chars-per-pixel */ -"32 32 7 1", -" c Gray0", -". c Cyan", -"X c Yellow", -"o c #808080808080", -"O c #c0c0c0c0c0c0", -"+ c Gray100", -"@ c None", +"32 32 9 1", +"$ c Black", +"O c #FFFFFF", +"@ c #808080", +"+ c #000080", +"o c #E8EB01", +" c None", +"X c #FFFF40", +"# c #C0C0C0", +". c #ABAD01", /* pixels */ -"@@@@@@@@@@@@ @@@@@@@@@@@@@@", -"@@@@@@@@@@ XXXXXX @@@@@@@@@@@@", -"@@@@@@@@@ XXXXXXXXXX @@@@@@@@@@@", -"@@@@@@@@@ XXXXXXXXXX @@@@@@@@@@@", -"@@@@@@@@ XXXXX XXXXX @@@@@@@@@@", -"@@@@@@@ XXXXXX XXXXXX @@@@@@@@@", -"@@@@@@@ XXXXXX XXXXXX @@@@@@@@@", -"@@@@@@@ XXXXXX XXXXXX @@@@@@@@@", -"@@@@@@@ XXXXXX XXXXXX @@@@@@@@@", -"@@@@@@@ XXXXXX XXXXXX @@@@@@@@@", -"@@@@@@@@ XXXXX XXXXX @@@@@@@@@", -"@@@@@@@@oXXXXXXXXXXXX @@@@@@@@@@", -"@@@@@@@o+ XXXX XXXX o@@@@@@@@@@", -"@@@@@@o++ XXXX XXXX +o@@@@@@@@@", -"@@@@@o++++ XXX XXX +++o@@@@@@@@", -"@@@@o++.+.+ XXXXXX .+..+o@@@@@@@", -"@@@o++++++++ XXXX +++++++o@@@@@@", -"@@ +..+.+.+. oooo +.+..+.+ @@@@@", -"@@@ ++++++++ OOOO +++++++ @@@@@@", -"@@@@ ++.+.+. oooo +.+..+ @@@@@@@", -"@@@oo ++++++ OO +++++ oo@@@@@@", -"@@@ooo ++.+.+ ++.++ ooo@@@@@@", -"@@@@ooo +.+.+ ++.+ ooo@@@@@@@", -"@@@@@ooo +++++++++++ ooo@@@@@@@@", -"@@@@@@ooo +.+.+.+.+ ooo@@@@@@@@@", -"@@@@@@@ooo +++++++ ooo@@@@@@@@@@", -"@@@@@@@@ooo +.+.+ ooo@@@@@@@@@@@", -"@@@@@@@@@ooo +++ ooo@@@@@@@@@@@@", -"@@@@@@@@@@ooo + ooo@@@@@@@@@@@@@", -"@@@@@@@@@@@ooo ooo@@@@@@@@@@@@@@", -"@@@@@@@@@@@@ooooo@@@@@@@@@@@@@@@", -"@@@@@@@@@@@@@ooo@@@@@@@@@@@@@@@@" +" ", +" ..... ", +" ..XXXXX.. ", +" ..XXXXXXXXo.. ", +" .XXXOXXXXXXXoo. ", +" .XOOXXX+XXXXXo. ", +" .XOOOXX+++XXXXoo. ", +" .XOOXXX+++XXXXXo. ", +" .XOOOXXX+++XXXXXXo. ", +" .XOOXXXX+++XXXXXXo. ", +" .XXXXXXX+++XXXXXXX. ", +" .XXXXXXX+++XXXXXXo. ", +" .XXXXXXX+++XXXXXoo. ", +" .XXXXXX+++XXXXXo. ", +" .XXXXXXX+XXXXXXo. ", +" .XXXXXXXXXXXXo. ", +" .XXXXX+++XXXoo. ", +" .XXXX+++XXoo. ", +" .XXXXXXXXo. ", +" ..XXXXXXo.. ", +" .XXXXXo.. ", +" @#######@ ", +" @@@@@@@@@ ", +" @#######@ ", +" @@@@@@@@@ ", +" @#######@ ", +" @@@@@@@ ", +" ### ", +" $$$ ", +" ", +" ", +" " }; diff --git a/art/toparent.xpm b/art/toparent.xpm index 04e996dfd5..c6cdf67a5c 100644 --- a/art/toparent.xpm +++ b/art/toparent.xpm @@ -1,24 +1,21 @@ -/* XPM */ -static char * toparent_xpm[] = { -"16 16 5 1", -" c None", -". c #000000", -"+ c #C0E4CB", -"@ c #808080", -"# c #77C490", -" ", -" ", -" . ", -" .+.@ ", -" .+++.@ ", -" .++##+.@ ", -" .++####+.@ ", -" ....+##....@ ", -" .+##.@@@@@ ", -" .+##...... ", -" .+#######.@ ", -" .+#######.@ ", -" .+#######.@ ", -" ..........@ ", -" ", -" "}; +/* XPM */ +static char * toparent_xpm[] = { +"16 15 3 1", +" c None", +". c Black", +"X c Gray100", +" ", +" .. ", +" .XX. ", +" .XXXX. ", +" .XXXXXX. ", +" .XXXXXXXX. ", +" ....XXXX.... ", +" .XXXX. ", +" .XXXX..... ", +" .XXXXXXXX. ", +" .XXXXXXXX. ", +" .XXXXXXXX. ", +" .XXXXXXXX. ", +" .......... ", +" "}; diff --git a/art/up.xpm b/art/up.xpm index 5d75546ed5..6ae14f9442 100644 --- a/art/up.xpm +++ b/art/up.xpm @@ -1,24 +1,21 @@ -/* XPM */ -static char * up_xpm[] = { -"16 16 5 1", -" c None", -". c #000000", -"+ c #C0E4CB", -"@ c #808080", -"# c #77C490", -" ", -" . ", -" .+.@ ", -" .+++.@ ", -" .++##+.@ ", -" .++####+.@ ", -" ....+##....@ ", -" .+##.@@@@@ ", -" .+##.@ ", -" .+##.@ ", -" .+##.@ ", -" .+##.@ ", -" .+##.@ ", -" .....@ ", -" ", -" "}; +/* XPM */ +static char * up_xpm[] = { +"16 15 3 1", +" c None", +". c Black", +"X c Gray100", +" ", +" .. ", +" .XX. ", +" .XXXX. ", +" .XXXXXX. ", +" .XXXXXXXX. ", +" ....XXXX.... ", +" .XXXX. ", +" .XXXX. ", +" .XXXX. ", +" .XXXX. ", +" .XXXX. ", +" .XXXX. ", +" ...... ", +" "}; 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..51fab47709 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, 2003 Free Software Foundation, Inc. -timestamp='2001-09-04' +timestamp='2004-03-12' # 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,42 @@ 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 +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +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 ; 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 ;' # 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 +140,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,74 +180,135 @@ 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 ;; + amd64:OpenBSD:*:*) + echo x86_64-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + amiga:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + arc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + cats:OpenBSD:*:*) + echo arm-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 ;; + pegasos: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 ;; + *:ekkoBSD:*:*) + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + exit 0 ;; + macppc:MirBSD:*:*) + echo powerppc-unknown-mirbsd${UNAME_RELEASE} + exit 0 ;; + *:MirBSD:*:*) + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + exit 0 ;; alpha:OSF1:*:*) - if test $UNAME_RELEASE = "V4.0"; then + case $UNAME_RELEASE in + *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - fi + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE="alpha" ;; + "EV4.5 (21064)") + UNAME_MACHINE="alpha" ;; + "LCA4 (21066/21068)") + UNAME_MACHINE="alpha" ;; + "EV5 (21164)") + UNAME_MACHINE="alphaev5" ;; + "EV5.6 (21164A)") + UNAME_MACHINE="alphaev56" ;; + "EV5.6 (21164PC)") + UNAME_MACHINE="alphapca56" ;; + "EV5.7 (21164PC)") + UNAME_MACHINE="alphapca57" ;; + "EV6 (21264)") + UNAME_MACHINE="alphaev6" ;; + "EV6.7 (21264A)") + UNAME_MACHINE="alphaev67" ;; + "EV6.8CB (21264C)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8AL (21264B)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8CX (21264D)") + UNAME_MACHINE="alphaev68" ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE="alphaev69" ;; + "EV7 (21364)") + UNAME_MACHINE="alphaev7" ;; + "EV7.9 (21364A)") + UNAME_MACHINE="alphaev79" ;; + esac + # A Pn.n version is a patched version. # A Vn.n version is a released version. # 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. - cat <$dummy.s - .data -\$Lformat: - .byte 37,100,45,37,120,10,0 # "%d-%x\n" - - .text - .globl main - .align 4 - .ent main -main: - .frame \$30,16,\$26,0 - ldgp \$29,0(\$27) - .prologue 1 - .long 0x47e03d80 # implver \$0 - lda \$2,-1 - .long 0x47e20c21 # amask \$2,\$1 - lda \$16,\$Lformat - mov \$0,\$17 - not \$1,\$18 - jsr \$26,printf - ldgp \$29,0(\$26) - mov 0,\$16 - jsr \$26,exit - .end main -EOF - eval $set_cc_for_build - $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null - if test "$?" = 0 ; then - case `./$dummy` in - 0-0) - UNAME_MACHINE="alpha" - ;; - 1-0) - UNAME_MACHINE="alphaev5" - ;; - 1-1) - UNAME_MACHINE="alphaev56" - ;; - 1-101) - UNAME_MACHINE="alphapca56" - ;; - 2-303) - UNAME_MACHINE="alphaev6" - ;; - 2-307) - UNAME_MACHINE="alphaev67" - ;; - 2-1307) - UNAME_MACHINE="alphaev68" - ;; - esac - fi - rm -f $dummy.s $dummy - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + exit 0 ;; + Alpha*:OpenVMS:*:*) + echo alpha-hp-vms exit 0 ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? @@ -247,33 +322,18 @@ 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 exit 0 ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; @@ -291,6 +351,13 @@ EOF NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit 0 ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + 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 +386,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 +400,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,17 +426,8 @@ 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} + m68k:machten:*:*) + echo m68k-apple-machten${UNAME_RELEASE} exit 0 ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} @@ -415,15 +467,20 @@ 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'` \ + && exit 0 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 +553,7 @@ 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 && exit 0 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 +562,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 +602,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 +612,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,11 +651,21 @@ 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` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; esac + if [ ${HP_ARCH} = "hppa2.0w" ] + then + # avoid double evaluation of $set_cc_for_build + test -n "$CC_FOR_BUILD" || eval $set_cc_for_build + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null + then + HP_ARCH="hppa2.0w" + else + HP_ARCH="hppa64" + fi + fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; ia64:HP-UX:*:*) @@ -635,8 +699,7 @@ 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 && exit 0 echo unknown-hitachi-hiuxwe2 exit 0 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) @@ -664,9 +727,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 +745,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 ;; @@ -700,26 +757,25 @@ EOF CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; - CRAY*T3D:*:*:*) - echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; - CRAY-2:*:*:*) - echo cray2-cray-unicos - exit 0 ;; + *:UNICOS/mp:*:*) + echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + 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} + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit 0 ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} @@ -731,10 +787,21 @@ 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=` + # GNU/KFreeBSD systems have a "k" prefix to indicate we are using + # FreeBSD's kernel, but not the complete OS. + case ${LIBC} in gnu) kernel_only='k' ;; esac + echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} exit 0 ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin @@ -745,11 +812,17 @@ EOF i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit 0 ;; + x86:Interix*:[34]*) + echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' + 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 @@ -761,25 +834,68 @@ EOF echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; *:GNU:*:*) + # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit 0 ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + exit 0 ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit 0 ;; arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; + cris:Linux:*:*) + echo cris-axis-linux-gnu + exit 0 ;; ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + m32r*: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=` + 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=` + test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu @@ -815,6 +931,9 @@ EOF s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit 0 ;; + sh64*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; @@ -828,7 +947,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 +960,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 +972,31 @@ 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 + #ifdef __dietlibc__ + LIBC=dietlibc + #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=` + 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 +1013,26 @@ 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:syllable:*:*) + echo ${UNAME_MACHINE}-pc-syllable + 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 +1054,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 +1090,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[345]??:*: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 | SHG2:*: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 +1115,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 +1186,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 ;; @@ -1054,18 +1196,24 @@ EOF echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Darwin:*:*) - echo `uname -p`-apple-darwin${UNAME_RELEASE} + case `uname -p` in + *86) UNAME_PROCESSOR=i686 ;; + powerpc) UNAME_PROCESSOR=powerpc ;; + esac + echo ${UNAME_PROCESSOR}-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-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit 0 ;; *:NonStop-UX:*:*) @@ -1088,11 +1236,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,11 +1254,11 @@ EOF *:ITS:*:*) echo pdp10-unknown-its exit 0 ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop + SEI:*:*:SEIUX) + echo mips-sei-seiux${UNAME_RELEASE} exit 0 ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos + *:DragonFly:*:*) + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit 0 ;; esac @@ -1237,8 +1380,7 @@ 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 && exit 0 # Apollos put the system type in the environment. diff --git a/config.sub b/config.sub index 393f13d373..ba331039bb 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='2004-03-12' # 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,8 @@ 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* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \ + kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; @@ -226,32 +228,46 @@ 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] \ + | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ | c4x | clipper \ - | d10v | d30v | dsp16xx \ - | fr30 \ + | d10v | d30v | dlx | dsp16xx \ + | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ - | m32r | m68000 | m68k | m88k | mcore \ - | mips16 | mips64 | mips64el | mips64orion | mips64orionel \ - | mips64vr4100 | mips64vr4100el | mips64vr4300 \ - | mips64vr4300el | mips64vr5000 | mips64vr5000el \ - | mipsbe | mipseb | mipsel | mipsle | mipstx39 | mipstx39el \ - | mipsisa32 \ + | ip2k | iq2000 \ + | m32r | m32rle | m68000 | m68k | m88k | mcore \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64vr | mips64vrel \ + | mips64orion | mips64orionel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | 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 \ - | tahoe | thumb | tic80 | tron \ - | v850 \ + | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \ + | strongarm \ + | tahoe | thumb | tic4x | tic80 | tron \ + | v850 | v850e \ | we32k \ - | x86 | xscale \ + | x86 | xscale | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; @@ -278,38 +294,56 @@ 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-* | c55x-* | c6x-* \ + | 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-* \ - | m32r-* \ - | m68000-* | m680[01234]0-* | m68360-* | m683?2-* | m68k-* \ + | ip2k-* | iq2000-* \ + | m32r-* | m32rle-* \ + | 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-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | 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]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ + | tahoe-* | thumb-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tron-* \ + | v850-* | v850e-* | vax-* \ | we32k-* \ - | x86-* | x86_64-* | xmp-* | xps100-* | xscale-* \ + | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ + | xtensa-* \ | ymp-* \ | z8k-*) ;; @@ -329,6 +363,9 @@ case $basic_machine in basic_machine=a29k-amd os=-udi ;; + abacus) + basic_machine=abacus-unknown + ;; adobe68k) basic_machine=m68010-adobe os=-scout @@ -343,6 +380,12 @@ case $basic_machine in basic_machine=a29k-none os=-bsd ;; + amd64) + basic_machine=x86_64-pc + ;; + amd64-*) + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; amdahl) basic_machine=580-amdahl os=-sysv @@ -374,6 +417,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,17 +441,13 @@ case $basic_machine in basic_machine=c38-convex os=-bsd ;; - cray | ymp) - basic_machine=ymp-cray + cray | j90) + basic_machine=j90-cray os=-unicos ;; - cray2) - basic_machine=cray2-cray - os=-unicos - ;; - [cjt]90) - basic_machine=${basic_machine}-cray - os=-unicos + cr16c) + basic_machine=cr16c-unknown + os=-elf ;; crds | unos) basic_machine=m68k-crds @@ -412,12 +455,24 @@ case $basic_machine in cris | cris-* | etrax*) basic_machine=cris-axis ;; + crx) + basic_machine=crx-unknown + os=-elf + ;; da30 | da30-*) basic_machine=m68k-da30 ;; 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 +653,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 +667,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 +743,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 +754,14 @@ case $basic_machine in basic_machine=hppa1.1-oki os=-proelf ;; + or32 | or32-*) + basic_machine=or32-unknown + os=-coff + ;; + os400) + basic_machine=powerpc-ibm + os=-os400 + ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose @@ -721,49 +784,55 @@ 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) + pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-*) + pentium4) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; - pentiumii-* | pentium2-*) + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; + pentium4-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; pn) basic_machine=pn-gould ;; 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 +853,26 @@ 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 + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; sequent) basic_machine=i386-sequent ;; @@ -795,7 +880,10 @@ case $basic_machine in basic_machine=sh-hitachi os=-hms ;; - sparclite-wrs) + sh64) + basic_machine=sh64-unknown + ;; + sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; @@ -862,22 +950,42 @@ case $basic_machine in os=-dynix ;; t3e) - basic_machine=t3e-cray + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; + tic55x | c55x*) + basic_machine=tic55x-unknown + os=-coff + ;; + tic6x | c6x*) + basic_machine=tic6x-unknown + os=-coff + ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; tower | tower-32) basic_machine=m68k-ncr ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; udi29k) basic_machine=a29k-amd os=-udi @@ -899,8 +1007,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 +1029,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 +1056,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 +1075,16 @@ case $basic_machine in we32k) basic_machine=we32k-att ;; - sh3 | sh4 | sh3eb | sh4eb) + sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; - sparc | sparcv9 | sparcv9b) + sh64) + basic_machine=sh64-unknown + ;; + sparc | sparcv8 | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; - cydra) + cydra) basic_machine=cydra-cydrome ;; orion) @@ -999,10 +1099,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. ;; @@ -1058,17 +1154,20 @@ case $os in | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ - | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \ + | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \ + | -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* | -nx6 | -nx7 | -sei* | -dragonfly*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1080,8 +1179,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* \ @@ -1090,6 +1191,9 @@ case $os in -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; + -linux-dietlibc) + os=-linux-dietlibc + ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; @@ -1102,6 +1206,9 @@ case $os in -opened*) os=-openedition ;; + -os400*) + os=-os400 + ;; -wince*) os=-wince ;; @@ -1120,14 +1227,23 @@ case $os in -acis*) os=-aos ;; + -atheos*) + os=-atheos + ;; + -syllable*) + os=-syllable + ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; + -nova*) + os=-rtmk-nova + ;; -ns2 ) - os=-nextstep2 + os=-nextstep2 ;; -nsk*) os=-nsk @@ -1139,6 +1255,9 @@ case $os in -sinix*) os=-sysv4 ;; + -tpf*) + os=-tpf + ;; -triton*) os=-sysv3 ;; @@ -1166,8 +1285,14 @@ 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 + ;; + -aros*) + os=-aros + ;; + -kaos*) + os=-kaos ;; -none) ;; @@ -1200,10 +1325,14 @@ case $basic_machine in arm*-semi) os=-aout ;; + c4x-* | tic4x-*) + os=-coff + ;; + # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; - pdp11-*) + pdp11-*) os=-none ;; *-dec | vax-*) @@ -1230,6 +1359,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 +1425,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) @@ -1374,10 +1506,16 @@ case $basic_machine in -mvs* | -opened*) vendor=ibm ;; + -os400*) + vendor=ibm + ;; -ptx*) vendor=sequent ;; - -vxsim* | -vxworks*) + -tpf*) + vendor=ibm + ;; + -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) diff --git a/configure b/configure index 53b06bcd3a..4d4fe3bcb0 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. @@ -436,6 +439,10 @@ ac_help="$ac_help --enable-xpm use xpm images (XPM file format)" ac_help="$ac_help --enable-icocur use Windows ICO and CUR formats" +ac_help="$ac_help + --disable-dynamic_dib don't use dynamic DIB loading/saving code under MSW" +ac_help="$ac_help + --disable-dynamic_ico_cur don't use dynamic icon/cursor loading/saving code under MSW" ac_help="$ac_help --disable-largefile omit support for large files" ac_help="$ac_help @@ -1014,7 +1021,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:1025: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -1035,7 +1042,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:1046: checking target system type" >&5 target_alias=$target case "$target_alias" in @@ -1053,7 +1060,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:1064: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -1078,45 +1085,47 @@ 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=4 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_REVISION=0 -WX_AGE=0 +WX_CURRENT=0 +WX_REVISION=2 +WX_AGE=1 USE_UNIX=1 +USE_OS2=0 USE_WIN32=0 USE_DOS=0 USE_BEOS=0 USE_MAC=0 -USE_LINUX= -USE_SGI= -USE_HPUX= -USE_SYSV= -USE_SVR4= USE_AIX= -USE_SUN= -USE_SOLARIS= -USE_SUNOS= -USE_ALPHA= -USE_OSF= USE_BSD= USE_DARWIN= USE_FREEBSD= -USE_OPENBSD= +USE_GNU= +USE_HPUX= +USE_LINUX= USE_NETBSD= +USE_OPENBSD= +USE_OSF= +USE_SGI= +USE_SOLARIS= +USE_SUN= +USE_SUNOS= +USE_SVR4= +USE_SYSV= USE_VMS= USE_ULTRIX= USE_DATA_GENERAL= +USE_ALPHA= NEEDS_D_REENTRANT_FOR_R_FUNCS=0 @@ -1167,6 +1176,18 @@ EOF USE_ALPHA=1 cat >> confdefs.h <<\EOF #define __ALPHA__ 1 +EOF + + fi + DEFAULT_DEFAULT_wxUSE_GTK=1 + ;; + *-*-gnu* | *-*-k*bsd*-gnu ) + USE_GNU=1 + TMP=`uname -m` + if test "x$TMP" = "xalpha"; then + USE_ALPHA=1 + cat >> confdefs.h <<\EOF +#define __ALPHA__ 1 EOF fi @@ -1239,11 +1260,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 +1273,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 +1326,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 @@ -1341,12 +1362,15 @@ EOF ;; *-pc-os2_emx | *-pc-os2-emx ) - cat >> confdefs.h <<\EOF + USE_OS2=1 + cat >> confdefs.h <<\EOF #define __EMX__ 1 EOF PROGRAM_EXT=".exe" DEFAULT_DEFAULT_wxUSE_PM=1 + CXX=gcc + LDFLAGS="$LDFLAGS -Zcrtdll -Zsysv-signals" ;; powerpc-*-darwin* ) @@ -1567,6 +1591,8 @@ if test $DEBUG_CONFIGURE = 1; then DEFAULT_wxUSE_IFF=no DEFAULT_wxUSE_XPM=no DEFAULT_wxUSE_ICO_CUR=no + DEFAULT_wxUSE_IMAGE_LOADING_IN_MSW=no + DEFAULT_wxUSE_RESOURCE_LOADING_IN_MSW=no else DEFAULT_wxUSE_UNIVERSAL=no @@ -1648,8 +1674,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 @@ -1742,6 +1768,8 @@ else DEFAULT_wxUSE_PNM=yes DEFAULT_wxUSE_XPM=yes DEFAULT_wxUSE_ICO_CUR=yes + DEFAULT_wxUSE_IMAGE_LOADING_IN_MSW=yes + DEFAULT_wxUSE_RESOURCE_LOADING_IN_MSW=yes fi @@ -1759,7 +1787,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:1791: 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 +1830,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:1834: 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 +1924,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:1928: 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 +1965,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:1969: 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 +2005,7 @@ fi echo $ac_n "checking for --with-libpng""... $ac_c" 1>&6 -echo "configure:1981: checking for --with-libpng" >&5 +echo "configure:2009: 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 +2056,7 @@ fi echo $ac_n "checking for --with-libjpeg""... $ac_c" 1>&6 -echo "configure:2032: checking for --with-libjpeg" >&5 +echo "configure:2060: 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 +2107,7 @@ fi echo $ac_n "checking for --with-libtiff""... $ac_c" 1>&6 -echo "configure:2083: checking for --with-libtiff" >&5 +echo "configure:2111: 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 +2158,7 @@ fi echo $ac_n "checking for --with-opengl""... $ac_c" 1>&6 -echo "configure:2134: checking for --with-opengl" >&5 +echo "configure:2162: 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 +2200,7 @@ fi echo $ac_n "checking for --with-dmalloc""... $ac_c" 1>&6 -echo "configure:2176: checking for --with-dmalloc" >&5 +echo "configure:2204: 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 +2239,7 @@ fi echo $ac_n "checking for --with-regex""... $ac_c" 1>&6 -echo "configure:2215: checking for --with-regex" >&5 +echo "configure:2243: 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 +2290,7 @@ fi echo $ac_n "checking for --with-zlib""... $ac_c" 1>&6 -echo "configure:2266: checking for --with-zlib" >&5 +echo "configure:2294: 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 +2341,7 @@ fi echo $ac_n "checking for --with-odbc""... $ac_c" 1>&6 -echo "configure:2317: checking for --with-odbc" >&5 +echo "configure:2345: 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 +2383,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:2387: 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 +2423,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:2427: 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 +2463,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:2467: 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 +2503,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:2507: 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 +2544,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:2548: 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 +2593,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:2597: 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 +2633,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:2637: 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 +2673,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:2677: 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 +2713,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:2717: 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 +2753,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:2757: 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 +2793,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:2797: 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 +2833,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:2837: 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 +2873,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:2877: 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 +2913,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:2917: 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 +2953,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:2957: 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 +2994,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:2998: 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 +3034,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:3038: 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 @@ -3051,7 +3079,7 @@ if test "${enable_rpath+set}" = set; then fi -if test "$wxRPATH_DIR" != "" -a "$wxRPATH_DIR" != "disable"; then +if test "$wxRPATH_DIR" != "" -a "$wxRPATH_DIR" != "disable" -a "$wxRPATH_DIR" != "no"; then WXCONFIG_RPATH="-Wl,-rpath -Wl,$wxRPATH_DIR" fi @@ -3060,7 +3088,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:3092: 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 +3128,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:3132: 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 +3169,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:3173: 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 +3209,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:3213: 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 +3249,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:3253: 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 +3289,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:3293: 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 +3329,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:3333: 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 +3369,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:3373: 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 +3409,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:3413: 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 +3450,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:3454: 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 +3491,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:3495: 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 +3531,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:3535: 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 +3571,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:3575: 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 +3611,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:3615: 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 +3651,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:3655: 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 +3691,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:3695: 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 +3731,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:3735: 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 +3771,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:3775: 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 +3811,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:3815: 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 +3851,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:3855: 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 +3891,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:3895: 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 +3931,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:3935: 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 +3971,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:3975: 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 +4011,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:4015: 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 +4051,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:4055: 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 +4091,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:4095: 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 +4131,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:4135: 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 +4171,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:4175: 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 +4211,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:4215: 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 +4251,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:4255: 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 +4291,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:4295: 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 +4331,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:4335: 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 +4371,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:4375: 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 +4411,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:4415: 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 +4451,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:4455: 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 +4491,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:4495: 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 +4531,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:4535: 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 +4571,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:4575: 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 +4612,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:4616: 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 +4652,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:4656: 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 +4693,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:4697: 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 +4733,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:4737: 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 +4774,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:4778: 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 +4814,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:4818: 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 +4854,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:4858: 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 +4894,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:4898: 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 +4934,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:4938: 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 +4977,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:4981: 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 +5021,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:5025: 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 +5061,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:5065: 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 +5101,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:5105: 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 +5141,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:5145: 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 +5181,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:5185: 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 +5221,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:5225: 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 +5261,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:5265: 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 +5301,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:5305: 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 +5341,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:5345: 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 +5381,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:5385: 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 +5421,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:5425: 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 +5462,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:5466: 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 +5505,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:5509: 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 +5545,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:5549: 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 +5586,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:5590: 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 +5628,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:5632: 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 +5668,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:5672: 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 +5708,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:5712: 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 +5749,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:5753: 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 +5791,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:5795: 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 +5912,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:5916: 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 +5952,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:5956: 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 +5992,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:5996: 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 +6032,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:6036: 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 +6072,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:6076: 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 +6112,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:6116: 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 +6152,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:6156: 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 +6192,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:6196: 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 +6232,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:6236: 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 +6272,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:6276: 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 +6312,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:6316: 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 +6352,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:6356: 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 +6392,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:6396: 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 +6432,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:6436: 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 +6472,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:6476: 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 +6512,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:6516: 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 +6552,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:6556: 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 +6592,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:6596: 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 +6632,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:6636: 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 +6672,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:6676: 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 +6712,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:6716: 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 +6752,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:6756: 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 +6792,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:6796: 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 +6832,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:6836: 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 +6872,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:6876: 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 +6912,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:6916: 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 +6952,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:6956: 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 +6992,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:6996: 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 +7032,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:7036: 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 +7072,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:7076: 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 +7112,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:7116: 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 +7152,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:7156: 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 +7192,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:7196: 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 +7232,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:7236: 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 +7272,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:7276: 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 +7312,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:7316: 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 +7352,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:7356: 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 +7392,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:7396: 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 +7432,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:7436: 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 +7474,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:7478: 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 +7514,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:7518: 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 +7554,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:7558: 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 +7594,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:7598: 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 +7634,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:7638: 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 +7674,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:7678: 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 +7714,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:7718: 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 +7754,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:7758: 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 +7794,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:7798: 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 +7834,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:7838: 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 +7874,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:7878: 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 +7914,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:7918: 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 +7954,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:7958: 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 +7994,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:7998: 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 +8036,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:8040: 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 +8076,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:8080: 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 +8116,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:8120: 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 +8156,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:8160: 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 +8196,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:8200: 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 +8236,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:8240: 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 +8276,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:8280: 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 +8316,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:8320: 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 +8356,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:8360: 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 +8398,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:8402: 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 +8438,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:8442: 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 +8478,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:8482: 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 +8518,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:8522: 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 +8558,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:8562: 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 +8598,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:8602: 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 +8638,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:8642: 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 +8678,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:8682: 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 @@ -8688,6 +8716,86 @@ fi fi + enablestring=disable + echo $ac_n "checking for --${enablestring:-enable}-dynamic_dib""... $ac_c" 1>&6 +echo "configure:8722: checking for --${enablestring:-enable}-dynamic_dib" >&5 + no_cache=0 + # Check whether --enable-dynamic_dib or --disable-dynamic_dib was given. +if test "${enable_dynamic_dib+set}" = set; then + enableval="$enable_dynamic_dib" + + if test "$enableval" = yes; then + ac_cv_use_dynamic_dib='wxUSE_IMAGE_LOADING_IN_MSW=yes' + else + ac_cv_use_dynamic_dib='wxUSE_IMAGE_LOADING_IN_MSW=no' + fi + +else + + LINE=`grep "wxUSE_IMAGE_LOADING_IN_MSW" ${wx_arg_cache_file}` + if test "x$LINE" != x ; then + eval "DEFAULT_$LINE" + else + no_cache=1 + fi + + ac_cv_use_dynamic_dib='wxUSE_IMAGE_LOADING_IN_MSW='$DEFAULT_wxUSE_IMAGE_LOADING_IN_MSW + +fi + + + eval "$ac_cv_use_dynamic_dib" + if test "$no_cache" != 1; then + echo $ac_cv_use_dynamic_dib >> ${wx_arg_cache_file}.tmp + fi + + if test "$wxUSE_IMAGE_LOADING_IN_MSW" = yes; then + echo "$ac_t""yes" 1>&6 + else + echo "$ac_t""no" 1>&6 + fi + + + enablestring=disable + echo $ac_n "checking for --${enablestring:-enable}-dynamic_ico_cur""... $ac_c" 1>&6 +echo "configure:8762: checking for --${enablestring:-enable}-dynamic_ico_cur" >&5 + no_cache=0 + # Check whether --enable-dynamic_ico_cur or --disable-dynamic_ico_cur was given. +if test "${enable_dynamic_ico_cur+set}" = set; then + enableval="$enable_dynamic_ico_cur" + + if test "$enableval" = yes; then + ac_cv_use_dynamic_ico_cur='wxUSE_RESOURCE_LOADING_IN_MSW=yes' + else + ac_cv_use_dynamic_ico_cur='wxUSE_RESOURCE_LOADING_IN_MSW=no' + fi + +else + + LINE=`grep "wxUSE_RESOURCE_LOADING_IN_MSW" ${wx_arg_cache_file}` + if test "x$LINE" != x ; then + eval "DEFAULT_$LINE" + else + no_cache=1 + fi + + ac_cv_use_dynamic_ico_cur='wxUSE_RESOURCE_LOADING_IN_MSW='$DEFAULT_wxUSE_RESOURCE_LOADING_IN_MSW + +fi + + + eval "$ac_cv_use_dynamic_ico_cur" + if test "$no_cache" != 1; then + echo $ac_cv_use_dynamic_ico_cur >> ${wx_arg_cache_file}.tmp + fi + + if test "$wxUSE_RESOURCE_LOADING_IN_MSW" = yes; then + echo "$ac_t""yes" 1>&6 + else + echo "$ac_t""no" 1>&6 + fi + + fi case "${host}" in @@ -8709,7 +8817,7 @@ esac echo $ac_n "checking for toolkit""... $ac_c" 1>&6 -echo "configure:8713: checking for toolkit" >&5 +echo "configure:8821: checking for toolkit" >&5 if test "$wxUSE_GUI" = "yes"; then @@ -8762,7 +8870,7 @@ if test "$wxUSE_GUI" = "yes"; then echo "$var=$value" >> ${wx_arg_cache_file} fi if test "$value" = 1; then - toolkit_echo=`echo $toolkit | tr [A-Z] [a-z]` + toolkit_echo=`echo $toolkit | tr "[A-Z]" "[a-z]"` echo "$ac_t""$toolkit_echo" 1>&6 fi fi @@ -8771,56 +8879,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 +9004,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:9008: 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 +9034,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:9038: 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 +9085,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:9089: 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 +9117,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:9121: 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 +9128,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 9074 "configure" +#line 9132 "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:9137: \"$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 +9159,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:9163: 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:9168: 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 +9173,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:9177: \"$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 +9192,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:9196: 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 +9225,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:9229: 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 +9240,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:9250: \"$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 +9257,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:9267: \"$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 +9274,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:9284: \"$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 +9306,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:9310: 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 +9330,7 @@ rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext < Autoconf TCGETA @@ -9309,7 +9367,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:9371: 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 +9399,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:9403: 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 +9410,12 @@ cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext << EOF -#line 9356 "configure" +#line 9414 "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:9419: \"$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 +9441,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:9445: 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:9450: 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 +9455,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:9459: \"$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 +9474,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:9478: 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 +9517,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:9521: 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 +9548,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:9552: 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 +9588,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:9592: 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 +9644,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 +9664,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:9668: 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 +9693,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:9697: 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 @@ -9651,15 +9711,18 @@ echo "$ac_t""$wx_cv_prog_makeisgnu" 1>&6 if test "x$wx_cv_prog_makeisgnu" = "xyes"; then IF_GNU_MAKE="" + IF_NOT_GNU_MAKE="#" else IF_GNU_MAKE="#" + IF_NOT_GNU_MAKE="" 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:9726: 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 +9769,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:9773: 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 +9803,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:9807: 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 +9837,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:9841: 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 +9845,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:9860: \"$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 +9880,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:9884: 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 +9901,115 @@ else fi +case "${host}" in + *-pc-os2_emx | *-pc-os2-emx ) + 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:9909: 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" + CLEANRESPROGRAMOBJ="" + fi + echo $ac_n "checking for gcc 3 or later""... $ac_c" 1>&6 +echo "configure:9953: checking for gcc 3 or later" >&5 +if eval "test \"`echo '$''{'wx_cv_gcc3'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + + wx_cv_gcc3=yes + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + + wx_cv_gcc3=no + + +fi +rm -f conftest* + +fi + +echo "$ac_t""$wx_cv_gcc3" 1>&6 + if test "$wx_cv_gcc3" = "no"; then + LIBS="$LIBS -lstdcpp" + else + LIBS="$LIBS -lstdcxx" + 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:10003: 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:10013: \"$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 +10041,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:10045: 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:10055: \"$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 +10081,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:10085: 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:10095: \"$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 +10121,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:10125: 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:10135: \"$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 +10161,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:10165: 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:10175: \"$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 +10203,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:10207: 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:10217: \"$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 +10245,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: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:10104: \"$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* @@ -10131,12 +10286,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:10290: 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:10318: \"$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 +10344,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:10348: 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:10358: \"$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 +10381,71 @@ 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 + if test "$wxUSE_UNIX" = "yes" -a "$wxUSE_PM" != 1; then + for ac_hdr in X11/Xlib.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:10399: 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:10409: \"$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* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + + 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:10439: 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:10449: \"$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 +10476,12 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:10277: checking for working const" >&5 +echo "configure:10480: 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:10534: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -10348,21 +10551,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:10352: checking for inline" >&5 +echo "configure:10555: 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:10569: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -10389,7 +10592,7 @@ esac echo $ac_n "checking size of char""... $ac_c" 1>&6 -echo "configure:10393: checking size of char" >&5 +echo "configure:10596: 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 +10600,10 @@ else ac_cv_sizeof_char=1 else cat > conftest.$ac_ext < +#include main() { FILE *f=fopen("conftestval", "w"); @@ -10408,7 +10612,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:10616: \"$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 +10632,7 @@ EOF echo $ac_n "checking size of short""... $ac_c" 1>&6 -echo "configure:10432: checking size of short" >&5 +echo "configure:10636: 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 +10640,10 @@ else ac_cv_sizeof_short=2 else cat > conftest.$ac_ext < +#include main() { FILE *f=fopen("conftestval", "w"); @@ -10447,7 +10652,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:10656: \"$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 +10672,7 @@ EOF echo $ac_n "checking size of void *""... $ac_c" 1>&6 -echo "configure:10471: checking size of void *" >&5 +echo "configure:10676: 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 +10680,10 @@ else ac_cv_sizeof_void_p=4 else cat > conftest.$ac_ext < +#include main() { FILE *f=fopen("conftestval", "w"); @@ -10486,7 +10692,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:10696: \"$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 +10712,7 @@ EOF echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:10510: checking size of int" >&5 +echo "configure:10716: 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 +10720,10 @@ else ac_cv_sizeof_int=4 else cat > conftest.$ac_ext < +#include main() { FILE *f=fopen("conftestval", "w"); @@ -10525,7 +10732,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:10736: \"$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 +10752,7 @@ EOF echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:10549: checking size of long" >&5 +echo "configure:10756: 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 +10760,10 @@ else ac_cv_sizeof_long=4 else cat > conftest.$ac_ext < +#include main() { FILE *f=fopen("conftestval", "w"); @@ -10564,7 +10772,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:10776: \"$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 @@ -10583,11 +10791,51 @@ cat >> confdefs.h <&6 +echo "configure:10796: checking size of size_t" >&5 +if eval "test \"`echo '$''{'ac_cv_sizeof_size_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + ac_cv_sizeof_size_t=4 +else + cat > conftest.$ac_ext < +#include +main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); + fprintf(f, "%d\n", sizeof(size_t)); + exit(0); +} +EOF +if { (eval echo configure:10816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ac_cv_sizeof_size_t=`cat conftestval` +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_sizeof_size_t=0 +fi +rm -fr conftest* +fi + +fi +echo "$ac_t""$ac_cv_sizeof_size_t" 1>&6 +cat >> confdefs.h <&6 -echo "configure:10591: checking size of long long" >&5 +echo "configure:10839: 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 +10843,10 @@ else ac_cv_sizeof_long_long=8 else cat > conftest.$ac_ext < +#include main() { FILE *f=fopen("conftestval", "w"); @@ -10606,7 +10855,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:10859: \"$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 +10877,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:10881: 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 +10885,10 @@ else ac_cv_sizeof_long_long=0 else cat > conftest.$ac_ext < +#include main() { FILE *f=fopen("conftestval", "w"); @@ -10647,7 +10897,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:10901: \"$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 +10922,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:10926: 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 +10930,10 @@ else ac_cv_sizeof_long_long=0 else cat > conftest.$ac_ext < +#include main() { FILE *f=fopen("conftestval", "w"); @@ -10691,7 +10942,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:10946: \"$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 +10964,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:10968: 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 +11009,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:11013: \"$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 +11041,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:11045: 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 +11058,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:11062: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_sys_file_offset_bits=64 else @@ -10821,13 +11085,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:11089: 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 +11102,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:11106: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_sys_large_files=1 else @@ -10865,7 +11129,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:11133: 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 +11150,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:11154: 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 +11168,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:11172: \"$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 +11183,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:11187: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -10939,7 +11203,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:11220: \"$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 +11244,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:11248: 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 +11257,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:11266: \"$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 +11306,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:11310: 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:11320: \"$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 +11364,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:11368: 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 +11379,7 @@ cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11395: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_cpp_bool=yes @@ -11165,7 +11429,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:11433: 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 +11444,7 @@ cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11459: \"$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:11476: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_explicit=no else @@ -11313,8 +11577,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` " @@ -11367,15 +11630,15 @@ fi rm -f confcache -if test "$USE_LINUX" = 1; then +if test "$USE_LINUX" = 1 -o "$USE_GNU" = 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:11636: 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 +11649,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:11653: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_lib_glibc21=yes @@ -11434,17 +11697,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:11701: 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:11711: \"$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 +11726,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:11730: 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:11758: \"$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 +11810,67 @@ 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:11818: 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 + unset ac_cv_header_zlib_h + +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:11846: \"$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 + 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:11864: 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:11874: \"$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 +11886,18 @@ 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 + + + 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:11901: 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 +11905,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:11920: \"$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 +11936,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 +11976,61 @@ EOF if test "$wxUSE_MGL" != 1 ; then if test "$wxUSE_LIBPNG" = "sys" -o "$wxUSE_LIBPNG" = "yes" ; then + echo $ac_n "checking for png.h > 0.90""... $ac_c" 1>&6 +echo "configure:11981: 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 + unset ac_cv_header_png_h + +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:12006: \"$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 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:12024: 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:12034: \"$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 +12046,15 @@ 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 + + + 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:12058: 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 +12062,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:12077: \"$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 +12093,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 +12132,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:12136: 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:12153: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_jpeglib_h=yes else @@ -11804,7 +12167,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:12171: 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 +12175,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:12190: \"$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 +12229,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 +12237,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:12249: 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:12259: \"$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* @@ -11901,16 +12271,17 @@ 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 TIFFError in -ltiff""... $ac_c" 1>&6 -echo "configure:11906: checking for TIFFError in -ltiff" >&5 + + echo $ac_n "checking for TIFFError in -ltiff""... $ac_c" 1>&6 +echo "configure:12277: 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:12296: \"$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 @@ -11941,7 +12312,8 @@ else echo "$ac_t""no" 1>&6 fi - + + else echo "$ac_t""no" 1>&6 fi @@ -11965,7 +12337,7 @@ fi fi -AFMINSTALL= +WIN32INSTALL= TOOLKIT= TOOLKIT_INCLUDE= @@ -11976,17 +12348,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:12352: 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:12362: \"$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 +12386,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:12390: 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:12400: \"$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 +12422,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:12426: 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 +12444,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:12448: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_w32api_win32_ie=yes @@ -12108,6 +12480,9 @@ 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" + CLEANRESPROGRAMOBJ=${RESPROGRAMOBJ} + + WIN32INSTALL=win32install fi if test "$USE_DARWIN" = 1; then @@ -12139,7 +12514,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:12518: checking for GTK+ version" >&5 gtk_version_cached=1 if eval "test \"`echo '$''{'wx_cv_lib_gtk'+set}'`\" = set"; then @@ -12154,7 +12529,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 +12555,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:12559: 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 +12603,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:12607: 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 +12638,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 +12713,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:12717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -12372,7 +12747,7 @@ fi CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$LIBS $GTK_LIBS" cat > conftest.$ac_ext < @@ -12382,7 +12757,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:12761: \"$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 +12788,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 +12839,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:12843: 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 +12874,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:12878: checking for GTK - version >= $min_gtk_version" >&5 no_gtk="" if test "$GTK_CONFIG" = "no" ; then no_gtk=yes @@ -12524,7 +12897,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 +12975,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:12979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -12636,7 +13009,7 @@ fi CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$LIBS $GTK_LIBS" cat > conftest.$ac_ext < @@ -12646,7 +13019,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:13023: \"$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 +13057,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 +13109,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:13113: 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 +13144,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:13148: checking for GTK - version >= $min_gtk_version" >&5 no_gtk="" if test "$GTK_CONFIG" = "no" ; then no_gtk=yes @@ -12795,7 +13167,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 +13245,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:13249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -12907,7 +13279,7 @@ fi CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$LIBS $GTK_LIBS" cat > conftest.$ac_ext < @@ -12917,7 +13289,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:13293: \"$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 +13327,7 @@ rm -f conftest* rm -f conf.gtktest + fi fi if test -z "$wx_cv_lib_gtk"; then @@ -12974,6 +13347,7 @@ fi case "$wx_cv_lib_gtk" in 2.0) WXGTK20=1 + TOOLKIT_VERSION=2 ;; 1.2.7) WXGTK127=1 WXGTK12=1 @@ -12998,7 +13372,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:13376: 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 +13416,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:13420: 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:13427: 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:13432: checking PANGOFT2_LIBS" >&5 PANGOFT2_LIBS=`$PKG_CONFIG --libs "pangoft2"` echo "$ac_t""$PANGOFT2_LIBS" 1>&6 else @@ -13088,17 +13462,79 @@ 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:13477: 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:13505: \"$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" GUI_TK_LIBRARY="$wx_cv_libs_gtk" - AFMINSTALL=afminstall TOOLKIT=GTK 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:13538: 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 +13542,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:13557: \"$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 +13580,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:13584: 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,47 +13588,63 @@ 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:13593: 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/x86/so linux/gcc/x86/a linux/gcc/glibc.so linux/gcc/glibc" + else + mgl_os_candidates="linux/gcc/x86/a linux/gcc/x86/so 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" TOOLKIT_INCLUDE="-I$MGL_ROOT/include" GUI_TK_LIBRARY="-L$MGL_ROOT/lib/$mgl_lib_type/$mgl_os -lmgl -lmglcpp -lpm" - AFMINSTALL=afminstall TOOLKIT=MGL GUIDIST=MGL_DIST fi 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:13648: 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; } @@ -13211,7 +13663,6 @@ echo "configure:13196: checking for MicroWindows" >&5 wxUSE_UNIVERSAL="yes" - AFMINSTALL=afminstall TOOLKIT=MICROWIN GUIDIST=MICROWIN_DIST @@ -13224,7 +13675,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:13679: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -13286,12 +13737,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:13746: \"$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 +13811,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:13822: \"$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 +13924,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:13928: 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:13938: \"$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 +13950,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:13961: \"$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 +13989,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:13993: 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 +13997,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:14012: \"$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 +14030,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:14034: 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 +14038,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:14053: \"$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 +14078,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:14082: 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:14110: \"$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 +14127,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:14131: 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 +14135,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:14150: \"$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 +14176,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:14180: 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:14208: \"$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 +14225,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:14229: 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 +14233,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:14248: \"$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 +14268,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:14272: 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:14300: \"$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 +14317,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:14321: 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 +14325,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:14340: \"$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 +14360,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:14364: 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:14392: \"$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 +14409,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:14413: 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 +14417,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:14432: \"$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 +14461,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:14465: 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 +14469,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:14484: \"$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 @@ -14060,12 +14511,11 @@ fi GUI_TK_LIBRARY="$X_LIBS" TOOLKIT_INCLUDE="$X_CFLAGS" - AFMINSTALL=afminstall COMPILED_X_PROGRAM=0 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:14519: 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 +14530,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:14534: 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 +14562,7 @@ EOF echo "$ac_t""found at $ac_find_libraries" 1>&6 else cat > conftest.$ac_ext < @@ -14124,7 +14574,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:14578: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* xpm_link=" -lXpm" @@ -14148,11 +14598,300 @@ 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:14610: 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:14654: 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:14661: 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:14666: 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:14705: 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:14749: 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:14756: 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:14761: 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:14801: 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:14845: 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:14852: 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:14857: 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 TOOLKIT_INCLUDE="-I\$(top_srcdir)/include/wx/x11/nanox -I\$(MICROWIN)/src/include $TOOLKIT_INCLUDE" - TOOLCHAIN_DEFS="${TOOLCHAIN_DEFS} -D__NANOX__ -DMWPIXEL_FORMAT=MWPF_TRUECOLOR0888 -DHAVE_FILEIO -DHAVE_BMP_SUPPORT=1 -DHAVE_GIF_SUPPORT=1 -DHAVE_PNM_SUPPORT=1 -DHAVE_XPM_SUPPORT=1 -DLINUX=1 -DUNIX=1 -DUSE_EXPOSURE -DSCREEN_HEIGHT=480 -DSCREEN_WIDTH=640 -DSCREEN_DEPTH=4 -DX11=1" + TOOLCHAIN_DEFS="${TOOLCHAIN_DEFS} -D__NANOX__ -DMWPIXEL_FORMAT=MWPF_TRUECOLOR0888 -DHAVE_FILEIO -DHAVE_BMP_SUPPORT=1 -DHAVE_GIF_SUPPORT=1 -DHAVE_PNM_SUPPORT=1 -DHAVE_XPM_SUPPORT=1 -DUNIX=1 -DUSE_EXPOSURE -DSCREEN_HEIGHT=480 -DSCREEN_WIDTH=640 -DSCREEN_DEPTH=4 -DX11=1" GUI_TK_LIBRARY="$GUI_TK_LIBRARY \$(MICROWIN)/src/lib/libnano-X.a" else GUI_TK_LIBRARY="$GUI_TK_LIBRARY -lX11$xpm_link" @@ -14166,17 +14905,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:14909: 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:14919: \"$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 +14942,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:14946: 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 +14970,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:14974: 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 +15020,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:15024: 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:15034: \"$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 +15046,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:15057: \"$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 +15085,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:15089: 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 +15093,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:15108: \"$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 +15126,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:15130: 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 +15134,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:15149: \"$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 +15174,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:15178: 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:15206: \"$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 +15223,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:15227: 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 +15231,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:15246: \"$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 +15272,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:15276: 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:15304: \"$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 +15321,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:15325: 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 +15329,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:15344: \"$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 +15364,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:15368: 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:15396: \"$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 +15413,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:15417: 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 +15421,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:15436: \"$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 +15456,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:15460: 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:15488: \"$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 +15505,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:15509: 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 +15513,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:15528: \"$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 +15557,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:15561: 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 +15565,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:15580: \"$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 +15605,15 @@ fi { echo "configure: error: X11 not found" 1>&2; exit 1; } fi - GUI_TK_LIBRARY="$X_LIBS" - TOOLKIT_INCLUDE="$X_CFLAGS" - AFMINSTALL=afminstall + GUI_TK_LIBRARY=`echo $X_LIBS | sed 's/ -LNONE//'` + TOOLKIT_INCLUDE=`echo $X_CFLAGS | sed 's/ -INONE//'` 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:15614: 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 +15624,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 +15651,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:15655: \"$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 +15672,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:15676: 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 +15703,7 @@ for ac_dir in $SEARCH_LIB; CFLAGS="$CFLAGS $TOOLKIT_INCLUDE" cat > conftest.$ac_ext < @@ -14974,7 +15715,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:15719: \"$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 +15739,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:15743: 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 +15775,7 @@ EOF CFLAGS="$CFLAGS $TOOLKIT_INCLUDE" cat > conftest.$ac_ext < @@ -15046,7 +15787,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:15791: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* xpm_link=" -lXpm" @@ -15073,13 +15814,13 @@ 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:15818: checking if we need -lXp and/or -lSM -lICE" >&5 libp_link="" libsm_ice_link="" libs_found=0 for libp in "" " -lXp"; do if test "$libs_found" = "0"; then - for libsm_ice in " -lSM -lICE"; do + for libsm_ice in "" " -lSM -lICE"; do if test "$libs_found" = "0"; then save_LIBS="$LIBS" LIBS="$GUI_TK_LIBRARY -lXm${xpm_link} ${libp} -lXmu -lXext -lXt${libsm_ice} -lX11" @@ -15087,7 +15828,7 @@ echo "configure:15077: checking if we need -lXp and/or -lSM -lICE" >&5 CFLAGS="$CFLAGS $TOOLKIT_INCLUDE" cat > conftest.$ac_ext < @@ -15102,7 +15843,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:15847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* libp_link="$libp" @@ -15148,6 +15889,9 @@ 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" fi if test "$TOOLKIT" = "PM" ; then @@ -15245,17 +15989,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:15993: 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:16003: \"$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 +16017,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:16021: 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 +16050,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:16054: 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 +16122,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 +16134,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 +16161,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 +16214,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:16225: 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:16235: \"$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 @@ -15479,16 +16272,16 @@ if test "$wxUSE_SHARED" = "yes"; then fi ;; - *-*-linux* ) + *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu ) 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:16279: 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:16296: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_prog_icc=yes else @@ -15519,9 +16312,9 @@ echo "$ac_t""$wx_cv_prog_icc" 1>&6 fi fi - if test "$wxUSE_SONAME" = "yes" ; then + if test "$wxUSE_SONAME" = "yes" ; then SONAME_FLAGS="-Wl,-soname,${WX_LIBRARY_LINK1}" - SONAME_FLAGS_GL="-Wl,-soname,${WX_LIBRARY_LINK1_GL}" + SONAME_FLAGS_GL="-Wl,-soname,${WX_LIBRARY_LINK1_GL} -L\$(build_libdir) $WXCONFIG_LIBS" WX_TARGET_LIBRARY_SONAME="-Wl,-soname,\$(TARGETLIB_LINK1)" fi ;; @@ -15543,15 +16336,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:16349: 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 +16373,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 +16385,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 +16397,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 +16458,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:16462: 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 +16488,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:16492: 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,27 +16516,24 @@ 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)" + else + LIBWXMACRESCOMP="#" fi 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:16532: 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 +16541,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:16545: \"$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 +16558,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 +16576,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 +16597,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -15812,7 +16608,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:16612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -15836,12 +16632,12 @@ EOF fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:15840: checking for mode_t" >&5 +echo "configure:16636: 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 +16665,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:15873: checking for off_t" >&5 +echo "configure:16669: 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 +16698,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:15906: checking for pid_t" >&5 +echo "configure:16702: 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 +16731,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:15939: checking for size_t" >&5 +echo "configure:16735: 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 +16764,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:16768: 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 +16807,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:16811: 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 +16826,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:16830: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_size_t_is_uint=no else @@ -16040,6 +16837,7 @@ else fi rm -f conftest* + fi @@ -16052,12 +16850,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:16854: 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 +16868,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:16872: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_size_t_is_ulong=no else @@ -16104,13 +16902,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:16906: 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 +16919,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:16923: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_struct_pw_gecos=yes @@ -16161,12 +16959,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:16963: 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:16991: \"$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 +17015,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:17019: 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 +17023,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:17038: \"$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 +17056,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:17060: 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 +17064,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:17079: \"$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 +17111,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:17115: 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:17143: \"$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 +17179,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:17183: 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:17214: \"$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 +17239,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:17243: 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:17274: \"$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 +17295,16 @@ fi done echo $ac_n "checking for _vsnwprintf""... $ac_c" 1>&6 -echo "configure:16501: checking for _vsnwprintf" >&5 +echo "configure:17299: 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:17308: \"$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 +17356,7 @@ fi echo $ac_n "checking for iconv""... $ac_c" 1>&6 -echo "configure:16562: checking for iconv" >&5 +echo "configure:17360: 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 +17364,7 @@ else am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no cat > conftest.$ac_ext < #include @@ -16576,7 +17374,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:17378: \"$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 +17386,7 @@ rm -f conftest* am_save_LIBS="$LIBS" LIBS="$LIBS -liconv" cat > conftest.$ac_ext < #include @@ -16598,7 +17396,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:17400: \"$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 +17417,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:17421: 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 +17441,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:17445: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_func_iconv_const="no" else @@ -16688,12 +17486,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:17490: 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:17518: \"$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 +17555,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:17559: 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 +17573,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:17577: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_type_sa_handler=int @@ -16812,12 +17610,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:17614: 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:17642: \"$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 +17664,12 @@ done echo $ac_n "checking for statfs""... $ac_c" 1>&6 -echo "configure:16870: checking for statfs" >&5 +echo "configure:17668: 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:17694: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_func_statfs=yes @@ -16913,34 +17711,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:17722: 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:17739: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_func_statvfs=yes @@ -16961,25 +17756,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:17770: 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:17791: \"$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:17818: \"$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:17874: 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:17902: \"$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 +17932,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:17936: 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:17964: \"$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 +17988,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:17992: 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:18020: \"$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 +18063,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:18067: 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:18095: \"$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 +18116,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:18120: 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 +18124,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:18139: \"$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 +18163,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:18167: 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:18195: \"$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 +18234,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:18238: 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:18266: \"$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 +18299,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:18303: 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:18334: \"$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 +18367,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:18371: 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:18399: \"$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 +18420,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:18424: 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 +18428,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:18443: \"$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 @@ -17561,8 +18457,9 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then INET_LINK="nsl" 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 $ac_n "checking for inet_addr in -lresolv""... $ac_c" 1>&6 +echo "configure:18463: 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 +18467,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:18482: \"$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 @@ -17599,8 +18496,9 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then INET_LINK="resolv" 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 $ac_n "checking for inet_addr in -lsocket""... $ac_c" 1>&6 +echo "configure:18502: 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 +18506,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:18521: \"$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 @@ -17635,14 +18533,16 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 INET_LINK="socket" - + else echo "$ac_t""no" 1>&6 fi - + + fi + fi @@ -17655,12 +18555,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:18559: 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:18587: \"$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 +18608,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:18612: 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 +18616,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:18631: \"$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 @@ -17816,7 +18716,7 @@ rm -f confcache CPP_MT_FLAG= -if test "$TOOLKIT" != "MSW"; then +if test "$TOOLKIT" != "MSW" -a "$TOOLKIT" != "PM"; then THREADS_LINK= @@ -17862,18 +18762,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:18766: 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:18771: 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:18777: checking for the pthreads library -l$flag" >&5 THREADS_LINK="-l$flag" ;; esac @@ -17884,14 +18784,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:18795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* THREADS_OK=yes else @@ -17920,10 +18820,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:18824: 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 +18853,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:18857: 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:18885: \"$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 +18910,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:18914: 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:18924: \"$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 +18948,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:18952: 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:18980: \"$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 +18998,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:19002: 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 +19006,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:19021: \"$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 +19050,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:19054: 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:19082: \"$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 +19093,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:19097: 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:19125: \"$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 +19136,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:19140: 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 +19164,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:19168: \"$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 +19182,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:19186: 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 +19190,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:19205: \"$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 +19233,8 @@ else fi +else + echo "$ac_t""no" 1>&6 fi @@ -18344,12 +19248,12 @@ EOF fi echo $ac_n "checking for pthread_cancel""... $ac_c" 1>&6 -echo "configure:18348: checking for pthread_cancel" >&5 +echo "configure:19252: 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:19280: \"$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 +19301,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:19305: 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 +19317,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:19321: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_func_pthread_cleanup_push=yes @@ -18441,13 +19345,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:19349: 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 +19361,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:19365: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_type_pthread_mutexattr_t=yes @@ -18484,13 +19388,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:19392: 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 +19403,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:19407: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_type_pthread_rec_mutex_init=yes @@ -18534,7 +19438,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:19442: 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 +19446,14 @@ else CFLAGS_OLD="$CFLAGS" CFLAGS="$CFLAGS -mthreads" cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:19457: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_cflags_mthread=yes else @@ -18574,6 +19478,11 @@ echo "$ac_t""$wx_cv_cflags_mthread" 1>&6 CFLAGS="$CFLAGS_OLD" fi ;; + *-pc-os2*emx ) + CFLAGS="$CFLAGS -Zmt -D__ST_MT_ERRNO__" + CXXFLAGS="$CXXFLAGS -Zmt -D__ST_MT_ERRNO__" + LDFLAGS="$LDFLAGS -Zmt" + ;; esac fi fi @@ -18588,7 +19497,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:19501: 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 +19597,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 +19885,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:19889: 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:19917: \"$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 +19939,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:19943: 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 +19957,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:19961: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_var_timezone=timezone @@ -19056,7 +19968,7 @@ else rm -rf conftest* cat > conftest.$ac_ext < @@ -19068,7 +19980,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:19984: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_var_timezone=_timezone @@ -19079,7 +19991,7 @@ else rm -rf conftest* cat > conftest.$ac_ext < @@ -19091,7 +20003,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:20007: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_var_timezone=__timezone @@ -19132,12 +20044,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:20048: 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:20076: \"$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 +20099,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:20103: 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 +20117,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:20121: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_struct_tm_has_gmtoff=yes @@ -19234,12 +20146,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:20150: 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:20178: \"$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 +20201,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:20205: 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 +20216,7 @@ cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext < @@ -19317,7 +20229,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:20233: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_func_gettimeofday_has_2_args=yes else @@ -19325,7 +20237,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext < @@ -19338,7 +20250,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:20254: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_func_gettimeofday_has_2_args=no else @@ -19393,12 +20305,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:20309: 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:20337: \"$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 @@ -19438,8 +20350,9 @@ 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 $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 +echo "configure:20356: 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 +20360,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:20375: \"$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 @@ -19474,17 +20387,18 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 if test "$INET_LINK" != " -lsocket"; then - INET_LINK="$INET_LINK -lsocket" - fi + INET_LINK="$INET_LINK -lsocket" + fi else echo "$ac_t""no" 1>&6 - echo "configure: warning: socket library not found - sockets will be disabled" 1>&2 - wxUSE_SOCKETS=no + echo "configure: warning: socket library not found - sockets will be disabled" 1>&2 + wxUSE_SOCKETS=no + - fi + fi @@ -19494,7 +20408,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:20412: 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 +20423,7 @@ cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext < @@ -19522,7 +20436,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:20440: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_type_getsockname3=socklen_t else @@ -19530,7 +20444,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext < @@ -19543,7 +20457,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:20461: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_type_getsockname3=size_t else @@ -19551,7 +20465,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext < @@ -19564,7 +20478,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:20482: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* wx_cv_type_getsockname3=int else @@ -19636,17 +20550,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:20554: 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:20564: \"$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* @@ -19689,7 +20603,7 @@ EOF fi -if test "$TOOLKIT" != "MSW"; then +if test "$TOOLKIT" != "MSW" -a "$USE_OS2" != 1; then HAVE_DL_FUNCS=0 HAVE_SHL_FUNCS=0 @@ -19700,12 +20614,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:20618: 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:20646: \"$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 +20670,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:20674: 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 +20678,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:20693: \"$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 +20718,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:20722: 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:20750: \"$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 +20774,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:20778: 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 +20782,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:20797: \"$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 +20832,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:20836: 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:20864: \"$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 +20885,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:20889: 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 +20893,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:20908: \"$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 @@ -20013,6 +20927,8 @@ else echo "$ac_t""no" 1>&6 fi + + fi done @@ -20065,7 +20981,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:20985: 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 +20989,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:21000: \"$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 +21144,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 +21178,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:21182: 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:21192: \"$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 +21227,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:21231: checking if g++ requires -fvtable-thunks" >&5 cat > conftest.$ac_ext < #include @@ -20317,7 +21237,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:21241: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""no" 1>&6 else @@ -20378,17 +21298,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:21302: 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:21312: \"$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 +21347,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:21351: checking if g++ requires -fvtable-thunks" >&5 cat > conftest.$ac_ext < #include @@ -20437,7 +21357,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:21361: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""no" 1>&6 else @@ -20846,6 +21766,11 @@ if test "$wxUSE_TOGGLEBTN" = "yes"; then if test "$wxUSE_MAC" = 1; then echo "configure: warning: Toggle button not yet supported under Mac OS X... disabled" 1>&2 wxUSE_TOGGLEBTN=no + else + if test "$wxUSE_PM" = 1; then + echo "configure: warning: Toggle button not yet supported under PM... disabled" 1>&2 + wxUSE_TOGGLEBTN=no + fi fi if test "$wxUSE_UNIVERSAL" = "yes"; then echo "configure: warning: Toggle button not yet supported under wxUniversal... disabled" 1>&2 @@ -21139,6 +22064,20 @@ EOF fi +if test "$wxUSE_IMAGE_LOADING_IN_MSW" = "yes"; then + cat >> confdefs.h <<\EOF +#define wxUSE_IMAGE_LOADING_IN_MSW 1 +EOF + +fi + +if test "$wxUSE_RESOURCE_LOADING_IN_MSW" = "yes"; then + cat >> confdefs.h <<\EOF +#define wxUSE_RESOURCE_LOADING_IN_MSW 1 +EOF + +fi + if test "$wxUSE_UNICODE" = "yes" -a "$wxUSE_UNICODE_MSLU" = "yes" ; then LIBS=" -lunicows $LIBS" fi @@ -21281,7 +22220,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:22231: 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:22259: \"$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:22286: 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:22314: \"$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:22339: 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:22351: 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:22379: \"$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:22406: 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:22434: \"$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:22459: 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 +22471,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 +22596,11 @@ SAMPLES_SUBDIRS="`echo $SAMPLES_SUBDIRS | tr -s ' ' | tr ' ' '\n' | sort | uniq + + + + + @@ -21422,7 +22608,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:22612: 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 @@ -21457,14 +22643,22 @@ fi wx_cv_path_samplesubdirs=$SAMPLES_SUBDIRS wx_cv_if_gnu_make=$IF_GNU_MAKE +wx_cv_if_not_gnu_make=$IF_NOT_GNU_MAKE wx_cv_path_ifs=$PATH_IFS 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 -export wx_cv_path_samplesubdirs wx_cv_if_gnu_make \ +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_if_not_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 +22766,7 @@ ac_given_INSTALL="$INSTALL" trap 'rm -fr `echo " wx-config + version-script src/make.env src/makeprog.env src/makelib.env @@ -21633,6 +22828,7 @@ s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g s%@INSTALL_DATA@%$INSTALL_DATA%g s%@STRIP@%$STRIP%g s%@IF_GNU_MAKE@%$IF_GNU_MAKE%g +s%@IF_NOT_GNU_MAKE@%$IF_NOT_GNU_MAKE%g s%@YACC@%$YACC%g s%@LEX@%$LEX%g s%@LEXLIB@%$LEXLIB%g @@ -21648,6 +22844,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 +22859,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 @@ -21682,7 +22883,7 @@ s%@WX_TARGET_LIBRARY_TYPE@%$WX_TARGET_LIBRARY_TYPE%g 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,18 +22906,22 @@ 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%@CLEANRESPROGRAMOBJ@%$CLEANRESPROGRAMOBJ%g s%@WX_RESOURCES_MACOSX_ASCII@%$WX_RESOURCES_MACOSX_ASCII%g s%@WX_RESOURCES_MACOSX_DATA@%$WX_RESOURCES_MACOSX_DATA%g 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 +22972,7 @@ EOF cat >> $CONFIG_STATUS <= 5) +USE_SOLARIS= +dnl SunOS or Solaris +USE_SUN= +dnl old/real SunOS (obsolete) +USE_SUNOS= +dnl SysV R4 +USE_SVR4= +dnl any System V +USE_SYSV= USE_VMS= USE_ULTRIX= USE_DATA_GENERAL= +USE_ALPHA= dnl on some platforms xxx_r() functions are declared inside "#ifdef dnl _REENTRANT" and it's easier to just define this symbol for these platforms @@ -151,6 +163,15 @@ case "${host}" in fi DEFAULT_DEFAULT_wxUSE_GTK=1 ;; + *-*-gnu* | *-*-k*bsd*-gnu ) + USE_GNU=1 + TMP=`uname -m` + if test "x$TMP" = "xalpha"; then + USE_ALPHA=1 + AC_DEFINE(__ALPHA__) + fi + DEFAULT_DEFAULT_wxUSE_GTK=1 + ;; *-*-irix5* | *-*-irix6* ) USE_SGI=1 USE_SVR4=1 @@ -187,15 +208,15 @@ case "${host}" in *-*-openbsd*) USE_BSD=1 USE_OPENBSD=1 - AC_DEFINE(__FREEBSD__) AC_DEFINE(__OPENBSD__) + AC_DEFINE(__BSD__) DEFAULT_DEFAULT_wxUSE_GTK=1 ;; *-*-netbsd*) USE_BSD=1 USE_NETBSD=1 - AC_DEFINE(__FREEBSD__) AC_DEFINE(__NETBSD__) + AC_DEFINE(__BSD__) DEFAULT_DEFAULT_wxUSE_GTK=1 ;; *-*-osf* ) @@ -224,8 +245,11 @@ case "${host}" in USE_AIX=1 USE_SYSV=1 USE_SVR4=1 - dnl Irvin Probst 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__) @@ -254,9 +278,14 @@ case "${host}" in ;; *-pc-os2_emx | *-pc-os2-emx ) + USE_OS2=1 + dnl Now both USE_OS2 and USE_UNIX should be set to 1 !! AC_DEFINE(__EMX__) PROGRAM_EXT=".exe" DEFAULT_DEFAULT_wxUSE_PM=1 + dnl "c++" wrapper is not always available, so always use plain gcc. + CXX=gcc + LDFLAGS="$LDFLAGS -Zcrtdll -Zsysv-signals" ;; powerpc-*-darwin* ) @@ -471,6 +500,8 @@ if test $DEBUG_CONFIGURE = 1; then DEFAULT_wxUSE_IFF=no DEFAULT_wxUSE_XPM=no DEFAULT_wxUSE_ICO_CUR=no + DEFAULT_wxUSE_IMAGE_LOADING_IN_MSW=no + DEFAULT_wxUSE_RESOURCE_LOADING_IN_MSW=no else DEFAULT_wxUSE_UNIVERSAL=no @@ -552,8 +583,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 @@ -646,6 +677,8 @@ else DEFAULT_wxUSE_PNM=yes DEFAULT_wxUSE_XPM=yes DEFAULT_wxUSE_ICO_CUR=yes + DEFAULT_wxUSE_IMAGE_LOADING_IN_MSW=yes + DEFAULT_wxUSE_RESOURCE_LOADING_IN_MSW=yes fi dnl WX_ARG_WITH should be used to select whether an external package will be @@ -742,7 +775,7 @@ WX_ARG_ENABLE(compat22, [ --disable-compat22 disable wxWindows 2.2 co AC_ARG_ENABLE(rpath, [ --enable-rpath=DIR output the rpath flag from wx-config], [wxRPATH_DIR="$enableval"]) -if test "$wxRPATH_DIR" != "" -a "$wxRPATH_DIR" != "disable"; then +if test "$wxRPATH_DIR" != "" -a "$wxRPATH_DIR" != "disable" -a "$wxRPATH_DIR" != "no"; then WXCONFIG_RPATH="-Wl,-rpath -Wl,$wxRPATH_DIR" fi @@ -1032,6 +1065,8 @@ WX_ARG_ENABLE(iff, [ --enable-iff use iff images (IFF file f WX_ARG_ENABLE(pnm, [ --enable-pnm use pnm images (PNM file format)], wxUSE_PNM) WX_ARG_ENABLE(xpm, [ --enable-xpm use xpm images (XPM file format)], wxUSE_XPM) WX_ARG_ENABLE(ico_cur, [ --enable-icocur use Windows ICO and CUR formats], wxUSE_ICO_CUR) +WX_ARG_ENABLE(dynamic_dib, [ --disable-dynamic_dib don't use dynamic DIB loading/saving code under MSW], wxUSE_IMAGE_LOADING_IN_MSW, disable) +WX_ARG_ENABLE(dynamic_ico_cur, [ --disable-dynamic_ico_cur don't use dynamic icon/cursor loading/saving code under MSW], wxUSE_RESOURCE_LOADING_IN_MSW, disable) fi @@ -1118,7 +1153,7 @@ if test "$wxUSE_GUI" = "yes"; then echo "$var=$value" >> ${wx_arg_cache_file} fi if test "$value" = 1; then - toolkit_echo=`echo $toolkit | tr [[A-Z]] [[a-z]]` + toolkit_echo=`echo $toolkit | tr "[[A-Z]]" "[[a-z]]"` AC_MSG_RESULT($toolkit_echo) fi fi @@ -1127,27 +1162,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 +1237,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 +1273,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 @@ -1298,11 +1315,14 @@ AC_CACHE_CHECK([if make is GNU make], wx_cv_prog_makeisgnu, if test "x$wx_cv_prog_makeisgnu" = "xyes"; then IF_GNU_MAKE="" + IF_NOT_GNU_MAKE="#" else IF_GNU_MAKE="#" + IF_NOT_GNU_MAKE="" fi AC_SUBST(IF_GNU_MAKE) +AC_SUBST(IF_NOT_GNU_MAKE) dnl we don't need to check for VPATH support in GNU make - it does have it if test "x$wx_cv_prog_makeisgnu" != "xyes"; then @@ -1357,6 +1377,48 @@ 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 Moreover we need to link explicitly against either stdcpp.a or stdcxx.a +dnl (depending on compiler version), since we are using "gcc", not "g++/c++". +dnl --------------------------------------------------------------------------- +dnl (OS/2-only piece) +case "${host}" in + *-pc-os2_emx | *-pc-os2-emx ) + 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" + CLEANRESPROGRAMOBJ="" + fi + AC_CACHE_CHECK([for gcc 3 or later], wx_cv_gcc3,[ + AC_TRY_COMPILE([], + [ + #if (__GNUC__ < 3) + #error old gcc + #endif + ], + [ + wx_cv_gcc3=yes + ], + [ + wx_cv_gcc3=no + ] + ) + ]) + if test "$wx_cv_gcc3" = "no"; then + LIBS="$LIBS -lstdcpp" + else + LIBS="$LIBS -lstdcxx" + fi + ;; +esac +dnl (end of OS/2-only piece) + dnl ------------------------------------------------------------------------ dnl Check for headers dnl ------------------------------------------------------------------------ @@ -1394,10 +1456,25 @@ 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 + if test "$wxUSE_UNIX" = "yes" -a "$wxUSE_PM" != 1; then dnl defines HAVE_X11_XKBLIB_H - AC_CHECK_HEADERS(X11/XKBlib.h) + AC_CHECK_HEADERS(X11/Xlib.h) + AC_CHECK_HEADERS([X11/XKBlib.h], [], [], + [ + #if HAVE_X11_XLIB_H + #include + #endif + ]) fi fi @@ -1418,6 +1495,7 @@ AC_CHECK_SIZEOF(short, 2) AC_CHECK_SIZEOF(void *, 4) AC_CHECK_SIZEOF(int, 4) AC_CHECK_SIZEOF(long, 4) +AC_CHECK_SIZEOF(size_t, 4) case "${host}" in arm-*-linux* ) @@ -1441,6 +1519,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 +1543,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 +1592,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 +1661,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` " @@ -1590,7 +1676,7 @@ dnl check for glibc version dnl dnl VZ: I have no idea why had this check been there originally, but now dnl we could probably do without it by just always adding _GNU_SOURCE -if test "$USE_LINUX" = 1; then +if test "$USE_LINUX" = 1 -o "$USE_GNU" = 1; then AC_CACHE_CHECK([for glibc 2.1 or later], wx_cv_lib_glibc21,[ AC_TRY_COMPILE([#include ], [ @@ -1656,7 +1742,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 +1772,61 @@ 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: don't have an answer, try later + unset ac_cv_header_zlib_h + )] + ) + dnl If the test above did not come up with a value (e.g. cross + dnl compiling) then this should give a definitive answer + 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 +1865,46 @@ 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 (later) if we have any png.h + unset ac_cv_header_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,16 +1981,27 @@ 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) - ) + [ + AC_CHECK_LIB(tiff, TIFFError, + TIFF_LINK=" -ltiff", + , + $TIFF_PREREQ_LINKS) + ] + ) if test "x$TIFF_LINK" = "x" ; then if test "$wxUSE_LIBTIFF" = "sys" ; then @@ -1857,7 +2025,7 @@ dnl ---------------------------------------------------------------- dnl search for toolkit (widget sets) dnl ---------------------------------------------------------------- -AFMINSTALL= +WIN32INSTALL= TOOLKIT= TOOLKIT_INCLUDE= @@ -1913,6 +2081,10 @@ 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" + CLEANRESPROGRAMOBJ=${RESPROGRAMOBJ} + + dnl install Win32-specific files in "make install" + WIN32INSTALL=win32install fi if test "$USE_DARWIN" = 1; then @@ -1965,17 +2137,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 +2170,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,12 +2199,22 @@ 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" GUI_TK_LIBRARY="$wx_cv_libs_gtk" - AFMINSTALL=afminstall TOOLKIT=GTK GUIDIST=GTK_DIST @@ -2048,42 +2231,57 @@ 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/x86/so linux/gcc/x86/a linux/gcc/glibc.so linux/gcc/glibc" + else + mgl_os_candidates="linux/gcc/x86/a linux/gcc/x86/so 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" TOOLKIT_INCLUDE="-I$MGL_ROOT/include" GUI_TK_LIBRARY="-L$MGL_ROOT/lib/$mgl_lib_type/$mgl_os -lmgl -lmglcpp -lpm" - AFMINSTALL=afminstall TOOLKIT=MGL GUIDIST=MGL_DIST fi @@ -2108,7 +2306,6 @@ equivalent variable and GTK+ is version 1.2.3 or above. wxUSE_UNIVERSAL="yes" - AFMINSTALL=afminstall TOOLKIT=MICROWIN GUIDIST=MICROWIN_DIST @@ -2126,7 +2323,6 @@ equivalent variable and GTK+ is version 1.2.3 or above. GUI_TK_LIBRARY="$X_LIBS" TOOLKIT_INCLUDE="$X_CFLAGS" - AFMINSTALL=afminstall COMPILED_X_PROGRAM=0 if test "$wxUSE_NANOX" = "yes"; then @@ -2171,11 +2367,42 @@ 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 TOOLKIT_INCLUDE="-I\$(top_srcdir)/include/wx/x11/nanox -I\$(MICROWIN)/src/include $TOOLKIT_INCLUDE" - TOOLCHAIN_DEFS="${TOOLCHAIN_DEFS} -D__NANOX__ -DMWPIXEL_FORMAT=MWPF_TRUECOLOR0888 -DHAVE_FILEIO -DHAVE_BMP_SUPPORT=1 -DHAVE_GIF_SUPPORT=1 -DHAVE_PNM_SUPPORT=1 -DHAVE_XPM_SUPPORT=1 -DLINUX=1 -DUNIX=1 -DUSE_EXPOSURE -DSCREEN_HEIGHT=480 -DSCREEN_WIDTH=640 -DSCREEN_DEPTH=4 -DX11=1" + TOOLCHAIN_DEFS="${TOOLCHAIN_DEFS} -D__NANOX__ -DMWPIXEL_FORMAT=MWPF_TRUECOLOR0888 -DHAVE_FILEIO -DHAVE_BMP_SUPPORT=1 -DHAVE_GIF_SUPPORT=1 -DHAVE_PNM_SUPPORT=1 -DHAVE_XPM_SUPPORT=1 -DUNIX=1 -DUSE_EXPOSURE -DSCREEN_HEIGHT=480 -DSCREEN_WIDTH=640 -DSCREEN_DEPTH=4 -DX11=1" GUI_TK_LIBRARY="$GUI_TK_LIBRARY \$(MICROWIN)/src/lib/libnano-X.a" else GUI_TK_LIBRARY="$GUI_TK_LIBRARY -lX11$xpm_link" @@ -2233,9 +2460,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" - AFMINSTALL=afminstall + 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//'` COMPILED_X_PROGRAM=0 AC_MSG_CHECKING(for Motif/Lesstif headers) @@ -2344,7 +2572,7 @@ equivalent variable and GTK+ is version 1.2.3 or above. libs_found=0 for libp in "" " -lXp"; do if test "$libs_found" = "0"; then - for libsm_ice in " -lSM -lICE"; do + for libsm_ice in "" " -lSM -lICE"; do if test "$libs_found" = "0"; then save_LIBS="$LIBS" LIBS="$GUI_TK_LIBRARY -lXm${xpm_link} ${libp} -lXmu -lXext -lXt${libsm_ice} -lX11" @@ -2401,6 +2629,9 @@ 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" fi dnl the name of the directory where the files for this toolkit live @@ -2577,8 +2808,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 +2821,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 +2854,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 +2920,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" @@ -2700,7 +2950,7 @@ if test "$wxUSE_SHARED" = "yes"; then fi ;; - *-*-linux* ) + *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu ) if test "$GCC" != "yes"; then AC_CACHE_CHECK([for Intel compiler], wx_cv_prog_icc, [ @@ -2719,9 +2969,14 @@ if test "$wxUSE_SHARED" = "yes"; then fi fi + dnl Building ELF shared libraries without an soname by default and + dnl including /usr/lib explicitly in the linker path causes all sorts + dnl of grief. We try to undo at least some of the wrongness that has + dnl propagated from that here when sonames are enabled by reinserting + dnl the arguments to declare the dependency on symbols in the main lib. if test "$wxUSE_SONAME" = "yes" ; then SONAME_FLAGS="-Wl,-soname,${WX_LIBRARY_LINK1}" - SONAME_FLAGS_GL="-Wl,-soname,${WX_LIBRARY_LINK1_GL}" + SONAME_FLAGS_GL="-Wl,-soname,${WX_LIBRARY_LINK1_GL} -L\$(build_libdir) $WXCONFIG_LIBS" dnl substitute this in makelib.env for the contrib libs WX_TARGET_LIBRARY_SONAME="-Wl,-soname,\$(TARGETLIB_LINK1)" fi @@ -2752,21 +3007,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 +3034,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 +3049,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,18 +3120,15 @@ 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)" + else + LIBWXMACRESCOMP="#" fi fi @@ -2885,11 +3148,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 +3171,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 +3366,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 +3388,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 @@ -3206,12 +3529,16 @@ AC_CHECK_FUNCS(inet_addr, [ AC_CHECK_LIB(nsl, inet_addr, INET_LINK="nsl", - AC_CHECK_LIB(resolv, inet_addr, - INET_LINK="resolv", - AC_CHECK_LIB(socket, inet_addr, - INET_LINK="socket" + [ + AC_CHECK_LIB(resolv, inet_addr, + INET_LINK="resolv", + [ + AC_CHECK_LIB(socket, inet_addr, + INET_LINK="socket" + ) + ] ) - ) + ] ) ] ) @@ -3244,7 +3571,7 @@ dnl --------------------------------------------------------------------------- dnl under MSW (except mingw32) we always have thread support CPP_MT_FLAG= -if test "$TOOLKIT" != "MSW"; then +if test "$TOOLKIT" != "MSW" -a "$TOOLKIT" != "PM"; then dnl the code below: dnl @@ -3364,7 +3691,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 +3750,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 @@ -3530,6 +3867,11 @@ else CFLAGS="$CFLAGS_OLD" fi ;; + *-pc-os2*emx ) + CFLAGS="$CFLAGS -Zmt -D__ST_MT_ERRNO__" + CXXFLAGS="$CXXFLAGS -Zmt -D__ST_MT_ERRNO__" + LDFLAGS="$LDFLAGS -Zmt" + ;; esac fi fi @@ -3626,11 +3968,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 @@ -3985,15 +4335,17 @@ if test "$wxUSE_SOCKETS" = "yes"; then if test "$TOOLKIT" != "MSW"; then dnl under Solaris and OS/2, socket functions live in -lsocket AC_CHECK_FUNC(socket,, - AC_CHECK_LIB(socket, socket, - if test "$INET_LINK" != " -lsocket"; then - INET_LINK="$INET_LINK -lsocket" - fi, - [ - AC_MSG_WARN([socket library not found - sockets will be disabled]) - wxUSE_SOCKETS=no - ] - ) + [ + AC_CHECK_LIB(socket, socket, + if test "$INET_LINK" != " -lsocket"; then + INET_LINK="$INET_LINK -lsocket" + fi, + [ + AC_MSG_WARN([socket library not found - sockets will be disabled]) + wxUSE_SOCKETS=no + ] + ) + ] ) fi fi @@ -4103,8 +4455,9 @@ dnl ------------------------------------------------------------------------ dnl DLL support dnl ------------------------------------------------------------------------ -dnl under MSW we always have LoadLibrary/GetProcAddress -if test "$TOOLKIT" != "MSW"; then +dnl under MSW we always have LoadLibrary/GetProcAddress and +dnl under OS/2 we always have DosLoadModule/DosQueryProcAddr +if test "$TOOLKIT" != "MSW" -a "$USE_OS2" != 1; then HAVE_DL_FUNCS=0 HAVE_SHL_FUNCS=0 @@ -4147,8 +4500,11 @@ if test "$TOOLKIT" != "MSW"; then dnl check also for dlerror() if test "$HAVE_DL_FUNCS" = 1; then AC_CHECK_FUNCS(dlerror, - AC_DEFINE(HAVE_DLERROR), - AC_CHECK_LIB(dl, dlerror, AC_DEFINE(HAVE_DLERROR))) + AC_DEFINE(HAVE_DLERROR), + [ + AC_CHECK_LIB(dl, dlerror, AC_DEFINE(HAVE_DLERROR)) + ] + ) fi fi @@ -4290,14 +4646,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 @@ -4648,6 +5008,11 @@ if test "$wxUSE_TOGGLEBTN" = "yes"; then if test "$wxUSE_MAC" = 1; then AC_MSG_WARN([Toggle button not yet supported under Mac OS X... disabled]) wxUSE_TOGGLEBTN=no + else + if test "$wxUSE_PM" = 1; then + AC_MSG_WARN([Toggle button not yet supported under PM... disabled]) + wxUSE_TOGGLEBTN=no + fi fi if test "$wxUSE_UNIVERSAL" = "yes"; then AC_MSG_WARN([Toggle button not yet supported under wxUniversal... disabled]) @@ -4852,6 +5217,14 @@ if test "$wxUSE_ICO_CUR" = "yes" ; then AC_DEFINE(wxUSE_ICO_CUR) fi +if test "$wxUSE_IMAGE_LOADING_IN_MSW" = "yes"; then + AC_DEFINE(wxUSE_IMAGE_LOADING_IN_MSW) +fi + +if test "$wxUSE_RESOURCE_LOADING_IN_MSW" = "yes"; then + AC_DEFINE(wxUSE_RESOURCE_LOADING_IN_MSW) +fi + if test "$wxUSE_UNICODE" = "yes" -a "$wxUSE_UNICODE_MSLU" = "yes" ; then dnl Must be done this late because -lunicows must be before all the other libs LIBS=" -lunicows $LIBS" @@ -4970,7 +5343,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 +5397,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 +5470,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) @@ -5090,7 +5505,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,15 +5540,18 @@ 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) AC_SUBST(RESFLAGS) AC_SUBST(RESPROGRAMOBJ) +AC_SUBST(CLEANRESPROGRAMOBJ) AC_SUBST(WX_RESOURCES_MACOSX_ASCII) AC_SUBST(WX_RESOURCES_MACOSX_DATA) @@ -5144,7 +5562,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) @@ -5170,14 +5589,22 @@ dnl idea could have been to use the cache but this wouldn't work when dnl configure doesn't use cache at all which is the default with autoconf 2.50) wx_cv_path_samplesubdirs=$SAMPLES_SUBDIRS wx_cv_if_gnu_make=$IF_GNU_MAKE +wx_cv_if_not_gnu_make=$IF_NOT_GNU_MAKE wx_cv_path_ifs=$PATH_IFS 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 -export wx_cv_path_samplesubdirs wx_cv_if_gnu_make \ +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_if_not_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 +5613,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 +5658,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..14f4df4645 100755 --- a/contrib/configure +++ b/contrib/configure @@ -1,27 +1,325 @@ #! /bin/sh - -# From configure.in Id: configure.in +# From configure.in Id: configure.in. # 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. +# Generated by GNU Autoconf 2.57. # +# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 +# Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## -# Defaults: -ac_help= +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi + +# Support unset when possible. +if (FOO=FOO; unset FOO) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# Work around bugs in pre-3.0 UWIN ksh. +$as_unset ENV MAIL MAILPATH +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + + +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} + + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac + +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links + as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.file + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + as_mkdir_p=false +fi + +as_executable_p="test -f" + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" + + +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH + + +# Name of the host. +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +exec 6>&1 + +# +# Initializations. +# ac_default_prefix=/usr/local -# Any additions from configure.in: +ac_config_libobj_dir=. +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} + +# Maximum number of lines to put in a shell here document. +# This variable seems obsolete. It should probably be removed, and +# only ac_max_sed_lines should be used. +: ${ac_max_here_lines=38} + +# Identity of this package. +PACKAGE_NAME= +PACKAGE_TARNAME= +PACKAGE_VERSION= +PACKAGE_STRING= +PACKAGE_BUGREPORT= + +ac_unique_file="Makefile.in" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#if HAVE_SYS_TYPES_H +# include +#endif +#if HAVE_SYS_STAT_H +# include +#endif +#if STDC_HEADERS +# include +# include +#else +# if HAVE_STDLIB_H +# include +# endif +#endif +#if HAVE_STRING_H +# if !STDC_HEADERS && HAVE_MEMORY_H +# include +# endif +# include +#endif +#if HAVE_STRINGS_H +# include +#endif +#if HAVE_INTTYPES_H +# include +#else +# if HAVE_STDINT_H +# include +# endif +#endif +#if HAVE_UNISTD_H +# include +#endif" + +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP PATH_IFS ESD_LINK WX_TARGET_LIBRARY WX_TARGET_LIBRARY_TYPE WX_LIBRARY_BASENAME WX_RELEASE WX_CURRENT WX_REVISION WX_AGE LIBOBJS LTLIBOBJS' +ac_subst_files='' # Initialize some variables set by options. +ac_init_help= +ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. -build=NONE -cache_file=./config.cache +cache_file=/dev/null exec_prefix=NONE -host=NONE no_create= -nonopt=NONE no_recursion= prefix=NONE program_prefix=NONE @@ -30,10 +328,15 @@ program_transform_name=s,x,x, silent= site= srcdir= -target=NONE verbose= x_includes=NONE x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' @@ -47,17 +350,9 @@ oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' -# Initialize some other variables. -subdirs= -MFLAGS= MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} -# Maximum number of lines to put in a shell here document. -ac_max_here_lines=12 - ac_prev= for ac_option do - # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval "$ac_prev=\$ac_option" @@ -65,59 +360,59 @@ do continue fi - case "$ac_option" in - -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) ac_optarg= ;; - esac + ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. - case "$ac_option" in + case $ac_option in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir="$ac_optarg" ;; + bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) - ac_prev=build ;; + ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build="$ac_optarg" ;; + build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file="$ac_optarg" ;; + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) - datadir="$ac_optarg" ;; + datadir=$ac_optarg ;; -disable-* | --disable-*) - ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` + ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - eval "enable_${ac_feature}=no" ;; + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) - ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` + ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac - eval "enable_${ac_feature}='$ac_optarg'" ;; + eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -126,95 +421,47 @@ do -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) - exec_prefix="$ac_optarg" ;; + exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; - -help | --help | --hel | --he) - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat << EOF -Usage: configure [options] [host] -Options: [defaults in brackets after descriptions] -Configuration: - --cache-file=FILE cache test results in FILE - --help print this message - --no-create do not create output files - --quiet, --silent do not print \`checking...' messages - --version print the version of autoconf that created configure -Directory and file names: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [same as prefix] - --bindir=DIR user executables in DIR [EPREFIX/bin] - --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] - --libexecdir=DIR program executables in DIR [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data in DIR - [PREFIX/share] - --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data in DIR - [PREFIX/com] - --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] - --libdir=DIR object code libraries in DIR [EPREFIX/lib] - --includedir=DIR C header files in DIR [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] - --infodir=DIR info documentation in DIR [PREFIX/info] - --mandir=DIR man documentation in DIR [PREFIX/man] - --srcdir=DIR find the sources in DIR [configure dir or ..] - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM - run sed PROGRAM on installed program names -EOF - cat << EOF -Host type: - --build=BUILD configure for building on BUILD [BUILD=HOST] - --host=HOST configure for HOST [guessed] - --target=TARGET configure for TARGET [TARGET=HOST] -Features and packages: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --x-includes=DIR X include files are in DIR - --x-libraries=DIR X library files are in DIR -EOF - if test -n "$ac_help"; then - echo "--enable and --with options recognized:$ac_help" - fi - exit 0 ;; + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; -host | --host | --hos | --ho) - ac_prev=host ;; + ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) - host="$ac_optarg" ;; + host_alias=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir="$ac_optarg" ;; + includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir="$ac_optarg" ;; + infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir="$ac_optarg" ;; + libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) - libexecdir="$ac_optarg" ;; + libexecdir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ @@ -223,19 +470,19 @@ EOF -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) - localstatedir="$ac_optarg" ;; + localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir="$ac_optarg" ;; + mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) + | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ @@ -249,26 +496,26 @@ EOF -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir="$ac_optarg" ;; + oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix="$ac_optarg" ;; + prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix="$ac_optarg" ;; + program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix="$ac_optarg" ;; + program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ @@ -285,7 +532,7 @@ EOF | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name="$ac_optarg" ;; + program_transform_name=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) @@ -295,7 +542,7 @@ EOF ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) - sbindir="$ac_optarg" ;; + sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ @@ -306,58 +553,57 @@ EOF | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) - sharedstatedir="$ac_optarg" ;; + sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) - site="$ac_optarg" ;; + site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir="$ac_optarg" ;; + srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir="$ac_optarg" ;; + sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target ;; + ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target="$ac_optarg" ;; + target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; - -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.13" - exit 0 ;; + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; -with-* | --with-*) - ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` + ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } ac_package=`echo $ac_package| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac - eval "with_${ac_package}='$ac_optarg'" ;; + eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) - ac_package=`echo $ac_option|sed -e 's/-*without-//'` + ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - eval "with_${ac_package}=no" ;; + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/-/_/g'` + eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. @@ -368,99 +614,110 @@ EOF ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes="$ac_optarg" ;; + x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries="$ac_optarg" ;; + x_libraries=$ac_optarg ;; - -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } + -*) { echo "$as_me: error: unrecognized option: $ac_option +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } ;; + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } + ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` + eval "$ac_envvar='$ac_optarg'" + export $ac_envvar ;; + *) - if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then - echo "configure: warning: $ac_option: invalid host type" 1>&2 - fi - if test "x$nonopt" != xNONE; then - { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } - fi - nonopt="$ac_option" + # FIXME: should be removed in autoconf 3.0. + echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then - { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + { echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } fi -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -# File descriptor usage: -# 0 standard input -# 1 file creation -# 2 errors and warnings -# 3 some systems may open it to /dev/tty -# 4 used on the Kubota Titan -# 6 checking for... messages and results -# 5 compiler messages saved in config.log -if test "$silent" = yes; then - exec 6>/dev/null -else - exec 6>&1 -fi -exec 5>./config.log - -echo "\ -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. -" 1>&5 - -# Strip out --no-create and --no-recursion so they do not pile up. -# Also quote any args containing shell metacharacters. -ac_configure_args= -for ac_arg +# Be sure to have absolute paths. +for ac_var in exec_prefix prefix do - case "$ac_arg" in - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) ;; - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) - ac_configure_args="$ac_configure_args '$ac_arg'" ;; - *) ac_configure_args="$ac_configure_args $ac_arg" ;; + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* | NONE | '' ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; esac done -# NLS nuisances. -# Only set these to C if already set. These must not be set unconditionally -# because not all systems understand e.g. LANG=C (notably SCO). -# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! -# Non-C LC_CTYPE values break the ctype check. -if test "${LANG+set}" = set; then LANG=C; export LANG; fi -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi -if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi -if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi +# Be sure to have absolute paths. +for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ + localstatedir libdir includedir oldincludedir infodir mandir +do + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; + esac +done -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo > confdefs.h +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null -# A filename unique to this package, relative to the directory that -# configure is in, which we can look for to find out if srcdir is correct. -ac_unique_file=Makefile.in # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. - ac_prog=$0 - ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` - test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. + ac_confdir=`(dirname "$0") 2>/dev/null || +$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$0" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. @@ -470,13 +727,422 @@ else fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then - { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 + { (exit 1); exit 1; }; } else - { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } fi fi -srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` +(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || + { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 + { (exit 1); exit 1; }; } +srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` +ac_env_build_alias_set=${build_alias+set} +ac_env_build_alias_value=$build_alias +ac_cv_env_build_alias_set=${build_alias+set} +ac_cv_env_build_alias_value=$build_alias +ac_env_host_alias_set=${host_alias+set} +ac_env_host_alias_value=$host_alias +ac_cv_env_host_alias_set=${host_alias+set} +ac_cv_env_host_alias_value=$host_alias +ac_env_target_alias_set=${target_alias+set} +ac_env_target_alias_value=$target_alias +ac_cv_env_target_alias_set=${target_alias+set} +ac_cv_env_target_alias_value=$target_alias +ac_env_CC_set=${CC+set} +ac_env_CC_value=$CC +ac_cv_env_CC_set=${CC+set} +ac_cv_env_CC_value=$CC +ac_env_CFLAGS_set=${CFLAGS+set} +ac_env_CFLAGS_value=$CFLAGS +ac_cv_env_CFLAGS_set=${CFLAGS+set} +ac_cv_env_CFLAGS_value=$CFLAGS +ac_env_LDFLAGS_set=${LDFLAGS+set} +ac_env_LDFLAGS_value=$LDFLAGS +ac_cv_env_LDFLAGS_set=${LDFLAGS+set} +ac_cv_env_LDFLAGS_value=$LDFLAGS +ac_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_env_CPPFLAGS_value=$CPPFLAGS +ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_cv_env_CPPFLAGS_value=$CPPFLAGS +ac_env_CPP_set=${CPP+set} +ac_env_CPP_value=$CPP +ac_cv_env_CPP_set=${CPP+set} +ac_cv_env_CPP_value=$CPP +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures this package to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +_ACEOF + + cat <<_ACEOF +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data [PREFIX/share] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --infodir=DIR info documentation [PREFIX/info] + --mandir=DIR man documentation [PREFIX/man] +_ACEOF + + cat <<\_ACEOF +_ACEOF +fi + +if test -n "$ac_init_help"; then + + cat <<\_ACEOF + +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have + headers in a nonstandard directory + CPP C preprocessor + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +_ACEOF +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + ac_popdir=`pwd` + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d $ac_dir || continue + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac +# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be +# absolute. +ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` +ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` +ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` +ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` + + cd $ac_dir + # Check for guested configure; otherwise get Cygnus style configure. + if test -f $ac_srcdir/configure.gnu; then + echo + $SHELL $ac_srcdir/configure.gnu --help=recursive + elif test -f $ac_srcdir/configure; then + echo + $SHELL $ac_srcdir/configure --help=recursive + elif test -f $ac_srcdir/configure.ac || + test -f $ac_srcdir/configure.in; then + echo + $ac_configure --help + else + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi + cd "$ac_popdir" + done +fi + +test -n "$ac_init_help" && exit 0 +if $ac_init_version; then + cat <<\_ACEOF + +Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 +Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit 0 +fi +exec 5>config.log +cat >&5 <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by $as_me, which was +generated by GNU Autoconf 2.57. Invocation command line was + + $ $0 $@ + +_ACEOF +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +hostinfo = `(hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + echo "PATH: $as_dir" +done + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_sep= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 2) + ac_configure_args1="$ac_configure_args1 '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" + # Get rid of the leading space. + ac_sep=" " + ;; + esac + done +done +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Be sure not to use single quotes in there, as some shells, +# such as our DU 5.0 friend, will then `close' the trap. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + cat <<\_ASBOX +## ---------------- ## +## Cache variables. ## +## ---------------- ## +_ASBOX + echo + # The following way of writing the cache mishandles newlines in values, +{ + (set) 2>&1 | + case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in + *ac_space=\ *) + sed -n \ + "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" + ;; + *) + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; +} + echo + + cat <<\_ASBOX +## ----------------- ## +## Output variables. ## +## ----------------- ## +_ASBOX + echo + for ac_var in $ac_subst_vars + do + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" + done | sort + echo + + if test -n "$ac_subst_files"; then + cat <<\_ASBOX +## ------------- ## +## Output files. ## +## ------------- ## +_ASBOX + echo + for ac_var in $ac_subst_files + do + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" + done | sort + echo + fi + + if test -s confdefs.h; then + cat <<\_ASBOX +## ----------- ## +## confdefs.h. ## +## ----------- ## +_ASBOX + echo + sed "/^$/d" confdefs.h | sort + echo + fi + test "$ac_signal" != 0 && + echo "$as_me: caught signal $ac_signal" + echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core && + rm -rf conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status + ' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo >confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then @@ -487,202 +1153,1646 @@ if test -z "$CONFIG_SITE"; then fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then - echo "loading site script $ac_site_file" + { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then - echo "loading cache $cache_file" - . $cache_file + # Some versions of bash will fail to source /dev/null (special + # files actually), so we avoid doing that. + if test -f "$cache_file"; then + { echo "$as_me:$LINENO: loading cache $cache_file" >&5 +echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . $cache_file;; + *) . ./$cache_file;; + esac + fi else - echo "creating cache $cache_file" - > $cache_file + { echo "$as_me:$LINENO: creating cache $cache_file" >&5 +echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in `(set) 2>&1 | + sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val="\$ac_cv_env_${ac_var}_value" + eval ac_new_val="\$ac_env_${ac_var}_value" + case $ac_old_set,$ac_new_set in + set,) + { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 +echo "$as_me: former value: $ac_old_val" >&2;} + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 +echo "$as_me: current value: $ac_new_val" >&2;} + ac_cache_corrupted=: + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { (exit 1); exit 1; }; } fi 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 +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + + + + + + + + + + + + + -ac_exeext= -ac_objext=o -if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then - # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. - if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then - ac_n= ac_c=' -' ac_t=' ' - else - ac_n=-n ac_c= ac_t= - fi -else - ac_n= ac_c='\c' ac_t= -fi ESD_LINK= -echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:531: checking how to run the C preprocessor" >&5 +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + +fi +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 "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl +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 "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$ac_ct_CC" && break +done + + CC=$ac_ct_CC +fi + +fi + + +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + +# Provide some information about the compiler. +echo "$as_me:$LINENO:" \ + "checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 + (eval $ac_compiler --version &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 + (eval $ac_compiler -v &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 + (eval $ac_compiler -V &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +echo "$as_me:$LINENO: checking for C compiler default output" >&5 +echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6 +ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 + (eval $ac_link_default) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Find the output, starting from the most likely. This scheme is +# not robust to junk in `.', hence go to wildcards (a.*) only as a last +# resort. + +# Be careful to initialize this variable, since it used to be cached. +# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. +ac_cv_exeext= +# b.out is created by i960 compilers. +for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) + ;; + conftest.$ac_ext ) + # This is the source file. + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + # FIXME: I believe we export ac_cv_exeext for Libtool, + # but it would be cool to find out if it's true. Does anybody + # maintain Libtool? --akim. + export ac_cv_exeext + break;; + * ) + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: C compiler cannot create executables +See \`config.log' for more details." >&5 +echo "$as_me: error: C compiler cannot create executables +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } +fi + +ac_exeext=$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6 + +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +# If not cross compiling, check that we can run a simple program. +if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { echo "$as_me:$LINENO: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + fi + fi +fi +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +rm -f a.out a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 +echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6 + +echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + export ac_cv_exeext + break;; + * ) break;; + esac +done +else + { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6 + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 +if test "${ac_cv_objext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6 +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 +if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_compiler_gnu=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 +GCC=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +CFLAGS="-g" +echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_prog_cc_g=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 +echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_prog_cc_stdc=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +# Don't try gcc -ansi; that turns off useful extensions and +# breaks some systems' header files. +# AIX -qlanglvl=ansi +# Ultrix and OSF/1 -std1 +# HP-UX 10.20 and later -Ae +# HP-UX older versions -Aa -D_HPUX_SOURCE +# SVR4 -Xc -D__EXTENSIONS__ +for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_stdc=$ac_arg +break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.$ac_objext +done +rm -f conftest.$ac_ext conftest.$ac_objext +CC=$ac_save_CC + +fi + +case "x$ac_cv_prog_cc_stdc" in + x|xno) + echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6 ;; + *) + echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 + CC="$CC $ac_cv_prog_cc_stdc" ;; +esac + +# Some people use a C++ compiler to compile C. Since we use `exit', +# in C++ we need to declare it. In case someone uses the same compiler +# for both compiling C and C++ we need to have the C++ compiler decide +# the declaration of exit, since it's the most demanding environment. +cat >conftest.$ac_ext <<_ACEOF +#ifndef __cplusplus + choke me +#endif +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + for ac_declaration in \ + '' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +#include +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +continue +fi +rm -f conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.$ac_objext conftest.$ac_ext +done +rm -f conftest* +if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h +fi + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.$ac_objext conftest.$ac_ext +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then -if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + if test "${ac_cv_prog_CPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - # This must be in double quotes, not single quotes, because CPP may get - # substituted into the Makefile and "${CC-cc}" will confuse make. - CPP="${CC-cc} -E" + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. # 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:552: \"$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 + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then : else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - 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:569: \"$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 - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - 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:586: \"$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 - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP=/lib/cpp -fi -rm -f conftest* -fi -rm -f conftest* -fi -rm -f conftest* - ac_cv_prog_CPP="$CPP" -fi - CPP="$ac_cv_prog_CPP" -else - ac_cv_prog_CPP="$CPP" -fi -echo "$ac_t""$CPP" 1>&6 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -ac_safe=`echo "esd.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for esd.h""... $ac_c" 1>&6 -echo "configure:612: checking for esd.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi else - cat > conftest.$ac_ext <&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6 +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6 +if test "${ac_cv_prog_egrep+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if echo a | (grep -E '(a|b)') >/dev/null 2>&1 + then ac_cv_prog_egrep='grep -E' + else ac_cv_prog_egrep='egrep' + fi +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 +echo "${ECHO_T}$ac_cv_prog_egrep" >&6 + EGREP=$ac_cv_prog_egrep + + +echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 +if test "${ac_cv_header_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_header_stdc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_header_stdc=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +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 <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + exit(2); + exit (0); +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_header_stdc=no +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6 +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. + + + + + + + + + +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_Header=no" +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +if test "${ac_cv_header_esd_h+set}" = set; then + echo "$as_me:$LINENO: checking for esd.h" >&5 +echo $ECHO_N "checking for esd.h... $ECHO_C" >&6 +if test "${ac_cv_header_esd_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_esd_h" >&5 +echo "${ECHO_T}$ac_cv_header_esd_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking esd.h usability" >&5 +echo $ECHO_N "checking esd.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default #include -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:622: \"$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* - eval "ac_cv_header_$ac_safe=yes" +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no fi -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 esd_close in -lesd""... $ac_c" 1>&6 -echo "configure:640: checking for esd_close in -lesd" >&5 -ac_lib_var=`echo esd'_'esd_close | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking esd.h presence" >&5 +echo $ECHO_N "checking esd.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi else - ac_save_LIBS="$LIBS" + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: esd.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: esd.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: esd.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: esd.h: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; + no:yes ) + { echo "$as_me:$LINENO: WARNING: esd.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: esd.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: esd.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: esd.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: esd.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: esd.h: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for esd.h" >&5 +echo $ECHO_N "checking for esd.h... $ECHO_C" >&6 +if test "${ac_cv_header_esd_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_esd_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_esd_h" >&5 +echo "${ECHO_T}$ac_cv_header_esd_h" >&6 + +fi +if test $ac_cv_header_esd_h = yes; then + + echo "$as_me:$LINENO: checking for esd_close in -lesd" >&5 +echo $ECHO_N "checking for esd_close in -lesd... $ECHO_C" >&6 +if test "${ac_cv_lib_esd_esd_close+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS LIBS="-lesd $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char esd_close(); - -int main() { -esd_close() -; return 0; } -EOF -if { (eval echo configure:659: \"$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" + builtin and then its argument prototype would still apply. */ +char esd_close (); +int +main () +{ +esd_close (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_esd_esd_close=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" + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_cv_lib_esd_esd_close=no fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_esd_esd_close" >&5 +echo "${ECHO_T}$ac_cv_lib_esd_esd_close" >&6 +if test $ac_cv_lib_esd_esd_close = yes; then + ESD_LINK="-lesd" - -else - echo "$ac_t""no" 1>&6 + fi -else - echo "$ac_t""no" 1>&6 fi + if test "$ESD_LINK" != "" ; then echo "ESound detected" fi @@ -691,6 +2801,11 @@ 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 @@ -699,342 +2814,934 @@ WX_TARGET_LIBRARY_TYPE=$wx_cv_target_libtype -trap '' 1 2 15 -cat > confcache <<\EOF + + + + + + ac_config_files="$ac_config_files src/Makefile src/ogl/Makefile src/mmedia/Makefile src/stc/Makefile src/svg/Makefile src/xrc/Makefile src/canvas/Makefile src/gizmos/Makefile src/plot/Makefile src/applet/Makefile src/fl/Makefile src/net/Makefile src/animate/Makefile samples/Makefile samples/mmedia/Makefile samples/ogl/Makefile 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/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 samples/fl/Makefile samples/fl/fl_demo1/Makefile samples/fl/fl_demo2/Makefile samples/fl/fl_sample1/Makefile samples/fl/fl_sample2/Makefile samples/fl/fl_sample3/Makefile utils/Makefile utils/wxrc/Makefile utils/wxrcedit/Makefile utils/convertrc/Makefile" +cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure -# scripts and configure runs. It is not useful on other systems. -# If it contains results you don't want to keep, you may remove or edit it. +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. # -# By default, configure uses ./config.cache as the cache file, -# creating it if it does not exist already. You can give configure -# the --cache-file=FILE option to use a different cache file; that is -# what configure does when it calls configure scripts in -# subdirectories, so they share the cache. -# Giving --cache-file=/dev/null disables caching, for debugging configure. -# config.status only pays attention to the cache file if you give it the -# --recheck option to rerun configure. +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. # -EOF +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. -(set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote substitution - # turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - -e "s/'/'\\\\''/g" \ - -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" - ;; - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' - ;; - esac >> confcache -if cmp -s $cache_file confcache; then - : -else +{ + (set) 2>&1 | + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; +} | + sed ' + t clear + : clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + : end' >>confcache +if diff $cache_file confcache >/dev/null 2>&1; then :; else if test -w $cache_file; then - echo "updating cache $cache_file" - cat confcache > $cache_file + test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" + cat confcache >$cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' -# Any assignment to VPATH causes Sun make to only execute -# the first set of double-colon rules, so remove it if not needed. -# If there is a colon in the path, we need to keep it. +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/; +s/:*\${srcdir}:*/:/; +s/:*@srcdir@:*/:/; +s/^\([^=]*=[ ]*\):*/\1/; +s/:*$//; +s/^[^=]*=[ ]*$//; +}' fi -trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 - # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. -cat > conftest.defs <<\EOF -s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g -s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g -s%\[%\\&%g -s%\]%\\&%g -s%\$%$$%g -EOF -DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '` -rm -f conftest.defs +# +# If the first sed substitution is executed (which looks for macros that +# take arguments), then we branch to the quote section. Otherwise, +# look for a macro that doesn't take arguments. +cat >confdef2opt.sed <<\_ACEOF +t clear +: clear +s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g +t quote +s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g +t quote +d +: quote +s,[ `~#$^&*(){}\\|;'"<>?],\\&,g +s,\[,\\&,g +s,\],\\&,g +s,\$,$$,g +p +_ACEOF +# We use echo to avoid assuming a particular line-breaking character. +# The extra dot is to prevent the shell from consuming trailing +# line-breaks from the sub-command output. A line-break within +# single-quotes doesn't work because, if this script is created in a +# platform that uses two characters for line-breaks (e.g., DOS), tr +# would break. +ac_LF_and_DOT=`echo; echo .` +DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` +rm -f confdef2opt.sed + + +ac_libobjs= +ac_ltlibobjs= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_i=`echo "$ac_i" | + sed 's/\$U\././;s/\.o$//;s/\.obj$//'` + # 2. Add them. + ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + -# Without the "./", some shells look in PATH for config.status. : ${CONFIG_STATUS=./config.status} - -echo creating $CONFIG_STATUS -rm -f $CONFIG_STATUS -cat > $CONFIG_STATUS <&5 +echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF +#! $SHELL +# Generated by $as_me. # Run this file to recreate the current configuration. -# This directory was configured as follows, -# on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# -# $0 $ac_configure_args -# # Compiler output produced by configure, useful for debugging -# configure, is in ./config.log if it exists. +# configure, is in config.log if it exists. -ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" -for ac_option -do - case "\$ac_option" in - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" - exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; - -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.13" - exit 0 ;; - -help | --help | --hel | --he | --h) - echo "\$ac_cs_usage"; exit 0 ;; - *) echo "\$ac_cs_usage"; exit 1 ;; - esac -done +debug=false +ac_cs_recheck=false +ac_cs_silent=false +SHELL=\${CONFIG_SHELL-$SHELL} +_ACEOF -ac_given_srcdir=$srcdir +cat >>$CONFIG_STATUS <<\_ACEOF +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## -trap 'rm -fr `echo " - src/Makefile - src/ogl/Makefile - src/mmedia/Makefile - src/stc/Makefile - src/svg/Makefile - src/xrc/Makefile - src/canvas/Makefile - src/gizmos/Makefile - src/plot/Makefile - src/applet/Makefile - src/fl/Makefile - src/net/Makefile - samples/Makefile - samples/mmedia/Makefile - samples/ogl/Makefile - 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/xrc/Makefile - samples/plot/Makefile - samples/applet/Makefile - samples/fl/Makefile - samples/fl/fl_demo1/Makefile - samples/fl/fl_demo2/Makefile - samples/fl/fl_sample1/Makefile - samples/fl/fl_sample2/Makefile - samples/fl/fl_sample3/Makefile - utils/Makefile - utils/wxrc/Makefile - utils/wxrcedit/Makefile - utils/convertrc/Makefile - " | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 -EOF -cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF -$ac_vpsub -$extrasub -s%@SHELL@%$SHELL%g -s%@CFLAGS@%$CFLAGS%g -s%@CPPFLAGS@%$CPPFLAGS%g -s%@CXXFLAGS@%$CXXFLAGS%g -s%@FFLAGS@%$FFLAGS%g -s%@DEFS@%$DEFS%g -s%@LDFLAGS@%$LDFLAGS%g -s%@LIBS@%$LIBS%g -s%@exec_prefix@%$exec_prefix%g -s%@prefix@%$prefix%g -s%@program_transform_name@%$program_transform_name%g -s%@bindir@%$bindir%g -s%@sbindir@%$sbindir%g -s%@libexecdir@%$libexecdir%g -s%@datadir@%$datadir%g -s%@sysconfdir@%$sysconfdir%g -s%@sharedstatedir@%$sharedstatedir%g -s%@localstatedir@%$localstatedir%g -s%@libdir@%$libdir%g -s%@includedir@%$includedir%g -s%@oldincludedir@%$oldincludedir%g -s%@infodir@%$infodir%g -s%@mandir@%$mandir%g -s%@CPP@%$CPP%g -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 - -CEOF -EOF - -cat >> $CONFIG_STATUS <<\EOF - -# Split the substitutions into bite-sized pieces for seds with -# small command number limits, like on Digital OSF/1 and HP-UX. -ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. -ac_file=1 # Number of current file. -ac_beg=1 # First line for current file. -ac_end=$ac_max_sed_cmds # Line after last line for current file. -ac_more_lines=: -ac_sed_cmds="" -while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file - else - sed "${ac_end}q" conftest.subs > conftest.s$ac_file - fi - if test ! -s conftest.s$ac_file; then - ac_more_lines=false - rm -f conftest.s$ac_file - else - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f conftest.s$ac_file" - else - ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" - fi - ac_file=`expr $ac_file + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_cmds` - fi -done -if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix fi -EOF -cat >> $CONFIG_STATUS </dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi -CONFIG_FILES=\${CONFIG_FILES-"src/Makefile - src/ogl/Makefile - src/mmedia/Makefile - src/stc/Makefile - src/svg/Makefile - src/xrc/Makefile - src/canvas/Makefile - src/gizmos/Makefile - src/plot/Makefile - src/applet/Makefile - src/fl/Makefile - src/net/Makefile - samples/Makefile - samples/mmedia/Makefile - samples/ogl/Makefile - 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/xrc/Makefile - samples/plot/Makefile - samples/applet/Makefile - samples/fl/Makefile - samples/fl/fl_demo1/Makefile - samples/fl/fl_demo2/Makefile - samples/fl/fl_sample1/Makefile - samples/fl/fl_sample2/Makefile - samples/fl/fl_sample3/Makefile - utils/Makefile - utils/wxrc/Makefile - utils/wxrcedit/Makefile - utils/convertrc/Makefile - "} -EOF -cat >> $CONFIG_STATUS <<\EOF -for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; + +# Work around bugs in pre-3.0 UWIN ksh. +$as_unset ENV MAIL MAILPATH +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + + +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 +echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; esac - # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 +echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} + { (exit 1); exit 1; }; } - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" - # A "../" for each directory in $ac_dir_suffix. - ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} + + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac + +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links + as_ln_s='cp -p' else - ac_dir_suffix= ac_dots= + as_ln_s='ln -s' + fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.file + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + as_mkdir_p=false +fi + +as_executable_p="test -f" + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" + + +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH + +exec 6>&1 + +# Open the log real soon, to keep \$[0] and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. Logging --version etc. is OK. +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX +} >&5 +cat >&5 <<_CSEOF + +This file was extended by $as_me, which was +generated by GNU Autoconf 2.57. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +_CSEOF +echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 +echo >&5 +_ACEOF + +# Files that config.status was made for. +if test -n "$ac_config_files"; then + echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_headers"; then + echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_links"; then + echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_commands"; then + echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS +fi + +cat >>$CONFIG_STATUS <<\_ACEOF + +ac_cs_usage="\ +\`$as_me' instantiates files from templates according to the +current configuration. + +Usage: $0 [OPTIONS] [FILE]... + + -h, --help print this help, then exit + -V, --version print version number, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + +Configuration files: +$config_files + +Report bugs to ." +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF +ac_cs_version="\\ +config.status +configured by $0, generated by GNU Autoconf 2.57, + with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" + +Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 +Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." +srcdir=$srcdir +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +# If no file are specified by the user, then we need to provide default +# value. By we need to know if files were specified by the user. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=*) + ac_option=`expr "x$1" : 'x\([^=]*\)='` + ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + ac_shift=: + ;; + -*) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + *) # This is not an option, so the user has probably given explicit + # arguments. + ac_option=$1 + ac_need_defaults=false;; + esac + + case $ac_option in + # Handling of the options. +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --vers* | -V ) + echo "$ac_cs_version"; exit 0 ;; + --he | --h) + # Conflict between --help and --header + { { echo "$as_me:$LINENO: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + CONFIG_FILES="$CONFIG_FILES $ac_optarg" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + ac_need_defaults=false;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; } ;; + + *) ac_config_targets="$ac_config_targets $1" ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +if \$ac_cs_recheck; then + echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion +fi + +_ACEOF + + + + + +cat >>$CONFIG_STATUS <<\_ACEOF +for ac_config_target in $ac_config_targets +do + case "$ac_config_target" in + # Handling of arguments. + "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; + "src/ogl/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/ogl/Makefile" ;; + "src/mmedia/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/mmedia/Makefile" ;; + "src/stc/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/stc/Makefile" ;; + "src/svg/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/svg/Makefile" ;; + "src/xrc/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/xrc/Makefile" ;; + "src/canvas/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/canvas/Makefile" ;; + "src/gizmos/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/gizmos/Makefile" ;; + "src/plot/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/plot/Makefile" ;; + "src/applet/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/applet/Makefile" ;; + "src/fl/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/fl/Makefile" ;; + "src/net/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/net/Makefile" ;; + "src/animate/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/animate/Makefile" ;; + "samples/Makefile" ) CONFIG_FILES="$CONFIG_FILES samples/Makefile" ;; + "samples/mmedia/Makefile" ) CONFIG_FILES="$CONFIG_FILES samples/mmedia/Makefile" ;; + "samples/ogl/Makefile" ) CONFIG_FILES="$CONFIG_FILES samples/ogl/Makefile" ;; + "samples/ogl/ogledit/Makefile" ) CONFIG_FILES="$CONFIG_FILES samples/ogl/ogledit/Makefile" ;; + "samples/ogl/studio/Makefile" ) CONFIG_FILES="$CONFIG_FILES samples/ogl/studio/Makefile" ;; + "samples/stc/Makefile" ) CONFIG_FILES="$CONFIG_FILES samples/stc/Makefile" ;; + "samples/svg/Makefile" ) CONFIG_FILES="$CONFIG_FILES samples/svg/Makefile" ;; + "samples/canvas/Makefile" ) CONFIG_FILES="$CONFIG_FILES samples/canvas/Makefile" ;; + "samples/canvas/test/Makefile" ) CONFIG_FILES="$CONFIG_FILES samples/canvas/test/Makefile" ;; + "samples/canvas/simple/Makefile" ) CONFIG_FILES="$CONFIG_FILES samples/canvas/simple/Makefile" ;; + "samples/gizmos/Makefile" ) CONFIG_FILES="$CONFIG_FILES samples/gizmos/Makefile" ;; + "samples/gizmos/editlbox/Makefile" ) CONFIG_FILES="$CONFIG_FILES samples/gizmos/editlbox/Makefile" ;; + "samples/gizmos/dynsash/Makefile" ) CONFIG_FILES="$CONFIG_FILES samples/gizmos/dynsash/Makefile" ;; + "samples/gizmos/dynsash_switch/Makefile" ) CONFIG_FILES="$CONFIG_FILES samples/gizmos/dynsash_switch/Makefile" ;; + "samples/gizmos/multicell/Makefile" ) CONFIG_FILES="$CONFIG_FILES samples/gizmos/multicell/Makefile" ;; + "samples/gizmos/splittree/Makefile" ) CONFIG_FILES="$CONFIG_FILES samples/gizmos/splittree/Makefile" ;; + "samples/gizmos/led/Makefile" ) CONFIG_FILES="$CONFIG_FILES samples/gizmos/led/Makefile" ;; + "samples/xrc/Makefile" ) CONFIG_FILES="$CONFIG_FILES samples/xrc/Makefile" ;; + "samples/plot/Makefile" ) CONFIG_FILES="$CONFIG_FILES samples/plot/Makefile" ;; + "samples/applet/Makefile" ) CONFIG_FILES="$CONFIG_FILES samples/applet/Makefile" ;; + "samples/fl/Makefile" ) CONFIG_FILES="$CONFIG_FILES samples/fl/Makefile" ;; + "samples/fl/fl_demo1/Makefile" ) CONFIG_FILES="$CONFIG_FILES samples/fl/fl_demo1/Makefile" ;; + "samples/fl/fl_demo2/Makefile" ) CONFIG_FILES="$CONFIG_FILES samples/fl/fl_demo2/Makefile" ;; + "samples/fl/fl_sample1/Makefile" ) CONFIG_FILES="$CONFIG_FILES samples/fl/fl_sample1/Makefile" ;; + "samples/fl/fl_sample2/Makefile" ) CONFIG_FILES="$CONFIG_FILES samples/fl/fl_sample2/Makefile" ;; + "samples/fl/fl_sample3/Makefile" ) CONFIG_FILES="$CONFIG_FILES samples/fl/fl_sample3/Makefile" ;; + "utils/Makefile" ) CONFIG_FILES="$CONFIG_FILES utils/Makefile" ;; + "utils/wxrc/Makefile" ) CONFIG_FILES="$CONFIG_FILES utils/wxrc/Makefile" ;; + "utils/wxrcedit/Makefile" ) CONFIG_FILES="$CONFIG_FILES utils/wxrcedit/Makefile" ;; + "utils/convertrc/Makefile" ) CONFIG_FILES="$CONFIG_FILES utils/convertrc/Makefile" ;; + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; + esac +done + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason to put it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Create a temporary directory, and hook for its removal unless debugging. +$debug || +{ + trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 +} + +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=./confstat$$-$RANDOM + (umask 077 && mkdir $tmp) +} || +{ + echo "$me: cannot create a temporary directory in ." >&2 + { (exit 1); exit 1; } +} + +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF + +# +# CONFIG_FILES section. +# + +# No need to generate the scripts if there are no CONFIG_FILES. +# This happens for instance when ./config.status config.h +if test -n "\$CONFIG_FILES"; then + # Protect against being on the right side of a sed subst in config.status. + sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; + s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF +s,@SHELL@,$SHELL,;t t +s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t +s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t +s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t +s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t +s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t +s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t +s,@exec_prefix@,$exec_prefix,;t t +s,@prefix@,$prefix,;t t +s,@program_transform_name@,$program_transform_name,;t t +s,@bindir@,$bindir,;t t +s,@sbindir@,$sbindir,;t t +s,@libexecdir@,$libexecdir,;t t +s,@datadir@,$datadir,;t t +s,@sysconfdir@,$sysconfdir,;t t +s,@sharedstatedir@,$sharedstatedir,;t t +s,@localstatedir@,$localstatedir,;t t +s,@libdir@,$libdir,;t t +s,@includedir@,$includedir,;t t +s,@oldincludedir@,$oldincludedir,;t t +s,@infodir@,$infodir,;t t +s,@mandir@,$mandir,;t t +s,@build_alias@,$build_alias,;t t +s,@host_alias@,$host_alias,;t t +s,@target_alias@,$target_alias,;t t +s,@DEFS@,$DEFS,;t t +s,@ECHO_C@,$ECHO_C,;t t +s,@ECHO_N@,$ECHO_N,;t t +s,@ECHO_T@,$ECHO_T,;t t +s,@LIBS@,$LIBS,;t t +s,@CC@,$CC,;t t +s,@CFLAGS@,$CFLAGS,;t t +s,@LDFLAGS@,$LDFLAGS,;t t +s,@CPPFLAGS@,$CPPFLAGS,;t t +s,@ac_ct_CC@,$ac_ct_CC,;t t +s,@EXEEXT@,$EXEEXT,;t t +s,@OBJEXT@,$OBJEXT,;t t +s,@CPP@,$CPP,;t t +s,@EGREP@,$EGREP,;t t +s,@PATH_IFS@,$PATH_IFS,;t t +s,@ESD_LINK@,$ESD_LINK,;t t +s,@WX_TARGET_LIBRARY@,$WX_TARGET_LIBRARY,;t t +s,@WX_TARGET_LIBRARY_TYPE@,$WX_TARGET_LIBRARY_TYPE,;t t +s,@WX_LIBRARY_BASENAME@,$WX_LIBRARY_BASENAME,;t t +s,@WX_RELEASE@,$WX_RELEASE,;t t +s,@WX_CURRENT@,$WX_CURRENT,;t t +s,@WX_REVISION@,$WX_REVISION,;t t +s,@WX_AGE@,$WX_AGE,;t t +s,@LIBOBJS@,$LIBOBJS,;t t +s,@LTLIBOBJS@,$LTLIBOBJS,;t t +CEOF + +_ACEOF + + cat >>$CONFIG_STATUS <<\_ACEOF + # Split the substitutions into bite-sized pieces for seds with + # small command number limits, like on Digital OSF/1 and HP-UX. + ac_max_sed_lines=48 + ac_sed_frag=1 # Number of current file. + ac_beg=1 # First line for current file. + ac_end=$ac_max_sed_lines # Line after last line for current file. + ac_more_lines=: + ac_sed_cmds= + while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + else + sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + fi + if test ! -s $tmp/subs.frag; then + ac_more_lines=false + else + # The purpose of the label and of the branching condition is to + # speed up the sed processing (if there are no `@' at all, there + # is no need to browse any of the substitutions). + # These are the two extra sed commands mentioned above. + (echo ':t + /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" + else + ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" + fi + ac_sed_frag=`expr $ac_sed_frag + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_lines` + fi + done + if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat + fi +fi # test -n "$CONFIG_FILES" + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; + esac + + # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. + ac_dir=`(dirname "$ac_file") 2>/dev/null || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac +# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be +# absolute. +ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` +ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` +ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` +ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` + + + + if test x"$ac_file" != x-; then + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + rm -f "$ac_file" + fi + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + configure_input= + else + configure_input="$ac_file. " + fi + configure_input=$configure_input"Generated from `echo $ac_file_in | + sed 's,.*/,,'` by configure." + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo $f;; + *) # Relative + if test -f "$f"; then + # Build tree + echo $f + elif test -f "$srcdir/$f"; then + # Source tree + echo $srcdir/$f + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF + sed "$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s,@configure_input@,$configure_input,;t t +s,@srcdir@,$ac_srcdir,;t t +s,@abs_srcdir@,$ac_abs_srcdir,;t t +s,@top_srcdir@,$ac_top_srcdir,;t t +s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t +s,@builddir@,$ac_builddir,;t t +s,@abs_builddir@,$ac_abs_builddir,;t t +s,@top_builddir@,$ac_top_builddir,;t t +s,@abs_top_builddir@,$ac_abs_top_builddir,;t t +" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out + rm -f $tmp/stdin + if test x"$ac_file" != x-; then + mv $tmp/out $ac_file + else + cat $tmp/out + rm -f $tmp/out fi - case "$ac_given_srcdir" in - .) srcdir=. - if test -z "$ac_dots"; then top_srcdir=. - else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; - /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; - *) # Relative path. - srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" - top_srcdir="$ac_dots$ac_given_srcdir" ;; - esac +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF - echo creating "$ac_file" - rm -f "$ac_file" - configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." - case "$ac_file" in - *Makefile*) ac_comsub="1i\\ -# $configure_input" ;; - *) ac_comsub= ;; - esac - - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - sed -e "$ac_comsub -s%@configure_input@%$configure_input%g -s%@srcdir@%$srcdir%g -s%@top_srcdir@%$top_srcdir%g -" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file -fi; done -rm -f conftest.s* - -EOF -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF - -exit 0 -EOF +{ (exit 0); exit 0; } +_ACEOF chmod +x $CONFIG_STATUS -rm -fr confdefs* $ac_clean_files -test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 +ac_clean_files=$ac_clean_files_save + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || { (exit 1); exit 1; } +fi diff --git a/contrib/configure.in b/contrib/configure.in index ef6db6c6ec..eda761445c 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 @@ -49,21 +59,25 @@ AC_OUTPUT([ src/applet/Makefile src/fl/Makefile src/net/Makefile + src/animate/Makefile samples/Makefile + samples/animate/Makefile samples/mmedia/Makefile samples/ogl/Makefile 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/docs/latex/fl/books.bmp b/contrib/docs/latex/fl/books.bmp deleted file mode 100644 index cf1e148734..0000000000 Binary files a/contrib/docs/latex/fl/books.bmp and /dev/null differ diff --git a/contrib/docs/latex/fl/books.gif b/contrib/docs/latex/fl/books.gif deleted file mode 100644 index 118aa0a819..0000000000 Binary files a/contrib/docs/latex/fl/books.gif and /dev/null differ diff --git a/contrib/docs/latex/fl/contents.gif b/contrib/docs/latex/fl/contents.gif index 723174f81d..da92528ddd 100644 Binary files a/contrib/docs/latex/fl/contents.gif and b/contrib/docs/latex/fl/contents.gif differ diff --git a/contrib/docs/latex/fl/shelves.bmp b/contrib/docs/latex/fl/shelves.bmp deleted file mode 100644 index f51aa39680..0000000000 Binary files a/contrib/docs/latex/fl/shelves.bmp and /dev/null differ diff --git a/contrib/docs/latex/fl/tex2rtf.ini b/contrib/docs/latex/fl/tex2rtf.ini index 54b56e940f..00043c3ca1 100644 --- a/contrib/docs/latex/fl/tex2rtf.ini +++ b/contrib/docs/latex/fl/tex2rtf.ini @@ -29,9 +29,6 @@ htmlFaceName = "Arial, Lucida, Helvetica" htmlWorkshopFiles = true htmlIndex = true -;\overview [2] {\rtfonly{See also }\settransparency{on}\sethotspotcolour{off}\sethotspotunderline{on}\winhelponly{\image{}{books.bmp}\settransparency{off}} -;\htmlonly{\image{}{books.gif}}\helpref{#1}{#2} -;\sethotspotcolour{on}\sethotspotunderline{on}} \overview [2] {\helpref{#1}{#2}} \docparam [2]{\parskip{0}{\it #1}\htmlignore{\par}\parskip{10}\indented{1cm}{#2}} %\wxheading [1]{{\bf \fcol{blue}{#1}}} diff --git a/contrib/docs/latex/gizmos/books.bmp b/contrib/docs/latex/gizmos/books.bmp deleted file mode 100644 index cf1e148734..0000000000 Binary files a/contrib/docs/latex/gizmos/books.bmp and /dev/null differ diff --git a/contrib/docs/latex/gizmos/books.gif b/contrib/docs/latex/gizmos/books.gif deleted file mode 100644 index 118aa0a819..0000000000 Binary files a/contrib/docs/latex/gizmos/books.gif and /dev/null differ diff --git a/contrib/docs/latex/gizmos/contents.gif b/contrib/docs/latex/gizmos/contents.gif index 723174f81d..da92528ddd 100644 Binary files a/contrib/docs/latex/gizmos/contents.gif and b/contrib/docs/latex/gizmos/contents.gif differ diff --git a/contrib/docs/latex/gizmos/shelves.bmp b/contrib/docs/latex/gizmos/shelves.bmp deleted file mode 100644 index f51aa39680..0000000000 Binary files a/contrib/docs/latex/gizmos/shelves.bmp and /dev/null differ diff --git a/contrib/docs/latex/gizmos/tex2rtf.ini b/contrib/docs/latex/gizmos/tex2rtf.ini index 3b1569a3c1..241b3171cb 100644 --- a/contrib/docs/latex/gizmos/tex2rtf.ini +++ b/contrib/docs/latex/gizmos/tex2rtf.ini @@ -29,9 +29,6 @@ htmlFaceName = "Arial, Lucida, Helvetica" htmlWorkshopFiles = true htmlIndex = true -;\overview [2] {\rtfonly{See also }\settransparency{on}\sethotspotcolour{off}\sethotspotunderline{on}\winhelponly{\image{}{books.bmp}\settransparency{off}} -;\htmlonly{\image{}{books.gif}}\helpref{#1}{#2} -;\sethotspotcolour{on}\sethotspotunderline{on}} \overview [2] {\helpref{#1}{#2}} \docparam [2]{\parskip{0}{\it #1}\htmlignore{\par}\parskip{10}\indented{1cm}{#2}} %\wxheading [1]{{\bf \fcol{blue}{#1}}} diff --git a/contrib/docs/latex/mmedia/books.bmp b/contrib/docs/latex/mmedia/books.bmp deleted file mode 100644 index cf1e148734..0000000000 Binary files a/contrib/docs/latex/mmedia/books.bmp and /dev/null differ diff --git a/contrib/docs/latex/mmedia/books.gif b/contrib/docs/latex/mmedia/books.gif deleted file mode 100644 index 118aa0a819..0000000000 Binary files a/contrib/docs/latex/mmedia/books.gif and /dev/null differ diff --git a/contrib/docs/latex/mmedia/contents.gif b/contrib/docs/latex/mmedia/contents.gif index 3dddfa3dd5..da92528ddd 100644 Binary files a/contrib/docs/latex/mmedia/contents.gif and b/contrib/docs/latex/mmedia/contents.gif differ diff --git a/contrib/docs/latex/mmedia/tex2rtf.ini b/contrib/docs/latex/mmedia/tex2rtf.ini index 75c1e1d5b5..a5694d11f2 100644 --- a/contrib/docs/latex/mmedia/tex2rtf.ini +++ b/contrib/docs/latex/mmedia/tex2rtf.ini @@ -16,7 +16,7 @@ winHelpContents = yes winHelpTitle = "MMedia Manual" truncateFilenames = no combineSubSections = yes -\overview [2] {\rtfonly{See also }\settransparency{on}\sethotspotcolour{off}\sethotspotunderline{on}\winhelponly{\image{}{books.bmp}\settransparency{off}} +\overview [2] {\helpref{#1}{#2}} \htmlonly{\image{}{books.gif}}\helpref{#1}{#2} \sethotspotcolour{on}\sethotspotunderline{on}} \docparam [2]{\parskip{0}{\it #1}\htmlignore{\par}\parskip{10}\indented{1cm}{#2}} diff --git a/contrib/docs/latex/ogl/books.bmp b/contrib/docs/latex/ogl/books.bmp deleted file mode 100644 index cf1e148734..0000000000 Binary files a/contrib/docs/latex/ogl/books.bmp and /dev/null differ diff --git a/contrib/docs/latex/ogl/books.gif b/contrib/docs/latex/ogl/books.gif deleted file mode 100644 index 118aa0a819..0000000000 Binary files a/contrib/docs/latex/ogl/books.gif and /dev/null differ diff --git a/contrib/docs/latex/ogl/contents.gif b/contrib/docs/latex/ogl/contents.gif index 723174f81d..da92528ddd 100644 Binary files a/contrib/docs/latex/ogl/contents.gif and b/contrib/docs/latex/ogl/contents.gif differ diff --git a/contrib/docs/latex/ogl/tex2rtf.ini b/contrib/docs/latex/ogl/tex2rtf.ini index eee50eed8b..16b0b710e1 100644 --- a/contrib/docs/latex/ogl/tex2rtf.ini +++ b/contrib/docs/latex/ogl/tex2rtf.ini @@ -16,7 +16,7 @@ winHelpContents = yes winHelpTitle = "OGL Manual" truncateFilenames = yes combineSubSections = yes -\overview [2] {\rtfonly{See also }\settransparency{on}\sethotspotcolour{off}\sethotspotunderline{on}\winhelponly{\image{}{books.bmp}\settransparency{off}} +\overview [2] {\helpref{#1}{#2}} \htmlonly{\image{}{books.gif}}\helpref{#1}{#2} \sethotspotcolour{on}\sethotspotunderline{on}} \docparam [2]{\parskip{0}{\it #1}\htmlignore{\par}\parskip{10}\indented{1cm}{#2}} diff --git a/contrib/docs/latex/svg/contents.gif b/contrib/docs/latex/svg/contents.gif index 723174f81d..da92528ddd 100644 Binary files a/contrib/docs/latex/svg/contents.gif and b/contrib/docs/latex/svg/contents.gif differ diff --git a/contrib/docs/latex/svg/tex2rtf.ini b/contrib/docs/latex/svg/tex2rtf.ini index a06196b9ec..4aab2e5ff3 100644 --- a/contrib/docs/latex/svg/tex2rtf.ini +++ b/contrib/docs/latex/svg/tex2rtf.ini @@ -16,7 +16,7 @@ winHelpContents = yes winHelpTitle = "SVG Manual" truncateFilenames = yes combineSubSections = yes -\overview [2] {\rtfonly{See also }\settransparency{on}\sethotspotcolour{off}\sethotspotunderline{on}\winhelponly{\image{}{books.bmp}\settransparency{off}} +\overview [2] {\helpref{#1}{#2}} \htmlonly{\image{}{books.gif}}\helpref{#1}{#2} \sethotspotcolour{on}\sethotspotunderline{on}} \docparam [2]{\parskip{0}{\it #1}\htmlignore{\par}\parskip{10}\indented{1cm}{#2}} diff --git a/contrib/include/wx/animate/animate.h b/contrib/include/wx/animate/animate.h index 2768d13d30..e740c6f034 100644 --- a/contrib/include/wx/animate/animate.h +++ b/contrib/include/wx/animate/animate.h @@ -21,6 +21,7 @@ #include #include #include +#include //#define ANIMDLLEXPORT WXDLLEXPORT #define ANIMDLLEXPORT @@ -138,7 +139,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/mmedia/sndaiff.h b/contrib/include/wx/mmedia/sndaiff.h index 3a44a856bc..53b53583af 100644 --- a/contrib/include/wx/mmedia/sndaiff.h +++ b/contrib/include/wx/mmedia/sndaiff.h @@ -3,7 +3,9 @@ // Purpose: // Date: 08/11/1999 // Author: Guilhem Lavaux (C) 1999 +// License: wxWindows license // CVSID: $Id$ +// License: wxWindows license // -------------------------------------------------------------------------- #ifndef _WX_SNDAIFF_H #define _WX_SNDAIFF_H diff --git a/contrib/include/wx/mmedia/sndbase.h b/contrib/include/wx/mmedia/sndbase.h index a19cf39917..564b89969e 100644 --- a/contrib/include/wx/mmedia/sndbase.h +++ b/contrib/include/wx/mmedia/sndbase.h @@ -4,6 +4,7 @@ // Date: 08/11/1999 // Author: Guilhem Lavaux (C) 1999 // CVSID: $Id$ +// License: wxWindows license // -------------------------------------------------------------------------- #ifndef _WX_SNDBASE_H #define _WX_SNDBASE_H diff --git a/contrib/include/wx/mmedia/sndcodec.h b/contrib/include/wx/mmedia/sndcodec.h index 27ca206c5b..9d5a03201b 100644 --- a/contrib/include/wx/mmedia/sndcodec.h +++ b/contrib/include/wx/mmedia/sndcodec.h @@ -4,6 +4,7 @@ // Date: 08/11/1999 // Author: Guilhem Lavaux (C) 1999 // CVSID: $Id$ +// License: wxWindows license // -------------------------------------------------------------------------- #ifndef _WX_SNDCODEC_H #define _WX_SNDCODEC_H diff --git a/contrib/include/wx/mmedia/sndcpcm.h b/contrib/include/wx/mmedia/sndcpcm.h index 310e0ebd35..7d761e583d 100644 --- a/contrib/include/wx/mmedia/sndcpcm.h +++ b/contrib/include/wx/mmedia/sndcpcm.h @@ -4,6 +4,7 @@ // Date: 08/11/1999 // Author: Guilhem Lavaux (C) 1999 // CVSID: $Id$ +// License: wxWindows license // -------------------------------------------------------------------------- #ifndef _WX_SNDCPCM_H #define _WX_SNDCPCM_H diff --git a/contrib/include/wx/mmedia/sndesd.h b/contrib/include/wx/mmedia/sndesd.h index 06cbce5f87..a8f606ad99 100644 --- a/contrib/include/wx/mmedia/sndesd.h +++ b/contrib/include/wx/mmedia/sndesd.h @@ -4,6 +4,7 @@ // Date: 08/11/1999 // Author: Guilhem Lavaux (C) 1999 // CVSID: $Id$ +// License: wxWindows license // -------------------------------------------------------------------------- #ifndef _WX_SNDESD_H #define _WX_SNDESD_H diff --git a/contrib/include/wx/mmedia/sndfile.h b/contrib/include/wx/mmedia/sndfile.h index 65dc888510..6cdb23033c 100644 --- a/contrib/include/wx/mmedia/sndfile.h +++ b/contrib/include/wx/mmedia/sndfile.h @@ -4,6 +4,7 @@ // Date: 08/11/1999 // Author: Guilhem Lavaux (C) 1999 // CVSID: $Id$ +// License: wxWindows license // -------------------------------------------------------------------------- #ifndef _WX_SNDFILE_H #define _WX_SNDFILE_H diff --git a/contrib/include/wx/mmedia/sndg72x.h b/contrib/include/wx/mmedia/sndg72x.h index 61ef7d602f..5c69bfecfb 100644 --- a/contrib/include/wx/mmedia/sndg72x.h +++ b/contrib/include/wx/mmedia/sndg72x.h @@ -4,6 +4,7 @@ // Date: 08/26/1999 // Author: Guilhem Lavaux (C) 1999 // CVSID: $Id$ +// License: wxWindows license // -------------------------------------------------------------------------- #ifndef _WX_SNDG72X_H #define _WX_SNDG72X_H diff --git a/contrib/include/wx/mmedia/sndmsad.h b/contrib/include/wx/mmedia/sndmsad.h index 8073330b50..b52659562e 100644 --- a/contrib/include/wx/mmedia/sndmsad.h +++ b/contrib/include/wx/mmedia/sndmsad.h @@ -4,6 +4,7 @@ // Date: 25/02/2000 // Author: Guilhem Lavaux (C) 2000 // CVSID: $Id$ +// License: wxWindows license // -------------------------------------------------------------------------- #ifndef _WX_SNDMSAD_H #define _WX_SNDMSAD_H diff --git a/contrib/include/wx/mmedia/sndoss.h b/contrib/include/wx/mmedia/sndoss.h index 9a8f3ddf4a..212ab4358b 100644 --- a/contrib/include/wx/mmedia/sndoss.h +++ b/contrib/include/wx/mmedia/sndoss.h @@ -4,6 +4,7 @@ // Date: 08/11/1999 // Author: Guilhem Lavaux (C) 1999 // CVSID: $Id$ +// License: wxWindows license // -------------------------------------------------------------------------- #ifndef _WX_SNDOSS_H #define _WX_SNDOSS_H diff --git a/contrib/include/wx/mmedia/sndpcm.h b/contrib/include/wx/mmedia/sndpcm.h index 652687a0f4..1123d47865 100644 --- a/contrib/include/wx/mmedia/sndpcm.h +++ b/contrib/include/wx/mmedia/sndpcm.h @@ -4,6 +4,7 @@ // Date: 08/11/1999 // Author: Guilhem Lavaux (C) 1999 // CVSID: $Id$ +// License: wxWindows license // -------------------------------------------------------------------------- #ifndef _WX_SNDPCM_H #define _WX_SNDPCM_H diff --git a/contrib/include/wx/mmedia/sndulaw.h b/contrib/include/wx/mmedia/sndulaw.h index c558bb4758..d0ec4024fe 100644 --- a/contrib/include/wx/mmedia/sndulaw.h +++ b/contrib/include/wx/mmedia/sndulaw.h @@ -4,6 +4,7 @@ // Date: 08/11/1999 // Author: Guilhem Lavaux (C) 1999 // CVSID: $Id$ +// License: wxWindows license // -------------------------------------------------------------------------- #ifndef _WX_SNDULAW_H #define _WX_SNDULAW_H diff --git a/contrib/include/wx/mmedia/sndwav.h b/contrib/include/wx/mmedia/sndwav.h index caebec4080..c83f021775 100644 --- a/contrib/include/wx/mmedia/sndwav.h +++ b/contrib/include/wx/mmedia/sndwav.h @@ -4,6 +4,7 @@ // Date: 08/11/1999 // Author: Guilhem Lavaux (C) 1999 // CVSID: $Id$ +// License: wxWindows license // -------------------------------------------------------------------------- #ifndef _WX_SNDWAV_H #define _WX_SNDWAV_H diff --git a/contrib/include/wx/mmedia/sndwin.h b/contrib/include/wx/mmedia/sndwin.h index e630ee4543..16a65282b4 100644 --- a/contrib/include/wx/mmedia/sndwin.h +++ b/contrib/include/wx/mmedia/sndwin.h @@ -4,6 +4,7 @@ // Date: 08/11/1999 // Author: Guilhem Lavaux (C) 1999 // CVSID: $Id$ +// License: wxWindows license // -------------------------------------------------------------------------- #ifndef _WX_SNDWIN_H #define _WX_SNDWIN_H 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..45688bcd54 100644 --- a/contrib/include/wx/stc/stc.h +++ b/contrib/include/wx/stc/stc.h @@ -24,6 +24,39 @@ #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 + + +// SWIG can't handle "#if" type of conditionals, only "#ifdef" +#ifdef SWIG +#define STC_USE_DND 1 +#else +#if wxUSE_DRAG_AND_DROP +#define STC_USE_DND 1 +#endif +#endif + //---------------------------------------------------------------------- // Should a wxPopupWindow be used for the call tips and autocomplete windows? @@ -43,12 +76,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 +86,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 +119,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. @@ -144,6 +175,7 @@ #define wxSTC_INDIC_TT 2 #define wxSTC_INDIC_DIAGONAL 3 #define wxSTC_INDIC_STRIKE 4 +#define wxSTC_INDIC_HIDDEN 5 #define wxSTC_INDIC0_MASK 0x20 #define wxSTC_INDIC1_MASK 0x40 #define wxSTC_INDIC2_MASK 0x80 @@ -167,22 +199,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 +221,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 @@ -378,6 +257,9 @@ // where most code reside, and the lines after the caret, eg. the body of a function. #define wxSTC_CARET_EVEN 0x08 +// Maximum value of keywordSet parameter of SetKeyWords. +#define wxSTC_KEYWORDSET_MAX 8 + // 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. @@ -454,6 +336,17 @@ #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 +#define wxSTC_LEX_LOUT 40 +#define wxSTC_LEX_ESCRIPT 41 +#define wxSTC_LEX_PS 42 +#define wxSTC_LEX_NSIS 43 +#define wxSTC_LEX_MMIXAL 44 // When a lexer specifies its language as SCLEX_AUTOMATIC it receives a // value assigned in sequence from SCLEX_AUTOMATIC+1. @@ -495,6 +388,7 @@ #define wxSTC_C_WORD2 16 #define wxSTC_C_COMMENTDOCKEYWORD 17 #define wxSTC_C_COMMENTDOCKEYWORDERROR 18 +#define wxSTC_C_GLOBALCLASS 19 // Lexical states for SCLEX_HTML, SCLEX_XML #define wxSTC_H_DEFAULT 0 @@ -706,6 +600,8 @@ #define wxSTC_LUA_WORD4 15 #define wxSTC_LUA_WORD5 16 #define wxSTC_LUA_WORD6 17 +#define wxSTC_LUA_WORD7 18 +#define wxSTC_LUA_WORD8 19 // Lexical states for SCLEX_ERRORLIST #define wxSTC_ERR_DEFAULT 0 @@ -722,6 +618,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 +667,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 +772,373 @@ #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_NUMBER 3 +#define wxSTC_POV_OPERATOR 4 +#define wxSTC_POV_IDENTIFIER 5 +#define wxSTC_POV_STRING 6 +#define wxSTC_POV_STRINGEOL 7 +#define wxSTC_POV_DIRECTIVE 8 +#define wxSTC_POV_BADDIRECTIVE 9 +#define wxSTC_POV_WORD2 10 +#define wxSTC_POV_WORD3 11 +#define wxSTC_POV_WORD4 12 +#define wxSTC_POV_WORD5 13 +#define wxSTC_POV_WORD6 14 +#define wxSTC_POV_WORD7 15 +#define wxSTC_POV_WORD8 16 + +// Lexical states for SCLEX_LOUT +#define wxSTC_LOUT_DEFAULT 0 +#define wxSTC_LOUT_COMMENT 1 +#define wxSTC_LOUT_NUMBER 2 +#define wxSTC_LOUT_WORD 3 +#define wxSTC_LOUT_WORD2 4 +#define wxSTC_LOUT_WORD3 5 +#define wxSTC_LOUT_WORD4 6 +#define wxSTC_LOUT_STRING 7 +#define wxSTC_LOUT_OPERATOR 8 +#define wxSTC_LOUT_IDENTIFIER 9 +#define wxSTC_LOUT_STRINGEOL 10 + +// Lexical states for SCLEX_ESCRIPT +#define wxSTC_ESCRIPT_DEFAULT 0 +#define wxSTC_ESCRIPT_COMMENT 1 +#define wxSTC_ESCRIPT_COMMENTLINE 2 +#define wxSTC_ESCRIPT_COMMENTDOC 3 +#define wxSTC_ESCRIPT_NUMBER 4 +#define wxSTC_ESCRIPT_WORD 5 +#define wxSTC_ESCRIPT_STRING 6 +#define wxSTC_ESCRIPT_OPERATOR 7 +#define wxSTC_ESCRIPT_IDENTIFIER 8 +#define wxSTC_ESCRIPT_BRACE 9 +#define wxSTC_ESCRIPT_WORD2 10 +#define wxSTC_ESCRIPT_WORD3 11 + +// Lexical states for SCLEX_PS +#define wxSTC_PS_DEFAULT 0 +#define wxSTC_PS_COMMENT 1 +#define wxSTC_PS_DSC_COMMENT 2 +#define wxSTC_PS_DSC_VALUE 3 +#define wxSTC_PS_NUMBER 4 +#define wxSTC_PS_NAME 5 +#define wxSTC_PS_KEYWORD 6 +#define wxSTC_PS_LITERAL 7 +#define wxSTC_PS_IMMEVAL 8 +#define wxSTC_PS_PAREN_ARRAY 9 +#define wxSTC_PS_PAREN_DICT 10 +#define wxSTC_PS_PAREN_PROC 11 +#define wxSTC_PS_TEXT 12 +#define wxSTC_PS_HEXSTRING 13 +#define wxSTC_PS_BASE85STRING 14 +#define wxSTC_PS_BADSTRINGCHAR 15 + +// Lexical states for SCLEX_NSIS +#define wxSTC_NSIS_DEFAULT 0 +#define wxSTC_NSIS_COMMENT 1 +#define wxSTC_NSIS_STRINGDQ 2 +#define wxSTC_NSIS_STRINGLQ 3 +#define wxSTC_NSIS_STRINGRQ 4 +#define wxSTC_NSIS_FUNCTION 5 +#define wxSTC_NSIS_VARIABLE 6 +#define wxSTC_NSIS_LABEL 7 +#define wxSTC_NSIS_USERDEFINED 8 +#define wxSTC_NSIS_SECTIONDEF 9 +#define wxSTC_NSIS_SUBSECTIONDEF 10 +#define wxSTC_NSIS_IFDEFINEDEF 11 +#define wxSTC_NSIS_MACRODEF 12 +#define wxSTC_NSIS_STRINGVAR 13 + +// Lexical states for SCLEX_MMIXAL +#define wxSTC_MMIXAL_LEADWS 0 +#define wxSTC_MMIXAL_COMMENT 1 +#define wxSTC_MMIXAL_LABEL 2 +#define wxSTC_MMIXAL_OPCODE 3 +#define wxSTC_MMIXAL_OPCODE_PRE 4 +#define wxSTC_MMIXAL_OPCODE_VALID 5 +#define wxSTC_MMIXAL_OPCODE_UNKNOWN 6 +#define wxSTC_MMIXAL_OPCODE_POST 7 +#define wxSTC_MMIXAL_OPERANDS 8 +#define wxSTC_MMIXAL_NUMBER 9 +#define wxSTC_MMIXAL_REF 10 +#define wxSTC_MMIXAL_CHAR 11 +#define wxSTC_MMIXAL_STRING 12 +#define wxSTC_MMIXAL_REGISTER 13 +#define wxSTC_MMIXAL_HEX 14 +#define wxSTC_MMIXAL_OPERATOR 15 +#define wxSTC_MMIXAL_SYMBOL 16 +#define wxSTC_MMIXAL_INCLUDE 17 + + +//----------------------------------------- +// 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 +1146,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 +1312,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 +1339,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 +1402,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 +1566,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 +1667,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 +1829,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 +1876,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,20 +1942,56 @@ 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(); + // Copy the line containing the caret. + void LineCopy(); + // Move the caret inside current view if it's not there already. void MoveCaretInsideView(); @@ -1765,10 +2102,10 @@ public: bool GetMouseDownCaptures(); // Sets the cursor to one of the SC_CURSOR* values. - void SetCursor(int cursorType); + void SetSTCCursor(int cursorType); // Get cursor type. - int GetCursor(); + int GetSTCCursor(); // Change the way control characters are displayed: // If symbol is < 32, keep the drawn way, else, use the given character. @@ -1805,6 +2142,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 +2153,35 @@ 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); + + // Given a valid document position, return the previous position taking code + // page into account. Returns 0 if passed 0. + int PositionBefore(int pos); + + // Given a valid document position, return the next position taking code + // page into account. Maximum value returned is the last position in the document. + int PositionAfter(int pos); + + // Copy a range of text to the clipboard. Positions are clipped into the document. + void CopyRange(int start, int end); + + // Copy argument text to the clipboard. + void CopyText(int length, const wxString& text); + // Start notifying the container of all key presses and commands. void StartRecord(); @@ -1918,6 +2287,19 @@ 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); + +#ifdef STC_USE_DND + // Allow for simulating a DnD DragOver + wxDragResult DoDragOver(wxCoord x, wxCoord y, wxDragResult def); + + // Allow for simulating a DnD DropText + bool DoDropText(long x, long y, const wxString& data); +#endif //---------------------------------------------------------------------- @@ -1933,6 +2315,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 +2332,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,15 +2351,6 @@ private: //---------------------------------------------------------------------- -// SWIG can't handle "#if" type of conditionals, onlu "#ifdef" -#ifdef SWIG -#define STC_USE_DND 1 -#else -#if wxUSE_DRAG_AND_DROP -#define STC_USE_DND 1 -#endif -#endif - class wxStyledTextEvent : public wxCommandEvent { public: wxStyledTextEvent(wxEventType commandType=0, int id=0); @@ -2072,31 +2446,36 @@ private: #endif }; + + #ifndef SWIG BEGIN_DECLARE_EVENT_TYPES() - DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_CHANGE, 1650) - DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_STYLENEEDED, 1651) - DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_CHARADDED, 1652) - DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_SAVEPOINTREACHED, 1653) - DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_SAVEPOINTLEFT, 1654) - DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_ROMODIFYATTEMPT, 1655) - DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_KEY, 1656) - DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_DOUBLECLICK, 1657) - DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_UPDATEUI, 1658) - DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_MODIFIED, 1659) - DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_MACRORECORD, 1660) - DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_MARGINCLICK, 1661) - DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_NEEDSHOWN, 1662) - DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_POSCHANGED, 1663) - DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_PAINTED, 1664) - DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_USERLISTSELECTION, 1665) - DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_URIDROPPED, 1666) - DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_DWELLSTART, 1667) - DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_DWELLEND, 1668) - DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_START_DRAG, 1669) - 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_EXPORTED_LOCAL_EVENT_TYPE(WXSTC_DECLSPEC, wxEVT_STC_CHANGE, 1650) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE(WXSTC_DECLSPEC, wxEVT_STC_STYLENEEDED, 1651) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE(WXSTC_DECLSPEC, wxEVT_STC_CHARADDED, 1652) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE(WXSTC_DECLSPEC, wxEVT_STC_SAVEPOINTREACHED, 1653) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE(WXSTC_DECLSPEC, wxEVT_STC_SAVEPOINTLEFT, 1654) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE(WXSTC_DECLSPEC, wxEVT_STC_ROMODIFYATTEMPT, 1655) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE(WXSTC_DECLSPEC, wxEVT_STC_KEY, 1656) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE(WXSTC_DECLSPEC, wxEVT_STC_DOUBLECLICK, 1657) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE(WXSTC_DECLSPEC, wxEVT_STC_UPDATEUI, 1658) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE(WXSTC_DECLSPEC, wxEVT_STC_MODIFIED, 1659) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE(WXSTC_DECLSPEC, wxEVT_STC_MACRORECORD, 1660) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE(WXSTC_DECLSPEC, wxEVT_STC_MARGINCLICK, 1661) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE(WXSTC_DECLSPEC, wxEVT_STC_NEEDSHOWN, 1662) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE(WXSTC_DECLSPEC, wxEVT_STC_POSCHANGED, 1663) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE(WXSTC_DECLSPEC, wxEVT_STC_PAINTED, 1664) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE(WXSTC_DECLSPEC, wxEVT_STC_USERLISTSELECTION, 1665) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE(WXSTC_DECLSPEC, wxEVT_STC_URIDROPPED, 1666) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE(WXSTC_DECLSPEC, wxEVT_STC_DWELLSTART, 1667) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE(WXSTC_DECLSPEC, wxEVT_STC_DWELLEND, 1668) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE(WXSTC_DECLSPEC, wxEVT_STC_START_DRAG, 1669) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE(WXSTC_DECLSPEC, wxEVT_STC_DRAG_OVER, 1670) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE(WXSTC_DECLSPEC, wxEVT_STC_DO_DROP, 1671) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE(WXSTC_DECLSPEC, wxEVT_STC_ZOOM, 1672) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE(WXSTC_DECLSPEC, wxEVT_STC_HOTSPOT_CLICK, 1673) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE(WXSTC_DECLSPEC, wxEVT_STC_HOTSPOT_DCLICK, 1674) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE(WXSTC_DECLSPEC, wxEVT_STC_CALLTIP_CLICK, 1675) END_DECLARE_EVENT_TYPES() #else enum { @@ -2123,6 +2502,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 +2536,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 //---------------------------------------------------------------------- @@ -2169,13 +2555,14 @@ inline wxString stc2wx(const char* str) { #endif } -inline wxString stc2wx(const char* str, size_t len) { #if wxUSE_UNICODE - return wxString(str, wxConvUTF8, len); +wxString stc2wx(const char* str, size_t len); #else +inline wxString stc2wx(const char* str, size_t len) { return wxString(str, len); -#endif } +#endif + #if wxUSE_UNICODE inline const wxWX2MBbuf wx2stc(const wxString& str) { diff --git a/contrib/include/wx/xrc/xh_all.h b/contrib/include/wx/xrc/xh_all.h index 5382b6ffb0..b807675abc 100644 --- a/contrib/include/wx/xrc/xh_all.h +++ b/contrib/include/wx/xrc/xh_all.h @@ -19,6 +19,7 @@ #include "wx/xrc/xh_dlg.h" #include "wx/xrc/xh_bttn.h" #include "wx/xrc/xh_chckb.h" +#include "wx/xrc/xh_tglbtn.h" #include "wx/xrc/xh_gauge.h" #include "wx/xrc/xh_html.h" #include "wx/xrc/xh_spin.h" @@ -46,5 +47,9 @@ #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" +#include "wx/xrc/xh_statbar.h" #endif // _WX_XMLRES_H_ diff --git a/contrib/include/wx/xrc/xh_chckl.h b/contrib/include/wx/xrc/xh_chckl.h index f5913dce84..9a9d6889ae 100644 --- a/contrib/include/wx/xrc/xh_chckl.h +++ b/contrib/include/wx/xrc/xh_chckl.h @@ -17,10 +17,10 @@ #include "wx/xrc/xmlres.h" -class WXXMLDLLEXPORT wxCheckListXmlHandler : public wxXmlResourceHandler +class WXXMLDLLEXPORT wxCheckListBoxXmlHandler : public wxXmlResourceHandler { public: - wxCheckListXmlHandler(); + wxCheckListBoxXmlHandler(); virtual wxObject *DoCreateResource(); virtual bool CanHandle(wxXmlNode *node); private: 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_statbar.h b/contrib/include/wx/xrc/xh_statbar.h new file mode 100644 index 0000000000..7e57e00d2f --- /dev/null +++ b/contrib/include/wx/xrc/xh_statbar.h @@ -0,0 +1,29 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: xh_statbar.h +// Purpose: XML resource handler for wxStatusBar +// Author: Brian Ravnsgaard Riis +// Created: 2004/01/21 +// RCS-ID: +// Copyright: (c) 2004 Brian Ravnsgaard Riis +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_STATBAR_H_ +#define _WX_XH_STATBAR_H_ + +#if defined(__GNUG__) && !defined(__APPLE__) +#pragma interface "xh_statbar.h" +#endif + +#include "wx/xrc/xmlres.h" + +class WXXMLDLLEXPORT wxStatusBarXmlHandler : public wxXmlResourceHandler +{ + public: + wxStatusBarXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +}; + +#endif // _WX_XH_STATBAR_H_ + diff --git a/contrib/include/wx/xrc/xh_tglbtn.h b/contrib/include/wx/xrc/xh_tglbtn.h new file mode 100644 index 0000000000..3cdf08800b --- /dev/null +++ b/contrib/include/wx/xrc/xh_tglbtn.h @@ -0,0 +1,36 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: xh_tglbtn.h +// Purpose: XML resource handler for wxToggleButton +// Author: Julian Smart +// Created: 2004-08-30 +// RCS-ID: $Id$ +// Copyright: (c) 2004 Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_TGLBTN_H_ +#define _WX_XH_TGLBTN_H_ + +#if defined(__GNUG__) && !defined(__APPLE__) +#pragma interface "xh_tglbtn.h" +#endif + +#include "wx/xrc/xmlres.h" +#include "wx/defs.h" + +#if wxUSE_TOGGLEBTN + +class WXDLLEXPORT wxToggleButtonXmlHandler : public wxXmlResourceHandler +{ +DECLARE_DYNAMIC_CLASS(wxToggleButtonXmlHandler) +public: + wxToggleButtonXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +}; + +#endif + + +#endif // _WX_XH_TGLBTN_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/bttrfly.gif b/contrib/samples/animate/bttrfly.gif deleted file mode 100644 index b84ac352d6..0000000000 Binary files a/contrib/samples/animate/bttrfly.gif and /dev/null differ diff --git a/contrib/samples/animate/hooked.gif b/contrib/samples/animate/hooked.gif deleted file mode 100644 index 7041b8ef55..0000000000 Binary files a/contrib/samples/animate/hooked.gif and /dev/null differ diff --git a/contrib/samples/animate/makefile.va b/contrib/samples/animate/makefile.va index d3b737651f..982e8c8fda 100644 --- a/contrib/samples/animate/makefile.va +++ b/contrib/samples/animate/makefile.va @@ -4,6 +4,7 @@ # Created: 1999 # Updated: # Copyright: (c) David Webster +# Licence: wxWindows license # # Makefile : Builds sample (VisualAgeC++ V3.0, OS/2 PM) # Use FINAL=1 argument to nmake to build final version with no debug info. 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/animate/tbttrfly.gif b/contrib/samples/animate/tbttrfly.gif deleted file mode 100644 index de6f2f4bcf..0000000000 Binary files a/contrib/samples/animate/tbttrfly.gif and /dev/null differ 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/bitmaps/bookmarks.bmp b/contrib/samples/fl/bitmaps/bookmarks.bmp index d6a3a7977c..61cf99ee2b 100644 Binary files a/contrib/samples/fl/bitmaps/bookmarks.bmp and b/contrib/samples/fl/bitmaps/bookmarks.bmp differ diff --git a/contrib/samples/fl/bitmaps/class_icon.bmp b/contrib/samples/fl/bitmaps/class_icon.bmp index fe1a0c9d87..8ab35e63b6 100644 Binary files a/contrib/samples/fl/bitmaps/class_icon.bmp and b/contrib/samples/fl/bitmaps/class_icon.bmp differ diff --git a/contrib/samples/fl/bitmaps/class_icon1.bmp b/contrib/samples/fl/bitmaps/class_icon1.bmp index ef9846d737..18109c80f9 100644 Binary files a/contrib/samples/fl/bitmaps/class_icon1.bmp and b/contrib/samples/fl/bitmaps/class_icon1.bmp differ diff --git a/contrib/samples/fl/bitmaps/copy.bmp b/contrib/samples/fl/bitmaps/copy.bmp index 5e66fc8dfe..a21608fc23 100644 Binary files a/contrib/samples/fl/bitmaps/copy.bmp and b/contrib/samples/fl/bitmaps/copy.bmp differ diff --git a/contrib/samples/fl/bitmaps/cut.bmp b/contrib/samples/fl/bitmaps/cut.bmp index cf9247f2ea..d41668ab3f 100644 Binary files a/contrib/samples/fl/bitmaps/cut.bmp and b/contrib/samples/fl/bitmaps/cut.bmp differ diff --git a/contrib/samples/fl/bitmaps/file_icon.bmp b/contrib/samples/fl/bitmaps/file_icon.bmp index 941b5ccabf..496988c6de 100644 Binary files a/contrib/samples/fl/bitmaps/file_icon.bmp and b/contrib/samples/fl/bitmaps/file_icon.bmp differ diff --git a/contrib/samples/fl/bitmaps/folder_icon.bmp b/contrib/samples/fl/bitmaps/folder_icon.bmp index 7e45f597ec..feae18738a 100644 Binary files a/contrib/samples/fl/bitmaps/folder_icon.bmp and b/contrib/samples/fl/bitmaps/folder_icon.bmp differ diff --git a/contrib/samples/fl/bitmaps/help_icon.bmp b/contrib/samples/fl/bitmaps/help_icon.bmp index cd1b36244c..548588a796 100644 Binary files a/contrib/samples/fl/bitmaps/help_icon.bmp and b/contrib/samples/fl/bitmaps/help_icon.bmp differ diff --git a/contrib/samples/fl/bitmaps/new.bmp b/contrib/samples/fl/bitmaps/new.bmp index 1785f051bb..371b34ade0 100644 Binary files a/contrib/samples/fl/bitmaps/new.bmp and b/contrib/samples/fl/bitmaps/new.bmp differ diff --git a/contrib/samples/fl/bitmaps/nextmark.bmp b/contrib/samples/fl/bitmaps/nextmark.bmp index ce916ee63d..597818bd44 100644 Binary files a/contrib/samples/fl/bitmaps/nextmark.bmp and b/contrib/samples/fl/bitmaps/nextmark.bmp differ diff --git a/contrib/samples/fl/bitmaps/open.bmp b/contrib/samples/fl/bitmaps/open.bmp index 8a2ac5cc01..35ad487487 100644 Binary files a/contrib/samples/fl/bitmaps/open.bmp and b/contrib/samples/fl/bitmaps/open.bmp differ diff --git a/contrib/samples/fl/bitmaps/paste.bmp b/contrib/samples/fl/bitmaps/paste.bmp index 8c4b66bfe8..73032d58b0 100644 Binary files a/contrib/samples/fl/bitmaps/paste.bmp and b/contrib/samples/fl/bitmaps/paste.bmp differ diff --git a/contrib/samples/fl/bitmaps/prevmark.bmp b/contrib/samples/fl/bitmaps/prevmark.bmp index 4b2a12e1c8..83ad6f346f 100644 Binary files a/contrib/samples/fl/bitmaps/prevmark.bmp and b/contrib/samples/fl/bitmaps/prevmark.bmp differ diff --git a/contrib/samples/fl/bitmaps/res_icon.bmp b/contrib/samples/fl/bitmaps/res_icon.bmp index 770cc35547..7077719210 100644 Binary files a/contrib/samples/fl/bitmaps/res_icon.bmp and b/contrib/samples/fl/bitmaps/res_icon.bmp differ diff --git a/contrib/samples/fl/bitmaps/save.bmp b/contrib/samples/fl/bitmaps/save.bmp index 02f8c7d5cb..2da2da72ad 100644 Binary files a/contrib/samples/fl/bitmaps/save.bmp and b/contrib/samples/fl/bitmaps/save.bmp differ diff --git a/contrib/samples/fl/bitmaps/saveall.bmp b/contrib/samples/fl/bitmaps/saveall.bmp index bd04e1c10f..4413bcfe74 100644 Binary files a/contrib/samples/fl/bitmaps/saveall.bmp and b/contrib/samples/fl/bitmaps/saveall.bmp differ diff --git a/contrib/samples/fl/bitmaps/search.bmp b/contrib/samples/fl/bitmaps/search.bmp index dee7606132..771adc406e 100644 Binary files a/contrib/samples/fl/bitmaps/search.bmp and b/contrib/samples/fl/bitmaps/search.bmp differ diff --git a/contrib/samples/fl/bitmaps/start95_dp.bmp b/contrib/samples/fl/bitmaps/start95_dp.bmp index d18943575d..d5187ef910 100644 Binary files a/contrib/samples/fl/bitmaps/start95_dp.bmp and b/contrib/samples/fl/bitmaps/start95_dp.bmp differ diff --git a/contrib/samples/fl/bitmaps/start95_pr.bmp b/contrib/samples/fl/bitmaps/start95_pr.bmp index 002c41da14..da4aad3ed8 100644 Binary files a/contrib/samples/fl/bitmaps/start95_pr.bmp and b/contrib/samples/fl/bitmaps/start95_pr.bmp differ diff --git a/contrib/samples/fl/bitmaps/tile.bmp b/contrib/samples/fl/bitmaps/tile.bmp index 2269ce2f5f..66901edf3d 100644 Binary files a/contrib/samples/fl/bitmaps/tile.bmp and b/contrib/samples/fl/bitmaps/tile.bmp differ 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..c094a9fdf3 100644 --- a/contrib/samples/gizmos/dynsash/Makefile.in +++ b/contrib/samples/gizmos/dynsash/Makefile.in @@ -4,6 +4,7 @@ # Created: 2001 # Updated: # Copyright: (c) 2001 Matt Kimball +# License: wxWindows license # # "%W% %G%" # @@ -16,7 +17,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..c77940f998 100644 --- a/contrib/samples/gizmos/dynsash_switch/Makefile.in +++ b/contrib/samples/gizmos/dynsash_switch/Makefile.in @@ -4,6 +4,7 @@ # Created: 2001 # Updated: # Copyright: (c) 2001 Matt Kimball +# License: wxWindows license # # "%W% %G%" # @@ -16,7 +17,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..1fda4fa97f 100644 --- a/contrib/samples/gizmos/multicell/mtest.cpp +++ b/contrib/samples/gizmos/multicell/mtest.cpp @@ -4,7 +4,9 @@ * Author: Alex Andruschak * Created: 2000 * Updated: - * Copyright: + * Copyright: + * Licence: wxWindows license + */ static const char sccsid[] = "%W% %G%"; @@ -79,7 +81,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.va b/contrib/samples/gizmos/splittree/makefile.va index ba7f61ed13..16a49ca2c4 100644 --- a/contrib/samples/gizmos/splittree/makefile.va +++ b/contrib/samples/gizmos/splittree/makefile.va @@ -4,6 +4,7 @@ # Created: 1999 # Updated: # Copyright: (c) David Webster +# Licence: wxWindows license # # Makefile : Builds sample (VisualAgeC++ V3.0, OS/2 PM) # Use FINAL=1 argument to nmake to build final version with no debug info. 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/bitmaps/copy.bmp b/contrib/samples/ogl/studio/bitmaps/copy.bmp deleted file mode 100644 index 4551a06bfa..0000000000 Binary files a/contrib/samples/ogl/studio/bitmaps/copy.bmp and /dev/null differ diff --git a/contrib/samples/ogl/studio/bitmaps/copy.xpm b/contrib/samples/ogl/studio/bitmaps/copy.xpm index 47565c1cae..00ae82e213 100644 --- a/contrib/samples/ogl/studio/bitmaps/copy.xpm +++ b/contrib/samples/ogl/studio/bitmaps/copy.xpm @@ -1,25 +1,44 @@ /* XPM */ static char *copy_xpm[] = { /* columns rows colors chars-per-pixel */ -"16 15 4 1", +"16 15 23 1", +"+ c #769CDA", +": c #DCE6F6", +"X c #3365B7", +"* c #FFFFFF", +"o c #9AB6E4", +"< c #EAF0FA", +"# c #B1C7EB", +". c #6992D7", +"3 c #F7F9FD", +", c #F0F5FC", +"$ c #A8C0E8", " c None", -". c Black", -"X c Gray100", -"o c #000080", +"- c #FDFEFF", +"& c #C4D5F0", +"1 c #E2EAF8", +"O c #89A9DF", +"= c #D2DFF4", +"4 c #FAFCFE", +"2 c #F5F8FD", +"; c #DFE8F7", +"% c #B8CCEC", +"> c #E5EDF9", +"@ c #648FD6", /* pixels */ -" ", -" ...... ", -" .XXXX.. ", -" .XXXX.X. ", -" .X..X.oooooo ", -" .XXXXXoXXXXoo ", -" .X....oXXXXoXo ", -" .XXXXXoX..Xoooo", -" .X....oXXXXXXXo", -" .XXXXXoX.....Xo", -" ......oXXXXXXXo", -" oX.....Xo", -" oXXXXXXXo", -" ooooooooo", -" " +" .....XX ", +" .oO+@X#X ", +" .$oO+X##X ", +" .%$o........ ", +" .&%$.*=&#o.-. ", +" .=&%.*;=&#.--. ", +" .:=&.*>;=&.... ", +" .>:=.*,>;=&#o. ", +" .<1:.*2,>:=&#. ", +" .2<1.*32,>:=&. ", +" .32<.*432,>:=. ", +" .32<.*-432,>:. ", +" .....**-432,>. ", +" .***-432,. ", +" .......... " }; diff --git a/contrib/samples/ogl/studio/bitmaps/cut.bmp b/contrib/samples/ogl/studio/bitmaps/cut.bmp deleted file mode 100644 index 15554338a0..0000000000 Binary files a/contrib/samples/ogl/studio/bitmaps/cut.bmp and /dev/null differ diff --git a/contrib/samples/ogl/studio/bitmaps/cut.xpm b/contrib/samples/ogl/studio/bitmaps/cut.xpm index bfe7e95cea..8afa8f6d15 100644 --- a/contrib/samples/ogl/studio/bitmaps/cut.xpm +++ b/contrib/samples/ogl/studio/bitmaps/cut.xpm @@ -1,24 +1,46 @@ /* XPM */ static char *cut_xpm[] = { /* columns rows colors chars-per-pixel */ -"16 15 3 1", +"16 15 25 1", +"6 c #D8BDC0", +": c #C3C3C4", +"- c #FFFFFF", +". c #6C6D70", +"2 c #AD3A45", +"o c #DBDBDB", +"# c #939495", +"< c #E42234", +"& c #C3C5C8", +"; c #C6CCD3", +"% c #B7B7B8", " c None", -". c Black", -"X c #000080", +"* c #DFE0E2", +"5 c #B69596", +"3 c #9C2A35", +"1 c #CFCFD0", +", c #AB5C64", +"+ c #D2D3D4", +"$ c #BCBDBE", +"@ c #C6C8CA", +"> c #CDC0C1", +"O c #826F72", +"X c #979BA0", +"4 c #9B8687", +"= c #9FA0A0", /* pixels */ -" ", -" . . ", -" . . ", -" . . ", -" .. .. ", -" . . ", -" ... ", -" . ", -" X.X ", -" X XXX ", -" XXX X X ", -" X X X X ", -" X X X X ", -" X X XX ", -" XX " +" .X .o ", +" O.+ @. ", +" O. .. ", +" O#$ %.& ", +" O.*.. ", +" #%#.. ", +" O=-.. ", +" #%#;. ", +" OO:=O ", +" >,,<, ,<,,1 ", +" ><23<1 1<32<1 ", +" ,2 4< <5 2, ", +" <, ,2 2, ,< ", +" 23,<5 5<,32 ", +" 6225 522> " }; diff --git a/contrib/samples/ogl/studio/bitmaps/file1.ico b/contrib/samples/ogl/studio/bitmaps/file1.ico index cc828ab4f2..497f7321bf 100644 Binary files a/contrib/samples/ogl/studio/bitmaps/file1.ico and b/contrib/samples/ogl/studio/bitmaps/file1.ico differ diff --git a/contrib/samples/ogl/studio/bitmaps/folder1.ico b/contrib/samples/ogl/studio/bitmaps/folder1.ico index c43de1c07c..806b900a30 100644 Binary files a/contrib/samples/ogl/studio/bitmaps/folder1.ico and b/contrib/samples/ogl/studio/bitmaps/folder1.ico differ diff --git a/contrib/samples/ogl/studio/bitmaps/help.bmp b/contrib/samples/ogl/studio/bitmaps/help.bmp deleted file mode 100644 index 2d9e6922ca..0000000000 Binary files a/contrib/samples/ogl/studio/bitmaps/help.bmp and /dev/null differ diff --git a/contrib/samples/ogl/studio/bitmaps/help.xpm b/contrib/samples/ogl/studio/bitmaps/help.xpm index 27a87ebb31..161b6b2658 100644 --- a/contrib/samples/ogl/studio/bitmaps/help.xpm +++ b/contrib/samples/ogl/studio/bitmaps/help.xpm @@ -1,24 +1,71 @@ /* XPM */ static char *help_xpm[] = { /* columns rows colors chars-per-pixel */ -"16 15 3 1", +"16 15 50 1", +"j c #4E7FD0", +"8 c #EDF2FB", +", c #7198D9", +"e c #DCE6F6", +"y c #FFFFFF", +"5 c #95B2E3", +"$ c #9AB6E4", +"g c #EAF0FA", +"1 c #2D59A3", +"@ c #B1C7EB", +"> c #6992D7", +"a c #D9E4F5", +"r c #356AC1", +"6 c #9BB7E5", +"= c #F7F9FD", +"+ c #BED0EE", +"z c #F0F5FC", +"f c #ADC4E9", +"# c #A8C0E8", +"7 c #CBD9F1", +"u c #366BC2", " c None", -". c Black", -"X c #008080", +"c c #FDFEFF", +"w c #274D8D", +"t c #C4D5F0", +"% c #7CA0DC", +"h c #E2EAF8", +"p c #487BCE", +"o c #4377CD", +"4 c #2A549A", +"< c #254A87", +"O c #CCDAF2", +"& c #89A9DF", +"9 c #2B559B", +"* c #D2DFF4", +". c #3366BB", +": c #2E5CA8", +"x c #FAFCFE", +"l c #F5F8FD", +"2 c #799EDB", +"d c #DFE8F7", +"; c #A6BFE8", +"3 c #638ED5", +"- c #5282D0", +"X c #2A5398", +"0 c #B8CCEC", +"s c #376EC9", +"q c #2D5AA5", +"i c #285092", +"k c #8CACE0", /* pixels */ -" ", -" ...... ", -" .XXXXX.. ", -" .XX...XX.. ", -" .X.. .X.. ", -" .X.. .XX.. ", -" .. .XX.. ", -" .XX.. ", -" .X.. ", -" .X.. ", -" .X.. ", -" .. ", -" .XX.. ", -" .XX.. ", -" ... " +" .......Xo ", +" .O+@#$%.&o ", +" .*O+@#$.=&- ", +" ;:::>#@#.==&: ", +" ,<1234<>@....: ", +"5 c #3366BB", +"$ c #2E5CA8", +"9 c #FAFCFE", +"4 c #F5F8FD", +"q c #638ED5", +"o c #5282D0", +"& c #B8CCEC", +"X c #376EC9", +"< c #ACE95B", /* pixels */ -" ", -" ........ ", -" .XXXXXX.. ", -" .XXXXXX.X. ", -" .XXXXXX.... ", -" .XXXXXXXXX. ", -" .XXXXXXXXX. ", -" .XXXXXXXXX. ", -" .XXXXXXXXX. ", -" .XXXXXXXXX. ", -" .XXXXXXXXX. ", -" .XXXXXXXXX. ", -" .XXXXXXXXX. ", -" ........... ", -" " +" .XoO+@#$. ", +" .%%&*=-O;: ", +" >>>>%&*=O,=o ", +" ><<>%%&*O,,=o", +">>><<>>>%&OOo+@", +"><<<<<<>1%&*=-@", +"><<<<<<>21%&*=@", +">>><<>>>321%&*+", +" ><<>456321%&O", +" >>>>7456321%o", +" .,8974563210", +" .,,897456320", +" .,,,8974563q", +" .,,,,897456w", +" ............" }; diff --git a/contrib/samples/ogl/studio/bitmaps/open.bmp b/contrib/samples/ogl/studio/bitmaps/open.bmp deleted file mode 100644 index bbf93fe033..0000000000 Binary files a/contrib/samples/ogl/studio/bitmaps/open.bmp and /dev/null differ diff --git a/contrib/samples/ogl/studio/bitmaps/open.xpm b/contrib/samples/ogl/studio/bitmaps/open.xpm index 54748e910d..36e058fc8e 100644 --- a/contrib/samples/ogl/studio/bitmaps/open.xpm +++ b/contrib/samples/ogl/studio/bitmaps/open.xpm @@ -1,26 +1,57 @@ /* XPM */ static char *open_xpm[] = { /* columns rows colors chars-per-pixel */ -"16 15 5 1", +"16 15 36 1", +", c #AAC1E8", +"1 c #9AEA53", +"q c #DCE6F6", +". c #295193", +"; c #A9D066", +"r c #C6D6F0", +"$ c #4A7CCE", +"9 c #779DDB", +"8 c #EAF0FA", +"O c #6E96D8", +"X c #214279", +"e c #BED0EE", +"6 c #85A7DF", +"5 c #F0F5FC", +"t c #ADC4E9", +": c #3161B1", " c None", -". c Black", -"X c Yellow", -"o c Gray100", -"O c #bfbf00", +"u c #274D8B", +"& c #BFDC9B", +"> c #9FB9E5", +"y c #5584D1", +"w c #3569BF", +"% c #3A70CA", +"+ c #305FAC", +"3 c #5D89D3", +"0 c #D2DFF4", +"@ c #CAE2AA", +"= c #B2D58C", +"2 c #FAFCFE", +"# c #638ED5", +"* c #CEDCF2", +"4 c #90AFE2", +"< c #B3C8EB", +"7 c #E5EDF9", +"- c #A2BCE6", +"o c #DFF0D0", /* pixels */ " ", -" ... ", -" . . .", -" ..", -" ... ...", -" .XoX....... ", -" .oXoXoXoXo. ", -" .XoXoXoXoX. ", -" .oXoX..........", -" .XoX.OOOOOOOOO.", -" .oo.OOOOOOOOO. ", -" .X.OOOOOOOOO. ", -" ..OOOOOOOOO. ", -" ........... ", +" .... ", +"XXXXX .oo. ", +"XOOOO+ .@o. ", +"XOOOO#$%.&*XXX ", +"XOOOOOOO.=*X-X ", +"XOXXXX...;*XXXX:", +"XOX>,<.11111*X2:", +"X3X4>,<.111*X5-:", +"XX#64>,,.1*X78: ", +"XXO964>,,.X0q7: ", +"Xw3O964>,,er0t: ", +"X%y3O964>, c #FEE3D7", +"O c #FFFFFF", +"o c #7B767D", +"% c #F79586", +"& c #CAE1F3", +"@ c #F08B62", +"# c #FCCBB8", +"- c #FDD8C9", +"4 c #FFF8F4", +"5 c #FFF5F0", " c None", -". c Black", -"X c Yellow", -"o c #808080", -"O c #000080", -"+ c Gray100", +"$ c #F8AA8F", +", c #EFF6FC", +"1 c #F7FBFD", +"2 c #FAFCFE", +"; c #DAEAF7", +": c #E9F3FA", +"6 c #FFFAF8", +". c #3C78A6", +"3 c #FFF1ED", +"X c #9B8687", +"+ c #FBBCA4", +"* c #B6D5EE", +"= c #F4F9FD", /* pixels */ -" ", -" .... ", -" .....XX..... ", -".ooo.X..X.ooo. ", -".oo. .oo. ", -".oo........oo. ", -".oooooooooooo. ", -".oooooOOOOOOO. ", -".oooooO+++++OO ", -".oooooO+++++O+O ", -".oooooO+OOO+OOO ", -".oooooO+++++++O ", -".oooooO+OOOOO+O ", -" .....O+++++++O ", -" OOOOOOOOO " +" ...... ", +" .XoOOOOoo. ", +".+XOOOOOOX@. ", +".+XXXXXXXX@. ", +".#++$$%@..... ", +".##++$$%.&*.=. ", +".-##++$$.;&.==. ", +".--##++$.:;.... ", +".>--##++.,:;&*. ", +".<>--##+.1,:;&. ", +".<<>--##.21,:;. ", +".3<<>--#.O21=:. ", +".45<<>--....... ", +".6453<>----. ", +"............ " }; diff --git a/contrib/samples/ogl/studio/bitmaps/preview.xpm b/contrib/samples/ogl/studio/bitmaps/preview.xpm index 0dfdca46e1..d0176b3546 100644 --- a/contrib/samples/ogl/studio/bitmaps/preview.xpm +++ b/contrib/samples/ogl/studio/bitmaps/preview.xpm @@ -1,26 +1,51 @@ /* XPM */ static char *preview_xpm[] = { /* columns rows colors chars-per-pixel */ -"16 15 5 1", -" c Black", -". c None", -"X c Gray100", -"o c #808080", -"O c Cyan", +"16 15 30 1", +"1 c Black", +"= c #97C4E7", +"< c #FFFFFF", +", c #69A1CF", +". c #5A89A6", +"# c #3A749C", +"+ c #538BB1", +"> c #D1E5F5", +"o c #6792AE", +"% c #C3DDF1", +"8 c #749BB5", +"; c #619BC4", +"X c #6B97B6", +"@ c #4B82A8", +" c None", +"O c #5F8FB0", +"q c #84A5BB", +": c #71A8D1", +"- c #85BBE2", +"9 c #EFF6FC", +"7 c #F7FBFD", +"6 c #FAFCFE", +"2 c #7FA6C0", +"5 c #C00000", +"0 c #FDFDFE", +"3 c #E2EFF8", +"$ c #8EA9BC", +"& c #B6D5EE", +"* c #A5CCEA", +"4 c #F4F9FD", /* pixels */ -" .......", -" XXXXXXX ......", -" XXXXXXX . .....", -" XXXXXXX ....", -" XXXXXXXXXX ....", -" XXXXXXX ....", -" XXXXXX o..o ...", -" XXXXX oOO.oo ..", -" XXXXX .O..o. ..", -" XXXXX ....o. ..", -" XXXXX o..Ooo ..", -" XXXXXX o..o o..", -" XXXXXXX o .", -" XXXXXXXXXX . ", -" .. " +" ..XoO+@#$ ", +" .%%&*=-;:; ", +" .>>%&*=,<=X ", +" $%%%1112<<=X ", +" $3-1<<<1oXO+ ", +" $314<<<<1=-+ ", +" $31<<<<<1-=+ ", +" $31<<<<<1&*O ", +" $3-1<<<51>%X ", +" $367111551>8 ", +" $3-----95518 ", +" $3<067466551 ", +" $3--------551 ", +" $3<<<0666<<55 ", +" $$$$$$$$$$q$ " }; diff --git a/contrib/samples/ogl/studio/bitmaps/print.bmp b/contrib/samples/ogl/studio/bitmaps/print.bmp deleted file mode 100644 index 00319b55bb..0000000000 Binary files a/contrib/samples/ogl/studio/bitmaps/print.bmp and /dev/null differ diff --git a/contrib/samples/ogl/studio/bitmaps/print.xpm b/contrib/samples/ogl/studio/bitmaps/print.xpm index 3c2e2be781..fae8103a9a 100644 --- a/contrib/samples/ogl/studio/bitmaps/print.xpm +++ b/contrib/samples/ogl/studio/bitmaps/print.xpm @@ -1,26 +1,56 @@ /* XPM */ static char *print_xpm[] = { /* columns rows colors chars-per-pixel */ -"16 15 5 1", +"16 15 35 1", +"y c #EDF2FB", +"9 c #4E7FD0", +"> c #B9CDED", +"# c #3365B7", +"r c #FFFFFF", +"8 c #2C58A0", +"X c #779DDB", +"7 c #7FA2DD", +"t c #3263B4", +"q c #6E96D8", +"= c #6992D7", +"* c #D9E4F5", +"0 c #356AC1", +"& c #CBD9F1", +"; c #97B4E3", +"e c #3161B1", " c None", -". c Black", -"X c Gray100", -"o c #808000", -"O c Yellow", +"1 c #B5C9EB", +", c #7CA0DC", +"4 c #487BCE", +"- c #4377CD", +". c #5584D1", +"6 c #3A70CA", +"2 c #305FAC", +"< c #5685D2", +"w c #4075CC", +"5 c #638ED5", +"3 c #3467BC", +"% c #2F5DA9", +"o c #ECF1FA", +": c #D6E1F4", +"@ c #376EC9", +"$ c #2D5AA5", +"+ c #A2BCE6", +"O c #CFDDF3", /* pixels */ -" ", -" ......... ", -" .XXXXXXXX. ", -" .X.....X. ", -" .XXXXXXXX. ", -" .X.....X.... ", -" .XXXXXXXX. . .", -" .......... . ..", -". . . .", -"............. .", -". ooo . . ", -". OOO ... ", -"............. . ", -" . . . ", -" ........... " +" .XXXXXXXX ", +" .oooooooX ", +" .OOOOOOOX ", +" .+++++++X ", +" @@#$%%%%%$%@@ ", +"#&*=-=;:>,<#*&# ", +".11.2345.63#11. ", +"4;;;;;;;;;;;;;4 ", +"677588888889776 ", +"0qq60wwwwwweqq0 ", +"3553rrrrrrr$553 ", +"3< c #3A70CA", +"- c #3569BF", +"& c #305FAC", +"1 c #5D89D3", +"= c #3366B9", +"9 c #2E5CA8", +"< c #638ED5", +"4 c #3467BC", +"X c #2F5DA9", +"# c #2A5398", +"$ c #376EC9", +"* c #2D5AA5", +"; c #8CACE0", /* pixels */ -"################", -"################", -"################", -"################", -"###a....########", -"##a.####..###.##", -"##.#######.#..##", -"##.########...##", -"##.#######....##", -"##a.#####.....##", -"###.a###########", -"################", -"################", -"################", -"################" +" .XoooO+ ", +" @o#####o$ @ ", +"%#&&*#*&&*# @o ", +"X=-#@;@#=-:#$*# ", +"#>-@ #->-=># ", +"*,>% #>,,,# ", +"*<1X X,<<<* ", +"@234; #13333* ", +" X56X $#7O155X ", +" O2869 .0$*o ", +" :qwe9 ", +" 9.rt9 ", +" 9+y@u ", +" i$$ ", +" " }; diff --git a/contrib/samples/ogl/studio/bitmaps/save.bmp b/contrib/samples/ogl/studio/bitmaps/save.bmp deleted file mode 100644 index 56dd10b6e3..0000000000 Binary files a/contrib/samples/ogl/studio/bitmaps/save.bmp and /dev/null differ diff --git a/contrib/samples/ogl/studio/bitmaps/save.xpm b/contrib/samples/ogl/studio/bitmaps/save.xpm index 01b18f9340..accf1f9eb2 100644 --- a/contrib/samples/ogl/studio/bitmaps/save.xpm +++ b/contrib/samples/ogl/studio/bitmaps/save.xpm @@ -1,25 +1,42 @@ /* XPM */ static char *save_xpm[] = { /* columns rows colors chars-per-pixel */ -"16 15 4 1", -" c None", -". c Black", -"X c #808000", -"o c #808080", +"16 15 21 1", +": c #AAC1E8", +"1 c #B9CDED", +"O c #FFFFFF", +" c #2C58A0", +"* c #B0C6EA", +"; c #2D59A3", +"X c #1C3866", +"= c #C3D4EF", +"2 c #CBD9F1", +"- c #DAE5F6", +"# c #97B4E3", +". c None", +"$ c #274D8B", +"& c #9FB9E5", +"@ c #5584D1", +"% c #82A5DE", +"o c #3A70CA", +"< c #A5BEE7", +", c #D2DFF4", +"+ c #3467BC", +"> c #C0D1EE", /* pixels */ -" ", -" .............. ", -" .X. . . ", -" .X. ... ", -" .X. .X. ", -" .X. .X. ", -" .X. .X. ", -" .X. .X. ", -" .XX........oX. ", -" .XXXXXXXXXXXX. ", -" .XX.........X. ", -" .XX...... .X. ", -" .XX...... .X. ", -" .XX...... .X. ", -" ............. " +" .", +" XoOOOOOOOOO+X .", +" @oO#######O+@ .", +" @oOOOOOOOOO+@ .", +" @oO#######O+@ .", +" @oOOOOOOOOO+@ .", +" @@+++++++++@@ .", +" @@@@@@@@@@@@@ .", +" @@@$$$$$$$$@@ .", +" @@$%%%&*=-O$@ .", +" @@$%X;;*=-O$@ .", +" @@$%X;;:>,O$@ .", +" @@$%X;;<12O$@ .", +" @@$<<2OOOOO$@ .", +". .." }; diff --git a/contrib/samples/ogl/studio/bitmaps/undo.bmp b/contrib/samples/ogl/studio/bitmaps/undo.bmp deleted file mode 100644 index 4ad80c772f..0000000000 Binary files a/contrib/samples/ogl/studio/bitmaps/undo.bmp and /dev/null differ diff --git a/contrib/samples/ogl/studio/bitmaps/undo.xpm b/contrib/samples/ogl/studio/bitmaps/undo.xpm index 157a623e3c..9266cb0e12 100644 --- a/contrib/samples/ogl/studio/bitmaps/undo.xpm +++ b/contrib/samples/ogl/studio/bitmaps/undo.xpm @@ -1,25 +1,58 @@ /* XPM */ static char *undo_xpm[] = { -/* width height num_colors chars_per_pixel */ -" 16 15 3 1", -/* colors */ -". c #000080", -"# c #c0c0c0", -"a c #808080", +/* columns rows colors chars-per-pixel */ +"16 15 37 1", +"4 c #4E7FD0", +"i c #3365B7", +"q c #8DADE1", +"= c #3162B3", +", c #4A7CCE", +"* c #779DDB", +"7 c #7FA2DD", +"8 c #6992D7", +"2 c #6E96D8", +"6 c #356AC1", +"+ c #9BB7E5", +"@ c #5886D2", +"y c #BED0EE", +"t c #C3D4EF", +"5 c #85A7DF", +". c #ADC4E9", +"u c #DAE5F6", +" c None", +"X c #487BCE", +"r c #9FB9E5", +"o c #254A87", +"w c #AEC5EA", +"e c #89A9DF", +"0 c #98B5E4", +"> c #3A70CA", +"- c #3569BF", +"& c #305FAC", +"1 c #5D89D3", +"; c #3366B9", +"9 c #2E5CA8", +"< c #638ED5", +"3 c #3467BC", +"O c #2F5DA9", +"$ c #2A5398", +"# c #376EC9", +"% c #2D5AA5", +": c #8CACE0", /* pixels */ -"################", -"################", -"################", -"################", -"########....a###", -"##.###..####.a##", -"##..#.#######.##", -"##...########.##", -"##....#######.##", -"##.....#####.a##", -"###########a.###", -"################", -"################", -"################", -"################" +" .XoooO+ ", +"@ #o$$$$$o@ ", +"o@ $%&&%$%&&$* ", +"$%#$=-;$@:@$-;O ", +"$>;->-$ @->$ ", +"$,,,>$ *>,% ", +"%<<<,O O1<% ", +"%22221$ :324@ ", +"O551X6$# O75O ", +"o%#8+ 9704X ", +" 9qwe= ", +" 9rt+9 ", +" y@u.9 ", +" ##i ", +" " }; 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/manual/bitmap1.bmp b/contrib/samples/ogl/studio/manual/bitmap1.bmp deleted file mode 100644 index 13e2170b73..0000000000 Binary files a/contrib/samples/ogl/studio/manual/bitmap1.bmp and /dev/null differ diff --git a/contrib/samples/ogl/studio/manual/bitmap2.bmp b/contrib/samples/ogl/studio/manual/bitmap2.bmp deleted file mode 100644 index 3d523b2de9..0000000000 Binary files a/contrib/samples/ogl/studio/manual/bitmap2.bmp and /dev/null differ diff --git a/contrib/samples/ogl/studio/manual/contents.gif b/contrib/samples/ogl/studio/manual/contents.gif index 3dddfa3dd5..da92528ddd 100644 Binary files a/contrib/samples/ogl/studio/manual/contents.gif and b/contrib/samples/ogl/studio/manual/contents.gif differ diff --git a/contrib/samples/ogl/studio/manual/copy.bmp b/contrib/samples/ogl/studio/manual/copy.bmp index 4551a06bfa..0a26d23ec3 100644 Binary files a/contrib/samples/ogl/studio/manual/copy.bmp and b/contrib/samples/ogl/studio/manual/copy.bmp differ diff --git a/contrib/samples/ogl/studio/manual/cut.bmp b/contrib/samples/ogl/studio/manual/cut.bmp index 15554338a0..e0de76cf51 100644 Binary files a/contrib/samples/ogl/studio/manual/cut.bmp and b/contrib/samples/ogl/studio/manual/cut.bmp differ diff --git a/contrib/samples/ogl/studio/manual/help.bmp b/contrib/samples/ogl/studio/manual/help.bmp index 2d9e6922ca..1b5e0b9603 100644 Binary files a/contrib/samples/ogl/studio/manual/help.bmp and b/contrib/samples/ogl/studio/manual/help.bmp differ diff --git a/contrib/samples/ogl/studio/manual/helpcs.bmp b/contrib/samples/ogl/studio/manual/helpcs.bmp index 8837381681..d6413e1d75 100644 Binary files a/contrib/samples/ogl/studio/manual/helpcs.bmp and b/contrib/samples/ogl/studio/manual/helpcs.bmp differ diff --git a/contrib/samples/ogl/studio/manual/new.bmp b/contrib/samples/ogl/studio/manual/new.bmp index d66feb2384..c832e3e7d5 100644 Binary files a/contrib/samples/ogl/studio/manual/new.bmp and b/contrib/samples/ogl/studio/manual/new.bmp differ diff --git a/contrib/samples/ogl/studio/manual/open.bmp b/contrib/samples/ogl/studio/manual/open.bmp index bbf93fe033..cc9e2881cc 100644 Binary files a/contrib/samples/ogl/studio/manual/open.bmp and b/contrib/samples/ogl/studio/manual/open.bmp differ diff --git a/contrib/samples/ogl/studio/manual/paste.bmp b/contrib/samples/ogl/studio/manual/paste.bmp index 564f514e0d..fd48d66c49 100644 Binary files a/contrib/samples/ogl/studio/manual/paste.bmp and b/contrib/samples/ogl/studio/manual/paste.bmp differ diff --git a/contrib/samples/ogl/studio/manual/preview.bmp b/contrib/samples/ogl/studio/manual/preview.bmp index da1f4dbc4b..a8bcdf5eff 100644 Binary files a/contrib/samples/ogl/studio/manual/preview.bmp and b/contrib/samples/ogl/studio/manual/preview.bmp differ diff --git a/contrib/samples/ogl/studio/manual/print.bmp b/contrib/samples/ogl/studio/manual/print.bmp index 00319b55bb..885d2e8d16 100644 Binary files a/contrib/samples/ogl/studio/manual/print.bmp and b/contrib/samples/ogl/studio/manual/print.bmp differ diff --git a/contrib/samples/ogl/studio/manual/redo.bmp b/contrib/samples/ogl/studio/manual/redo.bmp index 5877e34e00..5e97912b9a 100644 Binary files a/contrib/samples/ogl/studio/manual/redo.bmp and b/contrib/samples/ogl/studio/manual/redo.bmp differ diff --git a/contrib/samples/ogl/studio/manual/save.bmp b/contrib/samples/ogl/studio/manual/save.bmp index 56dd10b6e3..0df022cbb7 100644 Binary files a/contrib/samples/ogl/studio/manual/save.bmp and b/contrib/samples/ogl/studio/manual/save.bmp differ diff --git a/contrib/samples/ogl/studio/manual/undo.bmp b/contrib/samples/ogl/studio/manual/undo.bmp index 4ad80c772f..17447ace6b 100644 Binary files a/contrib/samples/ogl/studio/manual/undo.bmp and b/contrib/samples/ogl/studio/manual/undo.bmp differ 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..009e1776a1 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" @@ -33,7 +37,6 @@ #include "project.h" #include "symbols.h" -#if defined(__WXGTK__) || defined(__WXX11__) || defined(__WXMOTIF__) || defined(__WXMAC__) #include "bitmaps/new.xpm" #include "bitmaps/open.xpm" #include "bitmaps/save.xpm" @@ -58,7 +61,6 @@ #include "bitmaps/straight.xpm" #include "studio.xpm" -#endif IMPLEMENT_APP(csApp) @@ -311,18 +313,6 @@ void csApp::InitToolBar(wxToolBar* toolBar) { wxBitmap* bitmaps[10]; -#ifdef __WXMSW__ - bitmaps[0] = new wxBitmap("new", wxBITMAP_TYPE_RESOURCE); - bitmaps[1] = new wxBitmap("open", wxBITMAP_TYPE_RESOURCE); - bitmaps[2] = new wxBitmap("save", wxBITMAP_TYPE_RESOURCE); - bitmaps[3] = new wxBitmap("copy", wxBITMAP_TYPE_RESOURCE); - bitmaps[4] = new wxBitmap("cut", wxBITMAP_TYPE_RESOURCE); - bitmaps[5] = new wxBitmap("paste", wxBITMAP_TYPE_RESOURCE); - bitmaps[6] = new wxBitmap("print", wxBITMAP_TYPE_RESOURCE); - bitmaps[7] = new wxBitmap("help", wxBITMAP_TYPE_RESOURCE); - bitmaps[8] = new wxBitmap("undo", wxBITMAP_TYPE_RESOURCE); - bitmaps[9] = new wxBitmap("redo", wxBITMAP_TYPE_RESOURCE); -#elif defined(__WXGTK__) || defined(__WXX11__) || defined(__WXMOTIF__) || defined(__WXMAC__) bitmaps[0] = new wxBitmap( new_xpm ); bitmaps[1] = new wxBitmap( open_xpm ); bitmaps[2] = new wxBitmap( save_xpm ); @@ -333,36 +323,33 @@ void csApp::InitToolBar(wxToolBar* toolBar) bitmaps[7] = new wxBitmap( help_xpm ); bitmaps[8] = new wxBitmap( undo_xpm ); bitmaps[9] = new wxBitmap( redo_xpm ); -#else -#error "Not implemented for this platform." -#endif - toolBar->AddTool(wxID_NEW, *bitmaps[0], wxNullBitmap, FALSE, -1, -1, NULL, "New file"); - toolBar->AddTool(wxID_OPEN, *bitmaps[1], wxNullBitmap, FALSE, -1, -1, NULL, "Open file"); - toolBar->AddTool(wxID_SAVE, *bitmaps[2], wxNullBitmap, FALSE, -1, -1, NULL, "Save file"); - toolBar->AddSeparator(); - toolBar->AddTool(wxID_PRINT, *bitmaps[6], wxNullBitmap, FALSE, -1, -1, NULL, "Print"); - toolBar->AddSeparator(); - toolBar->AddTool(wxID_COPY, *bitmaps[3], wxNullBitmap, FALSE, -1, -1, NULL, "Copy"); - toolBar->AddTool(wxID_CUT, *bitmaps[4], wxNullBitmap, FALSE, -1, -1, NULL, "Cut"); - toolBar->AddTool(wxID_PASTE, *bitmaps[5], wxNullBitmap, FALSE, -1, -1, NULL, "Paste"); - toolBar->AddSeparator(); - toolBar->AddTool(wxID_UNDO, *bitmaps[8], wxNullBitmap, FALSE, -1, -1, NULL, "Undo"); - toolBar->AddTool(wxID_REDO, *bitmaps[9], wxNullBitmap, FALSE, -1, -1, NULL, "Redo"); - toolBar->AddSeparator(); - toolBar->AddTool(wxID_HELP, *bitmaps[7], wxNullBitmap, FALSE, -1, -1, NULL, "Help"); + toolBar->AddTool(wxID_NEW, *bitmaps[0], wxNullBitmap, FALSE, -1, -1, NULL, "New file"); + toolBar->AddTool(wxID_OPEN, *bitmaps[1], wxNullBitmap, FALSE, -1, -1, NULL, "Open file"); + toolBar->AddTool(wxID_SAVE, *bitmaps[2], wxNullBitmap, FALSE, -1, -1, NULL, "Save file"); + toolBar->AddSeparator(); + toolBar->AddTool(wxID_PRINT, *bitmaps[6], wxNullBitmap, FALSE, -1, -1, NULL, "Print"); + toolBar->AddSeparator(); + toolBar->AddTool(wxID_COPY, *bitmaps[3], wxNullBitmap, FALSE, -1, -1, NULL, "Copy"); + toolBar->AddTool(wxID_CUT, *bitmaps[4], wxNullBitmap, FALSE, -1, -1, NULL, "Cut"); + toolBar->AddTool(wxID_PASTE, *bitmaps[5], wxNullBitmap, FALSE, -1, -1, NULL, "Paste"); + toolBar->AddSeparator(); + toolBar->AddTool(wxID_UNDO, *bitmaps[8], wxNullBitmap, FALSE, -1, -1, NULL, "Undo"); + toolBar->AddTool(wxID_REDO, *bitmaps[9], wxNullBitmap, FALSE, -1, -1, NULL, "Redo"); + toolBar->AddSeparator(); + toolBar->AddTool(wxID_HELP, *bitmaps[7], wxNullBitmap, FALSE, -1, -1, NULL, "Help"); - toolBar->Realize(); + toolBar->Realize(); - toolBar->EnableTool(wxID_COPY, FALSE); - toolBar->EnableTool(wxID_PASTE, FALSE); - toolBar->EnableTool(wxID_PRINT, FALSE); - toolBar->EnableTool(wxID_UNDO, FALSE); - toolBar->EnableTool(wxID_REDO, FALSE); + toolBar->EnableTool(wxID_COPY, FALSE); + toolBar->EnableTool(wxID_PASTE, FALSE); + toolBar->EnableTool(wxID_PRINT, FALSE); + toolBar->EnableTool(wxID_UNDO, FALSE); + toolBar->EnableTool(wxID_REDO, FALSE); - int i; - for (i = 0; i < 10; i++) - delete bitmaps[i]; + int i; + for (i = 0; i < 10; i++) + delete bitmaps[i]; } // Create and initialise the diagram toolbar diff --git a/contrib/samples/ogl/studio/studio.rc b/contrib/samples/ogl/studio/studio.rc index 70a7a9c9e4..78f32f3459 100644 --- a/contrib/samples/ogl/studio/studio.rc +++ b/contrib/samples/ogl/studio/studio.rc @@ -7,21 +7,10 @@ aaaa ICON "studio.ico" wxSTD_MDIPARENTFRAME ICON "studio.ico" wxSTD_MDICHILDFRAME ICON "studio.ico" -studio ICON "studio.ico" +studio ICON "studio.ico" folder1 ICON "bitmaps/folder1.ico" file1 ICON "bitmaps/file1.ico" -new BITMAP "bitmaps/new.bmp" -open BITMAP "bitmaps/open.bmp" -save BITMAP "bitmaps/save.bmp" -copy BITMAP "bitmaps/copy.bmp" -cut BITMAP "bitmaps/cut.bmp" -paste BITMAP "bitmaps/paste.bmp" -print BITMAP "bitmaps/print.bmp" -help BITMAP "bitmaps/help.bmp" -undo BITMAP "bitmaps/undo.bmp" -redo BITMAP "bitmaps/redo.bmp" - arrowtool BITMAP "bitmaps/arrow.bmp" texttool BITMAP "bitmaps/texttool.bmp" 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..b026b30963 100644 --- a/contrib/samples/stc/Makefile.in +++ b/contrib/samples/stc/Makefile.in @@ -11,9 +11,9 @@ program_dir = contrib/samples/stc PROGRAM=stctest -OBJECTS=$(PROGRAM).o +OBJECTS=$(PROGRAM).o edit.o prefs.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/Makefile.sc b/contrib/samples/stc/Makefile.sc new file mode 100644 index 0000000000..66685e085a --- /dev/null +++ b/contrib/samples/stc/Makefile.sc @@ -0,0 +1,6 @@ +#Makefile from wxHatch for Symantec/Digital Mars compiler +WXDIR=..\..\.. +TARGET=stctest +OBJECTS = $(TARGET).obj edit.obj prefs.obj +EXTRALIBS=$(WXDIR)\lib\stc_sc.lib +include $(WXDIR)\src\makeprog.sc diff --git a/contrib/samples/stc/StcTestVC.dsp b/contrib/samples/stc/StcTestVC.dsp index f7e9b6e7e4..e436020cf2 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 @@ -147,6 +147,44 @@ LINK32=link.exe # Name "StcTestVC - Win32 Release DLL" # Begin Source File +SOURCE=.\edit.cpp + +!IF "$(CFG)" == "StcTestVC - Win32 Release" + +!ELSEIF "$(CFG)" == "StcTestVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "StcTestVC - Win32 Debug DLL" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "StcTestVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\prefs.cpp + +!IF "$(CFG)" == "StcTestVC - Win32 Release" + +!ELSEIF "$(CFG)" == "StcTestVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "StcTestVC - Win32 Debug DLL" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "StcTestVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + SOURCE=.\stctest.cpp !IF "$(CFG)" == "StcTestVC - Win32 Release" diff --git a/contrib/samples/stc/defsext.h b/contrib/samples/stc/defsext.h new file mode 100644 index 0000000000..eb55caf94a --- /dev/null +++ b/contrib/samples/stc/defsext.h @@ -0,0 +1,104 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: defsext.h extensions +// Purpose: STC test declarations +// Maintainer: Wyo +// Created: 2003-09-01 +// RCS-ID: $Id$ +// Copyright: (c) wxGuide +// Licence: wxWindows licence +////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_DEFSEXT_H_ +#define _WX_DEFSEXT_H_ + +//---------------------------------------------------------------------------- +// headers +//---------------------------------------------------------------------------- + +//! wxWindows headers +#include // printing support +#include // printing dialog + + +//============================================================================ +// declarations +//============================================================================ + +#define DEFAULT_LANGUAGE _("") + +#define PAGE_COMMON _("Common") +#define PAGE_LANGUAGES _("Languages") +#define PAGE_STYLE_TYPES _("Style types") + +#define STYLE_TYPES_COUNT 32 + + +// ---------------------------------------------------------------------------- +// standard IDs +// ---------------------------------------------------------------------------- + +enum { + // menu IDs + myID_PROPERTIES = wxID_HIGHEST, + myID_INDENTINC, + myID_INDENTRED, + myID_FINDNEXT, + myID_REPLACE, + myID_REPLACENEXT, + myID_BRACEMATCH, + myID_GOTO, + myID_PAGEACTIVE, + myID_DISPLAYEOL, + myID_INDENTGUIDE, + myID_LINENUMBER, + myID_LONGLINEON, + myID_WHITESPACE, + myID_FOLDTOGGLE, + myID_OVERTYPE, + myID_READONLY, + myID_WRAPMODEON, + myID_CHANGECASE, + myID_CHANGELOWER, + myID_CHANGEUPPER, + myID_HILIGHTLANG, + myID_HILIGHTFIRST, + myID_HILIGHTLAST = myID_HILIGHTFIRST + 99, + myID_CONVERTEOL, + myID_CONVERTCR, + myID_CONVERTCRLF, + myID_CONVERTLF, + myID_USECHARSET, + myID_CHARSETANSI, + myID_CHARSETMAC, + myID_PAGEPREV, + myID_PAGENEXT, + myID_SELECTLINE, + + // other IDs + myID_STATUSBAR, + myID_TITLEBAR, + myID_ABOUTTIMER, + myID_UPDATETIMER, + + // dialog find IDs + myID_DLG_FIND_TEXT, + + // preferences IDs + myID_PREFS_LANGUAGE, + myID_PREFS_STYLETYPE, + myID_PREFS_KEYWORDS, +}; + +// ---------------------------------------------------------------------------- +// global items +// ---------------------------------------------------------------------------- + +//! global application name +extern wxString *g_appname; + +//! global print data, to remember settings during the session +extern wxPrintData *g_printData; +extern wxPageSetupData *g_pageSetupData; + +#endif // _WX_DEFSEXT_H_ + diff --git a/contrib/samples/stc/edit.cpp b/contrib/samples/stc/edit.cpp new file mode 100644 index 0000000000..a402edc521 --- /dev/null +++ b/contrib/samples/stc/edit.cpp @@ -0,0 +1,824 @@ +////////////////////////////////////////////////////////////////////////////// +// File: edit.cpp +// Purpose: STC test module +// Maintainer: Wyo +// Created: 2003-09-01 +// RCS-ID: $Id$ +// Copyright: (c) wxGuide +// Licence: wxWindows licence +////////////////////////////////////////////////////////////////////////////// + +//---------------------------------------------------------------------------- +// informations +//---------------------------------------------------------------------------- + + +//---------------------------------------------------------------------------- +// headers +//---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes . +#include + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +// for all others, include the necessary headers (this file is usually all you +// need because it includes almost all 'standard' wxWindows headers) +#ifndef WX_PRECOMP + #include +#endif + +//! wxWindows headers +#include // raw file io support +#include // filename support + +//! application headers +#include "defsext.h" // additional definitions + +#include "edit.h" // edit module + + +//---------------------------------------------------------------------------- +// resources +//---------------------------------------------------------------------------- + + +//============================================================================ +// declarations +//============================================================================ + + +//============================================================================ +// implementation +//============================================================================ + +//---------------------------------------------------------------------------- +// Edit +//---------------------------------------------------------------------------- + +BEGIN_EVENT_TABLE (Edit, wxStyledTextCtrl) + // common + EVT_SIZE ( Edit::OnSize) + // edit + EVT_MENU (wxID_CLEAR, Edit::OnEditClear) + EVT_MENU (wxID_CUT, Edit::OnEditCut) + EVT_MENU (wxID_COPY, Edit::OnEditCopy) + EVT_MENU (wxID_PASTE, Edit::OnEditPaste) + EVT_MENU (myID_INDENTINC, Edit::OnEditIndentInc) + EVT_MENU (myID_INDENTRED, Edit::OnEditIndentRed) + EVT_MENU (wxID_SELECTALL, Edit::OnEditSelectAll) + EVT_MENU (myID_SELECTLINE, Edit::OnEditSelectLine) + EVT_MENU (wxID_REDO, Edit::OnEditRedo) + EVT_MENU (wxID_UNDO, Edit::OnEditUndo) + // find + EVT_MENU (wxID_FIND, Edit::OnFind) + EVT_MENU (myID_FINDNEXT, Edit::OnFindNext) + EVT_MENU (myID_REPLACE, Edit::OnReplace) + EVT_MENU (myID_REPLACENEXT, Edit::OnReplaceNext) + EVT_MENU (myID_BRACEMATCH, Edit::OnBraceMatch) + EVT_MENU (myID_GOTO, Edit::OnGoto) + // view + EVT_MENU_RANGE (myID_HILIGHTFIRST, myID_HILIGHTLAST, + Edit::OnHilightLang) + EVT_MENU (myID_DISPLAYEOL, Edit::OnDisplayEOL) + EVT_MENU (myID_INDENTGUIDE, Edit::OnIndentGuide) + EVT_MENU (myID_LINENUMBER, Edit::OnLineNumber) + EVT_MENU (myID_LONGLINEON, Edit::OnLongLineOn) + EVT_MENU (myID_WHITESPACE, Edit::OnWhiteSpace) + EVT_MENU (myID_FOLDTOGGLE, Edit::OnFoldToggle) + EVT_MENU (myID_OVERTYPE, Edit::OnSetOverType) + EVT_MENU (myID_READONLY, Edit::OnSetReadOnly) + EVT_MENU (myID_WRAPMODEON, Edit::OnWrapmodeOn) + EVT_MENU (myID_CHARSETANSI, Edit::OnUseCharset) + EVT_MENU (myID_CHARSETMAC, Edit::OnUseCharset) + // extra + EVT_MENU (myID_CHANGELOWER, Edit::OnChangeCase) + EVT_MENU (myID_CHANGEUPPER, Edit::OnChangeCase) + EVT_MENU (myID_CONVERTCR, Edit::OnConvertEOL) + EVT_MENU (myID_CONVERTCRLF, Edit::OnConvertEOL) + EVT_MENU (myID_CONVERTLF, Edit::OnConvertEOL) + // stc + EVT_STC_MARGINCLICK (-1, Edit::OnMarginClick) + EVT_STC_CHARADDED (-1, Edit::OnCharAdded) +END_EVENT_TABLE() + +Edit::Edit (wxWindow *parent, wxWindowID id, + const wxPoint &pos, + const wxSize &size, + long style) + : wxStyledTextCtrl (parent, id, pos, size, style) { + + m_filename = _T(""); + + m_LineNrID = 0; + m_DividerID = 1; + m_FoldingID = 2; + + // initialize language + m_language = NULL; + + // default font for all styles + SetViewEOL (g_CommonPrefs.displayEOLEnable); + SetIndentationGuides (g_CommonPrefs.indentGuideEnable); + SetEdgeMode (g_CommonPrefs.longLineOnEnable? + wxSTC_EDGE_LINE: wxSTC_EDGE_NONE); + SetViewWhiteSpace (g_CommonPrefs.whiteSpaceEnable? + wxSTC_WS_VISIBLEALWAYS: wxSTC_WS_INVISIBLE); + SetOvertype (g_CommonPrefs.overTypeInitial); + SetReadOnly (g_CommonPrefs.readOnlyInitial); + SetWrapMode (g_CommonPrefs.wrapModeInitial? + wxSTC_WRAP_WORD: wxSTC_WRAP_NONE); + wxFont font (10, wxMODERN, wxNORMAL, wxNORMAL); + StyleSetFont (wxSTC_STYLE_DEFAULT, font); + StyleSetForeground (wxSTC_STYLE_DEFAULT, wxColour (_T("BLACK"))); + StyleSetBackground (wxSTC_STYLE_DEFAULT, wxColour (_T("WHITE"))); + StyleSetForeground (wxSTC_STYLE_LINENUMBER, wxColour (_T("DARK GREY"))); + StyleSetBackground (wxSTC_STYLE_LINENUMBER, wxColour (_T("WHITE"))); + StyleSetForeground(wxSTC_STYLE_INDENTGUIDE, wxColour (_T("DARK GREY"))); + InitializePrefs (DEFAULT_LANGUAGE); + + // set visibility + SetVisiblePolicy (wxSTC_VISIBLE_STRICT|wxSTC_VISIBLE_SLOP, 1); + SetXCaretPolicy (wxSTC_CARET_EVEN|wxSTC_VISIBLE_STRICT|wxSTC_CARET_SLOP, 1); + SetYCaretPolicy (wxSTC_CARET_EVEN|wxSTC_VISIBLE_STRICT|wxSTC_CARET_SLOP, 1); + + // markers + MarkerDefine (wxSTC_MARKNUM_FOLDER, wxSTC_MARK_DOTDOTDOT, _T("BLACK"), _T("BLACK")); + MarkerDefine (wxSTC_MARKNUM_FOLDEROPEN, wxSTC_MARK_ARROWDOWN, _T("BLACK"), _T("BLACK")); + MarkerDefine (wxSTC_MARKNUM_FOLDERSUB, wxSTC_MARK_EMPTY, _T("BLACK"), _T("BLACK")); + MarkerDefine (wxSTC_MARKNUM_FOLDEREND, wxSTC_MARK_DOTDOTDOT, _T("BLACK"), _T("WHITE")); + MarkerDefine (wxSTC_MARKNUM_FOLDEROPENMID, wxSTC_MARK_ARROWDOWN, _T("BLACK"), _T("WHITE")); + MarkerDefine (wxSTC_MARKNUM_FOLDERMIDTAIL, wxSTC_MARK_EMPTY, _T("BLACK"), _T("BLACK")); + MarkerDefine (wxSTC_MARKNUM_FOLDERTAIL, wxSTC_MARK_EMPTY, _T("BLACK"), _T("BLACK")); + + // miscelaneous + m_LineNrMargin = TextWidth (wxSTC_STYLE_LINENUMBER, _T("_999999")); + m_FoldingMargin = 16; + SetMarginWidth (m_LineNrID, + g_CommonPrefs.lineNumberEnable? m_LineNrMargin: 0); + CmdKeyClear (wxSTC_KEY_TAB, 0); // this is done by the menu accelerator key + SetLayoutCache (wxSTC_CACHE_PAGE); + +} + +Edit::~Edit () {} + +//---------------------------------------------------------------------------- +// common event handlers +void Edit::OnSize( wxSizeEvent& event ) { + int x = GetClientSize().x + + (g_CommonPrefs.lineNumberEnable? m_LineNrMargin: 0) + + (g_CommonPrefs.foldEnable? m_FoldingMargin: 0); + if (x > 0) SetScrollWidth (x); + event.Skip(); +} + +// edit event handlers +void Edit::OnEditRedo (wxCommandEvent &WXUNUSED(event)) { + if (!CanRedo()) return; + Redo (); +} + +void Edit::OnEditUndo (wxCommandEvent &WXUNUSED(event)) { + if (!CanUndo()) return; + Undo (); +} + +void Edit::OnEditClear (wxCommandEvent &WXUNUSED(event)) { + if (GetReadOnly()) return; + Clear (); +} + +void Edit::OnEditCut (wxCommandEvent &WXUNUSED(event)) { + if (GetReadOnly() || (GetSelectionEnd()-GetSelectionStart() <= 0)) return; + Cut (); +} + +void Edit::OnEditCopy (wxCommandEvent &WXUNUSED(event)) { + if (GetSelectionEnd()-GetSelectionStart() <= 0) return; + Copy (); +} + +void Edit::OnEditPaste (wxCommandEvent &WXUNUSED(event)) { + if (!CanPaste()) return; + Paste (); +} + +void Edit::OnFind (wxCommandEvent &WXUNUSED(event)) { +} + +void Edit::OnFindNext (wxCommandEvent &WXUNUSED(event)) { +} + +void Edit::OnReplace (wxCommandEvent &WXUNUSED(event)) { +} + +void Edit::OnReplaceNext (wxCommandEvent &WXUNUSED(event)) { +} + +void Edit::OnBraceMatch (wxCommandEvent &WXUNUSED(event)) { + int min = GetCurrentPos (); + int max = BraceMatch (min); + if (max > (min+1)) { + BraceHighlight (min+1, max); + SetSelection (min+1, max); + }else{ + BraceBadLight (min); + } +} + +void Edit::OnGoto (wxCommandEvent &WXUNUSED(event)) { +} + +void Edit::OnEditIndentInc (wxCommandEvent &WXUNUSED(event)) { + CmdKeyExecute (wxSTC_CMD_TAB); +} + +void Edit::OnEditIndentRed (wxCommandEvent &WXUNUSED(event)) { + CmdKeyExecute (wxSTC_CMD_DELETEBACK); +} + +void Edit::OnEditSelectAll (wxCommandEvent &WXUNUSED(event)) { + SetSelection (0, GetTextLength ()); +} + +void Edit::OnEditSelectLine (wxCommandEvent &WXUNUSED(event)) { + int lineStart = PositionFromLine (GetCurrentLine()); + int lineEnd = PositionFromLine (GetCurrentLine() + 1); + SetSelection (lineStart, lineEnd); +} + +void Edit::OnHilightLang (wxCommandEvent &event) { + InitializePrefs (g_LanguagePrefs [event.GetId() - myID_HILIGHTFIRST].name); +} + +void Edit::OnDisplayEOL (wxCommandEvent &WXUNUSED(event)) { + SetViewEOL (!GetViewEOL()); +} + +void Edit::OnIndentGuide (wxCommandEvent &WXUNUSED(event)) { + SetIndentationGuides (!GetIndentationGuides()); +} + +void Edit::OnLineNumber (wxCommandEvent &WXUNUSED(event)) { + SetMarginWidth (m_LineNrID, + GetMarginWidth (m_LineNrID) == 0? m_LineNrMargin: 0); +} + +void Edit::OnLongLineOn (wxCommandEvent &WXUNUSED(event)) { + SetEdgeMode (GetEdgeMode() == 0? wxSTC_EDGE_LINE: wxSTC_EDGE_NONE); +} + +void Edit::OnWhiteSpace (wxCommandEvent &WXUNUSED(event)) { + SetViewWhiteSpace (GetViewWhiteSpace() == 0? + wxSTC_WS_VISIBLEALWAYS: wxSTC_WS_INVISIBLE); +} + +void Edit::OnFoldToggle (wxCommandEvent &WXUNUSED(event)) { + ToggleFold (GetFoldParent(GetCurrentLine())); +} + +void Edit::OnSetOverType (wxCommandEvent &WXUNUSED(event)) { + SetOvertype (!GetOvertype()); +} + +void Edit::OnSetReadOnly (wxCommandEvent &WXUNUSED(event)) { + SetReadOnly (!GetReadOnly()); +} + +void Edit::OnWrapmodeOn (wxCommandEvent &WXUNUSED(event)) { + SetWrapMode (GetWrapMode() == 0? wxSTC_WRAP_WORD: wxSTC_WRAP_NONE); +} + +void Edit::OnUseCharset (wxCommandEvent &event) { + int Nr; + int charset = GetCodePage(); + switch (event.GetId()) { + case myID_CHARSETANSI: {charset = wxSTC_CHARSET_ANSI; break;} + case myID_CHARSETMAC: {charset = wxSTC_CHARSET_ANSI; break;} + } + for (Nr = 0; Nr < wxSTC_STYLE_LASTPREDEFINED; Nr++) { + StyleSetCharacterSet (Nr, charset); + } + SetCodePage (charset); +} + +void Edit::OnChangeCase (wxCommandEvent &event) { + switch (event.GetId()) { + case myID_CHANGELOWER: { + CmdKeyExecute (wxSTC_CMD_LOWERCASE); + break; + } + case myID_CHANGEUPPER: { + CmdKeyExecute (wxSTC_CMD_UPPERCASE); + break; + } + } +} + +void Edit::OnConvertEOL (wxCommandEvent &event) { + int eolMode = GetEOLMode(); + switch (event.GetId()) { + case myID_CONVERTCR: { eolMode = wxSTC_EOL_CR; break;} + case myID_CONVERTCRLF: { eolMode = wxSTC_EOL_CRLF; break;} + case myID_CONVERTLF: { eolMode = wxSTC_EOL_LF; break;} + } + ConvertEOLs (eolMode); + SetEOLMode (eolMode); +} + +//! misc +void Edit::OnMarginClick (wxStyledTextEvent &event) { + if (event.GetMargin() == 2) { + int lineClick = LineFromPosition (event.GetPosition()); + int levelClick = GetFoldLevel (lineClick); + if ((levelClick & wxSTC_FOLDLEVELHEADERFLAG) > 0) { + ToggleFold (lineClick); + } + } +} + +void Edit::OnCharAdded (wxStyledTextEvent &event) { + char chr = event.GetKey(); + int currentLine = GetCurrentLine(); + // Change this if support for mac files with \r is needed + if (chr == '\n') { + int lineInd = 0; + if (currentLine > 0) { + lineInd = GetLineIndentation(currentLine - 1); + } + if (lineInd == 0) return; + SetLineIndentation (currentLine, lineInd); + GotoPos(PositionFromLine (currentLine) + lineInd); + } +} + + +//---------------------------------------------------------------------------- +// private functions +wxString Edit::DeterminePrefs (const wxString &filename) { + + LanguageInfo const* curInfo; + + // determine language from filepatterns + int languageNr; + for (languageNr = 0; languageNr < g_LanguagePrefsSize; languageNr++) { + curInfo = &g_LanguagePrefs [languageNr]; + wxString filepattern = curInfo->filepattern; + filepattern.Lower(); + while (!filepattern.IsEmpty()) { + wxString cur = filepattern.BeforeFirst (';'); + if ((cur == filename) || + (cur == (filename.BeforeLast ('.') + _T(".*"))) || + (cur == (_T("*.") + filename.AfterLast ('.')))) { + return curInfo->name; + } + filepattern = filepattern.AfterFirst (';'); + } + } + return wxEmptyString; + +} + +bool Edit::InitializePrefs (const wxString &name) { + + // initialize styles + StyleClearAll(); + LanguageInfo const* curInfo = NULL; + + // determine language + bool found = false; + int languageNr; + for (languageNr = 0; languageNr < g_LanguagePrefsSize; languageNr++) { + curInfo = &g_LanguagePrefs [languageNr]; + if (curInfo->name == name) { + found = true; + break; + } + } + if (!found) return false; + + // set lexer and language + SetLexer (curInfo->lexer); + m_language = curInfo; + + // set margin for line numbers + SetMarginType (m_LineNrID, wxSTC_MARGIN_NUMBER); + StyleSetForeground (wxSTC_STYLE_LINENUMBER, wxColour (_T("DARK GREY"))); + StyleSetBackground (wxSTC_STYLE_LINENUMBER, wxColour (_T("WHITE"))); + SetMarginWidth (m_LineNrID, + g_CommonPrefs.lineNumberEnable? m_LineNrMargin: 0); + + // default fonts for all styles! + int Nr; + for (Nr = 0; Nr < wxSTC_STYLE_LASTPREDEFINED; Nr++) { + wxFont font (10, wxMODERN, wxNORMAL, wxNORMAL); + StyleSetFont (Nr, font); + } + + // set common styles + StyleSetForeground (wxSTC_STYLE_DEFAULT, wxColour (_T("DARK GREY"))); + StyleSetForeground (wxSTC_STYLE_INDENTGUIDE, wxColour (_T("DARK GREY"))); + + // initialize settings + if (g_CommonPrefs.syntaxEnable) { + int keywordnr = 0; + for (Nr = 0; Nr < STYLE_TYPES_COUNT; Nr++) { + if (curInfo->styles[Nr].type == -1) continue; + const StyleInfo &curType = g_StylePrefs [curInfo->styles[Nr].type]; + wxFont font (curType.fontsize, wxMODERN, wxNORMAL, wxNORMAL, false, + curType.fontname); + StyleSetFont (Nr, font); + if (curType.foreground) { + StyleSetForeground (Nr, wxColour (curType.foreground)); + } + if (curType.background) { + StyleSetBackground (Nr, wxColour (curType.background)); + } + StyleSetBold (Nr, (curType.fontstyle & mySTC_STYLE_BOLD) > 0); + StyleSetItalic (Nr, (curType.fontstyle & mySTC_STYLE_ITALIC) > 0); + StyleSetUnderline (Nr, (curType.fontstyle & mySTC_STYLE_UNDERL) > 0); + StyleSetVisible (Nr, (curType.fontstyle & mySTC_STYLE_HIDDEN) == 0); + StyleSetCase (Nr, curType.lettercase); + const wxChar *pwords = curInfo->styles[Nr].words; + if (pwords) { + SetKeyWords (keywordnr, pwords); + keywordnr += 1; + } + } + } + + // set margin as unused + SetMarginType (m_DividerID, wxSTC_MARGIN_SYMBOL); + SetMarginWidth (m_DividerID, 0); + SetMarginSensitive (m_DividerID, false); + + // folding + SetMarginType (m_FoldingID, wxSTC_MARGIN_SYMBOL); + SetMarginMask (m_FoldingID, wxSTC_MASK_FOLDERS); + StyleSetBackground (m_FoldingID, wxColour (_T("WHITE"))); + SetMarginWidth (m_FoldingID, 0); + SetMarginSensitive (m_FoldingID, false); + if (g_CommonPrefs.foldEnable) { + SetMarginWidth (m_FoldingID, curInfo->folds != 0? m_FoldingMargin: 0); + SetMarginSensitive (m_FoldingID, curInfo->folds != 0); + SetProperty (_T("fold"), curInfo->folds != 0? _T("1"): _T("0")); + SetProperty (_T("fold.comment"), + (curInfo->folds & mySTC_FOLD_COMMENT) > 0? _T("1"): _T("0")); + SetProperty (_T("fold.compact"), + (curInfo->folds & mySTC_FOLD_COMPACT) > 0? _T("1"): _T("0")); + SetProperty (_T("fold.preprocessor"), + (curInfo->folds & mySTC_FOLD_PREPROC) > 0? _T("1"): _T("0")); + SetProperty (_T("fold.html"), + (curInfo->folds & mySTC_FOLD_HTML) > 0? _T("1"): _T("0")); + SetProperty (_T("fold.html.preprocessor"), + (curInfo->folds & mySTC_FOLD_HTMLPREP) > 0? _T("1"): _T("0")); + SetProperty (_T("fold.comment.python"), + (curInfo->folds & mySTC_FOLD_COMMENTPY) > 0? _T("1"): _T("0")); + SetProperty (_T("fold.quotes.python"), + (curInfo->folds & mySTC_FOLD_QUOTESPY) > 0? _T("1"): _T("0")); + } + SetFoldFlags (wxSTC_FOLDFLAG_LINEBEFORE_CONTRACTED | + wxSTC_FOLDFLAG_LINEAFTER_CONTRACTED); + + // set spaces and indention + SetTabWidth (4); + SetUseTabs (false); + SetTabIndents (true); + SetBackSpaceUnIndents (true); + SetIndent (g_CommonPrefs.indentEnable? 4: 0); + + // others + SetViewEOL (g_CommonPrefs.displayEOLEnable); + SetIndentationGuides (g_CommonPrefs.indentGuideEnable); + SetEdgeColumn (80); + SetEdgeMode (g_CommonPrefs.longLineOnEnable? wxSTC_EDGE_LINE: wxSTC_EDGE_NONE); + SetViewWhiteSpace (g_CommonPrefs.whiteSpaceEnable? + wxSTC_WS_VISIBLEALWAYS: wxSTC_WS_INVISIBLE); + SetOvertype (g_CommonPrefs.overTypeInitial); + SetReadOnly (g_CommonPrefs.readOnlyInitial); + SetWrapMode (g_CommonPrefs.wrapModeInitial? + wxSTC_WRAP_WORD: wxSTC_WRAP_NONE); + + return true; +} + +bool Edit::LoadFile () { + + // get filname + if (!m_filename) { + wxFileDialog dlg (this, _T("Open file"), _T(""), _T(""), + _T("Any file (*)|*"), wxOPEN | wxFILE_MUST_EXIST | wxCHANGE_DIR); + if (dlg.ShowModal() != wxID_OK) return false; + m_filename = dlg.GetPath(); + } + + // load file + return LoadFile (m_filename); +} + +bool Edit::LoadFile (const wxString &filename) { + + // load file in edit and clear undo + if (!filename.IsEmpty()) m_filename = filename; +// wxFile file (m_filename); +// if (!file.IsOpened()) return false; + ClearAll (); +// long lng = file.Length (); +// if (lng > 0) { +// wxString buf; +// wxChar *buff = buf.GetWriteBuf (lng); +// file.Read (buff, lng); +// buf.UngetWriteBuf (); +// InsertText (0, buf); +// } +// file.Close(); + + wxStyledTextCtrl::LoadFile(m_filename); + + EmptyUndoBuffer(); + + // determine lexer language + wxFileName fname (m_filename); + InitializePrefs (DeterminePrefs (fname.GetFullName())); + + return true; +} + +bool Edit::SaveFile () { + + // return if no change + if (!Modified()) return true; + + // get filname + if (!m_filename) { + wxFileDialog dlg (this, _T("Save file"), _T(""), _T(""), _T("Any file (*)|*"), + wxSAVE | wxOVERWRITE_PROMPT); + if (dlg.ShowModal() != wxID_OK) return false; + m_filename = dlg.GetPath(); + } + + // save file + return SaveFile (m_filename); +} + +bool Edit::SaveFile (const wxString &filename) { + + // return if no change + if (!Modified()) return true; + +// // save edit in file and clear undo +// if (!filename.IsEmpty()) m_filename = filename; +// wxFile file (m_filename, wxFile::write); +// if (!file.IsOpened()) return false; +// wxString buf = GetText(); +// bool okay = file.Write (buf); +// file.Close(); +// if (!okay) return false; +// EmptyUndoBuffer(); +// SetSavePoint(); + +// return true; + + return wxStyledTextCtrl::SaveFile(filename); + +} + +bool Edit::Modified () { + + // return modified state + return (GetModify() && !GetReadOnly()); +} + +//---------------------------------------------------------------------------- +// EditProperties +//---------------------------------------------------------------------------- + +EditProperties::EditProperties (Edit *edit, + long style) + : wxDialog (edit, -1, wxEmptyString, + wxDefaultPosition, wxDefaultSize, + style | wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER) { + + // sets the application title + SetTitle (_("Properties")); + wxString text; + + // fullname + wxBoxSizer *fullname = new wxBoxSizer (wxHORIZONTAL); + fullname->Add (10, 0); + fullname->Add (new wxStaticText (this, -1, _("Full filename"), + wxDefaultPosition, wxSize(80, -1)), + 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL); + fullname->Add (new wxStaticText (this, -1, edit->GetFilename()), + 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL); + + // text info + wxGridSizer *textinfo = new wxGridSizer (4, 0, 2); + textinfo->Add (new wxStaticText (this, -1, _("Language"), + wxDefaultPosition, wxSize(80, -1)), + 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxLEFT, 4); + textinfo->Add (new wxStaticText (this, -1, edit->m_language->name), + 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxRIGHT, 4); + textinfo->Add (new wxStaticText (this, -1, _("Lexer-ID: "), + wxDefaultPosition, wxSize(80, -1)), + 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxLEFT, 4); + text = wxString::Format (_T("%d"), edit->GetLexer()); + textinfo->Add (new wxStaticText (this, -1, text), + 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxRIGHT, 4); + wxString EOLtype = _T(""); + switch (edit->GetEOLMode()) { + case wxSTC_EOL_CR: {EOLtype = _T("CR (Unix)"); break; } + case wxSTC_EOL_CRLF: {EOLtype = _T("CRLF (Windows)"); break; } + case wxSTC_EOL_LF: {EOLtype = _T("CR (Macintosh)"); break; } + } + textinfo->Add (new wxStaticText (this, -1, _("Line endings"), + wxDefaultPosition, wxSize(80, -1)), + 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxLEFT, 4); + textinfo->Add (new wxStaticText (this, -1, EOLtype), + 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxRIGHT, 4); + + // text info box + wxStaticBoxSizer *textinfos = new wxStaticBoxSizer ( + new wxStaticBox (this, -1, _("Informations")), + wxVERTICAL); + textinfos->Add (textinfo, 0, wxEXPAND); + textinfos->Add (0, 6); + + // statistic + wxGridSizer *statistic = new wxGridSizer (4, 0, 2); + statistic->Add (new wxStaticText (this, -1, _("Total lines"), + wxDefaultPosition, wxSize(80, -1)), + 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxLEFT, 4); + text = wxString::Format (_T("%d"), edit->GetLineCount()); + statistic->Add (new wxStaticText (this, -1, text), + 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxRIGHT, 4); + statistic->Add (new wxStaticText (this, -1, _("Total chars"), + wxDefaultPosition, wxSize(80, -1)), + 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxLEFT, 4); + text = wxString::Format (_T("%d"), edit->GetTextLength()); + statistic->Add (new wxStaticText (this, -1, text), + 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxRIGHT, 4); + statistic->Add (new wxStaticText (this, -1, _("Current line"), + wxDefaultPosition, wxSize(80, -1)), + 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxLEFT, 4); + text = wxString::Format (_T("%d"), edit->GetCurrentLine()); + statistic->Add (new wxStaticText (this, -1, text), + 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxRIGHT, 4); + statistic->Add (new wxStaticText (this, -1, _("Current pos"), + wxDefaultPosition, wxSize(80, -1)), + 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxLEFT, 4); + text = wxString::Format (_T("%d"), edit->GetCurrentPos()); + statistic->Add (new wxStaticText (this, -1, text), + 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxRIGHT, 4); + + // char/line statistics + wxStaticBoxSizer *statistics = new wxStaticBoxSizer ( + new wxStaticBox (this, -1, _("Statistics")), + wxVERTICAL); + statistics->Add (statistic, 0, wxEXPAND); + statistics->Add (0, 6); + + // total pane + wxBoxSizer *totalpane = new wxBoxSizer (wxVERTICAL); + totalpane->Add (fullname, 0, wxEXPAND | wxLEFT | wxRIGHT | wxTOP, 10); + totalpane->Add (0, 6); + totalpane->Add (textinfos, 0, wxEXPAND | wxLEFT | wxRIGHT, 10); + totalpane->Add (0, 10); + totalpane->Add (statistics, 0, wxEXPAND | wxLEFT | wxRIGHT, 10); + totalpane->Add (0, 6); + wxButton *okButton = new wxButton (this, wxID_OK, _("OK")); + okButton->SetDefault(); + totalpane->Add (okButton, 0, wxALIGN_CENTER | wxALL, 10); + + SetSizerAndFit (totalpane); + + ShowModal(); +} + +//---------------------------------------------------------------------------- +// EditPrint +//---------------------------------------------------------------------------- + +EditPrint::EditPrint (Edit *edit, wxChar *title) + : wxPrintout(title) { + m_edit = edit; + m_printed = 0; + +} + +bool EditPrint::OnPrintPage (int page) { + + wxDC *dc = GetDC(); + if (!dc) return false; + + // scale DC + PrintScaling (dc); + + // print page + if (page == 1) m_printed = 0; + m_printed = m_edit->FormatRange (1, m_printed, m_edit->GetLength(), + dc, dc, m_printRect, m_pageRect); + + return true; +} + +bool EditPrint::OnBeginDocument (int startPage, int endPage) { + + if (!wxPrintout::OnBeginDocument (startPage, endPage)) { + return false; + } + + return true; +} + +void EditPrint::GetPageInfo (int *minPage, int *maxPage, int *selPageFrom, int *selPageTo) { + + // initialize values + *minPage = 0; + *maxPage = 0; + *selPageFrom = 0; + *selPageTo = 0; + + // scale DC if possible + wxDC *dc = GetDC(); + if (!dc) return; + PrintScaling (dc); + + // get print page informations and convert to printer pixels + wxSize ppiScr; + GetPPIScreen (&ppiScr.x, &ppiScr.y); + wxSize page = g_pageSetupData->GetPaperSize(); + page.x = static_cast (page.x * ppiScr.x / 25.4); + page.y = static_cast (page.y * ppiScr.y / 25.4); + m_pageRect = wxRect (0, + 0, + page.x, + page.y); + + // get margins informations and convert to printer pixels + int top = 25; // default 25 + int bottom = 25; // default 25 + int left = 20; // default 20 + int right = 20; // default 20 + wxPoint (top, left) = g_pageSetupData->GetMarginTopLeft(); + wxPoint (bottom, right) = g_pageSetupData->GetMarginBottomRight(); + top = static_cast (top * ppiScr.y / 25.4); + bottom = static_cast (bottom * ppiScr.y / 25.4); + left = static_cast (left * ppiScr.x / 25.4); + right = static_cast (right * ppiScr.x / 25.4); + m_printRect = wxRect (left, + top, + page.x - (left + right), + page.y - (top + bottom)); + + // count pages + while (HasPage (*maxPage)) { + m_printed = m_edit->FormatRange (0, m_printed, m_edit->GetLength(), + dc, dc, m_printRect, m_pageRect); + *maxPage += 1; + } + if (*maxPage > 0) *minPage = 1; + *selPageFrom = *minPage; + *selPageTo = *maxPage; +} + +bool EditPrint::HasPage (int WXUNUSED(page)) { + + return (m_printed < m_edit->GetLength()); +} + +bool EditPrint::PrintScaling (wxDC *dc){ + + // check for dc, return if none + if (!dc) return false; + + // get printer and screen sizing values + wxSize ppiScr; + GetPPIScreen (&ppiScr.x, &ppiScr.y); + if (ppiScr.x == 0) { // most possible guess 96 dpi + ppiScr.x = 96; + ppiScr.y = 96; + } + wxSize ppiPrt; + GetPPIPrinter (&ppiPrt.x, &ppiPrt.y); + if (ppiPrt.x == 0) { // scaling factor to 1 + ppiPrt.x = ppiScr.x; + ppiPrt.y = ppiScr.y; + } + wxSize dcSize = dc->GetSize(); + wxSize pageSize; + GetPageSizePixels (&pageSize.x, &pageSize.y); + + // set user scale + float scale_x = (float)(ppiPrt.x * dcSize.x) / + (float)(ppiScr.x * pageSize.x); + float scale_y = (float)(ppiPrt.y * dcSize.y) / + (float)(ppiScr.y * pageSize.y); + dc->SetUserScale (scale_x, scale_y); + + return true; +} + diff --git a/contrib/samples/stc/edit.h b/contrib/samples/stc/edit.h new file mode 100644 index 0000000000..0a4cbf4aba --- /dev/null +++ b/contrib/samples/stc/edit.h @@ -0,0 +1,169 @@ +////////////////////////////////////////////////////////////////////////////// +// File: edit.h +// Purpose: STC test module +// Maintainer: Wyo +// Created: 2003-09-01 +// RCS-ID: $Id$ +// Copyright: (c) wxGuide +// Licence: wxWindows licence +////////////////////////////////////////////////////////////////////////////// + +#ifndef _EDIT_H_ +#define _EDIT_H_ + +//---------------------------------------------------------------------------- +// informations +//---------------------------------------------------------------------------- + + +//---------------------------------------------------------------------------- +// headers +//---------------------------------------------------------------------------- + +//! wxWindows headers + +//! wxWindows/contrib headers +#include // styled text control + +//! application headers +#include "prefs.h" // preferences + + +//============================================================================ +// declarations +//============================================================================ + +class EditPrint; +class EditProperties; + + +//---------------------------------------------------------------------------- +//! Edit +class Edit: public wxStyledTextCtrl { + friend class EditProperties; + friend class EditPrint; + +public: + //! constructor + Edit (wxWindow *parent, wxWindowID id = -1, + const wxPoint &pos = wxDefaultPosition, + const wxSize &size = wxDefaultSize, + long style = wxSUNKEN_BORDER|wxVSCROLL + ); + + //! destructor + ~Edit (); + + // event handlers + // common + void OnSize( wxSizeEvent &event ); + // edit + void OnEditRedo (wxCommandEvent &event); + void OnEditUndo (wxCommandEvent &event); + void OnEditClear (wxCommandEvent &event); + void OnEditCut (wxCommandEvent &event); + void OnEditCopy (wxCommandEvent &event); + void OnEditPaste (wxCommandEvent &event); + // find + void OnFind (wxCommandEvent &event); + void OnFindNext (wxCommandEvent &event); + void OnReplace (wxCommandEvent &event); + void OnReplaceNext (wxCommandEvent &event); + void OnBraceMatch (wxCommandEvent &event); + void OnGoto (wxCommandEvent &event); + void OnEditIndentInc (wxCommandEvent &event); + void OnEditIndentRed (wxCommandEvent &event); + void OnEditSelectAll (wxCommandEvent &event); + void OnEditSelectLine (wxCommandEvent &event); + //! view + void OnHilightLang (wxCommandEvent &event); + void OnDisplayEOL (wxCommandEvent &event); + void OnIndentGuide (wxCommandEvent &event); + void OnLineNumber (wxCommandEvent &event); + void OnLongLineOn (wxCommandEvent &event); + void OnWhiteSpace (wxCommandEvent &event); + void OnFoldToggle (wxCommandEvent &event); + void OnSetOverType (wxCommandEvent &event); + void OnSetReadOnly (wxCommandEvent &event); + void OnWrapmodeOn (wxCommandEvent &event); + void OnUseCharset (wxCommandEvent &event); + //! extra + void OnChangeCase (wxCommandEvent &event); + void OnConvertEOL (wxCommandEvent &event); + // stc + void OnMarginClick (wxStyledTextEvent &event); + void OnCharAdded (wxStyledTextEvent &event); + + //! language/lexer + wxString DeterminePrefs (const wxString &filename); + bool InitializePrefs (const wxString &filename); + bool UserSettings (const wxString &filename); + LanguageInfo const* GetLanguageInfo () {return m_language;}; + + //! load/save file + bool LoadFile (); + bool LoadFile (const wxString &filename); + bool SaveFile (); + bool SaveFile (const wxString &filename); + bool Modified (); + wxString GetFilename () {return m_filename;}; + void SetFilename (const wxString &filename) {m_filename = filename;}; + +private: + // file + wxString m_filename; + + // lanugage properties + LanguageInfo const* m_language; + + // margin variables + int m_LineNrID; + int m_LineNrMargin; + int m_FoldingID; + int m_FoldingMargin; + int m_DividerID; + + DECLARE_EVENT_TABLE() +}; + +//---------------------------------------------------------------------------- +//! EditProperties +class EditProperties: public wxDialog { + +public: + + //! constructor + EditProperties (Edit *edit, long style = 0); + +private: + +}; + +//---------------------------------------------------------------------------- +//! EditPrint +class EditPrint: public wxPrintout { + +public: + + //! constructor + EditPrint (Edit *edit, wxChar *title = _T("")); + + //! event handlers + bool OnPrintPage (int page); + bool OnBeginDocument (int startPage, int endPage); + + //! print functions + bool HasPage (int page); + void GetPageInfo (int *minPage, int *maxPage, int *selPageFrom, int *selPageTo); + +private: + Edit *m_edit; + int m_printed; + wxRect m_pageRect; + wxRect m_printRect; + + bool PrintScaling (wxDC *dc); +}; + +#endif // _EDIT_H_ + diff --git a/contrib/samples/stc/makefile.b32 b/contrib/samples/stc/makefile.b32 index ae489f3a7d..b4c8c55fae 100644 --- a/contrib/samples/stc/makefile.b32 +++ b/contrib/samples/stc/makefile.b32 @@ -11,8 +11,8 @@ WXDIR = $(WXWIN) TARGET=stctest -EXTRALIBS=$(WXDIR)\contrib\lib\stc.lib -OBJECTS = $(TARGET).obj +EXTRALIBS=$(WXDIR)\lib\stc.lib +OBJECTS = $(TARGET).obj edit.obj prefs.obj !include $(WXDIR)\src\makeprog.b32 diff --git a/contrib/samples/stc/makefile.g95 b/contrib/samples/stc/makefile.g95 index 9c8a7efe29..59cb05835a 100644 --- a/contrib/samples/stc/makefile.g95 +++ b/contrib/samples/stc/makefile.g95 @@ -6,7 +6,7 @@ WXDIR = ../../.. TARGET = stctest -OBJECTS = $(TARGET).o +OBJECTS = $(TARGET).o edit.o prefs.o EXTRAINC = -I$(WXDIR)/contrib/include EXTRALIBS = -lstc diff --git a/contrib/samples/stc/makefile.vc b/contrib/samples/stc/makefile.vc index 4ab23679ef..e388d237c3 100644 --- a/contrib/samples/stc/makefile.vc +++ b/contrib/samples/stc/makefile.vc @@ -6,7 +6,7 @@ WXDIR = $(WXWIN) PROGRAM = stctest -OBJECTS = $(PROGRAM).obj +OBJECTS = $(PROGRAM).obj edit.obj prefs.obj EXTRALIBS = $(WXDIR)\lib\stc$(LIBEXT).lib EXTRAINC = -I$(WXDIR)\contrib\include diff --git a/contrib/samples/stc/makefile.wat b/contrib/samples/stc/makefile.wat new file mode 100644 index 0000000000..08fd7c55a2 --- /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 $(OUTPUTDIR)\edit.obj $(OUTPUTDIR)\prefs.obj + +!include $(WXDIR)\src\makeprog.wat + + diff --git a/wxPython/tests/bitmaps/mondrian.ico b/contrib/samples/stc/mondrian.ico similarity index 100% rename from wxPython/tests/bitmaps/mondrian.ico rename to contrib/samples/stc/mondrian.ico diff --git a/contrib/samples/stc/mondrian.xpm b/contrib/samples/stc/mondrian.xpm new file mode 100644 index 0000000000..409f27a843 --- /dev/null +++ b/contrib/samples/stc/mondrian.xpm @@ -0,0 +1,44 @@ +/* XPM */ +static char *mondrian_xpm[] = { +/* columns rows colors chars-per-pixel */ +"32 32 6 1", +" c Black", +". c Blue", +"X c #00bf00", +"o c Red", +"O c Yellow", +"+ c Gray100", +/* pixels */ +" ", +" oooooo +++++++++++++++++++++++ ", +" oooooo +++++++++++++++++++++++ ", +" oooooo +++++++++++++++++++++++ ", +" oooooo +++++++++++++++++++++++ ", +" oooooo +++++++++++++++++++++++ ", +" oooooo +++++++++++++++++++++++ ", +" oooooo +++++++++++++++++++++++ ", +" ", +" ++++++ ++++++++++++++++++ .... ", +" ++++++ ++++++++++++++++++ .... ", +" ++++++ ++++++++++++++++++ .... ", +" ++++++ ++++++++++++++++++ .... ", +" ++++++ ++++++++++++++++++ .... ", +" ++++++ ++++++++++++++++++ ", +" ++++++ ++++++++++++++++++ ++++ ", +" ++++++ ++++++++++++++++++ ++++ ", +" ++++++ ++++++++++++++++++ ++++ ", +" ++++++ ++++++++++++++++++ ++++ ", +" ++++++ ++++++++++++++++++ ++++ ", +" ++++++ ++++++++++++++++++ ++++ ", +" ++++++ ++++++++++++++++++ ++++ ", +" ++++++ ++++++++++++++++++ ++++ ", +" ++++++ ++++++++++++++++++ ++++ ", +" ++++++ ++++ ", +" ++++++ OOOOOOOOOOOO XXXXX ++++ ", +" ++++++ OOOOOOOOOOOO XXXXX ++++ ", +" ++++++ OOOOOOOOOOOO XXXXX ++++ ", +" ++++++ OOOOOOOOOOOO XXXXX ++++ ", +" ++++++ OOOOOOOOOOOO XXXXX ++++ ", +" ++++++ OOOOOOOOOOOO XXXXX ++++ ", +" " +}; diff --git a/contrib/samples/stc/prefs.cpp b/contrib/samples/stc/prefs.cpp new file mode 100644 index 0000000000..7927082f75 --- /dev/null +++ b/contrib/samples/stc/prefs.cpp @@ -0,0 +1,379 @@ +////////////////////////////////////////////////////////////////////////////// +// File: prefs.cpp +// Purpose: STC test Preferences initialization +// Maintainer: Wyo +// Created: 2003-09-01 +// RCS-ID: $Id$ +// Copyright: (c) wxGuide +// Licence: wxWindows licence +////////////////////////////////////////////////////////////////////////////// + +//---------------------------------------------------------------------------- +// headers +//---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes . +#include + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +// for all others, include the necessary headers (this file is usually all you +// need because it includes almost all 'standard' wxWindows headers) +#ifndef WX_PRECOMP + #include +#endif + +//! wxWindows headers + +//! wxWindows/contrib headers + +//! application headers +#include "defsext.h" // Additional definitions +#include "prefs.h" // Preferences + + +//============================================================================ +// declarations +//============================================================================ + +//---------------------------------------------------------------------------- +//! language types +const CommonInfo g_CommonPrefs = { + // editor functionality prefs + true, // syntaxEnable + true, // foldEnable + true, // indentEnable + // display defaults prefs + false, // overTypeInitial + false, // readOnlyInitial + false, // wrapModeInitial + false, // displayEOLEnable + false, // IndentGuideEnable + true, // lineNumberEnable + false, // longLineOnEnable + false, // whiteSpaceEnable +}; + +//---------------------------------------------------------------------------- +// keywordlists +// C++ +wxChar* CppWordlist1 = + _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"); +wxChar* CppWordlist2 = + _T("file"); +wxChar* CppWordlist3 = + _T("a addindex addtogroup anchor arg attention author b brief bug c \ + class code date def defgroup deprecated dontinclude e em endcode \ + endhtmlonly endif endlatexonly endlink endverbatim enum example \ + exception f$ f[ f] file fn hideinitializer htmlinclude \ + htmlonly if image include ingroup internal invariant interface \ + latexonly li line link mainpage name namespace nosubgrouping note \ + overload p page par param post pre ref relates remarks return \ + retval sa section see showinitializer since skip skipline struct \ + subsection test throw todo typedef union until var verbatim \ + verbinclude version warning weakgroup $ @ "" & < > # { }"); + +// Python +wxChar* PythonWordlist1 = + _T("and assert break class continue def del elif else except exec \ + finally for from global if import in is lambda None not or pass \ + print raise return try while yield"); +wxChar* PythonWordlist2 = + _T("ACCELERATORS ALT AUTO3STATE AUTOCHECKBOX AUTORADIOBUTTON BEGIN \ + BITMAP BLOCK BUTTON CAPTION CHARACTERISTICS CHECKBOX CLASS \ + COMBOBOX CONTROL CTEXT CURSOR DEFPUSHBUTTON DIALOG DIALOGEX \ + DISCARDABLE EDITTEXT END EXSTYLE FONT GROUPBOX ICON LANGUAGE \ + LISTBOX LTEXT MENU MENUEX MENUITEM MESSAGETABLE POPUP PUSHBUTTON \ + RADIOBUTTON RCDATA RTEXT SCROLLBAR SEPARATOR SHIFT STATE3 \ + STRINGTABLE STYLE TEXTINCLUDE VALUE VERSION VERSIONINFO VIRTKEY"); + + +//---------------------------------------------------------------------------- +//! languages +const LanguageInfo g_LanguagePrefs [] = { + // C++ + {_T("C++"), + _T("*.c;*.cc;*.cpp;*.cxx;*.cs;*.h;*.hh;*.hpp;*.hxx;*.sma"), + wxSTC_LEX_CPP, + {{mySTC_TYPE_DEFAULT, NULL}, + {mySTC_TYPE_COMMENT, NULL}, + {mySTC_TYPE_COMMENT_LINE, NULL}, + {mySTC_TYPE_COMMENT_DOC, NULL}, + {mySTC_TYPE_NUMBER, NULL}, + {mySTC_TYPE_WORD1, CppWordlist1}, // KEYWORDS + {mySTC_TYPE_STRING, NULL}, + {mySTC_TYPE_CHARACTER, NULL}, + {mySTC_TYPE_UUID, NULL}, + {mySTC_TYPE_PREPROCESSOR, NULL}, + {mySTC_TYPE_OPERATOR, NULL}, + {mySTC_TYPE_IDENTIFIER, NULL}, + {mySTC_TYPE_STRING_EOL, NULL}, + {mySTC_TYPE_DEFAULT, NULL}, // VERBATIM + {mySTC_TYPE_REGEX, NULL}, + {mySTC_TYPE_COMMENT_SPECIAL, NULL}, // DOXY + {mySTC_TYPE_WORD2, CppWordlist2}, // EXTRA WORDS + {mySTC_TYPE_WORD3, CppWordlist3}, // DOXY KEYWORDS + {mySTC_TYPE_ERROR, NULL}, // KEYWORDS ERROR + {-1, NULL}, + {-1, NULL}, + {-1, NULL}, + {-1, NULL}, + {-1, NULL}, + {-1, NULL}, + {-1, NULL}, + {-1, NULL}, + {-1, NULL}, + {-1, NULL}, + {-1, NULL}, + {-1, NULL}, + {-1, NULL}}, + mySTC_FOLD_COMMENT | mySTC_FOLD_COMPACT | mySTC_FOLD_PREPROC}, + // Python + {_T("Python"), + _T("*.py;*.pyw"), + wxSTC_LEX_PYTHON, + {{mySTC_TYPE_DEFAULT, NULL}, + {mySTC_TYPE_COMMENT_LINE, NULL}, + {mySTC_TYPE_NUMBER, NULL}, + {mySTC_TYPE_STRING, NULL}, + {mySTC_TYPE_CHARACTER, NULL}, + {mySTC_TYPE_WORD1, PythonWordlist1}, // KEYWORDS + {mySTC_TYPE_DEFAULT, NULL}, // TRIPLE + {mySTC_TYPE_DEFAULT, NULL}, // TRIPLEDOUBLE + {mySTC_TYPE_DEFAULT, NULL}, // CLASSNAME + {mySTC_TYPE_DEFAULT, PythonWordlist2}, // DEFNAME + {mySTC_TYPE_OPERATOR, NULL}, + {mySTC_TYPE_IDENTIFIER, NULL}, + {mySTC_TYPE_DEFAULT, NULL}, // COMMENT_BLOCK + {mySTC_TYPE_STRING_EOL, NULL}, + {-1, NULL}, + {-1, NULL}, + {-1, NULL}, + {-1, NULL}, + {-1, NULL}, + {-1, NULL}, + {-1, NULL}, + {-1, NULL}, + {-1, NULL}, + {-1, NULL}, + {-1, NULL}, + {-1, NULL}, + {-1, NULL}, + {-1, NULL}, + {-1, NULL}, + {-1, NULL}, + {-1, NULL}, + {-1, NULL}}, + mySTC_FOLD_COMMENTPY | mySTC_FOLD_QUOTESPY}, + // * (any) + {(wxChar *)DEFAULT_LANGUAGE, + _T("*.*"), + wxSTC_LEX_PROPERTIES, + {{mySTC_TYPE_DEFAULT, NULL}, + {mySTC_TYPE_DEFAULT, NULL}, + {mySTC_TYPE_DEFAULT, NULL}, + {mySTC_TYPE_DEFAULT, NULL}, + {mySTC_TYPE_DEFAULT, NULL}, + {-1, NULL}, + {-1, NULL}, + {-1, NULL}, + {-1, NULL}, + {-1, NULL}, + {-1, NULL}, + {-1, NULL}, + {-1, NULL}, + {-1, NULL}, + {-1, NULL}, + {-1, NULL}, + {-1, NULL}, + {-1, NULL}, + {-1, NULL}, + {-1, NULL}, + {-1, NULL}, + {-1, NULL}, + {-1, NULL}, + {-1, NULL}, + {-1, NULL}, + {-1, NULL}, + {-1, NULL}, + {-1, NULL}, + {-1, NULL}, + {-1, NULL}, + {-1, NULL}, + {-1, NULL}}, + 0}, + }; + +const int g_LanguagePrefsSize = WXSIZEOF(g_LanguagePrefs); + +//---------------------------------------------------------------------------- +//! style types +const StyleInfo g_StylePrefs [] = { + // mySTC_TYPE_DEFAULT + {_T("Default"), + _T("BLACK"), _T("WHITE"), + _T(""), 10, 0, 0}, + + // mySTC_TYPE_WORD1 + {_T("Keyword1"), + _T("BLUE"), _T("WHITE"), + _T(""), 10, mySTC_STYLE_BOLD, 0}, + + // mySTC_TYPE_WORD2 + {_T("Keyword2"), + _T("DARK BLUE"), _T("WHITE"), + _T(""), 10, 0, 0}, + + // mySTC_TYPE_WORD3 + {_T("Keyword3"), + _T("CORNFLOWER BLUE"), _T("WHITE"), + _T(""), 10, 0, 0}, + + // mySTC_TYPE_WORD4 + {_T("Keyword4"), + _T("CYAN"), _T("WHITE"), + _T(""), 10, 0, 0}, + + // mySTC_TYPE_WORD5 + {_T("Keyword5"), + _T("DARK GREY"), _T("WHITE"), + _T(""), 10, 0, 0}, + + // mySTC_TYPE_WORD6 + {_T("Keyword6"), + _T("GREY"), _T("WHITE"), + _T(""), 10, 0, 0}, + + // mySTC_TYPE_COMMENT + {_T("Comment"), + _T("FOREST GREEN"), _T("WHITE"), + _T(""), 10, 0, 0}, + + // mySTC_TYPE_COMMENT_DOC + {_T("Comment (Doc)"), + _T("FOREST GREEN"), _T("WHITE"), + _T(""), 10, 0, 0}, + + // mySTC_TYPE_COMMENT_LINE + {_T("Comment line"), + _T("FOREST GREEN"), _T("WHITE"), + _T(""), 10, 0, 0}, + + // mySTC_TYPE_COMMENT_SPECIAL + {_T("Special comment"), + _T("FOREST GREEN"), _T("WHITE"), + _T(""), 10, mySTC_STYLE_ITALIC, 0}, + + // mySTC_TYPE_CHARACTER + {_T("Character"), + _T("KHAKI"), _T("WHITE"), + _T(""), 10, 0, 0}, + + // mySTC_TYPE_CHARACTER_EOL + {_T("Character (EOL)"), + _T("KHAKI"), _T("WHITE"), + _T(""), 10, 0, 0}, + + // mySTC_TYPE_STRING + {_T("String"), + _T("BROWN"), _T("WHITE"), + _T(""), 10, 0, 0}, + + // mySTC_TYPE_STRING_EOL + {_T("String (EOL)"), + _T("BROWN"), _T("WHITE"), + _T(""), 10, 0, 0}, + + // mySTC_TYPE_DELIMITER + {_T("Delimiter"), + _T("ORANGE"), _T("WHITE"), + _T(""), 10, 0, 0}, + + // mySTC_TYPE_PUNCTUATION + {_T("Punctuation"), + _T("ORANGE"), _T("WHITE"), + _T(""), 10, 0, 0}, + + // mySTC_TYPE_OPERATOR + {_T("Operator"), + _T("BLACK"), _T("WHITE"), + _T(""), 10, mySTC_STYLE_BOLD, 0}, + + // mySTC_TYPE_BRACE + {_T("Label"), + _T("VIOLET"), _T("WHITE"), + _T(""), 10, 0, 0}, + + // mySTC_TYPE_COMMAND + {_T("Command"), + _T("BLUE"), _T("WHITE"), + _T(""), 10, 0, 0}, + + // mySTC_TYPE_IDENTIFIER + {_T("Identifier"), + _T("BLACK"), _T("WHITE"), + _T(""), 10, 0, 0}, + + // mySTC_TYPE_LABEL + {_T("Label"), + _T("VIOLET"), _T("WHITE"), + _T(""), 10, 0, 0}, + + // mySTC_TYPE_NUMBER + {_T("Number"), + _T("SIENNA"), _T("WHITE"), + _T(""), 10, 0, 0}, + + // mySTC_TYPE_PARAMETER + {_T("Parameter"), + _T("VIOLET"), _T("WHITE"), + _T(""), 10, mySTC_STYLE_ITALIC, 0}, + + // mySTC_TYPE_REGEX + {_T("Regular expression"), + _T("ORCHID"), _T("WHITE"), + _T(""), 10, 0, 0}, + + // mySTC_TYPE_UUID + {_T("UUID"), + _T("ORCHID"), _T("WHITE"), + _T(""), 10, 0, 0}, + + // mySTC_TYPE_VALUE + {_T("Value"), + _T("ORCHID"), _T("WHITE"), + _T(""), 10, mySTC_STYLE_ITALIC, 0}, + + // mySTC_TYPE_PREPROCESSOR + {_T("Preprocessor"), + _T("GREY"), _T("WHITE"), + _T(""), 10, 0, 0}, + + // mySTC_TYPE_SCRIPT + {_T("Script"), + _T("DARK GREY"), _T("WHITE"), + _T(""), 10, 0, 0}, + + // mySTC_TYPE_ERROR + {_T("Error"), + _T("RED"), _T("WHITE"), + _T(""), 10, 0, 0}, + + // mySTC_TYPE_UNDEFINED + {_T("Undefined"), + _T("ORANGE"), _T("WHITE"), + _T(""), 10, 0, 0} + + }; + +const int g_StylePrefsSize = WXSIZEOF(g_StylePrefs); + diff --git a/contrib/samples/stc/prefs.h b/contrib/samples/stc/prefs.h new file mode 100644 index 0000000000..523362545c --- /dev/null +++ b/contrib/samples/stc/prefs.h @@ -0,0 +1,153 @@ + ////////////////////////////////////////////////////////////////////////////// +// File: prefs.h +// Purpose: STC test Preferences initialization +// Maintainer: Wyo +// Created: 2003-09-01 +// RCS-ID: $Id$ +// Copyright: (c) wxGuide +// Licence: wxWindows licence +////////////////////////////////////////////////////////////////////////////// + +#ifndef _PREFS_H_ +#define _PREFS_H_ + +//---------------------------------------------------------------------------- +// informations +//---------------------------------------------------------------------------- + + +//---------------------------------------------------------------------------- +// headers +//---------------------------------------------------------------------------- + +//! wxWindows headers + +//! wxWindows/contrib headers +#include // styled text control + +//! application headers + + +//============================================================================ +// declarations +//============================================================================ + +//! general style types +#define mySTC_TYPE_DEFAULT 0 + +#define mySTC_TYPE_WORD1 1 +#define mySTC_TYPE_WORD2 2 +#define mySTC_TYPE_WORD3 3 +#define mySTC_TYPE_WORD4 4 +#define mySTC_TYPE_WORD5 5 +#define mySTC_TYPE_WORD6 6 + +#define mySTC_TYPE_COMMENT 7 +#define mySTC_TYPE_COMMENT_DOC 8 +#define mySTC_TYPE_COMMENT_LINE 9 +#define mySTC_TYPE_COMMENT_SPECIAL 10 + +#define mySTC_TYPE_CHARACTER 11 +#define mySTC_TYPE_CHARACTER_EOL 12 +#define mySTC_TYPE_STRING 13 +#define mySTC_TYPE_STRING_EOL 14 + +#define mySTC_TYPE_DELIMITER 15 + +#define mySTC_TYPE_PUNCTUATION 16 + +#define mySTC_TYPE_OPERATOR 17 + +#define mySTC_TYPE_BRACE 18 + +#define mySTC_TYPE_COMMAND 19 +#define mySTC_TYPE_IDENTIFIER 20 +#define mySTC_TYPE_LABEL 21 +#define mySTC_TYPE_NUMBER 22 +#define mySTC_TYPE_PARAMETER 23 +#define mySTC_TYPE_REGEX 24 +#define mySTC_TYPE_UUID 25 +#define mySTC_TYPE_VALUE 26 + +#define mySTC_TYPE_PREPROCESSOR 27 +#define mySTC_TYPE_SCRIPT 28 + +#define mySTC_TYPE_ERROR 29 + +//---------------------------------------------------------------------------- +//! style bits types +#define mySTC_STYLE_BOLD 1 +#define mySTC_STYLE_ITALIC 2 +#define mySTC_STYLE_UNDERL 4 +#define mySTC_STYLE_HIDDEN 8 + +//---------------------------------------------------------------------------- +//! general folding types +#define mySTC_FOLD_COMMENT 1 +#define mySTC_FOLD_COMPACT 2 +#define mySTC_FOLD_PREPROC 4 + +#define mySTC_FOLD_HTML 16 +#define mySTC_FOLD_HTMLPREP 32 + +#define mySTC_FOLD_COMMENTPY 64 +#define mySTC_FOLD_QUOTESPY 128 + +//---------------------------------------------------------------------------- +//! flags +#define mySTC_FLAG_WRAPMODE 16 + +//---------------------------------------------------------------------------- +// CommonInfo + +struct CommonInfo { + // editor functionality prefs + bool syntaxEnable; + bool foldEnable; + bool indentEnable; + // display defaults prefs + bool readOnlyInitial; + bool overTypeInitial; + bool wrapModeInitial; + bool displayEOLEnable; + bool indentGuideEnable; + bool lineNumberEnable; + bool longLineOnEnable; + bool whiteSpaceEnable; +}; +extern const CommonInfo g_CommonPrefs; + +//---------------------------------------------------------------------------- +// LanguageInfo + +struct LanguageInfo { + wxChar *name; + wxChar *filepattern; + int lexer; + struct { + int type; + const wxChar *words; + } styles [STYLE_TYPES_COUNT]; + int folds; +}; + +extern const LanguageInfo g_LanguagePrefs[]; +extern const int g_LanguagePrefsSize; + +//---------------------------------------------------------------------------- +// StyleInfo +struct StyleInfo { + wxChar *name; + wxChar *foreground; + wxChar *background; + wxChar *fontname; + int fontsize; + int fontstyle; + int lettercase; +}; + +extern const StyleInfo g_StylePrefs[]; +extern const int g_StylePrefsSize; + +#endif // _PREFS_H_ + diff --git a/contrib/samples/stc/stctest.cpp b/contrib/samples/stc/stctest.cpp index b33052c86c..7fa8e3f17d 100644 --- a/contrib/samples/stc/stctest.cpp +++ b/contrib/samples/stc/stctest.cpp @@ -1,194 +1,664 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: stctest.cpp -// Purpose: sample of using wxStyledTextCtrl -// Author: Robin Dunn -// Modified by: -// Created: 3-Feb-2000 +////////////////////////////////////////////////////////////////////////////// +// File: stctest.cpp +// Purpose: STC test application +// Maintainer: Otto Wyss +// Created: 2003-09-01 // RCS-ID: $Id$ -// Copyright: (c) 2000 by Total Control Software +// Copyright: (c) wxGuide // Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////// -#if defined(__GNUG__) && !defined(__APPLE__) - #pragma implementation "stctest.cpp" - #pragma interface "stctest.cpp" -#endif +//---------------------------------------------------------------------------- +// headers +//---------------------------------------------------------------------------- -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" +// For compilers that support precompilation, includes . +#include #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 +// need because it includes almost all 'standard' wxWindows headers) #ifndef WX_PRECOMP - #include "wx/wx.h" + #include #endif -#include +//! wxWindows headers +#include // configuration support +#include // file dialog support +#include // filename support +#include // notebook support +#include // system settings +#include // strings support +#include // images support -#include +//! application headers +#include "defsext.h" // Additional definitions +#include "edit.h" // Edit module +#include "prefs.h" // Prefs -//---------------------------------------------------------------------- -class MyApp : public wxApp -{ +//---------------------------------------------------------------------------- +// resources +//---------------------------------------------------------------------------- + +// the application icon (under Windows and OS/2 it is in resources) +#if defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXMAC__) || defined(__WXMGL__) || defined(__WXX11__) + #include "mondrian.xpm" +#endif + +//============================================================================ +// declarations +//============================================================================ + +#define APP_NAME _T("STC-Test") +#define APP_DESCR _("See http://wxguide.sourceforge.net/") + +#define APP_MAINT _T("Otto Wyss") +#define APP_VENDOR _T("wxWindows") +#define APP_COPYRIGTH _T("(C) 2003 Otto Wyss") +#define APP_LICENCE _T("wxWindows") + +#define APP_VERSION _T("0.1.alpha") +#define APP_BUILD __DATE__ + +#define APP_WEBSITE _T("http://www.wxWindows.org") +#define APP_MAIL _T("mailto://???") + +#define NONAME _("") + +class AppBook; + + +//---------------------------------------------------------------------------- +//! global application name +wxString *g_appname = NULL; + +//! global print data, to remember settings during the session +wxPrintData *g_printData = (wxPrintData*) NULL; +wxPageSetupData *g_pageSetupData = (wxPageSetupData*) NULL; + + +//---------------------------------------------------------------------------- +//! application APP_VENDOR-APP_NAME. +class App: public wxApp { + friend class AppFrame; + public: - virtual bool OnInit(); -}; + //! the main function called durning application start + virtual bool OnInit (); -//---------------------------------------------------------------------- - -// Define a new frame type: this is going to be our main frame -class MyFrame : public wxFrame -{ -public: - MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size); - - void OnQuit(wxCommandEvent& event); - void OnAbout(wxCommandEvent& event); + //! application exit function + virtual int OnExit (); private: - wxStyledTextCtrl* ed; + //! frame window + AppFrame* m_frame; + +}; + +// created dynamically by wxWindows +DECLARE_APP (App); + +//---------------------------------------------------------------------------- +//! frame of the application APP_VENDOR-APP_NAME. +class AppFrame: public wxFrame { + friend class App; + friend class AppBook; + friend class AppAbout; + +public: + //! constructor + AppFrame (const wxString &title); + + //! destructor + ~AppFrame (); + + //! event handlers + //! common + void OnClose (wxCloseEvent &event); + void OnAbout (wxCommandEvent &event); + void OnExit (wxCommandEvent &event); + void OnTimerEvent (wxTimerEvent &event); + //! file + void OnFileNew (wxCommandEvent &event); + void OnFileNewFrame (wxCommandEvent &event); + void OnFileOpen (wxCommandEvent &event); + void OnFileOpenFrame (wxCommandEvent &event); + void OnFileSave (wxCommandEvent &event); + void OnFileSaveAs (wxCommandEvent &event); + void OnFileClose (wxCommandEvent &event); + //! properties + void OnProperties (wxCommandEvent &event); + //! print + void OnPrintSetup (wxCommandEvent &event); + void OnPrintPreview (wxCommandEvent &event); + void OnPrint (wxCommandEvent &event); + //! edit events + void OnEdit (wxCommandEvent &event); + +private: + // edit object + Edit *m_edit; + void FileOpen (wxString fname); + + //! creates the application menu bar + wxMenuBar *m_menuBar; + void CreateMenu (); + + // print preview position and size + wxRect DeterminePrintSize (); + + DECLARE_EVENT_TABLE() +}; + +//---------------------------------------------------------------------------- +//! about box of the application APP_VENDOR-APP_NAME +class AppAbout: public wxDialog { + +public: + //! constructor + AppAbout (wxWindow *parent, + int milliseconds = 0, + long style = 0); + + //! destructor + ~AppAbout (); + + // event handlers + void OnTimerEvent (wxTimerEvent &event); + +private: + // timer + wxTimer *m_timer; DECLARE_EVENT_TABLE() }; -// IDs for the controls and the menu commands -enum -{ - // menu items - ID_Quit = 1, - ID_About, - ID_ED -}; +//============================================================================ +// implementation +//============================================================================ -BEGIN_EVENT_TABLE(MyFrame, wxFrame) - EVT_MENU (ID_Quit, MyFrame::OnQuit) - EVT_MENU (ID_About, MyFrame::OnAbout) -END_EVENT_TABLE() +IMPLEMENT_APP (App) -IMPLEMENT_APP(MyApp) +//---------------------------------------------------------------------------- +// App +//---------------------------------------------------------------------------- -//---------------------------------------------------------------------- -// `Main program' equivalent: the program execution "starts" here +bool App::OnInit () { -bool MyApp::OnInit() -{ - MyFrame *frame = new MyFrame("Testing wxStyledTextCtrl", - wxPoint(5, 5), wxSize(400, 600)); + wxInitAllImageHandlers(); - frame->Show(TRUE); - return TRUE; + // set application and vendor name + SetAppName (APP_NAME); + SetVendorName (APP_VENDOR); + g_appname = new wxString (); + g_appname->Append (APP_VENDOR); + g_appname->Append (_T("-")); + g_appname->Append (APP_NAME); + + // initialize print data and setup + g_printData = new wxPrintData; + g_pageSetupData = new wxPageSetupDialogData; + + // create application frame + m_frame = new AppFrame (*g_appname); + + // open application frame + m_frame->Layout (); + m_frame->Show (true); + SetTopWindow (m_frame); + + return true; } -//---------------------------------------------------------------------- +int App::OnExit () { -// frame constructor -MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size) - : wxFrame((wxFrame *)NULL, -1, title, pos, size) -{ -#ifdef __WXMAC__ - // we need this in order to allow the about menu relocation, since ABOUT is - // not the default id of the about menu - wxApp::s_macAboutMenuItemId = ID_About; -#endif + // delete global appname + delete g_appname; + // delete global print data and setup + if (g_printData) delete g_printData; + if (g_pageSetupData) delete g_pageSetupData; - // create a menu bar - wxMenu *menuFile = new wxMenu("", wxMENU_TEAROFF); + return 0; +} - // the "About" item should be in the help menu - wxMenu *helpMenu = new wxMenu; - helpMenu->Append(ID_About, "&About...\tCtrl-A", "Show about dialog"); +//---------------------------------------------------------------------------- +// AppFrame +//---------------------------------------------------------------------------- - menuFile->Append(ID_Quit, "E&xit\tAlt-X", "Quit this program"); +BEGIN_EVENT_TABLE (AppFrame, wxFrame) + // common + EVT_CLOSE ( AppFrame::OnClose) + // file + EVT_MENU (wxID_OPEN, AppFrame::OnFileOpen) + EVT_MENU (wxID_SAVE, AppFrame::OnFileSave) + EVT_MENU (wxID_SAVEAS, AppFrame::OnFileSaveAs) + EVT_MENU (wxID_CLOSE, AppFrame::OnFileClose) + // properties + EVT_MENU (myID_PROPERTIES, AppFrame::OnProperties) + // print and exit + EVT_MENU (wxID_PRINT_SETUP, AppFrame::OnPrintSetup) + EVT_MENU (wxID_PREVIEW, AppFrame::OnPrintPreview) + EVT_MENU (wxID_PRINT, AppFrame::OnPrint) + EVT_MENU (wxID_EXIT, AppFrame::OnExit) + // edit + EVT_MENU (wxID_CLEAR, AppFrame::OnEdit) + EVT_MENU (wxID_CUT, AppFrame::OnEdit) + EVT_MENU (wxID_COPY, AppFrame::OnEdit) + EVT_MENU (wxID_PASTE, AppFrame::OnEdit) + EVT_MENU (myID_INDENTINC, AppFrame::OnEdit) + EVT_MENU (myID_INDENTRED, AppFrame::OnEdit) + EVT_MENU (wxID_SELECTALL, AppFrame::OnEdit) + EVT_MENU (myID_SELECTLINE, AppFrame::OnEdit) + EVT_MENU (wxID_REDO, AppFrame::OnEdit) + EVT_MENU (wxID_UNDO, AppFrame::OnEdit) + // find + EVT_MENU (wxID_FIND, AppFrame::OnEdit) + EVT_MENU (myID_FINDNEXT, AppFrame::OnEdit) + EVT_MENU (myID_REPLACE, AppFrame::OnEdit) + EVT_MENU (myID_REPLACENEXT, AppFrame::OnEdit) + EVT_MENU (myID_BRACEMATCH, AppFrame::OnEdit) + EVT_MENU (myID_GOTO, AppFrame::OnEdit) + // view + EVT_MENU_RANGE (myID_HILIGHTFIRST, myID_HILIGHTLAST, + AppFrame::OnEdit) + EVT_MENU (myID_DISPLAYEOL, AppFrame::OnEdit) + EVT_MENU (myID_INDENTGUIDE, AppFrame::OnEdit) + EVT_MENU (myID_LINENUMBER, AppFrame::OnEdit) + EVT_MENU (myID_LONGLINEON, AppFrame::OnEdit) + EVT_MENU (myID_WHITESPACE, AppFrame::OnEdit) + EVT_MENU (myID_FOLDTOGGLE, AppFrame::OnEdit) + EVT_MENU (myID_OVERTYPE, AppFrame::OnEdit) + EVT_MENU (myID_READONLY, AppFrame::OnEdit) + EVT_MENU (myID_WRAPMODEON, AppFrame::OnEdit) + // extra + EVT_MENU (myID_CHANGELOWER, AppFrame::OnEdit) + EVT_MENU (myID_CHANGEUPPER, AppFrame::OnEdit) + EVT_MENU (myID_CONVERTCR, AppFrame::OnEdit) + EVT_MENU (myID_CONVERTCRLF, AppFrame::OnEdit) + EVT_MENU (myID_CONVERTLF, AppFrame::OnEdit) + EVT_MENU (myID_CHARSETANSI, AppFrame::OnEdit) + EVT_MENU (myID_CHARSETMAC, AppFrame::OnEdit) + // help + EVT_MENU (wxID_ABOUT, AppFrame::OnAbout) +END_EVENT_TABLE () - // now append the freshly created menu to the menu bar... - wxMenuBar *menuBar = new wxMenuBar(); - menuBar->Append(menuFile, "&File"); - menuBar->Append(helpMenu, "&Help"); +AppFrame::AppFrame (const wxString &title) + : wxFrame ((wxFrame *)NULL, -1, title, wxDefaultPosition, wxDefaultSize, + wxDEFAULT_FRAME_STYLE | wxNO_FULL_REPAINT_ON_RESIZE) { - // ... and attach this menu bar to the frame - SetMenuBar(menuBar); + // intitialize important variables + m_edit = NULL; -#if wxUSE_STATUSBAR - CreateStatusBar(2); - SetStatusText("Testing wxStyledTextCtrl"); -#endif // wxUSE_STATUSBAR + // set icon and background + SetTitle (*g_appname); + SetIcon (wxICON (mondrian)); + SetBackgroundColour (_T("WHITE")); + // about box shown for 1 seconds + AppAbout (this, 1000); - //---------------------------------------- - // Setup the editor - ed = new wxStyledTextCtrl(this, ID_ED); + // create menu + m_menuBar = new wxMenuBar; + CreateMenu (); - // Default font - wxFont font(10, wxMODERN, wxNORMAL, wxNORMAL); - ed->StyleSetFont(wxSTC_STYLE_DEFAULT, font); - ed->StyleClearAll(); + // open first page + m_edit = new Edit (this, -1); + m_edit->SetFocus(); - 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); + FileOpen (_T("stctest.cpp")); +} -#ifdef __WXMSW__ - ed->StyleSetSpec(2, "fore:#007f00,bold,face:Arial,size:9"); -#else - ed->StyleSetSpec(2, "fore:#007f00,bold,face:Helvetica,size:9"); -#endif +AppFrame::~AppFrame () { +} - // give it some text to play with - wxFile file("stctest.cpp"); - wxString st; +// common event handlers +void AppFrame::OnClose (wxCloseEvent &event) { + wxCommandEvent evt; + OnFileClose (evt); + if (m_edit && m_edit->Modified()) { + if (event.CanVeto()) event.Veto (true); + return; + } + Destroy(); +} - char* buff = st.GetWriteBuf(file.Length()); - file.Read(buff, file.Length()); - st.UngetWriteBuf(); +void AppFrame::OnAbout (wxCommandEvent &WXUNUSED(event)) { + AppAbout (this); +} - ed->InsertText(0, st); - ed->EmptyUndoBuffer(); +void AppFrame::OnExit (wxCommandEvent &WXUNUSED(event)) { + Close (true); +} - 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"); +// file event handlers +void AppFrame::OnFileOpen (wxCommandEvent &WXUNUSED(event)) { + if (!m_edit) return; + wxString fname; + wxFileDialog dlg (this, _T("Open file"), _T(""), _T(""), _T("Any file (*)|*"), + wxOPEN | wxFILE_MUST_EXIST | wxCHANGE_DIR); + if (dlg.ShowModal() != wxID_OK) return; + fname = dlg.GetPath (); + FileOpen (fname); +} + +void AppFrame::OnFileSave (wxCommandEvent &WXUNUSED(event)) { + if (!m_edit) return; + if (!m_edit->Modified()) { + wxMessageBox (_("There is nothing to save!"), _("Save file"), + wxOK | wxICON_EXCLAMATION); + return; + } + m_edit->SaveFile (); +} + +void AppFrame::OnFileSaveAs (wxCommandEvent &WXUNUSED(event)) { + if (!m_edit) return; + wxString filename = wxEmptyString; + wxFileDialog dlg (this, _T("Save file"), _T(""), _T(""), _T("Any file (*)|*"), wxSAVE|wxOVERWRITE_PROMPT); + if (dlg.ShowModal() != wxID_OK) return; + filename = dlg.GetPath(); + m_edit->SaveFile (filename); +} + +void AppFrame::OnFileClose (wxCommandEvent &WXUNUSED(event)) { + if (!m_edit) return; + if (m_edit->Modified()) { + if (wxMessageBox (_("Text is not saved, save before closing?"), _("Close"), + wxYES_NO | wxICON_QUESTION) == wxYES) { + m_edit->SaveFile(); + if (m_edit->Modified()) { + wxMessageBox (_("Text could not be saved!"), _("Close abort"), + wxOK | wxICON_EXCLAMATION); + return; + } + } + } + m_edit->SetFilename (wxEmptyString); + m_edit->ClearAll(); + m_edit->SetSavePoint(); +} + +// properties event handlers +void AppFrame::OnProperties (wxCommandEvent &WXUNUSED(event)) { + if (!m_edit) return; + EditProperties (m_edit, 0); +} + +// print event handlers +void AppFrame::OnPrintSetup (wxCommandEvent &WXUNUSED(event)) { + (*g_pageSetupData) = * g_printData; + wxPageSetupDialog pageSetupDialog(this, g_pageSetupData); + pageSetupDialog.ShowModal(); + (*g_printData) = pageSetupDialog.GetPageSetupData().GetPrintData(); + (*g_pageSetupData) = pageSetupDialog.GetPageSetupData(); +} + +void AppFrame::OnPrintPreview (wxCommandEvent &WXUNUSED(event)) { + wxPrintDialogData printDialogData( *g_printData); + wxPrintPreview *preview = + new wxPrintPreview (new EditPrint (m_edit), + new EditPrint (m_edit), + &printDialogData); + if (!preview->Ok()) { + delete preview; + wxMessageBox (_("There was a problem with previewing.\n\ + Perhaps your current printer is not correctly?"), + _("Previewing"), wxOK); + return; + } + wxRect rect = DeterminePrintSize(); + wxPreviewFrame *frame = new wxPreviewFrame (preview, this, _("Print Preview")); + frame->SetSize (rect); + frame->Centre(wxBOTH); + frame->Initialize(); + frame->Show(true); +} + +void AppFrame::OnPrint (wxCommandEvent &WXUNUSED(event)) { + wxPrintDialogData printDialogData( *g_printData); + wxPrinter printer (&printDialogData); + EditPrint printout (m_edit); + if (!printer.Print (this, &printout, true)) { + if (wxPrinter::GetLastError() == wxPRINTER_ERROR) { + wxMessageBox (_("There was a problem with printing.\n\ + Perhaps your current printer is not correctly?"), + _("Previewing"), wxOK); + return; + } + } + (*g_printData) = printer.GetPrintDialogData().GetPrintData(); +} + +// edit events +void AppFrame::OnEdit (wxCommandEvent &event) { + if (m_edit) m_edit->ProcessEvent (event); +} + +// private functions +void AppFrame::CreateMenu () { + + // File menu + wxMenu *menuFile = new wxMenu; + menuFile->Append (wxID_OPEN, _("&Open ..\tCtrl+O")); + menuFile->Append (wxID_SAVE, _("&Save\tCtrl+S")); + menuFile->Append (wxID_SAVEAS, _("Save &as ..\tCtrl+Shift+S")); + menuFile->Append (wxID_CLOSE, _("&Close\tCtrl+W")); + menuFile->AppendSeparator(); + menuFile->Append (myID_PROPERTIES, _("Proper&ties ..\tCtrl+I")); + menuFile->AppendSeparator(); + menuFile->Append (wxID_PRINT_SETUP, _("Print Set&up ..")); + menuFile->Append (wxID_PREVIEW, _("Print Pre&view\tCtrl+Shift+P")); + menuFile->Append (wxID_PRINT, _("&Print ..\tCtrl+P")); + menuFile->AppendSeparator(); + menuFile->Append (wxID_EXIT, _("&Quit\tCtrl+Q")); + + // Edit menu + wxMenu *menuEdit = new wxMenu; + menuEdit->Append (wxID_UNDO, _("&Undo\tCtrl+Z")); + menuEdit->Append (wxID_REDO, _("&Redo\tCtrl+Shift+Z")); + menuEdit->AppendSeparator(); + menuEdit->Append (wxID_CUT, _("Cu&t\tCtrl+X")); + menuEdit->Append (wxID_COPY, _("&Copy\tCtrl+C")); + menuEdit->Append (wxID_PASTE, _("&Paste\tCtrl+V")); + menuEdit->Append (wxID_CLEAR, _("&Delete\tDel")); + menuEdit->AppendSeparator(); + menuEdit->Append (wxID_FIND, _("&Find\tCtrl+F")); + menuEdit->Enable (wxID_FIND, false); + menuEdit->Append (myID_FINDNEXT, _("Find &next\tF3")); + menuEdit->Enable (myID_FINDNEXT, false); + menuEdit->Append (myID_REPLACE, _("&Replace\tCtrl+H")); + menuEdit->Enable (myID_REPLACE, false); + menuEdit->Append (myID_REPLACENEXT, _("Replace &again\tShift+F4")); + menuEdit->Enable (myID_REPLACENEXT, false); + menuEdit->AppendSeparator(); + menuEdit->Append (myID_BRACEMATCH, _("&Match brace\tCtrl+M")); + menuEdit->Append (myID_GOTO, _("&Goto\tCtrl+G")); + menuEdit->Enable (myID_GOTO, false); + menuEdit->AppendSeparator(); + menuEdit->Append (myID_INDENTINC, _("&Indent increase\tTab")); + menuEdit->Append (myID_INDENTRED, _("I&ndent reduce\tBksp")); + menuEdit->AppendSeparator(); + menuEdit->Append (wxID_SELECTALL, _("&Select all\tCtrl+A")); + menuEdit->Append (myID_SELECTLINE, _("Select &line\tCtrl+L")); + + // hilight submenu + wxMenu *menuHilight = new wxMenu; + int Nr; + for (Nr = 0; Nr < g_LanguagePrefsSize; Nr++) { + menuHilight->Append (myID_HILIGHTFIRST + Nr, + g_LanguagePrefs [Nr].name); + } + + // charset submenu + wxMenu *menuCharset = new wxMenu; + menuCharset->Append (myID_CHARSETANSI, _("&ANSI (Windows)")); + menuCharset->Append (myID_CHARSETMAC, _("&MAC (Macintosh)")); + + // View menu + wxMenu *menuView = new wxMenu; + menuView->Append (myID_HILIGHTLANG, _("&Hilight language .."), menuHilight); + menuView->AppendSeparator(); + menuView->AppendCheckItem (myID_FOLDTOGGLE, _("&Toggle current fold\tCtrl+T")); + menuView->AppendCheckItem (myID_OVERTYPE, _("&Overwrite mode\tIns")); + menuView->AppendCheckItem (myID_WRAPMODEON, _("&Wrap mode\tCtrl+U")); + menuView->AppendSeparator(); + menuView->AppendCheckItem (myID_DISPLAYEOL, _("Show line &endings")); + menuView->AppendCheckItem (myID_INDENTGUIDE, _("Show &indent guides")); + menuView->AppendCheckItem (myID_LINENUMBER, _("Show line &numbers")); + menuView->AppendCheckItem (myID_LONGLINEON, _("Show &long line marker")); + menuView->AppendCheckItem (myID_WHITESPACE, _("Show white&space")); + menuView->AppendSeparator(); + menuView->Append (myID_USECHARSET, _("Use &code page of .."), menuCharset); + + // change case submenu + wxMenu *menuChangeCase = new wxMenu; + menuChangeCase->Append (myID_CHANGEUPPER, _("&Upper case")); + menuChangeCase->Append (myID_CHANGELOWER, _("&Lower case")); + + // convert EOL submenu + wxMenu *menuConvertEOL = new wxMenu; + menuConvertEOL->Append (myID_CONVERTCR, _("CR (&Linux)")); + menuConvertEOL->Append (myID_CONVERTCRLF, _("CR+LF (&Windows)")); + menuConvertEOL->Append (myID_CONVERTLF, _("LF (&Macintosh)")); + + // Extra menu + wxMenu *menuExtra = new wxMenu; + menuExtra->AppendCheckItem (myID_READONLY, _("&Readonly mode")); + menuExtra->AppendSeparator(); + menuExtra->Append (myID_CHANGECASE, _("Change &case to .."), menuChangeCase); + menuExtra->AppendSeparator(); + menuExtra->Append (myID_CONVERTEOL, _("Convert line &endings to .."), menuConvertEOL); + + // Window menu + wxMenu *menuWindow = new wxMenu; + menuWindow->Append (myID_PAGEPREV, _("&Previous\tCtrl+Shift+Tab")); + menuWindow->Append (myID_PAGENEXT, _("&Next\tCtrl+Tab")); + + // Help menu + wxMenu *menuHelp = new wxMenu; + menuHelp->Append (wxID_ABOUT, _("&About ..\tShift+F1")); + + // construct menu + m_menuBar->Append (menuFile, _("&File")); + m_menuBar->Append (menuEdit, _("&Edit")); + m_menuBar->Append (menuView, _("&View")); + m_menuBar->Append (menuExtra, _("E&xtra")); + m_menuBar->Append (menuWindow, _("&Window")); + m_menuBar->Append (menuHelp, _("&Help")); + SetMenuBar (m_menuBar); } +void AppFrame::FileOpen (wxString fname) { + wxFileName w(fname); w.Normalize(); fname = w.GetFullPath(); + m_edit->LoadFile (fname); +} +wxRect AppFrame::DeterminePrintSize () { + + wxSize scr = wxGetDisplaySize(); + + // determine position and size (shifting 16 left and down) + wxRect rect = GetRect(); + rect.x += 16; + rect.y += 16; + rect.width = wxMin (rect.width, (scr.x - rect.x)); + rect.height = wxMin (rect.height, (scr.x - rect.y)); + + return rect; +} + + +//---------------------------------------------------------------------------- +// AppAbout +//---------------------------------------------------------------------------- + +BEGIN_EVENT_TABLE (AppAbout, wxDialog) + EVT_TIMER (myID_ABOUTTIMER, AppAbout::OnTimerEvent) +END_EVENT_TABLE () + +AppAbout::AppAbout (wxWindow *parent, + int milliseconds, + long style) + : wxDialog (parent, -1, wxEmptyString, + wxDefaultPosition, wxDefaultSize, + style | wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER) { + + // set timer if any + m_timer = NULL; + if (milliseconds > 0) { + m_timer = new wxTimer (this, myID_ABOUTTIMER); + m_timer->Start (milliseconds, wxTIMER_ONE_SHOT); + } + + // sets the application title + SetTitle (_("About ..")); + + // about info + wxGridSizer *aboutinfo = new wxGridSizer (2, 0, 2); + aboutinfo->Add (new wxStaticText(this, -1, _("Written by: ")), + 0, wxALIGN_LEFT); + aboutinfo->Add (new wxStaticText(this, -1, APP_MAINT), + 1, wxEXPAND | wxALIGN_LEFT); + aboutinfo->Add (new wxStaticText(this, -1, _("Version: ")), + 0, wxALIGN_LEFT); + aboutinfo->Add (new wxStaticText(this, -1, APP_VERSION), + 1, wxEXPAND | wxALIGN_LEFT); + aboutinfo->Add (new wxStaticText(this, -1, _("Licence type: ")), + 0, wxALIGN_LEFT); + aboutinfo->Add (new wxStaticText(this, -1, APP_LICENCE), + 1, wxEXPAND | wxALIGN_LEFT); + aboutinfo->Add (new wxStaticText(this, -1, _("Copyright: ")), + 0, wxALIGN_LEFT); + aboutinfo->Add (new wxStaticText(this, -1, APP_COPYRIGTH), + 1, wxEXPAND | wxALIGN_LEFT); + + // about icontitle//info + wxBoxSizer *aboutpane = new wxBoxSizer (wxHORIZONTAL); + wxBitmap bitmap = wxBitmap(wxICON (mondrian)); + aboutpane->Add (new wxStaticBitmap (this, -1, bitmap), + 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 20); + aboutpane->Add (aboutinfo, 1, wxEXPAND); + aboutpane->Add (60, 0); + + // about complete + wxBoxSizer *totalpane = new wxBoxSizer (wxVERTICAL); + totalpane->Add (0, 20); + wxStaticText *appname = new wxStaticText(this, -1, *g_appname); + appname->SetFont (wxFont (24, wxDEFAULT, wxNORMAL, wxBOLD)); + totalpane->Add (appname, 0, wxALIGN_CENTER | wxLEFT | wxRIGHT, 40); + totalpane->Add (0, 10); + totalpane->Add (aboutpane, 0, wxEXPAND | wxALL, 4); + totalpane->Add (new wxStaticText(this, -1, APP_DESCR), + 0, wxALIGN_CENTER | wxALL, 10); + wxButton *okButton = new wxButton (this, wxID_OK, _("OK")); + okButton->SetDefault(); + totalpane->Add (okButton, 0, wxALIGN_CENTER | wxLEFT | wxRIGHT | wxBOTTOM, 10); + + SetSizerAndFit (totalpane); + + CenterOnScreen(); + ShowModal(); +} + +AppAbout::~AppAbout () { + if (m_timer) { + delete m_timer; + m_timer = NULL; + } +} + +//---------------------------------------------------------------------------- // event handlers - -void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event)) -{ - // TRUE is to force the frame to close - Close(TRUE); +void AppAbout::OnTimerEvent (wxTimerEvent &WXUNUSED(event)) { + if (m_timer) delete m_timer; + m_timer = NULL; + EndModal (wxID_OK); } -void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) -{ - wxString msg; - msg.Printf( _T("Testing wxStyledTextCtrl...\n")); - - wxMessageBox(msg, "About This Test", wxOK | wxICON_INFORMATION, this); -} diff --git a/contrib/samples/stc/stctest.rc b/contrib/samples/stc/stctest.rc index b86c4e2265..4b3d5ef9cf 100644 --- a/contrib/samples/stc/stctest.rc +++ b/contrib/samples/stc/stctest.rc @@ -1 +1,5 @@ +mondrian ICON "mondrian.ico" #include "wx/msw/wx.rc" + + + 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/bitmaps/help.xpm b/contrib/samples/svg/bitmaps/help.xpm index e9e215ff2d..161b6b2658 100644 --- a/contrib/samples/svg/bitmaps/help.xpm +++ b/contrib/samples/svg/bitmaps/help.xpm @@ -1,25 +1,71 @@ -/* XPM */ -static char *help_xpm[] = { -/* columns rows colors chars-per-pixel */ -"16 15 4 1", -" c None", -". c Black", -"X c Blue", -"o c #000080", -/* pixels */ -" ", -" ...... ", -" .XXXXX.. ", -" .XX...oX.. ", -" .X.. .X.. ", -" .X.. .XX.. ", -" .. .XX.. ", -" .XX.. ", -" .X.. ", -" .X.. ", -" .o.. ", -" .. ", -" .XX.. ", -" .XX.. ", -" ... " -}; +/* XPM */ +static char *help_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 50 1", +"j c #4E7FD0", +"8 c #EDF2FB", +", c #7198D9", +"e c #DCE6F6", +"y c #FFFFFF", +"5 c #95B2E3", +"$ c #9AB6E4", +"g c #EAF0FA", +"1 c #2D59A3", +"@ c #B1C7EB", +"> c #6992D7", +"a c #D9E4F5", +"r c #356AC1", +"6 c #9BB7E5", +"= c #F7F9FD", +"+ c #BED0EE", +"z c #F0F5FC", +"f c #ADC4E9", +"# c #A8C0E8", +"7 c #CBD9F1", +"u c #366BC2", +" c None", +"c c #FDFEFF", +"w c #274D8D", +"t c #C4D5F0", +"% c #7CA0DC", +"h c #E2EAF8", +"p c #487BCE", +"o c #4377CD", +"4 c #2A549A", +"< c #254A87", +"O c #CCDAF2", +"& c #89A9DF", +"9 c #2B559B", +"* c #D2DFF4", +". c #3366BB", +": c #2E5CA8", +"x c #FAFCFE", +"l c #F5F8FD", +"2 c #799EDB", +"d c #DFE8F7", +"; c #A6BFE8", +"3 c #638ED5", +"- c #5282D0", +"X c #2A5398", +"0 c #B8CCEC", +"s c #376EC9", +"q c #2D5AA5", +"i c #285092", +"k c #8CACE0", +/* pixels */ +" .......Xo ", +" .O+@#$%.&o ", +" .*O+@#$.=&- ", +" ;:::>#@#.==&: ", +" ,<1234<>@....: ", +"5 c #3366BB", +"$ c #2E5CA8", +"9 c #FAFCFE", +"4 c #F5F8FD", +"q c #638ED5", +"o c #5282D0", +"& c #B8CCEC", +"X c #376EC9", +"< c #ACE95B", +/* pixels */ +" .XoO+@#$. ", +" .%%&*=-O;: ", +" >>>>%&*=O,=o ", +" ><<>%%&*O,,=o", +">>><<>>>%&OOo+@", +"><<<<<<>1%&*=-@", +"><<<<<<>21%&*=@", +">>><<>>>321%&*+", +" ><<>456321%&O", +" >>>>7456321%o", +" .,8974563210", +" .,,897456320", +" .,,,8974563q", +" .,,,,897456w", +" ............" +}; diff --git a/contrib/samples/svg/bitmaps/save.xpm b/contrib/samples/svg/bitmaps/save.xpm index 0f743dac37..accf1f9eb2 100644 --- a/contrib/samples/svg/bitmaps/save.xpm +++ b/contrib/samples/svg/bitmaps/save.xpm @@ -1,25 +1,42 @@ -/* XPM */ -static char *save_xpm[] = { -/* columns rows colors chars-per-pixel */ -"16 15 4 1", -" c None", -". c Black", -"X c #808000", -"o c #808080", -/* pixels */ -" ", -" .............. ", -" .X. . . ", -" .X. ... ", -" .X. .X. ", -" .X. .X. ", -" .X. .X. ", -" .X. .X. ", -" .XX........oX. ", -" .XXXXXXXXXXXX. ", -" .XX.........X. ", -" .XX...... .X. ", -" .XX...... .X. ", -" .XX...... .X. ", -" ............. " -}; +/* XPM */ +static char *save_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 21 1", +": c #AAC1E8", +"1 c #B9CDED", +"O c #FFFFFF", +" c #2C58A0", +"* c #B0C6EA", +"; c #2D59A3", +"X c #1C3866", +"= c #C3D4EF", +"2 c #CBD9F1", +"- c #DAE5F6", +"# c #97B4E3", +". c None", +"$ c #274D8B", +"& c #9FB9E5", +"@ c #5584D1", +"% c #82A5DE", +"o c #3A70CA", +"< c #A5BEE7", +", c #D2DFF4", +"+ c #3467BC", +"> c #C0D1EE", +/* pixels */ +" .", +" XoOOOOOOOOO+X .", +" @oO#######O+@ .", +" @oOOOOOOOOO+@ .", +" @oO#######O+@ .", +" @oOOOOOOOOO+@ .", +" @@+++++++++@@ .", +" @@@@@@@@@@@@@ .", +" @@@$$$$$$$$@@ .", +" @@$%%%&*=-O$@ .", +" @@$%X;;*=-O$@ .", +" @@$%X;;:>,O$@ .", +" @@$%X;;<12O$@ .", +" @@$<<2OOOOO$@ .", +". .." +}; diff --git a/contrib/samples/svg/makefile.sc b/contrib/samples/svg/makefile.sc new file mode 100644 index 0000000000..16c3d00572 --- /dev/null +++ b/contrib/samples/svg/makefile.sc @@ -0,0 +1,6 @@ +#Digital Mars (was Symantec) C++ makefile +WXDIR = ..\..\.. +EXTRALIBS=dcsvg_sc +TARGET=svgtest +OBJECTS = $(TARGET).obj +include $(WXDIR)\src\makeprog.sc 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..f465f4bdeb 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 /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 wxxrc24d.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 /O2 /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 wxxrc24.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/rc/controls.xrc b/contrib/samples/xrc/rc/controls.xrc index 119716ad1b..6f927b1535 100644 --- a/contrib/samples/xrc/rc/controls.xrc +++ b/contrib/samples/xrc/rc/controls.xrc @@ -130,7 +130,7 @@ - + 1 @@ -142,7 +142,7 @@ wxALIGN_CENTRE|wxALL 5 - + 180,180 Download library 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/Makefile.in b/contrib/src/Makefile.in index b7d0b5a630..c50da28735 100644 --- a/contrib/src/Makefile.in +++ b/contrib/src/Makefile.in @@ -1,6 +1,6 @@ # $Id$ -CONTRIB_SUBDIRS=canvas fl gizmos mmedia net ogl plot stc svg xrc #applet +CONTRIB_SUBDIRS=canvas fl gizmos mmedia net ogl plot stc svg xrc #animate applet all: @for d in $(CONTRIB_SUBDIRS); do (cd $$d && $(MAKE)); done 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..10bc394b14 100644 --- a/contrib/src/animate/animate.cpp +++ b/contrib/src/animate/animate.cpp @@ -22,6 +22,8 @@ #include "wx/wfstream.h" #include "wx/image.h" #include "wx/gifdecod.h" +#include "wx/log.h" +#include "wx/dcmemory.h" #include "wx/animate/animate.h" /* @@ -80,7 +82,7 @@ bool wxAnimationPlayer::Play(wxWindow& window, const wxPoint& pos, bool looped) { if (!Build()) { - wxLogWarning("wxAnimationPlayer::Play: could not build the image cache."); + wxLogWarning(_T("wxAnimationPlayer::Play: could not build the image cache.")); return FALSE; } } @@ -212,7 +214,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/applet/makefile b/contrib/src/applet/makefile index 69b6155c5c..504b18418e 100644 --- a/contrib/src/applet/makefile +++ b/contrib/src/applet/makefile @@ -3,7 +3,8 @@ # Copyright (C) 1999 SciTech Software # All rights reserved. # -# Descripton: Generic makefile for the SciTech wxApplet library +# Description: Generic makefile for the SciTech wxApplet library +# Licence: wxWindows license # ############################################################################# 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..971a140080 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) @@ -311,7 +314,7 @@ void wxRemotelyScrolledTreeCtrl::AdjustRemoteScrollbars() if (scrolledWindow) { wxRect itemRect; - if (GetBoundingRect(GetRootItem(), itemRect)) + if (GetBoundingRect(GetFirstVisibleItem(), itemRect)) { // Actually, the real height seems to be 1 less than reported // (e.g. 16 instead of 16) 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/mmedia/sndaiff.cpp b/contrib/src/mmedia/sndaiff.cpp index f86a81e346..9474a70aa1 100644 --- a/contrib/src/mmedia/sndaiff.cpp +++ b/contrib/src/mmedia/sndaiff.cpp @@ -4,6 +4,7 @@ // Date: 08/11/1999 // Author: Guilhem Lavaux (C) 1999 // CVSID: $Id$ +// Licence: wxWindows licence // -------------------------------------------------------------------------- #ifdef __GNUG__ #pragma implementation "sndaiff.cpp" diff --git a/contrib/src/mmedia/sndbase.cpp b/contrib/src/mmedia/sndbase.cpp index e331e0edce..933476e5c6 100644 --- a/contrib/src/mmedia/sndbase.cpp +++ b/contrib/src/mmedia/sndbase.cpp @@ -4,6 +4,7 @@ // Date: 08/11/1999 // Author: Guilhem Lavaux (C) 1999, 2000 // CVSID: $Id$ +// Licence: wxWindows licence // -------------------------------------------------------------------------- #ifdef __GNUG__ #pragma implementation "sndbase.cpp" diff --git a/contrib/src/mmedia/sndcodec.cpp b/contrib/src/mmedia/sndcodec.cpp index 4c4ab5bdf0..a736c204d9 100644 --- a/contrib/src/mmedia/sndcodec.cpp +++ b/contrib/src/mmedia/sndcodec.cpp @@ -4,6 +4,7 @@ // Date: 08/11/1999 // Author: Guilhem Lavaux (C) 1999 // CVSID: $Id$ +// Licence: wxWindows licence // -------------------------------------------------------------------------- #ifdef __GNUG__ #pragma implementation "sndcodec.cpp" diff --git a/contrib/src/mmedia/sndcpcm.cpp b/contrib/src/mmedia/sndcpcm.cpp index 8142931644..062f0156c2 100644 --- a/contrib/src/mmedia/sndcpcm.cpp +++ b/contrib/src/mmedia/sndcpcm.cpp @@ -4,6 +4,7 @@ // Date: 08/11/1999 // Author: Guilhem Lavaux (C) 1999, 2000 // CVSID: $Id$ +// Licence: wxWindows licence // -------------------------------------------------------------------------- #ifdef __GNUG__ #pragma implementation "sndcpcm.cpp" @@ -51,7 +52,7 @@ wxUint32 wxSoundStreamPcm::GetBestSize() const // ----------------------------------------------------------------------- #define DEFINE_CONV(name, input_type, output_type, convert) \ -static void Convert_##name##(const void *buf_in, void *buf_out, wxUint32 len) \ +static void Convert_##name(const void *buf_in, void *buf_out, wxUint32 len) \ {\ register input_type src; \ register const input_type *t_buf_in = (input_type *)buf_in; \ @@ -112,7 +113,7 @@ DEFINE_CONV(16_swap_16_sign_swap, wxUint16, wxUint16, (src ^ 0x80)) // XX swapped stereo -> YY swapped mono // XX swapped stereo -> YY swapped mono sign -static wxSoundStreamPcm::ConverterType s_converters[4][3][2] = { +static wxSoundStreamPcm::ConverterType s_converters[4][3][2] = { { { NULL, @@ -152,10 +153,10 @@ static wxSoundStreamPcm::ConverterType s_converters[4][3][2] = { }, { NULL, - NULL + NULL }, }, - + { { NULL, /* 16 -> 16 */ @@ -186,7 +187,7 @@ wxSoundStream& wxSoundStreamPcm::Read(void *buffer, wxUint32 len) // We must have a multiple of 2 len &= 0x01; - + if (!m_function_in) { m_sndio->Read(buffer, len); m_lastcount = m_sndio->GetLastAccess(); @@ -195,7 +196,7 @@ wxSoundStream& wxSoundStreamPcm::Read(void *buffer, wxUint32 len) } in_bufsize = GetReadSize(len); - + if (len <= m_best_size) { m_sndio->Read(m_prebuffer, in_bufsize); m_snderror = m_sndio->GetError(); @@ -203,11 +204,11 @@ wxSoundStream& wxSoundStreamPcm::Read(void *buffer, wxUint32 len) m_lastcount = 0; return *this; } - + m_function_in(m_prebuffer, buffer, m_sndio->GetLastAccess()); } else { char *temp_buffer; - + temp_buffer = new char[in_bufsize]; m_sndio->Read(temp_buffer, in_bufsize); @@ -216,21 +217,21 @@ wxSoundStream& wxSoundStreamPcm::Read(void *buffer, wxUint32 len) m_lastcount = 0; return *this; } - + m_function_in(temp_buffer, buffer, m_sndio->GetLastAccess()); - + delete[] temp_buffer; } - + m_lastcount = (wxUint32)(m_sndio->GetLastAccess() * m_multiplier_in); - + return *this; } wxSoundStream& wxSoundStreamPcm::Write(const void *buffer, wxUint32 len) { wxUint32 out_bufsize; - + if (!m_function_out) { m_sndio->Write(buffer, len); m_lastcount = m_sndio->GetLastAccess(); @@ -252,17 +253,17 @@ wxSoundStream& wxSoundStreamPcm::Write(const void *buffer, wxUint32 len) } } else { char *temp_buffer; - + temp_buffer = new char[out_bufsize]; m_function_out(buffer, temp_buffer, len); - + m_sndio->Write(temp_buffer, out_bufsize); m_snderror = m_sndio->GetError(); if (m_snderror != wxSOUND_NOERROR) { m_lastcount = 0; return *this; } - + delete[] temp_buffer; } @@ -275,7 +276,7 @@ bool wxSoundStreamPcm::SetSoundFormat(const wxSoundFormatBase& format) { wxSoundFormatBase *new_format; wxSoundFormatPcm *pcm_format, *pcm_format2; - + if (m_sndio->SetSoundFormat(format)) { m_function_out = NULL; m_function_in = NULL; @@ -287,7 +288,7 @@ bool wxSoundStreamPcm::SetSoundFormat(const wxSoundFormatBase& format) } if (m_sndformat) delete m_sndformat; - + new_format = m_sndio->GetSoundFormat().Clone(); pcm_format = (wxSoundFormatPcm *)&format; pcm_format2 = (wxSoundFormatPcm *)new_format; @@ -317,7 +318,7 @@ bool wxSoundStreamPcm::SetSoundFormat(const wxSoundFormatBase& format) int table_no, table_no2; int i_sign, i_swap; - + switch (pcm_format->GetBPS()) { case 8: table_no = 0; @@ -340,7 +341,7 @@ bool wxSoundStreamPcm::SetSoundFormat(const wxSoundFormatBase& format) // TODO: Add something here: error, log, ... return FALSE; } - + if (pcm_format2->Signed() != pcm_format->Signed()) i_sign = 1; else @@ -389,14 +390,14 @@ bool wxSoundStreamPcm::SetSoundFormat(const wxSoundFormatBase& format) m_best_size = (wxUint32)(m_sndio->GetBestSize() * m_multiplier_out); } - + m_prebuffer = new char[m_prebuffer_size]; - + bool SetSoundFormatReturn; SetSoundFormatReturn = m_sndio->SetSoundFormat(*new_format); wxASSERT( SetSoundFormatReturn ); - + m_sndformat = new_format; return TRUE; } @@ -429,14 +430,14 @@ void ResamplingShrink_##DEPTH##(const void *source, void *destination, wxUint32 source_data = (wxUint##DEPTH## *)source; dest_data = (wxUint##DEPTH## *)destination; - + pos = m_saved_pos; while (len > 0) { // Increment the position in the input buffer pos += m_pitch; if (pos & INTMASK) { pos &= FLOATMASK; - + *dest_data ++ = *source_data; } len--; diff --git a/contrib/src/mmedia/sndesd.cpp b/contrib/src/mmedia/sndesd.cpp index 74a55b63c2..35c1365752 100644 --- a/contrib/src/mmedia/sndesd.cpp +++ b/contrib/src/mmedia/sndesd.cpp @@ -4,6 +4,7 @@ // Date: 08/11/1999 // Author: Guilhem Lavaux (C) 1999 // CVSID: $Id$ +// Licence: wxWindows licence // -------------------------------------------------------------------------- #ifdef __GNUG__ #pragma implementation "sndesd.cpp" diff --git a/contrib/src/mmedia/sndfile.cpp b/contrib/src/mmedia/sndfile.cpp index 54e333b6c8..945c49cecd 100644 --- a/contrib/src/mmedia/sndfile.cpp +++ b/contrib/src/mmedia/sndfile.cpp @@ -4,6 +4,7 @@ // Date: 08/11/1999 // Author: Guilhem Lavaux (C) 1999, 2000 // CVSID: $Id$ +// Licence: wxWindows licence // -------------------------------------------------------------------------- #include "wx/wxprec.h" diff --git a/contrib/src/mmedia/sndg72x.cpp b/contrib/src/mmedia/sndg72x.cpp index f9ce3ca810..3842f071ae 100644 --- a/contrib/src/mmedia/sndg72x.cpp +++ b/contrib/src/mmedia/sndg72x.cpp @@ -4,6 +4,7 @@ // Date: 08/26/1999 // Author: Guilhem Lavaux (C) 1999 // CVSID: $Id$ +// Licence: wxWindows licence // -------------------------------------------------------------------------- #ifdef __GNUG__ #pragma implementation "sndg72x.cpp" diff --git a/contrib/src/mmedia/sndmsad.cpp b/contrib/src/mmedia/sndmsad.cpp index dbc6505d5b..6798a31280 100644 --- a/contrib/src/mmedia/sndmsad.cpp +++ b/contrib/src/mmedia/sndmsad.cpp @@ -4,6 +4,7 @@ // Date: 08/11/1999 // Author: Guilhem Lavaux (C) 1999 // CVSID: $Id$ +// Licence: wxWindows licence // -------------------------------------------------------------------------- #ifdef __GNUG__ #pragma implementation "sndmsad.cpp" diff --git a/contrib/src/mmedia/sndoss.cpp b/contrib/src/mmedia/sndoss.cpp index 48b35e8017..5fd6d013ea 100644 --- a/contrib/src/mmedia/sndoss.cpp +++ b/contrib/src/mmedia/sndoss.cpp @@ -4,6 +4,7 @@ // Date: 08/11/1999 // Author: Guilhem Lavaux (C) 1999, 2000 // CVSID: $Id$ +// Licence: wxWindows licence // -------------------------------------------------------------------------- #ifdef __GNUG__ #pragma implementation "sndoss.cpp" diff --git a/contrib/src/mmedia/sndpcm.cpp b/contrib/src/mmedia/sndpcm.cpp index a6a5a70080..d08ad384a0 100644 --- a/contrib/src/mmedia/sndpcm.cpp +++ b/contrib/src/mmedia/sndpcm.cpp @@ -4,6 +4,7 @@ // Date: 08/11/1999 // Author: Guilhem Lavaux (C) 1999 // CVSID: $Id$ +// Licence: wxWindows licence // -------------------------------------------------------------------------- #ifdef __GNUG__ #pragma implementation "sndpcm.cpp" diff --git a/contrib/src/mmedia/sndulaw.cpp b/contrib/src/mmedia/sndulaw.cpp index f0ea5cfc66..0aaaa4f421 100644 --- a/contrib/src/mmedia/sndulaw.cpp +++ b/contrib/src/mmedia/sndulaw.cpp @@ -4,6 +4,7 @@ // Date: 08/11/1999 // Author: Guilhem Lavaux (C) 1999 // CVSID: $Id$ +// Licence: wxWindows licence // -------------------------------------------------------------------------- #ifdef __GNUG__ #pragma implementation "sndulaw.cpp" diff --git a/contrib/src/mmedia/sndwav.cpp b/contrib/src/mmedia/sndwav.cpp index a9712d8189..a275942b31 100644 --- a/contrib/src/mmedia/sndwav.cpp +++ b/contrib/src/mmedia/sndwav.cpp @@ -4,6 +4,7 @@ // Date: 08/11/1999 // Author: Guilhem Lavaux (C) 1999 // CVSID: $Id$ +// Licence: wxWindows licence // -------------------------------------------------------------------------- #ifdef __GNUG__ #pragma implementation "sndwav.cpp" diff --git a/contrib/src/mmedia/sndwin.cpp b/contrib/src/mmedia/sndwin.cpp index 538f7e1813..0d662f5b12 100644 --- a/contrib/src/mmedia/sndwin.cpp +++ b/contrib/src/mmedia/sndwin.cpp @@ -4,6 +4,7 @@ // Date: 08/11/1999 // Author: Guilhem Lavaux (C) 1999, 2000 // CVSID: $Id$ +// Licence: wxWindows licence // -------------------------------------------------------------------------- #ifdef __GNUG__ #pragma implementation "sndwin.cpp" diff --git a/contrib/src/mmedia/vidxanm.cpp b/contrib/src/mmedia/vidxanm.cpp index 9da2da3403..d6cb52683a 100644 --- a/contrib/src/mmedia/vidxanm.cpp +++ b/contrib/src/mmedia/vidxanm.cpp @@ -61,7 +61,7 @@ public: wxVideoXANIMOutput(); void OnTerminate(int pid, int status); - + bool IsTerminated() const; protected: bool m_terminated; @@ -121,11 +121,11 @@ wxVideoXANIM::wxVideoXANIM(wxInputStream& str) m_paused = FALSE; m_size[0] = 0; m_size[1] = 0; - + m_filename = wxGetTempFileName("vidxa"); m_remove_file = TRUE; wxFileOutputStream fout(m_filename); - + fout << str; CollectInfo(); @@ -142,7 +142,7 @@ wxVideoXANIM::wxVideoXANIM(const wxString& filename) m_remove_file = FALSE; m_size[0] = 0; m_size[1] = 0; - + CollectInfo(); } @@ -152,7 +152,7 @@ wxVideoXANIM::~wxVideoXANIM() Stop(); delete m_internal; delete m_xanim_detector; - + if (m_remove_file) wxRemoveFile(m_filename); } @@ -163,7 +163,7 @@ wxVideoXANIM::~wxVideoXANIM() bool wxVideoXANIM::Play() { if (!m_paused && m_xanim_started) - return TRUE; + return TRUE; if (!m_video_output) { wxVideoCreateFrame(this); return TRUE; @@ -203,12 +203,12 @@ bool wxVideoXANIM::Stop() SendCommand("q"); // We are waiting for the termination of the subprocess. - while (m_xanim_started) { + while (m_xanim_started) { wxYield(); } m_paused = FALSE; - + return TRUE; } @@ -315,7 +315,7 @@ bool wxVideoXANIM::AttachOutput(wxWindow& out) { if (!wxVideoBaseDriver::AttachOutput(out)) return FALSE; - + return TRUE; } @@ -348,7 +348,7 @@ bool wxVideoXANIM::SendCommand(const char *command, char **ret, int prop_format; Atom prop_type; unsigned long extra; - + XGetWindowProperty(m_internal->xanim_dpy, m_internal->xanim_window, m_internal->xanim_ret, 0, 16, True, AnyPropertyType, &prop_type, &prop_format, (unsigned long *)size, @@ -362,7 +362,7 @@ bool wxVideoXANIM::CollectInfo() wxVideoXANIMOutput *xanimProcess; wxString xanim_command; wxStringTokenizer tokenizer; - + xanimProcess = new wxVideoXANIMOutput; xanim_command = wxT("xanim +v +Zv -Ae "); xanim_command += m_filename; @@ -371,22 +371,22 @@ bool wxVideoXANIM::CollectInfo() wxInputStream *infoStream = xanimProcess->GetInputStream(); wxString totalOutput; - + while (infoStream->LastError() == wxSTREAM_NOERROR) { char line[100]; infoStream->Read(line, sizeof(line)-1); if (infoStream->LastRead() == 0) break; - + line[infoStream->LastRead()] = 0; - - totalOutput += line; + + totalOutput += line; } // This is good for everything ... :-) int position = totalOutput.Find(wxT("Video Codec:")); - + totalOutput.Remove(0, position+13); position = totalOutput.Find(wxT("depth=")); @@ -398,11 +398,11 @@ bool wxVideoXANIM::CollectInfo() // the rest of the line wxString token = tokenizer.GetNextToken(); unsigned long my_long; - + #define GETINT(i) \ totalOutput.ToULong(&my_long); \ i = my_long; - + // 'Audio Codec:' totalOutput = tokenizer.GetString(); totalOutput.Remove(0, totalOutput.Find(wxT(":"))+2); @@ -456,10 +456,10 @@ bool wxVideoXANIM::RestartXANIM() unsigned long extra; char prop[4]; bool xanim_chg_size; - + if (!m_video_output || m_xanim_started) return FALSE; - + // Check if we can change the size of the window dynamicly xanim_chg_size = TRUE; // Get current display @@ -467,24 +467,24 @@ bool wxVideoXANIM::RestartXANIM() m_internal->xanim_dpy = gdk_display; GtkPizza *pizza = GTK_PIZZA( m_video_output->m_wxwindow ); GdkWindow *window = pizza->bin_window; - + m_internal->xanim_window = ((GdkWindowPrivate *)window)->xwindow; #endif // Get the XANIM atom m_internal->xanim_atom = XInternAtom(m_internal->xanim_dpy, "XANIM_PROPERTY", False); - + // Build the command xanim_command.Printf(wxT("xanim -Zr +Ze +Sr +f +W%d +f +q " - "+Av70 %s %s"), m_internal->xanim_window, + "+Av70 %s %s"), (int)m_internal->xanim_window, (xanim_chg_size) ? _T("") : _T(""), WXSTRINGCAST m_filename); - + // Execute it if (!wxExecute(xanim_command, FALSE, m_xanim_detector)) return FALSE; - + // Wait for XAnim to be ready nitems = 0; m_xanim_started = TRUE; @@ -498,17 +498,17 @@ bool wxVideoXANIM::RestartXANIM() } wxSize vibrato_size; - + vibrato_size = m_video_output->GetSize(); - + vibrato_size.SetWidth(vibrato_size.GetWidth()+1); m_video_output->SetSize(vibrato_size); vibrato_size.SetWidth(vibrato_size.GetWidth()-1); m_video_output->SetSize(vibrato_size); // Very useful ! Actually it "should" sends a SETSIZE event to XAnim // FIXME: This event is not sent !! - + m_paused = FALSE; - + return TRUE; } 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..0440864935 100644 --- a/contrib/src/net/smapi.cpp +++ b/contrib/src/net/smapi.cpp @@ -141,16 +141,21 @@ bool wxMapiSession::Logon(const wxString& sProfileName, const wxString& sPasswor //Setup the ascii versions of the profile name and password int nProfileLength = sProfileName.Length(); - int nPasswordLength = sPassword.Length(); 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 @@ -189,7 +194,7 @@ bool wxMapiSession::Logon(const wxString& sProfileName, const wxString& sPasswor } else { - wxLogDebug(_T("Failed to logon to MAPI using a shared session, Error:%d\n"), nError); + wxLogDebug(_T("Failed to logon to MAPI using a shared session, Error:%ld\n"), nError); m_data->m_nLastError = nError; } } @@ -226,7 +231,7 @@ bool wxMapiSession::Logoff() ULONG nError = m_data->m_lpfnMAPILogoff(m_data->m_hSession, 0, 0, 0); if (nError != SUCCESS_SUCCESS) { - wxLogDebug(_T("Failed in call to MapiLogoff, Error:%d"), nError); + wxLogDebug(_T("Failed in call to MapiLogoff, Error:%ld"), nError); m_data->m_nLastError = nError; bSuccess = TRUE; } @@ -251,12 +256,18 @@ bool wxMapiSession::Resolve(const wxString& sName, void* lppRecip1) wxASSERT(m_data->m_hSession); //MAPI session handle must be valid //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) { - wxLogDebug(_T("Failed to resolve the name: %s, Error:%d\n"), sName, nError); + wxLogDebug(_T("Failed to resolve the name: %s, Error:%ld\n"), + sName.c_str(), nError); m_data->m_nLastError = nError; } @@ -277,10 +288,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(); -// mapiMessage.lpszSubject = T2A((LPTSTR) (LPCTSTR) message.m_subject); -// mapiMessage.lpszNoteText = T2A((LPTSTR) (LPCTSTR) message.m_body); +#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.nRecipCount = message.m_to.GetCount() + message.m_cc.GetCount() + message.m_bcc.GetCount(); wxASSERT(mapiMessage.nRecipCount); //Must have at least 1 recipient! @@ -295,13 +312,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 +364,16 @@ 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 +392,16 @@ 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; } @@ -392,17 +424,23 @@ bool wxMapiSession::Send(wxMailMessage& message) ZeroMemory(&file, sizeof(MapiFileDesc)); file.nPosition = 0xFFFFFFFF; 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; if (nTitleSize && !message.m_attachmentTitles[i].IsEmpty()) { 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 } } } @@ -416,16 +454,30 @@ bool wxMapiSession::Send(wxMailMessage& message) } else { - wxLogDebug(_T("Failed to send mail message, Error:%d\n"), nError); + wxLogDebug(_T("Failed to send mail message, Error:%ld\n"), nError); m_data->m_nLastError = nError; } //Tidy up the Attachements if (nAttachmentSize) + { +#ifdef UNICODE + for (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 (i = 0;i < nRecipIndex;i++) + free(mapiMessage.lpRecips[i].lpszName); +#endif delete [] mapiMessage.lpRecips; + delete mapiMessage.lpOriginator; return bSuccess; @@ -435,4 +487,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..66bc8c42f9 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 @@ -17,7 +18,7 @@ HEADERS=basic.h basicp.h bmpshape.h canvas.h composit.h constrnt.h \ divided.h drawn.h drawnp.h lines.h linesp.h mfutils.h misc.h \ ogl.h ogldiag.h -OBJECTS=basic.o bmpshape.o composit.o divided.o lines.o misc.o \ +OBJECTS=basic.o bmpshape.o composit.o divided.o lines.o oglmisc.o \ basic2.o canvas.o constrnt.o drawn.o mfutils.o ogldiag.o DEPFILES=$(OBJECTS:.o=.d) diff --git a/contrib/src/ogl/OglVC.dsp b/contrib/src/ogl/OglVC.dsp index 1deb8da3a1..e064cb00bc 100644 --- a/contrib/src/ogl/OglVC.dsp +++ b/contrib/src/ogl/OglVC.dsp @@ -124,11 +124,11 @@ SOURCE=.\mfutils.cpp # End Source File # Begin Source File -SOURCE=.\misc.cpp +SOURCE=.\ogldiag.cpp # End Source File # Begin Source File -SOURCE=.\ogldiag.cpp +SOURCE=.\oglmisc.cpp # End Source File # End Target # End Project 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..bb57c9fed6 100644 --- a/contrib/src/ogl/bmpshape.cpp +++ b/contrib/src/ogl/bmpshape.cpp @@ -37,11 +37,11 @@ * */ -IMPLEMENT_DYNAMIC_CLASS(wxBitmapShape, wxShape) +IMPLEMENT_DYNAMIC_CLASS(wxBitmapShape, wxRectangleShape) wxBitmapShape::wxBitmapShape():wxRectangleShape(100.0, 50.0) { - m_filename = ""; + m_filename = wxEmptyString; } wxBitmapShape::~wxBitmapShape() @@ -52,13 +52,11 @@ void wxBitmapShape::OnDraw(wxDC& dc) { if (!m_bitmap.Ok()) return; - - wxMemoryDC tempDC; - tempDC.SelectObject(m_bitmap); + double x, y; x = WXROUND(m_xpos - m_bitmap.GetWidth() / 2.0); y = WXROUND(m_ypos - m_bitmap.GetHeight() / 2.0); - dc.Blit((long) x, (long) y, m_bitmap.GetWidth(), m_bitmap.GetHeight(), &tempDC, 0, 0); + dc.DrawBitmap(m_bitmap, x, y, true); } void wxBitmapShape::SetSize(double w, double h, bool recursive) @@ -76,7 +74,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..a2f65fc16d 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(); @@ -513,22 +507,23 @@ bool wxLineShape::HitTest(double x, double y, int *attachment, double *distance) wxRealPoint *point1 = (wxRealPoint *)node->Data(); wxRealPoint *point2 = (wxRealPoint *)node->Next()->Data(); - // Allow for inaccurate mousing or vert/horiz lines + // For inaccurate mousing allow 8 pixel corridor int extra = 4; - double left = wxMin(point1->x, point2->x) - extra; - double right = wxMax(point1->x, point2->x) + extra; - double bottom = wxMin(point1->y, point2->y) - extra; - double top = wxMax(point1->y, point2->y) + extra; - - if ((x > left && x < right && y > bottom && y < top) || inLabelRegion) + double dx = point2->x - point1->x; + double dy = point2->y - point1->y; + double seg_len = sqrt(dx*dx+dy*dy); + double distance_from_seg = + seg_len*((x-point1->x)*dy-(y-point1->y)*dx)/(dy*dy+dx*dx); + double distance_from_prev = + seg_len*((y-point1->y)*dy+(x-point1->x)*dx)/(dy*dy+dx*dx); + + if ((fabs(distance_from_seg) < extra && + distance_from_prev >= 0 && distance_from_prev <= seg_len) + || inLabelRegion) { - // Work out distance from centre of line - double centre_x = (double)(left + (right - left)/2.0); - double centre_y = (double)(bottom + (top - bottom)/2.0); - *attachment = 0; - *distance = (double)sqrt((centre_x - x)*(centre_x - x) + (centre_y - y)*(centre_y - y)); + *distance = distance_from_seg; return TRUE; } @@ -754,7 +749,7 @@ void wxLineShape::DrawArrow(wxDC& dc, wxArrowHead *arrow, double xOffset, bool p dc.SetPen(* m_pen); if (arrow->_GetType() == ARROW_HOLLOW_CIRCLE) - dc.SetBrush(* g_oglWhiteBackgroundBrush); + dc.SetBrush(GetBackgroundBrush()); else dc.SetBrush(* m_brush); @@ -1373,7 +1368,7 @@ void wxLineShape::ResetControlPoints() } } -#ifdef PROLOGIO +#if wxUSE_PROLOGIO void wxLineShape::WriteAttributes(wxExpr *clause) { wxShape::WriteAttributes(clause); @@ -2340,7 +2335,7 @@ wxRealPoint *wxLineShape::GetNextControlPoint(wxShape *nodeObject) return (wxRealPoint *)node->Data(); } else - return FALSE; + return NULL; } /* diff --git a/contrib/src/ogl/makefile.b32 b/contrib/src/ogl/makefile.b32 index 0b5356ac42..90a96767b7 100644 --- a/contrib/src/ogl/makefile.b32 +++ b/contrib/src/ogl/makefile.b32 @@ -11,7 +11,7 @@ WXDIR = $(WXWIN) LIBTARGET=$(WXDIR)\lib\ogl.lib -OBJECTS = basic.obj basic2.obj canvas.obj ogldiag.obj lines.obj misc.obj divided.obj constrnt.obj\ +OBJECTS = basic.obj basic2.obj canvas.obj ogldiag.obj lines.obj oglmisc.obj divided.obj constrnt.obj\ composit.obj drawn.obj bmpshape.obj mfutils.obj !include $(WXDIR)\src\makelib.b32 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.dos b/contrib/src/ogl/makefile.dos index 27bc9657d9..f8bfaf1b20 100644 --- a/contrib/src/ogl/makefile.dos +++ b/contrib/src/ogl/makefile.dos @@ -27,7 +27,7 @@ INC = /I$(WXDIR)\include /I$(WXDIR)\contrib\include # to disable PROLOGIO-dependent code OPTIONS = -DPROLOGIO -OBJECTS = basic.obj basic2.obj canvas.obj ogldiag.obj lines.obj misc.obj divided.obj constrnt.obj\ +OBJECTS = basic.obj basic2.obj canvas.obj ogldiag.obj lines.obj oglmisc.obj divided.obj constrnt.obj\ composit.obj drawn.obj bitmap.obj mfutils.obj all: $(GRAPHICSLIB) diff --git a/contrib/src/ogl/makefile.g95 b/contrib/src/ogl/makefile.g95 index 12a93aeac7..074d2c8cf2 100644 --- a/contrib/src/ogl/makefile.g95 +++ b/contrib/src/ogl/makefile.g95 @@ -10,7 +10,7 @@ WXDIR = ../../.. LIBTARGET=$(WXDIR)/lib/libogl.a -OBJECTS = basic.o basic2.o canvas.o ogldiag.o lines.o misc.o divided.o constrnt.o\ +OBJECTS = basic.o basic2.o canvas.o ogldiag.o lines.o oglmisc.o divided.o constrnt.o\ composit.o drawn.o bmpshape.o mfutils.o include $(WXDIR)/src/makelib.g95 diff --git a/contrib/src/ogl/makefile.unx b/contrib/src/ogl/makefile.unx index 5141fb6766..31e7f67f67 100644 --- a/contrib/src/ogl/makefile.unx +++ b/contrib/src/ogl/makefile.unx @@ -19,7 +19,7 @@ LIB_CPP_SRC=\ canvas.o\ ogldiag.o\ lines.o\ - misc.o\ + oglmisc.o\ divided.o\ constrnt.o\ composit.o\ diff --git a/contrib/src/ogl/makefile.vc b/contrib/src/ogl/makefile.vc index 461dd6a3bc..c539298607 100644 --- a/contrib/src/ogl/makefile.vc +++ b/contrib/src/ogl/makefile.vc @@ -25,7 +25,7 @@ DOCSOURCEDIR=$(WXDIR)\contrib\docs\latex\ogl PROGRAM=test -OBJECTS = $(D)\basic.obj $(D)\basic2.obj $(D)\canvas.obj $(D)\ogldiag.obj $(D)\lines.obj $(D)\misc.obj $(D)\divided.obj $(D)\constrnt.obj\ +OBJECTS = $(D)\basic.obj $(D)\basic2.obj $(D)\canvas.obj $(D)\ogldiag.obj $(D)\lines.obj $(D)\oglmisc.obj $(D)\divided.obj $(D)\constrnt.obj\ $(D)\composit.obj $(D)\drawn.obj $(D)\bmpshape.obj $(D)\mfutils.obj LIBTARGET=$(WXDIR)\lib\ogl$(LIBEXT).lib @@ -82,7 +82,7 @@ $(D)\lines.obj: lines.$(SRCSUFF) $(OGLINC)/basic.h $(OGLINC)/misc.h $(OGLIN $(CPPFLAGS) /c /Fo$@ /Tp $(*B).$(SRCSUFF) << -$(D)\misc.obj: misc.$(SRCSUFF) $(OGLINC)/basic.h $(OGLINC)/misc.h $(OGLINC)/constrnt.h $(OGLINC)/basicp.h +$(D)\oglmisc.obj: oglmisc.$(SRCSUFF) $(OGLINC)/basic.h $(OGLINC)/misc.h $(OGLINC)/constrnt.h $(OGLINC)/basicp.h cl @<< $(CPPFLAGS) /c /Fo$@ /Tp $(*B).$(SRCSUFF) << 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 deleted file mode 100644 index 76bf00cc4f..0000000000 --- a/contrib/src/ogl/misc.cpp +++ /dev/null @@ -1,867 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: misc.cpp -// Purpose: Miscellaneous OGL support functions -// Author: Julian Smart -// Modified by: -// Created: 12/07/98 -// RCS-ID: $Id$ -// Copyright: (c) Julian Smart -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "misc.h" -#endif - -// For compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include -#endif - -#include - -#include - -#ifdef new -#undef new -#endif - -#if wxUSE_IOSTREAMH -#include -#else -#include -#endif -#include -#include -#include - -#include -#include -#include -#include -#include - -wxFont* g_oglNormalFont; -wxPen* g_oglBlackPen; -wxPen* g_oglTransparentPen; -wxPen* g_oglBlackForegroundPen; -wxPen* g_oglWhiteBackgroundPen; -wxBrush* g_oglWhiteBackgroundBrush; - -char* oglBuffer = NULL; - -wxList oglObjectCopyMapping(wxKEY_INTEGER); - - - -void wxOGLInitialize() -{ - g_oglNormalFont = wxTheFontList->FindOrCreateFont(10, wxSWISS, wxNORMAL, wxNORMAL); - g_oglBlackPen = wxThePenList->FindOrCreatePen(wxT("BLACK"), 1, wxSOLID); - g_oglTransparentPen = wxThePenList->FindOrCreatePen(wxT("WHITE"), 1, wxTRANSPARENT); - g_oglBlackForegroundPen = wxThePenList->FindOrCreatePen(wxT("BLACK"), 1, wxSOLID); - g_oglWhiteBackgroundPen = wxThePenList->FindOrCreatePen(wxT("WHITE"), 1, wxSOLID); - g_oglWhiteBackgroundBrush = wxTheBrushList->FindOrCreateBrush(wxT("WHITE"), wxSOLID); - - OGLInitializeConstraintTypes(); - - // Initialize big buffer used when writing images - oglBuffer = new char[3000]; - -} - -void wxOGLCleanUp() -{ - if (oglBuffer) - { - delete[] oglBuffer; - oglBuffer = NULL; - } - oglBuffer = NULL; - - g_oglNormalFont = NULL; // These will be cleaned up by their GDI list - g_oglBlackPen = NULL; - g_oglTransparentPen = NULL; - g_oglBlackForegroundPen = NULL; - g_oglWhiteBackgroundPen = NULL; - g_oglWhiteBackgroundBrush = NULL; - - OGLCleanUpConstraintTypes(); -} - -wxFont *oglMatchFont(int point_size) -{ - wxFont *font = wxTheFontList->FindOrCreateFont(point_size, wxSWISS, wxNORMAL, wxNORMAL); -#if 0 - switch (point_size) - { - case 4: - font = swiss_font_4; - break; - case 6: - font = swiss_font_6; - break; - case 8: - font = swiss_font_8; - break; - case 12: - font = swiss_font_12; - break; - case 14: - font = swiss_font_14; - break; - case 18: - font = swiss_font_18; - break; - case 24: - font = swiss_font_24; - break; - default: - case 10: - font = swiss_font_10; - break; - } -#endif - return font; -} - -int FontSizeDialog(wxFrame *parent, int old_size) -{ - if (old_size <= 0) - old_size = 10; - wxString buf; - buf << old_size; - wxString ans = wxGetTextFromUser(wxT("Enter point size"), wxT("Font size"), buf, parent); - if (ans.Length() == 0) - return 0; - - long new_size = 0; - ans.ToLong(&new_size); - if ((new_size <= 0) || (new_size > 40)) - { - wxMessageBox(wxT("Invalid point size!"), wxT("Error"), wxOK); - return 0; - } - return new_size; -/* - char *strings[8]; - strings[0] = "4"; - strings[1] = "6"; - strings[2] = "8"; - strings[3] = "10"; - strings[4] = "12"; - strings[5] = "14"; - strings[6] = "18"; - strings[7] = "24"; - char *ans = wxGetSingleChoice("Choose", "Choose a font size", 8, strings, parent); - if (ans) - { - int size; - sscanf(ans, "%d", &size); - return oglMatchFont(size); - } - else return NULL; -*/ -} - -// Centre a list of strings in the given box. xOffset and yOffset are the -// the positions that these lines should be relative to, and this might be -// the same as m_xpos, m_ypos, but might be zero if formatting from left-justifying. -void oglCentreText(wxDC& dc, wxList *text_list, - double m_xpos, double m_ypos, double width, double height, - int formatMode) -{ - int n = text_list->Number(); - - if (!text_list || (n == 0)) - return; - - // First, get maximum dimensions of box enclosing text - - long char_height = 0; - long max_width = 0; - long current_width = 0; - - // Store text extents for speed - double *widths = new double[n]; - - wxNode *current = text_list->First(); - int i = 0; - while (current) - { - wxShapeTextLine *line = (wxShapeTextLine *)current->Data(); - dc.GetTextExtent(line->GetText(), ¤t_width, &char_height); - widths[i] = current_width; - - if (current_width > max_width) - max_width = current_width; - current = current->Next(); - i ++; - } - - double max_height = n*char_height; - - double xoffset, yoffset, xOffset, yOffset; - - if (formatMode & FORMAT_CENTRE_VERT) - { - if (max_height < height) - yoffset = (double)(m_ypos - (height/2.0) + (height - max_height)/2.0); - else - yoffset = (double)(m_ypos - (height/2.0)); - yOffset = m_ypos; - } - else - { - yoffset = 0.0; - yOffset = 0.0; - } - - if (formatMode & FORMAT_CENTRE_HORIZ) - { - xoffset = (double)(m_xpos - width/2.0); - xOffset = m_xpos; - } - else - { - xoffset = 0.0; - xOffset = 0.0; - } - - current = text_list->First(); - i = 0; - - while (current) - { - wxShapeTextLine *line = (wxShapeTextLine *)current->Data(); - - double x; - if ((formatMode & FORMAT_CENTRE_HORIZ) && (widths[i] < width)) - x = (double)((width - widths[i])/2.0 + xoffset); - else - x = xoffset; - double y = (double)(i*char_height + yoffset); - - line->SetX( x - xOffset ); line->SetY( y - yOffset ); - current = current->Next(); - i ++; - } - - delete widths; -} - -// Centre a list of strings in the given box -void oglCentreTextNoClipping(wxDC& dc, wxList *text_list, - double m_xpos, double m_ypos, double width, double height) -{ - int n = text_list->Number(); - - if (!text_list || (n == 0)) - return; - - // First, get maximum dimensions of box enclosing text - - long char_height = 0; - long max_width = 0; - long current_width = 0; - - // Store text extents for speed - double *widths = new double[n]; - - wxNode *current = text_list->First(); - int i = 0; - while (current) - { - wxShapeTextLine *line = (wxShapeTextLine *)current->Data(); - dc.GetTextExtent(line->GetText(), ¤t_width, &char_height); - widths[i] = current_width; - - if (current_width > max_width) - max_width = current_width; - current = current->Next(); - i ++; - } - - double max_height = n*char_height; - - double yoffset = (double)(m_ypos - (height/2.0) + (height - max_height)/2.0); - - double xoffset = (double)(m_xpos - width/2.0); - - current = text_list->First(); - i = 0; - - while (current) - { - wxShapeTextLine *line = (wxShapeTextLine *)current->Data(); - - double x = (double)((width - widths[i])/2.0 + xoffset); - double y = (double)(i*char_height + yoffset); - - line->SetX( x - m_xpos ); line->SetY( y - m_ypos ); - current = current->Next(); - i ++; - } - delete widths; -} - -void oglGetCentredTextExtent(wxDC& dc, wxList *text_list, - double m_xpos, double m_ypos, double width, double height, - double *actual_width, double *actual_height) -{ - int n = text_list->Number(); - - if (!text_list || (n == 0)) - { - *actual_width = 0; - *actual_height = 0; - return; - } - - // First, get maximum dimensions of box enclosing text - - long char_height = 0; - long max_width = 0; - long current_width = 0; - - wxNode *current = text_list->First(); - int i = 0; - while (current) - { - wxShapeTextLine *line = (wxShapeTextLine *)current->Data(); - dc.GetTextExtent(line->GetText(), ¤t_width, &char_height); - - if (current_width > max_width) - max_width = current_width; - current = current->Next(); - i ++; - } - - *actual_height = n*char_height; - *actual_width = max_width; -} - -// Format a string to a list of strings that fit in the given box. -// Interpret %n and 10 or 13 as a new line. -wxStringList *oglFormatText(wxDC& dc, const wxString& text, double width, double height, int formatMode) -{ - // First, parse the string into a list of words - wxStringList word_list; - - // Make new lines into NULL strings at this point - int i = 0; int j = 0; int len = text.Length(); - wxChar word[200]; word[0] = 0; - bool end_word = FALSE; bool new_line = FALSE; - while (i < len) - { - switch (text[i]) - { - case wxT('%'): - { - i ++; - if (i == len) - { word[j] = wxT('%'); j ++; } - else - { - if (text[i] == wxT('n')) - { new_line = TRUE; end_word = TRUE; i++; } - else - { word[j] = wxT('%'); j ++; word[j] = text[i]; j ++; i ++; } - } - break; - } - case 10: - { - new_line = TRUE; end_word = TRUE; i++; - break; - } - case 13: - { - new_line = TRUE; end_word = TRUE; i++; - } - case wxT(' '): - { - end_word = TRUE; - i ++; - break; - } - default: - { - word[j] = text[i]; - j ++; i ++; - break; - } - } - if (i == len) end_word = TRUE; - if (end_word) - { - word[j] = 0; - j = 0; - word_list.Add(word); - end_word = FALSE; - } - if (new_line) - { - word_list.Append(NULL); - new_line = FALSE; - } - } - // Now, make a list of strings which can fit in the box - wxStringList *string_list = new wxStringList; - - wxString buffer; - wxNode *node = word_list.First(); - long x, y; - - while (node) - { - wxString oldBuffer(buffer); - - char *s = (char *)node->Data(); - if (!s) - { - // FORCE NEW LINE - if (buffer.Length() > 0) - string_list->Add(buffer); - - buffer.Empty(); - } - else - { - if (buffer.Length() != 0) - buffer += " "; - - buffer += s; - dc.GetTextExtent(buffer, &x, &y); - - // Don't fit within the bounding box if we're fitting shape to contents - if ((x > width) && !(formatMode & FORMAT_SIZE_TO_CONTENTS)) - { - // Deal with first word being wider than box - if (oldBuffer.Length() > 0) - string_list->Add(oldBuffer); - - buffer.Empty(); - buffer += s; - } - } - - node = node->Next(); - } - if (buffer.Length() != 0) - string_list->Add(buffer); - - return string_list; -} - -void oglDrawFormattedText(wxDC& dc, wxList *text_list, - double m_xpos, double m_ypos, double width, double height, - int formatMode) -{ - double xoffset, yoffset; - if (formatMode & FORMAT_CENTRE_HORIZ) - xoffset = m_xpos; - else - xoffset = (double)(m_xpos - (width / 2.0)); - - if (formatMode & FORMAT_CENTRE_VERT) - yoffset = m_ypos; - else - yoffset = (double)(m_ypos - (height / 2.0)); - - dc.SetClippingRegion( - (long)(m_xpos - width/2.0), (long)(m_ypos - height/2.0), - (long)width, (long)height); - - wxNode *current = text_list->First(); - while (current) - { - wxShapeTextLine *line = (wxShapeTextLine *)current->Data(); - - dc.DrawText(line->GetText(), WXROUND(xoffset + line->GetX()), WXROUND(yoffset + line->GetY())); - current = current->Next(); - } - - dc.DestroyClippingRegion(); -} - -/* - * Find centroid given list of points comprising polyline - * - */ - -void oglFindPolylineCentroid(wxList *points, double *x, double *y) -{ - double xcount = 0; - double ycount = 0; - - wxNode *node = points->First(); - while (node) - { - wxRealPoint *point = (wxRealPoint *)node->Data(); - xcount += point->x; - ycount += point->y; - node = node->Next(); - } - - *x = (xcount/points->Number()); - *y = (ycount/points->Number()); -} - -/* - * Check that (x1, y1) -> (x2, y2) hits (x3, y3) -> (x4, y4). - * If so, ratio1 gives the proportion along the first line - * that the intersection occurs (or something like that). - * Used by functions below. - * - */ -void oglCheckLineIntersection(double x1, double y1, double x2, double y2, - double x3, double y3, double x4, double y4, - double *ratio1, double *ratio2) -{ - double denominator_term = (y4 - y3)*(x2 - x1) - (y2 - y1)*(x4 - x3); - double numerator_term = (x3 - x1)*(y4 - y3) + (x4 - x3)*(y1 - y3); - - double line_constant; - double length_ratio = 1.0; - double k_line = 1.0; - - // Check for parallel lines - if ((denominator_term < 0.005) && (denominator_term > -0.005)) - line_constant = -1.0; - else - line_constant = numerator_term/denominator_term; - - // Check for intersection - if ((line_constant < 1.0) && (line_constant > 0.0)) - { - // Now must check that other line hits - if (((y4 - y3) < 0.005) && ((y4 - y3) > -0.005)) - k_line = ((x1 - x3) + line_constant*(x2 - x1))/(x4 - x3); - else - k_line = ((y1 - y3) + line_constant*(y2 - y1))/(y4 - y3); - - if ((k_line >= 0.0) && (k_line < 1.0)) - length_ratio = line_constant; - else - k_line = 1.0; - } - *ratio1 = length_ratio; - *ratio2 = k_line; -} - -/* - * Find where (x1, y1) -> (x2, y2) hits one of the lines in xvec, yvec. - * (*x3, *y3) is the point where it hits. - * - */ -void oglFindEndForPolyline(double n, double xvec[], double yvec[], - double x1, double y1, double x2, double y2, double *x3, double *y3) -{ - int i; - double lastx = xvec[0]; - double lasty = yvec[0]; - - double min_ratio = 1.0; - double line_ratio; - double other_ratio; - - for (i = 1; i < n; i++) - { - oglCheckLineIntersection(x1, y1, x2, y2, lastx, lasty, xvec[i], yvec[i], - &line_ratio, &other_ratio); - lastx = xvec[i]; - lasty = yvec[i]; - - if (line_ratio < min_ratio) - min_ratio = line_ratio; - } - - // Do last (implicit) line if last and first doubles are not identical - if (!(xvec[0] == lastx && yvec[0] == lasty)) - { - oglCheckLineIntersection(x1, y1, x2, y2, lastx, lasty, xvec[0], yvec[0], - &line_ratio, &other_ratio); - - if (line_ratio < min_ratio) - min_ratio = line_ratio; - } - - *x3 = (x1 + (x2 - x1)*min_ratio); - *y3 = (y1 + (y2 - y1)*min_ratio); - -} - -/* - * Find where the line hits the box. - * - */ - -void oglFindEndForBox(double width, double height, - double x1, double y1, // Centre of box (possibly) - double x2, double y2, // other end of line - double *x3, double *y3) // End on box edge -{ - double xvec[5]; - double yvec[5]; - - xvec[0] = (double)(x1 - width/2.0); - yvec[0] = (double)(y1 - height/2.0); - xvec[1] = (double)(x1 - width/2.0); - yvec[1] = (double)(y1 + height/2.0); - xvec[2] = (double)(x1 + width/2.0); - yvec[2] = (double)(y1 + height/2.0); - xvec[3] = (double)(x1 + width/2.0); - yvec[3] = (double)(y1 - height/2.0); - xvec[4] = (double)(x1 - width/2.0); - yvec[4] = (double)(y1 - height/2.0); - - oglFindEndForPolyline(5, xvec, yvec, x2, y2, x1, y1, x3, y3); -} - -/* - * Find where the line hits the circle. - * - */ - -void oglFindEndForCircle(double radius, - double x1, double y1, // Centre of circle - double x2, double y2, // Other end of line - double *x3, double *y3) -{ - double H = (double)sqrt((x2 - x1)*(x2 - x1) + (y2 - y1)*(y2 - y1)); - - if (H == 0.0) - { - *x3 = x1; - *y3 = y1; - } - else - { - *y3 = radius * (y2 - y1)/H + y1; - *x3 = radius * (x2 - x1)/H + x1; - } -} - -/* - * Given the line (x1, y1) -> (x2, y2), and an arrow size of given length and width, - * return the position of the tip of the arrow and the left and right vertices of the arrow. - * - */ - -void oglGetArrowPoints(double x1, double y1, double x2, double y2, - double length, double width, - double *tip_x, double *tip_y, - double *side1_x, double *side1_y, - double *side2_x, double *side2_y) -{ - double l = (double)sqrt((x2 - x1)*(x2 - x1) + (y2 - y1)*(y2 - y1)); - - if (l < 0.01) - l = (double) 0.01; - - double i_bar = (x2 - x1)/l; - double j_bar = (y2 - y1)/l; - - double x3 = (- length*i_bar) + x2; - double y3 = (- length*j_bar) + y2; - - *side1_x = width*(-j_bar) + x3; - *side1_y = width*i_bar + y3; - - *side2_x = -width*(-j_bar) + x3; - *side2_y = -width*i_bar + y3; - - *tip_x = x2; *tip_y = y2; -} - -/* - * Given an ellipse and endpoints of a line, returns the point at which - * the line touches the ellipse in values x4, y4. - * This function assumes that the centre of the ellipse is at x1, y1, and the - * ellipse has a width of width1 and a height of height1. It also assumes you are - * wanting to draw an arc FROM point x2, y2 TOWARDS point x3, y3. - * This function calculates the x,y coordinates of the intersection point of - * the arc with the ellipse. - * Author: Ian Harrison - */ - -void oglDrawArcToEllipse(double x1, double y1, double width1, double height1, double x2, double y2, double x3, double y3, - double *x4, double *y4) -{ - double a1 = (double)(width1/2.0); - double b1 = (double)(height1/2.0); - - // These are required to give top left x and y coordinates for DrawEllipse -// double top_left_x1 = (double)(x1 - a1); -// double top_left_y1 = (double)(y1 - b1); -/* - // Check for vertical line - if (fabs(x2 - x3) < 0.05) - { - *x4 = x3; - if (y2 < y3) - *y4 = (double)(y1 - b1); - else - *y4 = (double)(y1 + b1); - return; - } -*/ - // Check that x2 != x3 - if (fabs(x2 - x3) < 0.05) - { - *x4 = x2; - if (y3 > y2) - *y4 = (double)(y1 - sqrt((b1*b1 - (((x2-x1)*(x2-x1))*(b1*b1)/(a1*a1))))); - else - *y4 = (double)(y1 + sqrt((b1*b1 - (((x2-x1)*(x2-x1))*(b1*b1)/(a1*a1))))); - return; - } - - // Calculate the x and y coordinates of the point where arc intersects ellipse - - double A, B, C, D, E, F, G, H, K; - double ellipse1_x, ellipse1_y; - - A = (double)(1/(a1 * a1)); - B = (double)((y3 - y2) * (y3 - y2)) / ((x3 - x2) * (x3 - x2) * b1 * b1); - C = (double)(2 * (y3 - y2) * (y2 - y1)) / ((x3 - x2) * b1 * b1); - D = (double)((y2 - y1) * (y2 - y1)) / (b1 * b1); - E = (double)(A + B); - F = (double)(C - (2 * A * x1) - (2 * B * x2)); - G = (double)((A * x1 * x1) + (B * x2 * x2) - (C * x2) + D - 1); - H = (double)((y3 - y2) / (x3 - x2)); - K = (double)((F * F) - (4 * E * G)); - - if (K >= 0) - // In this case the line intersects the ellipse, so calculate intersection - { - if(x2 >= x1) - { - ellipse1_x = (double)(((F * -1) + sqrt(K)) / (2 * E)); - ellipse1_y = (double)((H * (ellipse1_x - x2)) + y2); - } - else - { - ellipse1_x = (double)(((F * -1) - sqrt(K)) / (2 * E)); - ellipse1_y = (double)((H * (ellipse1_x - x2)) + y2); - } - } - else - // in this case, arc does not intersect ellipse, so just draw arc - { - ellipse1_x = x3; - ellipse1_y = y3; - } - *x4 = ellipse1_x; - *y4 = ellipse1_y; - -/* - // Draw a little circle (radius = 2) at the end of the arc where it hits - // the ellipse . - - double circle_x = ellipse1_x - 2.0; - double circle_y = ellipse1_y - 2.0; - m_canvas->DrawEllipse(circle_x, circle_y, 4.0, 4.0); -*/ -} - -// Update a list item from a list of strings -void UpdateListBox(wxListBox *item, wxList *list) -{ - item->Clear(); - if (!list) - return; - - wxNode *node = list->First(); - while (node) - { - char *s = (char *)node->Data(); - item->Append(s); - node = node->Next(); - } -} - -bool oglRoughlyEqual(double val1, double val2, double tol) -{ - return ( (val1 < (val2 + tol)) && (val1 > (val2 - tol)) && - (val2 < (val1 + tol)) && (val2 > (val1 - tol))); -} - -/* - * Hex<->Dec conversion - */ - -// Array used in DecToHex conversion routine. -static wxChar sg_HexArray[] = { wxT('0'), wxT('1'), wxT('2'), wxT('3'), - wxT('4'), wxT('5'), wxT('6'), wxT('7'), - wxT('8'), wxT('9'), wxT('A'), wxT('B'), - wxT('C'), wxT('D'), wxT('E'), wxT('F') -}; - -// Convert 2-digit hex number to decimal -unsigned int oglHexToDec(wxChar* buf) -{ - int firstDigit, secondDigit; - - if (buf[0] >= wxT('A')) - firstDigit = buf[0] - wxT('A') + 10; - else - firstDigit = buf[0] - wxT('0'); - - if (buf[1] >= wxT('A')) - secondDigit = buf[1] - wxT('A') + 10; - else - secondDigit = buf[1] - wxT('0'); - - return firstDigit * 16 + secondDigit; -} - -// Convert decimal integer to 2-character hex string -void oglDecToHex(unsigned int dec, wxChar *buf) -{ - int firstDigit = (int)(dec/16.0); - int secondDigit = (int)(dec - (firstDigit*16.0)); - buf[0] = sg_HexArray[firstDigit]; - buf[1] = sg_HexArray[secondDigit]; - buf[2] = 0; -} - -// 3-digit hex to wxColour -wxColour oglHexToColour(const wxString& hex) -{ - if (hex.Length() == 6) - { - long r, g, b; - r = g = b = 0; - hex.Mid(0,2).ToLong(&r, 16); - hex.Mid(2,2).ToLong(&g, 16); - hex.Mid(4,2).ToLong(&b, 16); - return wxColour(r, g, b); - } - else - return wxColour(0,0,0); -} - -// RGB to 3-digit hex -wxString oglColourToHex(const wxColour& colour) -{ - wxChar buf[7]; - unsigned int red = colour.Red(); - unsigned int green = colour.Green(); - unsigned int blue = colour.Blue(); - - oglDecToHex(red, buf); - oglDecToHex(green, buf+2); - oglDecToHex(blue, buf+4); - - return wxString(buf); -} - - 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..9e7fd4a1b6 100644 --- a/contrib/src/ogl/oglmisc.cpp +++ b/contrib/src/ogl/oglmisc.cpp @@ -25,18 +25,12 @@ #endif #include - #include #ifdef new #undef new #endif -#if wxUSE_IOSTREAMH -#include -#else -#include -#endif #include #include #include @@ -67,12 +61,12 @@ void wxOGLInitialize() g_oglNormalFont = new wxFont(10, wxSWISS, wxNORMAL, wxNORMAL); - g_oglBlackPen = new wxPen("BLACK", 1, wxSOLID); + g_oglBlackPen = new wxPen(wxT("BLACK"), 1, wxSOLID); - g_oglWhiteBackgroundPen = new wxPen("WHITE", 1, wxSOLID); - g_oglTransparentPen = new wxPen("WHITE", 1, wxTRANSPARENT); - g_oglWhiteBackgroundBrush = new wxBrush("WHITE", wxSOLID); - g_oglBlackForegroundPen = new wxPen("BLACK", 1, wxSOLID); + g_oglWhiteBackgroundPen = new wxPen(wxT("WHITE"), 1, wxSOLID); + g_oglTransparentPen = new wxPen(wxT("WHITE"), 1, wxTRANSPARENT); + g_oglWhiteBackgroundBrush = new wxBrush(wxT("WHITE"), wxSOLID); + g_oglBlackForegroundPen = new wxPen(wxT("BLACK"), 1, wxSOLID); OGLInitializeConstraintTypes(); @@ -169,16 +163,17 @@ int FontSizeDialog(wxFrame *parent, int old_size) { if (old_size <= 0) old_size = 10; - char buf[40]; - sprintf(buf, "%d", old_size); - wxString ans = wxGetTextFromUser("Enter point size", "Font size", buf, parent); - if (ans == "") + wxString buf; + buf << old_size; + wxString ans = wxGetTextFromUser(wxT("Enter point size"), wxT("Font size"), buf, parent); + if (ans.Length() == 0) return 0; - int new_size = atoi(ans); + long new_size = 0; + ans.ToLong(&new_size); if ((new_size <= 0) || (new_size > 40)) { - wxMessageBox("Invalid point size!", "Error", wxOK); + wxMessageBox(wxT("Invalid point size!"), wxT("Error"), wxOK); return 0; } return new_size; @@ -210,7 +205,7 @@ void oglCentreText(wxDC& dc, wxList *text_list, double m_xpos, double m_ypos, double width, double height, int formatMode) { - int n = text_list->Number(); + int n = text_list->GetCount(); if (!text_list || (n == 0)) return; @@ -224,17 +219,17 @@ void oglCentreText(wxDC& dc, wxList *text_list, // Store text extents for speed double *widths = new double[n]; - wxNode *current = text_list->First(); + wxNode *current = text_list->GetFirst(); int i = 0; while (current) { - wxShapeTextLine *line = (wxShapeTextLine *)current->Data(); + wxShapeTextLine *line = (wxShapeTextLine *)current->GetData(); dc.GetTextExtent(line->GetText(), ¤t_width, &char_height); widths[i] = current_width; if (current_width > max_width) max_width = current_width; - current = current->Next(); + current = current->GetNext(); i ++; } @@ -267,12 +262,12 @@ void oglCentreText(wxDC& dc, wxList *text_list, xOffset = 0.0; } - current = text_list->First(); + current = text_list->GetFirst(); i = 0; while (current) { - wxShapeTextLine *line = (wxShapeTextLine *)current->Data(); + wxShapeTextLine *line = (wxShapeTextLine *)current->GetData(); double x; if ((formatMode & FORMAT_CENTRE_HORIZ) && (widths[i] < width)) @@ -282,7 +277,7 @@ void oglCentreText(wxDC& dc, wxList *text_list, double y = (double)(i*char_height + yoffset); line->SetX( x - xOffset ); line->SetY( y - yOffset ); - current = current->Next(); + current = current->GetNext(); i ++; } @@ -293,7 +288,7 @@ void oglCentreText(wxDC& dc, wxList *text_list, void oglCentreTextNoClipping(wxDC& dc, wxList *text_list, double m_xpos, double m_ypos, double width, double height) { - int n = text_list->Number(); + int n = text_list->GetCount(); if (!text_list || (n == 0)) return; @@ -307,17 +302,17 @@ void oglCentreTextNoClipping(wxDC& dc, wxList *text_list, // Store text extents for speed double *widths = new double[n]; - wxNode *current = text_list->First(); + wxNode *current = text_list->GetFirst(); int i = 0; while (current) { - wxShapeTextLine *line = (wxShapeTextLine *)current->Data(); + wxShapeTextLine *line = (wxShapeTextLine *)current->GetData(); dc.GetTextExtent(line->GetText(), ¤t_width, &char_height); widths[i] = current_width; if (current_width > max_width) max_width = current_width; - current = current->Next(); + current = current->GetNext(); i ++; } @@ -327,18 +322,18 @@ void oglCentreTextNoClipping(wxDC& dc, wxList *text_list, double xoffset = (double)(m_xpos - width/2.0); - current = text_list->First(); + current = text_list->GetFirst(); i = 0; while (current) { - wxShapeTextLine *line = (wxShapeTextLine *)current->Data(); + wxShapeTextLine *line = (wxShapeTextLine *)current->GetData(); double x = (double)((width - widths[i])/2.0 + xoffset); double y = (double)(i*char_height + yoffset); line->SetX( x - m_xpos ); line->SetY( y - m_ypos ); - current = current->Next(); + current = current->GetNext(); i ++; } delete widths; @@ -348,7 +343,7 @@ void oglGetCentredTextExtent(wxDC& dc, wxList *text_list, double m_xpos, double m_ypos, double width, double height, double *actual_width, double *actual_height) { - int n = text_list->Number(); + int n = text_list->GetCount(); if (!text_list || (n == 0)) { @@ -363,16 +358,16 @@ void oglGetCentredTextExtent(wxDC& dc, wxList *text_list, long max_width = 0; long current_width = 0; - wxNode *current = text_list->First(); + wxNode *current = text_list->GetFirst(); int i = 0; while (current) { - wxShapeTextLine *line = (wxShapeTextLine *)current->Data(); + wxShapeTextLine *line = (wxShapeTextLine *)current->GetData(); dc.GetTextExtent(line->GetText(), ¤t_width, &char_height); if (current_width > max_width) max_width = current_width; - current = current->Next(); + current = current->GetNext(); i ++; } @@ -388,24 +383,24 @@ wxStringList *oglFormatText(wxDC& dc, const wxString& text, double width, double wxStringList word_list; // Make new lines into NULL strings at this point - int i = 0; int j = 0; int len = strlen(text); - char word[200]; word[0] = 0; + int i = 0; int j = 0; int len = text.Length(); + wxChar word[200]; word[0] = 0; bool end_word = FALSE; bool new_line = FALSE; while (i < len) { switch (text[i]) { - case '%': + case wxT('%'): { i ++; if (i == len) - { word[j] = '%'; j ++; } + { word[j] = wxT('%'); j ++; } else { - if (text[i] == 'n') + if (text[i] == wxT('n')) { new_line = TRUE; end_word = TRUE; i++; } else - { word[j] = '%'; j ++; word[j] = text[i]; j ++; i ++; } + { word[j] = wxT('%'); j ++; word[j] = text[i]; j ++; i ++; } } break; } @@ -418,7 +413,7 @@ wxStringList *oglFormatText(wxDC& dc, const wxString& text, double width, double { new_line = TRUE; end_word = TRUE; i++; } - case ' ': + case wxT(' '): { end_word = TRUE; i ++; @@ -448,30 +443,29 @@ wxStringList *oglFormatText(wxDC& dc, const wxString& text, double width, double // Now, make a list of strings which can fit in the box wxStringList *string_list = new wxStringList; - char buffer[400]; - buffer[0] = 0; - wxNode *node = word_list.First(); + wxString buffer; + wxStringListNode *node = word_list.GetFirst(); long x, y; while (node) { wxString oldBuffer(buffer); - char *s = (char *)node->Data(); + wxChar *s = (wxChar *)node->GetData(); if (!s) { // FORCE NEW LINE - if (strlen(buffer) > 0) + if (buffer.Length() > 0) string_list->Add(buffer); - buffer[0] = 0; + buffer.Empty(); } else { - if (buffer[0] != 0) - strcat(buffer, " "); + if (buffer.Length() != 0) + buffer += wxT(" "); - strcat(buffer, s); + buffer += s; dc.GetTextExtent(buffer, &x, &y); // Don't fit within the bounding box if we're fitting shape to contents @@ -481,14 +475,14 @@ wxStringList *oglFormatText(wxDC& dc, const wxString& text, double width, double if (oldBuffer.Length() > 0) string_list->Add(oldBuffer); - buffer[0] = 0; - strcat(buffer, s); + buffer.Empty(); + buffer += s; } } - node = node->Next(); + node = node->GetNext(); } - if (buffer[0] != 0) + if (buffer.Length() != 0) string_list->Add(buffer); return string_list; @@ -513,13 +507,13 @@ void oglDrawFormattedText(wxDC& dc, wxList *text_list, (long)(m_xpos - width/2.0), (long)(m_ypos - height/2.0), (long)width, (long)height); - wxNode *current = text_list->First(); + wxNode *current = text_list->GetFirst(); while (current) { - wxShapeTextLine *line = (wxShapeTextLine *)current->Data(); + wxShapeTextLine *line = (wxShapeTextLine *)current->GetData(); dc.DrawText(line->GetText(), WXROUND(xoffset + line->GetX()), WXROUND(yoffset + line->GetY())); - current = current->Next(); + current = current->GetNext(); } dc.DestroyClippingRegion(); @@ -535,17 +529,17 @@ void oglFindPolylineCentroid(wxList *points, double *x, double *y) double xcount = 0; double ycount = 0; - wxNode *node = points->First(); + wxNode *node = points->GetFirst(); while (node) { - wxRealPoint *point = (wxRealPoint *)node->Data(); + wxRealPoint *point = (wxRealPoint *)node->GetData(); xcount += point->x; ycount += point->y; - node = node->Next(); + node = node->GetNext(); } - *x = (xcount/points->Number()); - *y = (ycount/points->Number()); + *x = (xcount/points->GetCount()); + *y = (ycount/points->GetCount()); } /* @@ -813,12 +807,12 @@ void UpdateListBox(wxListBox *item, wxList *list) if (!list) return; - wxNode *node = list->First(); + wxNode *node = list->GetFirst(); while (node) { - char *s = (char *)node->Data(); + wxChar *s = (wxChar *)node->GetData(); item->Append(s); - node = node->Next(); + node = node->GetNext(); } } @@ -833,29 +827,32 @@ bool oglRoughlyEqual(double val1, double val2, double tol) */ // Array used in DecToHex conversion routine. -static char sg_HexArray[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', - 'C', 'D', 'E', 'F' }; +static wxChar sg_HexArray[] = { wxT('0'), wxT('1'), wxT('2'), wxT('3'), + wxT('4'), wxT('5'), wxT('6'), wxT('7'), + wxT('8'), wxT('9'), wxT('A'), wxT('B'), + wxT('C'), wxT('D'), wxT('E'), wxT('F') +}; // Convert 2-digit hex number to decimal -unsigned int oglHexToDec(char* buf) +unsigned int oglHexToDec(wxChar* buf) { int firstDigit, secondDigit; - if (buf[0] >= 'A') - firstDigit = buf[0] - 'A' + 10; + if (buf[0] >= wxT('A')) + firstDigit = buf[0] - wxT('A') + 10; else - firstDigit = buf[0] - '0'; + firstDigit = buf[0] - wxT('0'); - if (buf[1] >= 'A') - secondDigit = buf[1] - 'A' + 10; + if (buf[1] >= wxT('A')) + secondDigit = buf[1] - wxT('A') + 10; else - secondDigit = buf[1] - '0'; + secondDigit = buf[1] - wxT('0'); return firstDigit * 16 + secondDigit; } // Convert decimal integer to 2-character hex string -void oglDecToHex(unsigned int dec, char *buf) +void oglDecToHex(unsigned int dec, wxChar *buf) { int firstDigit = (int)(dec/16.0); int secondDigit = (int)(dec - (firstDigit*16.0)); @@ -868,22 +865,22 @@ void oglDecToHex(unsigned int dec, char *buf) wxColour oglHexToColour(const wxString& hex) { if (hex.Length() == 6) - { - char buf[7]; - strncpy(buf, hex, 7); - unsigned int r = oglHexToDec((char *)buf); - unsigned int g = oglHexToDec((char *)(buf+2)); - unsigned int b = oglHexToDec((char *)(buf+4)); + { + long r, g, b; + r = g = b = 0; + hex.Mid(0,2).ToLong(&r, 16); + hex.Mid(2,2).ToLong(&g, 16); + hex.Mid(4,2).ToLong(&b, 16); return wxColour(r, g, b); - } - else - return wxColour(0,0,0); + } + else + return wxColour(0,0,0); } // RGB to 3-digit hex wxString oglColourToHex(const wxColour& colour) { - char buf[7]; + wxChar buf[7]; unsigned int red = colour.Red(); unsigned int green = colour.Green(); unsigned int blue = colour.Blue(); 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..4b7698698d 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 @@ -30,28 +30,39 @@ OBJECTS=PlatWX.o ScintillaWX.o stc.o \ Document.o \ DocumentAccessor.o \ Editor.o \ + ExternalLexer.o \ Indicator.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 \ + LexEScript.o \ + LexFortran.o \ LexHTML.o \ LexLisp.o \ + LexLout.o \ LexLua.o \ LexOthers.o \ + LexPOV.o \ LexPascal.o \ LexPerl.o \ LexPython.o \ LexRuby.o \ LexSQL.o \ LexVB.o \ + LexMMIXAL.o \ + LexNsis.o \ + LexPS.o \ + LexScriptol.o \ LineMarker.o \ PropSet.o \ RESearch.o \ @@ -61,6 +72,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..7d5f25b1d3 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 *WXUNUSED(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)); @@ -419,23 +426,32 @@ void SurfaceImpl::DrawTextClipped(PRectangle rc, Font &font, int ybase, 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]; + int* tpos = new int[len+1]; int totalWidth = 0; 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) { + while ((int)i < len) { unsigned char uch = (unsigned char)s[i]; positions[i++] = tpos[ui]; if (uch >= 0x80) { @@ -472,6 +505,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; @@ -499,7 +542,7 @@ int SurfaceImpl::Descent(Font &font) { return d; } -int SurfaceImpl::InternalLeading(Font &font) { +int SurfaceImpl::InternalLeading(Font &WXUNUSED(font)) { return 0; } @@ -520,7 +563,7 @@ int SurfaceImpl::AverageCharWidth(Font &font) { return hdc->GetCharWidth(); } -int SurfaceImpl::SetPalette(Palette *pal, bool inBackGround) { +int SurfaceImpl::SetPalette(Palette *WXUNUSED(pal), bool WXUNUSED(inBackGround)) { return 0; } @@ -533,15 +576,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 WXUNUSED(codePage)) { + // dbcsMode = codePage == SC_CP_DBCS; +} + + Surface *Surface::Allocate() { return new SurfaceImpl; } @@ -556,8 +597,10 @@ Window::~Window() { } void Window::Destroy() { - if (id) + if (id) { + Show(FALSE); GETWIN(id)->Destroy(); + } id = 0; } @@ -566,6 +609,7 @@ bool Window::HasFocus() { } PRectangle Window::GetPosition() { + if (! id) return PRectangle(); wxRect rc(GETWIN(id)->GetPosition(), GETWIN(id)->GetSize()); return PRectangleFromwxRect(rc); } @@ -580,6 +624,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 +673,9 @@ void Window::SetCursor(Cursor curs) { case cursorReverseArrow: cursorId = wxCURSOR_RIGHT_ARROW; break; + case cursorHand: + cursorId = wxCURSOR_HAND; + break; default: cursorId = wxCURSOR_ARROW; break; @@ -650,194 +698,369 @@ 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) -END_EVENT_TABLE() - - - -#else - - -class wxSTCListBox : public wxListBox { -public: - wxSTCListBox(wxWindow* parent, wxWindowID id) - : wxListBox(parent, id, wxDefaultPosition, wxDefaultSize, - 0, NULL, wxLB_SINGLE | wxSIMPLE_BORDER | wxWANTS_CHARS) - {} - - void OnKeyDown(wxKeyEvent& event) { - // Give the key events to the STC. It will then update - // the listbox as needed. - GetGrandParent()->GetEventHandler()->ProcessEvent(event); + void OnKillFocus(wxFocusEvent& event) { + // Do nothing. Prevents base class from resetting the colors... } private: DECLARE_EVENT_TABLE() }; -BEGIN_EVENT_TABLE(wxSTCListBox, wxListBox) - EVT_KEY_DOWN(wxSTCListBox::OnKeyDown) - EVT_CHAR(wxSTCListBox::OnKeyDown) +BEGIN_EVENT_TABLE(wxSTCListBox, wxListView) + EVT_SET_FOCUS( wxSTCListBox::OnFocus) + EVT_KILL_FOCUS(wxSTCListBox::OnKillFocus) END_EVENT_TABLE() -#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 { +// A window to place the wxSTCListBox upon +class wxSTCListBoxWin : public wxWindow { +private: + wxListView* lv; + CallBackAction doubleClickAction; + void* doubleClickActionData; public: - wxSTCListBoxWin(wxWindow* parent, wxWindowID id) - : wxSTCListBoxWinBase(parent, param2) { - lb = new wxSTCListBox(this, id); - lb->SetCursor(wxCursor(wxCURSOR_ARROW)); - lb->SetFocus(); - } + wxSTCListBoxWin(wxWindow* parent, wxWindowID id) : + wxWindow(parent, id, wxDefaultPosition, wxSize(0,0), wxNO_BORDER ) + { + + 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); + + // Eventhough we immediately reset the focus to the parent, this helps + // things to look right... + lv->SetFocus(); + + Hide(); + } + + + // On OSX and (possibly others) there can still be pending + // messages/events for the list control when Scintilla wants to + // close it, so do a pending delete of it instead of destroying + // immediately. + bool Destroy() { + if ( !wxPendingDelete.Member(this) ) + wxPendingDelete.Append(this); + return TRUE; + } + + + 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; + } + + + 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 ; + + // 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 *WXUNUSED(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() < (size_t)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(); } //---------------------------------------------------------------------- @@ -863,6 +1086,13 @@ void Menu::Show(Point pt, Window &w) { //---------------------------------------------------------------------- +DynamicLibrary *DynamicLibrary::Load(const char *WXUNUSED(modulePath)) { + wxFAIL_MSG(wxT("Dynamic lexer loading not implemented yet")); + return NULL; +} + +//---------------------------------------------------------------------- + ColourDesired Platform::Chrome() { wxColour c; c = wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE); @@ -882,18 +1112,21 @@ 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)); } -bool Platform::IsKeyDown(int key) { +bool Platform::IsKeyDown(int WXUNUSED(key)) { return false; // I don't think we'll need this. } @@ -986,10 +1219,17 @@ int Platform::Clamp(int val, int minVal, int maxVal) { } -bool Platform::IsDBCSLeadByte(int codePage, char ch) { +bool Platform::IsDBCSLeadByte(int WXUNUSED(codePage), char WXUNUSED(ch)) { return false; } +int Platform::DBCSCharLength(int WXUNUSED(codePage), const char *WXUNUSED(s)) { + return 1; +} + +int Platform::DBCSCharMaxLength() { + return 1; +} //---------------------------------------------------------------------- @@ -1007,6 +1247,22 @@ double ElapsedTime::Duration(bool reset) { //---------------------------------------------------------------------- +#if wxUSE_UNICODE +wxString stc2wx(const char* str, size_t len) +{ + char *buffer=new char[len+1]; + strncpy(buffer, str, len); + buffer[len]=0; + + wxString cstr(buffer, wxConvUTF8); + + delete[] buffer; + return cstr; +} +#endif + + + diff --git a/contrib/src/stc/ScintillaWX.cpp b/contrib/src/stc/ScintillaWX.cpp index f1c0e43a0a..6acb7805d1 100644 --- a/contrib/src/stc/ScintillaWX.cpp +++ b/contrib/src/stc/ScintillaWX.cpp @@ -16,6 +16,7 @@ #include "ScintillaWX.h" +#include "ExternalLexer.h" #include "wx/stc/stc.h" #include "PlatWX.h" @@ -67,26 +68,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 +98,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 +115,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() @@ -140,6 +136,7 @@ END_EVENT_TABLE() ScintillaWX::ScintillaWX(wxStyledTextCtrl* win) { capturedMouse = false; + focusEvent = false; wMain = win; stc = win; wheelRotation = 0; @@ -223,7 +220,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 +255,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 +279,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 +300,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 +312,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); @@ -332,17 +334,24 @@ void ScintillaWX::NotifyParent(SCNotification scn) { } +// This method is overloaded from ScintillaBase in order to prevent the +// AutoComplete window from being destroyed when it gets the focus. There is +// a side effect that the AutoComp will also not be destroyed when switching +// to another window, but I think that is okay. +void ScintillaWX::CancelModes() { + if (! focusEvent) + AutoCompleteCancel(); + ct.CallTipCancel(); + Editor::CancelModes(); +} + + void ScintillaWX::Copy() { if (currentPos != anchor) { SelectionText st; CopySelectionRange(&st); - if (wxTheClipboard->Open()) { - wxTheClipboard->UsePrimarySelection(); - wxString text = stc2wx(st.s, st.len); - wxTheClipboard->SetData(new wxTextDataObject(text)); - wxTheClipboard->Close(); - } + CopyToClipboard(st); } } @@ -355,7 +364,7 @@ void ScintillaWX::Paste() { bool gotData = FALSE; if (wxTheClipboard->Open()) { - wxTheClipboard->UsePrimarySelection(); + wxTheClipboard->UsePrimarySelection(FALSE); gotData = wxTheClipboard->GetData(data); wxTheClipboard->Close(); } @@ -372,25 +381,40 @@ void ScintillaWX::Paste() { } +void ScintillaWX::CopyToClipboard(const SelectionText& st) { + if (wxTheClipboard->Open()) { + wxTheClipboard->UsePrimarySelection(FALSE); + wxString text = stc2wx(st.s, st.len); + wxTheClipboard->SetData(new wxTextDataObject(text)); + wxTheClipboard->Close(); + } +} + + bool ScintillaWX::CanPaste() { bool canPaste = FALSE; bool didOpen; - if ( (didOpen = !wxTheClipboard->IsOpened()) ) - wxTheClipboard->Open(); + if (Editor::CanPaste()) { + didOpen = !wxTheClipboard->IsOpened(); + if ( didOpen ) + 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; + } } @@ -398,15 +422,35 @@ void ScintillaWX::AddToPopUp(const char *label, int cmd, bool enabled) { if (!label[0]) ((wxMenu*)popup.GetID())->AppendSeparator(); else - ((wxMenu*)popup.GetID())->Append(cmd, stc2wx(label)); + ((wxMenu*)popup.GetID())->Append(cmd, wxGetTranslation(stc2wx(label))); if (!enabled) ((wxMenu*)popup.GetID())->Enable(cmd, 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 +459,50 @@ 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; + } + +#ifdef SCI_LEXER + case SCI_LOADLEXERLIBRARY: + LexerManager::GetInstance()->Load((const char*)lParam); + break; +#endif + default: + return ScintillaBase::WndProc(iMessage, wParam, lParam); + } + return 0; } @@ -433,22 +514,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 +594,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; @@ -528,7 +611,7 @@ void ScintillaWX::DoMouseWheel(int rotation, int delta, } -void ScintillaWX::DoSize(int width, int height) { +void ScintillaWX::DoSize(int WXUNUSED(width), int WXUNUSED(height)) { // PRectangle rcClient(0,0,width,height); // SetScrollBarsTo(rcClient); // DropGraphics(); @@ -536,37 +619,89 @@ void ScintillaWX::DoSize(int width, int height) { } void ScintillaWX::DoLoseFocus(){ + focusEvent = true; SetFocusState(false); + focusEvent = false; } void ScintillaWX::DoGainFocus(){ + focusEvent = true; SetFocusState(true); + focusEvent = false; } 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); } +#ifdef __WXGTK__ +void ScintillaWX::DoMiddleButtonUp(Point pt) { + // 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(); +} +#else +void ScintillaWX::DoMiddleButtonUp(Point WXUNUSED(pt)) { +} +#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) { + +#ifdef __WXMAC__ +int ScintillaWX::DoKeyDown(int key, bool shift, bool ctrl, bool alt, bool meta, bool* consumed) { +#else +int ScintillaWX::DoKeyDown(int key, bool shift, bool ctrl, bool alt, bool WXUNUSED(meta), bool* consumed) { +#endif #if defined(__WXGTK__) || defined(__WXMAC__) - // Ctrl chars (A-Z) end up with the wrong keycode on wxGTK... + // Ctrl chars (A-Z) end up with the wrong keycode on wxGTK + // TODO: Check this, it shouldn't be true any longer. if (ctrl && key >= 1 && key <= 26) key += 'A' - 1; #endif @@ -578,7 +713,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; @@ -598,6 +735,22 @@ int ScintillaWX::DoKeyDown(int key, bool shift, bool ctrl, bool alt, bool* cons case WXK_MENU: key = 0; break; } +#ifdef __WXMAC__ + if ( meta ) { + // check for a few common Mac Meta-key combos and remap them to Ctrl + // for Scintilla + switch ( key ) { + case 'Z': // Undo + case 'X': // Cut + case 'C': // Copy + case 'V': // Paste + case 'A': // Select All + ctrl = true; + break; + } + } +#endif + int rv = KeyDown(key, shift, ctrl, alt, consumed); if (key) @@ -649,7 +802,7 @@ bool ScintillaWX::DoDropText(long x, long y, const wxString& data) { } -wxDragResult ScintillaWX::DoDragEnter(wxCoord x, wxCoord y, wxDragResult def) { +wxDragResult ScintillaWX::DoDragEnter(wxCoord WXUNUSED(x), wxCoord WXUNUSED(y), wxDragResult def) { dragResult = def; return dragResult; } @@ -681,16 +834,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,7 +859,24 @@ void ScintillaWX::DoScrollToColumn(int column) { HorizontalScrollTo(column * vs.spaceWidth); } +#ifdef __WXGTK__ +void ScintillaWX::ClipChildren(wxDC& dc, PRectangle rect) { + 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); +} +#else +void ScintillaWX::ClipChildren(wxDC& WXUNUSED(dc), PRectangle WXUNUSED(rect)) { +} +#endif //---------------------------------------------------------------------- //---------------------------------------------------------------------- diff --git a/contrib/src/stc/ScintillaWX.h b/contrib/src/stc/ScintillaWX.h index 5f87911952..d0d383d507 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" @@ -54,7 +55,15 @@ //---------------------------------------------------------------------- -class wxStyledTextCtrl; // forward +#ifdef WXMAKINGDLL_STC + #define WXDLLIMPEXP_STC WXEXPORT +#elif defined(WXUSINGDLL) + #define WXDLLIMPEXP_STC WXIMPORT +#else // not making nor using DLL + #define WXDLLIMPEXP_STC +#endif + +class WXDLLIMPEXP_STC wxStyledTextCtrl; // forward class ScintillaWX; @@ -99,6 +108,8 @@ public: virtual bool ModifyScrollBars(int nMax, int nPage); virtual void Copy(); virtual void Paste(); + virtual void CopyToClipboard(const SelectionText &selectedText); + virtual void CreateCallTipWindow(PRectangle rc); virtual void AddToPopUp(const char *label, int cmd = 0, bool enabled = true); virtual void ClaimSelection(); @@ -113,6 +124,7 @@ public: virtual void NotifyChange(); virtual void NotifyParent(SCNotification scn); + virtual void CancelModes(); // Event delegates void DoPaint(wxDC* dc, wxRect rect); @@ -122,12 +134,13 @@ 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); + int DoKeyDown(int key, bool shift, bool ctrl, bool alt, bool meta, bool* consumed); void DoTick() { Tick(); } #if wxUSE_DRAG_AND_DROP @@ -148,9 +161,11 @@ public: bool GetHideSelection() { return hideSelection; } void DoScrollToLine(int line); void DoScrollToColumn(int column); + void ClipChildren(wxDC& dc, PRectangle rect); private: bool capturedMouse; + bool focusEvent; wxStyledTextCtrl* stc; #if wxUSE_DRAG_AND_DROP @@ -158,6 +173,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..71e634428a 100644 --- a/contrib/src/stc/StcVC.dsp +++ b/contrib/src/stc/StcVC.dsp @@ -1,10 +1,11 @@ -# 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 @@ -13,22 +14,22 @@ CFG=StcVC - 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 "StcVC.mak" CFG="StcVC - Win32 Debug" +!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 "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" +!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 @@ -159,6 +254,10 @@ SOURCE=.\scintilla\src\Editor.h # End Source File # Begin Source File +SOURCE=.\scintilla\src\ExternalLexer.cxx +# End Source File +# Begin Source File + SOURCE=.\scintilla\src\Indicator.cxx # End Source File # Begin Source File @@ -179,10 +278,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 +314,22 @@ 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\LexEScript.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 @@ -219,6 +338,10 @@ SOURCE=.\scintilla\src\LexLisp.cxx # End Source File # Begin Source File +SOURCE=.\scintilla\src\LexLout.cxx +# End Source File +# Begin Source File + SOURCE=.\scintilla\src\LexLua.cxx # End Source File # Begin Source File @@ -227,6 +350,14 @@ SOURCE=.\scintilla\src\LexMatlab.cxx # End Source File # Begin Source File +SOURCE=.\scintilla\src\LexMMIXAL.cxx +# End Source File +# Begin Source File + +SOURCE=.\scintilla\src\LexNsis.cxx +# End Source File +# Begin Source File + SOURCE=.\scintilla\src\LexOthers.cxx # End Source File # Begin Source File @@ -239,6 +370,14 @@ SOURCE=.\scintilla\src\LexPerl.cxx # End Source File # Begin Source File +SOURCE=.\scintilla\src\LexPOV.cxx +# End Source File +# Begin Source File + +SOURCE=.\scintilla\src\LexPS.cxx +# End Source File +# Begin Source File + SOURCE=.\scintilla\src\LexPython.cxx # End Source File # Begin Source File @@ -247,6 +386,10 @@ SOURCE=.\scintilla\src\LexRuby.cxx # End Source File # Begin Source File +SOURCE=.\scintilla\src\LexScriptol.cxx +# End Source File +# Begin Source File + SOURCE=.\scintilla\src\LexSQL.cxx # End Source File # Begin Source File @@ -263,14 +406,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 +442,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 +462,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 +488,14 @@ SOURCE=.\scintilla\src\ViewStyle.h SOURCE=.\scintilla\src\WindowAccessor.cxx # End Source File +# Begin Source File + +SOURCE=.\scintilla\include\WindowAccessor.h +# End Source File +# Begin Source File + +SOURCE=.\scintilla\src\XPM.cxx +# 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..aa9432d377 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+2); + 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,124 @@ 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), + + # Rename some that woudl otherwise hid the wxWindow methods + 'SetFocus' : ('SetSTCFocus', 0, 0, 0), + 'GetFocus' : ('GetSTCFocus', 0, 0, 0), + 'SetCursor' : ('SetSTCCursor', 0, 0, 0), + 'GetCursor' : ('GetSTCCursor', 0, 0, 0), + + 'LoadLexerLibrary' : (None, 0,0,0), @@ -468,54 +605,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 +628,7 @@ def processIface(iface, h_tmplt, cpp_tmplt, h_dest, cpp_dest): curDocStrings = [] values = [] methods = [] + cmds = [] # parse iface file fi = FileInput(iface) @@ -547,7 +647,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 +670,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 +848,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..669ac63d33 100644 --- a/contrib/src/stc/makefile.b32 +++ b/contrib/src/stc/makefile.b32 @@ -17,9 +17,26 @@ SCINTILLA=.\scintilla 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 + +!if "$(WXUSINGUNIV)" == "1" +USE_UNIV="UNIV" +CFG=$(CFG)v +WXLIBNAME=$(WXLIBNAME)v +ARCHINCDIR=$(ARCHINCDIR)v +SETUPSRCDIR=$(WXDIR)\include\wx\univ +PORT=__WXUNIVERSAL__ +STCEXTRACPPFLAGS=-D__WX__ -D__WXUNIVERSAL__ -DSCI_LEXER -DLINK_LEXERS -I$(SCINTILLA)/include -I$(S) +STCCFG = stcu.cfg +!else +USE_UNIV="" +PORT=__WXMSW__ +SETUPSRCDIR=$(WXDIR)\include\wx\msw +STCEXTRACPPFLAGS=-D__WX__ -DSCI_LEXER -DLINK_LEXERS -I$(SCINTILLA)/include -I$(S) +STCCFG = stc.cfg +!endif OBJECTS = \ AutoComplete.obj \ @@ -29,28 +46,39 @@ OBJECTS = \ Document.obj \ DocumentAccessor.obj \ Editor.obj \ + ExternalLexer.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 \ + LexEScript.obj \ + LexFortran.obj \ LexHTML.obj \ LexLisp.obj \ + LexLout.obj \ LexLua.obj \ LexOthers.obj \ + LexPOV.obj \ LexPascal.obj \ LexPerl.obj \ LexPython.obj \ LexRuby.obj \ LexSQL.obj \ LexVB.obj \ + LexMMIXAL.obj \ + LexNsis.obj \ + LexPS.obj \ + LexScriptol.obj \ LineMarker.obj \ PropSet.obj \ RESearch.obj \ @@ -60,17 +88,18 @@ 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 +118,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..94c3275ac2 100644 --- a/contrib/src/stc/makefile.g95 +++ b/contrib/src/stc/makefile.g95 @@ -17,28 +17,39 @@ OBJECTS = \ $(S)/Document.$(OBJSUFF) \ $(S)/DocumentAccessor.$(OBJSUFF) \ $(S)/Editor.$(OBJSUFF) \ + $(S)/ExternalLexer.$(OBJSUFF) \ $(S)/Indicator.$(OBJSUFF) \ $(S)/KeyMap.$(OBJSUFF) \ $(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)/LexEScript.$(OBJSUFF) \ + $(S)/LexFortran.$(OBJSUFF) \ $(S)/LexHTML.$(OBJSUFF) \ $(S)/LexLisp.$(OBJSUFF) \ + $(S)/LexLout.$(OBJSUFF) \ $(S)/LexLua.$(OBJSUFF) \ $(S)/LexOthers.$(OBJSUFF) \ + $(S)/LexPOV.$(OBJSUFF) \ $(S)/LexPascal.$(OBJSUFF) \ $(S)/LexPerl.$(OBJSUFF) \ $(S)/LexPython.$(OBJSUFF) \ $(S)/LexRuby.$(OBJSUFF) \ $(S)/LexSQL.$(OBJSUFF) \ $(S)/LexVB.$(OBJSUFF) \ + $(S)/LexMMIXAL.$(OBJSUFF) \ + $(S)/LexNsis.$(OBJSUFF) \ + $(S)/LexPS.$(OBJSUFF) \ + $(S)/LexScriptol.$(OBJSUFF) \ $(S)/LineMarker.$(OBJSUFF) \ $(S)/PropSet.$(OBJSUFF) \ $(S)/RESearch.$(OBJSUFF) \ @@ -48,11 +59,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.sc b/contrib/src/stc/makefile.sc new file mode 100644 index 0000000000..10461dc1f0 --- /dev/null +++ b/contrib/src/stc/makefile.sc @@ -0,0 +1,81 @@ +WXDIR = ..\..\.. + +SCINTILLA=.\scintilla +S=$(SCINTILLA)\src + +EXTRASTCCPPFLAGS = -D__WX__ -DSCI_LEXER -DLINK_LEXERS -I$(SCINTILLA)/include -I$(S) +EXTRACPPFLAGS=$(EXTRACPPFLAGS) $(EXTRASTCCPPFLAGS) +STCCPPFLAGS=$(DLL_FLAGS) $(EXTRACPPFLAGS) + +include $(WXDIR)\src\makesc.env +LIBTARGET=$(WXDIR)\lib\stc$(SC_SUFFIX).lib +THISDIR=$(WXDIR)\contrib\src\stc + + + + +# variables +OBJECTS = \ + $(S)\AutoComplete.obj \ + $(S)\CallTip.obj \ + $(S)\CellBuffer.obj \ + $(S)\ContractionState.obj \ + $(S)\Document.obj \ + $(S)\DocumentAccessor.obj \ + $(S)\Editor.obj \ + $(S)\ExternalLexer.obj \ + $(S)\Indicator.obj \ + $(S)\KeyMap.obj \ + $(S)\KeyWords.obj \ + $(S)\LexAVE.obj \ + $(S)\LexAda.obj \ + $(S)\LexAsm.obj \ + $(S)\LexBaan.obj \ + $(S)\LexBullant.obj \ + $(S)\LexMatlab.obj \ + $(S)\LexCPP.obj \ + $(S)\LexConf.obj \ + $(S)\LexCrontab.obj \ + $(S)\LexCSS.obj \ + $(S)\LexEiffel.obj \ + $(S)\LexEScript.obj \ + $(S)\LexFortran.obj \ + $(S)\LexHTML.obj \ + $(S)\LexLisp.obj \ + $(S)\LexLua.obj \ + $(S)\LexLout.obj \ + $(S)\LexOthers.obj \ + $(S)\LexPOV.obj \ + $(S)\LexPascal.obj \ + $(S)\LexPerl.obj \ + $(S)\LexPython.obj \ + $(S)\LexRuby.obj \ + $(S)\LexSQL.obj \ + $(S)\LexVB.obj \ + $(S)\LexMMIXAL.obj \ + $(S)\LexNsis.obj \ + $(S)\LexPS.obj \ + $(S)\LexScriptol.obj \ + $(S)\LineMarker.obj \ + $(S)\PropSet.obj \ + $(S)\RESearch.obj \ + $(S)\ScintillaBase.obj \ + $(S)\Style.obj \ + $(S)\StyleContext.obj \ + $(S)\UniConversion.obj \ + $(S)\ViewStyle.obj \ + $(S)\WindowAccessor.obj \ + $(S)\XPM.obj \ + \ + PlatWX.obj \ + ScintillaWX.obj \ + stc.obj \ + + +include $(WXDIR)\src\makelib.sc + + +.cxx.obj: + *$(CC) -c $(CFLAGS) $(STCCPPFLAGS) $(INCLUDE) $(OPTIONS) $< -o$@ + + diff --git a/contrib/src/stc/makefile.vc b/contrib/src/stc/makefile.vc index 9a3fdc08e7..b61df3fb00 100644 --- a/contrib/src/stc/makefile.vc +++ b/contrib/src/stc/makefile.vc @@ -22,28 +22,39 @@ OBJECTS = \ $(D)\Document.obj \ $(D)\DocumentAccessor.obj \ $(D)\Editor.obj \ + $(D)\ExternalLexer.obj \ $(D)\Indicator.obj \ $(D)\KeyMap.obj \ $(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)\LexEScript.obj \ + $(D)\LexFortran.obj \ $(D)\LexHTML.obj \ $(D)\LexLisp.obj \ + $(D)\LexLout.obj \ $(D)\LexLua.obj \ $(D)\LexOthers.obj \ + $(D)\LexPOV.obj \ $(D)\LexPascal.obj \ $(D)\LexPerl.obj \ $(D)\LexPython.obj \ $(D)\LexRuby.obj \ $(D)\LexSQL.obj \ $(D)\LexVB.obj \ + $(D)\LexMMIXAL.obj \ + $(D)\LexNsis.obj \ + $(D)\LexPS.obj \ + $(D)\LexScriptol.obj \ $(D)\LineMarker.obj \ $(D)\PropSet.obj \ $(D)\RESearch.obj \ @@ -53,6 +64,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..5f4122dce6 --- /dev/null +++ b/contrib/src/stc/makefile.wat @@ -0,0 +1,95 @@ +# 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 & + ExternalLexer.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 & + LexEScript.obj & + LexFortran.obj & + LexHTML.obj & + LexLisp.obj & + LexLout.obj & + LexLua.obj & + LexOthers.obj & + LexPOV.obj & + LexPascal.obj & + LexPerl.obj & + LexPython.obj & + LexRuby.obj & + LexSQL.obj & + LexVB.obj & + LexMMIXAL.obj & + LexNsis.obj & + LexPS.obj & + LexScriptol.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..1960be5d3d 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.54 diff --git a/contrib/src/stc/scintilla/include/Platform.h b/contrib/src/stc/scintilla/include/Platform.h index 1a8dfaa96e..4f7ba2357c 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 @@ -57,6 +57,7 @@ typedef void *SurfaceID; typedef void *WindowID; typedef void *MenuID; typedef void *TickerID; +typedef void *Function; /** * A geometric point class. @@ -109,6 +110,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 +143,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 +154,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 +228,9 @@ struct ColourPair { desired = desired_; allocated.Set(desired.AsLong()); } + void Copy() { + allocated.Set(desired.AsLong()); + } }; class Window; // Forward declaration for Palette @@ -271,9 +306,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 +327,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 +343,7 @@ public: virtual void FlushCachedState()=0; virtual void SetUnicodeMode(bool unicodeMode_)=0; + virtual void SetDBCSMode(int codePage)=0; }; /** @@ -329,8 +366,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 +378,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 +390,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; }; /** @@ -408,6 +435,23 @@ public: double Duration(bool reset=false); }; +/** + * Dynamic Library (DLL/SO/...) loading + */ +class DynamicLibrary { +public: + virtual ~DynamicLibrary() {}; + + /// @return Pointer to function "name", or NULL on failure. + virtual Function FindFunction(const char *name) = 0; + + /// @return true if the library was loaded successfully. + virtual bool IsValid() = 0; + + /// @return An instance of a DynamicLibrary subclass with "modulePath" loaded. + static DynamicLibrary *Load(const char *modulePath); +}; + /** * Platform class used to retrieve system wide parameters such as double click speed * and chrome colour. Not a creatable object, more of a module with several functions. @@ -426,6 +470,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 +478,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..20ac5f774a 100644 --- a/contrib/src/stc/scintilla/include/PropSet.h +++ b/contrib/src/stc/scintilla/include/PropSet.h @@ -24,11 +24,21 @@ struct Property { /** */ class PropSet { -private: +protected: enum { hashRoots=31 }; Property *props[hashRoots]; Property *enumnext; int enumhash; + static unsigned int HashString(const char *s, size_t len) { + unsigned int ret = 0; + while (len--) { + ret <<= 4; + ret ^= *s; + s++; + } + return ret; + } + static bool IncludesVar(const char *value, const char *key); public: PropSet *superPS; PropSet(); @@ -38,7 +48,7 @@ public: void SetMultiple(const char *s); SString Get(const char *key); SString GetExpanded(const char *key); - SString Expand(const char *withVars); + SString Expand(const char *withVars, int maxExpands=100); int GetInt(const char *key, int defaultValue=0); SString GetWild(const char *keybase, const char *filename); SString GetNewExpand(const char *keybase, const char *filename=""); @@ -60,7 +70,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 +80,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..34867542f9 100644 --- a/contrib/src/stc/scintilla/include/SciLexer.h +++ b/contrib/src/stc/scintilla/include/SciLexer.h @@ -48,6 +48,17 @@ #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_LOUT 40 +#define SCLEX_ESCRIPT 41 +#define SCLEX_PS 42 +#define SCLEX_NSIS 43 +#define SCLEX_MMIXAL 44 #define SCLEX_AUTOMATIC 1000 #define SCE_P_DEFAULT 0 #define SCE_P_COMMENTLINE 1 @@ -82,6 +93,7 @@ #define SCE_C_WORD2 16 #define SCE_C_COMMENTDOCKEYWORD 17 #define SCE_C_COMMENTDOCKEYWORDERROR 18 +#define SCE_C_GLOBALCLASS 19 #define SCE_H_DEFAULT 0 #define SCE_H_TAG 1 #define SCE_H_TAGUNKNOWN 2 @@ -259,6 +271,8 @@ #define SCE_LUA_WORD4 15 #define SCE_LUA_WORD5 16 #define SCE_LUA_WORD6 17 +#define SCE_LUA_WORD7 18 +#define SCE_LUA_WORD8 19 #define SCE_ERR_DEFAULT 0 #define SCE_ERR_PYTHON 1 #define SCE_ERR_GCC 2 @@ -273,6 +287,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 +326,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 +416,135 @@ #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_NUMBER 3 +#define SCE_POV_OPERATOR 4 +#define SCE_POV_IDENTIFIER 5 +#define SCE_POV_STRING 6 +#define SCE_POV_STRINGEOL 7 +#define SCE_POV_DIRECTIVE 8 +#define SCE_POV_BADDIRECTIVE 9 +#define SCE_POV_WORD2 10 +#define SCE_POV_WORD3 11 +#define SCE_POV_WORD4 12 +#define SCE_POV_WORD5 13 +#define SCE_POV_WORD6 14 +#define SCE_POV_WORD7 15 +#define SCE_POV_WORD8 16 +#define SCE_LOUT_DEFAULT 0 +#define SCE_LOUT_COMMENT 1 +#define SCE_LOUT_NUMBER 2 +#define SCE_LOUT_WORD 3 +#define SCE_LOUT_WORD2 4 +#define SCE_LOUT_WORD3 5 +#define SCE_LOUT_WORD4 6 +#define SCE_LOUT_STRING 7 +#define SCE_LOUT_OPERATOR 8 +#define SCE_LOUT_IDENTIFIER 9 +#define SCE_LOUT_STRINGEOL 10 +#define SCE_ESCRIPT_DEFAULT 0 +#define SCE_ESCRIPT_COMMENT 1 +#define SCE_ESCRIPT_COMMENTLINE 2 +#define SCE_ESCRIPT_COMMENTDOC 3 +#define SCE_ESCRIPT_NUMBER 4 +#define SCE_ESCRIPT_WORD 5 +#define SCE_ESCRIPT_STRING 6 +#define SCE_ESCRIPT_OPERATOR 7 +#define SCE_ESCRIPT_IDENTIFIER 8 +#define SCE_ESCRIPT_BRACE 9 +#define SCE_ESCRIPT_WORD2 10 +#define SCE_ESCRIPT_WORD3 11 +#define SCE_PS_DEFAULT 0 +#define SCE_PS_COMMENT 1 +#define SCE_PS_DSC_COMMENT 2 +#define SCE_PS_DSC_VALUE 3 +#define SCE_PS_NUMBER 4 +#define SCE_PS_NAME 5 +#define SCE_PS_KEYWORD 6 +#define SCE_PS_LITERAL 7 +#define SCE_PS_IMMEVAL 8 +#define SCE_PS_PAREN_ARRAY 9 +#define SCE_PS_PAREN_DICT 10 +#define SCE_PS_PAREN_PROC 11 +#define SCE_PS_TEXT 12 +#define SCE_PS_HEXSTRING 13 +#define SCE_PS_BASE85STRING 14 +#define SCE_PS_BADSTRINGCHAR 15 +#define SCE_NSIS_DEFAULT 0 +#define SCE_NSIS_COMMENT 1 +#define SCE_NSIS_STRINGDQ 2 +#define SCE_NSIS_STRINGLQ 3 +#define SCE_NSIS_STRINGRQ 4 +#define SCE_NSIS_FUNCTION 5 +#define SCE_NSIS_VARIABLE 6 +#define SCE_NSIS_LABEL 7 +#define SCE_NSIS_USERDEFINED 8 +#define SCE_NSIS_SECTIONDEF 9 +#define SCE_NSIS_SUBSECTIONDEF 10 +#define SCE_NSIS_IFDEFINEDEF 11 +#define SCE_NSIS_MACRODEF 12 +#define SCE_NSIS_STRINGVAR 13 +#define SCE_MMIXAL_LEADWS 0 +#define SCE_MMIXAL_COMMENT 1 +#define SCE_MMIXAL_LABEL 2 +#define SCE_MMIXAL_OPCODE 3 +#define SCE_MMIXAL_OPCODE_PRE 4 +#define SCE_MMIXAL_OPCODE_VALID 5 +#define SCE_MMIXAL_OPCODE_UNKNOWN 6 +#define SCE_MMIXAL_OPCODE_POST 7 +#define SCE_MMIXAL_OPERANDS 8 +#define SCE_MMIXAL_NUMBER 9 +#define SCE_MMIXAL_REF 10 +#define SCE_MMIXAL_CHAR 11 +#define SCE_MMIXAL_STRING 12 +#define SCE_MMIXAL_REGISTER 13 +#define SCE_MMIXAL_HEX 14 +#define SCE_MMIXAL_OPERATOR 15 +#define SCE_MMIXAL_SYMBOL 16 +#define SCE_MMIXAL_INCLUDE 17 //--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..34893c8938 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 @@ -200,6 +204,7 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, #define INDIC_TT 2 #define INDIC_DIAGONAL 3 #define INDIC_STRIKE 4 +#define INDIC_HIDDEN 5 #define INDIC0_MASK 0x20 #define INDIC1_MASK 0x40 #define INDIC2_MASK 0x80 @@ -241,6 +246,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 +287,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 +343,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 +366,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 +399,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 +449,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 +459,13 @@ 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_LINECOPY 2455 #define SCI_MOVECARETINSIDEVIEW 2401 #define SCI_LINELENGTH 2350 #define SCI_BRACEHIGHLIGHT 2351 @@ -464,7 +504,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 +520,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,14 +528,29 @@ 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_POSITIONBEFORE 2417 +#define SCI_POSITIONAFTER 2418 +#define SCI_COPYRANGE 2419 +#define SCI_COPYTEXT 2420 #define SCI_STARTRECORD 3001 #define SCI_STOPRECORD 3002 #define SCI_SETLEXER 4001 #define SCI_GETLEXER 4002 #define SCI_COLOURISE 4003 #define SCI_SETPROPERTY 4004 +#define KEYWORDSET_MAX 8 #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 +604,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..9ca4ad539a 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) @@ -452,6 +462,7 @@ val INDIC_SQUIGGLE=1 val INDIC_TT=2 val INDIC_DIAGONAL=3 val INDIC_STRIKE=4 +val INDIC_HIDDEN=5 val INDIC0_MASK=0x20 val INDIC1_MASK=0x40 val INDIC2_MASK=0x80 @@ -578,6 +589,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 +705,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 +713,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 +888,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 +904,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 +945,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 +1031,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 +1186,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 +1208,33 @@ 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(,) + +# Copy the line containing the caret. +fun void LineCopy=2455(,) + # Move the caret inside current view if it's not there already. fun void MoveCaretInsideView=2401(,) @@ -1251,7 +1345,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 +1385,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 +1424,41 @@ 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(,) + +# Given a valid document position, return the previous position taking code +# page into account. Returns 0 if passed 0. +fun position PositionBefore=2417(position pos,) + +# Given a valid document position, return the next position taking code +# page into account. Maximum value returned is the last position in the document. +fun position PositionAfter=2418(position pos,) + +# Copy a range of text to the clipboard. Positions are clipped into the document. +fun void CopyRange=2419(position start, position end) + +# Copy argument text to the clipboard. +fun void CopyText=2420(int length, string text) + # Start notifying the container of all key presses and commands. fun void StartRecord=3001(,) @@ -1345,12 +1477,18 @@ fun void Colourise=4003(position start, position end) # Set up a value that may be used by a lexer for some optional feature. set void SetProperty=4004(string key, string value) +# Maximum value of keywordSet parameter of SetKeyWords. +val KEYWORDSET_MAX=8 + # Set up the key words used by the lexer. 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) +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 +1580,17 @@ 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 +val SCLEX_LOUT=40 +val SCLEX_ESCRIPT=41 +val SCLEX_PS=42 +val SCLEX_NSIS=43 +val SCLEX_MMIXAL=44 # When a lexer specifies its language as SCLEX_AUTOMATIC it receives a # value assigned in sequence from SCLEX_AUTOMATIC+1. @@ -1488,6 +1637,7 @@ val SCE_C_COMMENTLINEDOC=15 val SCE_C_WORD2=16 val SCE_C_COMMENTDOCKEYWORD=17 val SCE_C_COMMENTDOCKEYWORDERROR=18 +val SCE_C_GLOBALCLASS=19 # Lexical states for SCLEX_HTML, SCLEX_XML lex HTML=SCLEX_HTML SCE_H lex XML=SCLEX_XML SCE_H @@ -1692,6 +1842,8 @@ val SCE_LUA_WORD3=14 val SCE_LUA_WORD4=15 val SCE_LUA_WORD5=16 val SCE_LUA_WORD6=17 +val SCE_LUA_WORD7=18 +val SCE_LUA_WORD8=19 # Lexical states for SCLEX_ERRORLIST lex ErrorList=SCLEX_ERRORLIST SCE_ERR_ val SCE_ERR_DEFAULT=0 @@ -1708,6 +1860,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 +1909,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,6 +2014,154 @@ 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_NUMBER=3 +val SCE_POV_OPERATOR=4 +val SCE_POV_IDENTIFIER=5 +val SCE_POV_STRING=6 +val SCE_POV_STRINGEOL=7 +val SCE_POV_DIRECTIVE=8 +val SCE_POV_BADDIRECTIVE=9 +val SCE_POV_WORD2=10 +val SCE_POV_WORD3=11 +val SCE_POV_WORD4=12 +val SCE_POV_WORD5=13 +val SCE_POV_WORD6=14 +val SCE_POV_WORD7=15 +val SCE_POV_WORD8=16 +# Lexical states for SCLEX_LOUT +lex LOUT=SCLEX_LOUT SCE_LOUT_ +val SCE_LOUT_DEFAULT=0 +val SCE_LOUT_COMMENT=1 +val SCE_LOUT_NUMBER=2 +val SCE_LOUT_WORD=3 +val SCE_LOUT_WORD2=4 +val SCE_LOUT_WORD3=5 +val SCE_LOUT_WORD4=6 +val SCE_LOUT_STRING=7 +val SCE_LOUT_OPERATOR=8 +val SCE_LOUT_IDENTIFIER=9 +val SCE_LOUT_STRINGEOL=10 +# Lexical states for SCLEX_ESCRIPT +lex ESCRIPT=SCLEX_ESCRIPT SCE_ESCRIPT_ +val SCE_ESCRIPT_DEFAULT=0 +val SCE_ESCRIPT_COMMENT=1 +val SCE_ESCRIPT_COMMENTLINE=2 +val SCE_ESCRIPT_COMMENTDOC=3 +val SCE_ESCRIPT_NUMBER=4 +val SCE_ESCRIPT_WORD=5 +val SCE_ESCRIPT_STRING=6 +val SCE_ESCRIPT_OPERATOR=7 +val SCE_ESCRIPT_IDENTIFIER=8 +val SCE_ESCRIPT_BRACE=9 +val SCE_ESCRIPT_WORD2=10 +val SCE_ESCRIPT_WORD3=11 +# Lexical states for SCLEX_PS +lex PS=SCLEX_PS SCE_PS_ +val SCE_PS_DEFAULT=0 +val SCE_PS_COMMENT=1 +val SCE_PS_DSC_COMMENT=2 +val SCE_PS_DSC_VALUE=3 +val SCE_PS_NUMBER=4 +val SCE_PS_NAME=5 +val SCE_PS_KEYWORD=6 +val SCE_PS_LITERAL=7 +val SCE_PS_IMMEVAL=8 +val SCE_PS_PAREN_ARRAY=9 +val SCE_PS_PAREN_DICT=10 +val SCE_PS_PAREN_PROC=11 +val SCE_PS_TEXT=12 +val SCE_PS_HEXSTRING=13 +val SCE_PS_BASE85STRING=14 +val SCE_PS_BADSTRINGCHAR=15 +# Lexical states for SCLEX_NSIS +lex NSIS=SCLEX_NSIS SCE_NSIS_ +val SCE_NSIS_DEFAULT=0 +val SCE_NSIS_COMMENT=1 +val SCE_NSIS_STRINGDQ=2 +val SCE_NSIS_STRINGLQ=3 +val SCE_NSIS_STRINGRQ=4 +val SCE_NSIS_FUNCTION=5 +val SCE_NSIS_VARIABLE=6 +val SCE_NSIS_LABEL=7 +val SCE_NSIS_USERDEFINED=8 +val SCE_NSIS_SECTIONDEF=9 +val SCE_NSIS_SUBSECTIONDEF=10 +val SCE_NSIS_IFDEFINEDEF=11 +val SCE_NSIS_MACRODEF=12 +val SCE_NSIS_STRINGVAR=13 +# Lexical states for SCLEX_MMIXAL +lex MMIXAL=SCLEX_MMIXAL SCE_MMIXAL_ +val SCE_MMIXAL_LEADWS=0 +val SCE_MMIXAL_COMMENT=1 +val SCE_MMIXAL_LABEL=2 +val SCE_MMIXAL_OPCODE=3 +val SCE_MMIXAL_OPCODE_PRE=4 +val SCE_MMIXAL_OPCODE_VALID=5 +val SCE_MMIXAL_OPCODE_UNKNOWN=6 +val SCE_MMIXAL_OPCODE_POST=7 +val SCE_MMIXAL_OPERANDS=8 +val SCE_MMIXAL_NUMBER=9 +val SCE_MMIXAL_REF=10 +val SCE_MMIXAL_CHAR=11 +val SCE_MMIXAL_STRING=12 +val SCE_MMIXAL_REGISTER=13 +val SCE_MMIXAL_HEX=14 +val SCE_MMIXAL_OPERATOR=15 +val SCE_MMIXAL_SYMBOL=16 +val SCE_MMIXAL_INCLUDE=17 # Events @@ -1874,6 +2184,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/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..6dae675075 100644 --- a/contrib/src/stc/scintilla/src/CellBuffer.cxx +++ b/contrib/src/stc/scintilla/src/CellBuffer.cxx @@ -103,9 +103,9 @@ void MarkerHandleSet::RemoveNumber(int markerNum) { if (mhn->number == markerNum) { *pmhn = mhn->next; delete mhn; - return ; + } else { + pmhn = &((*pmhn)->next); } - pmhn = &((*pmhn)->next); } } @@ -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/Document.cxx b/contrib/src/stc/scintilla/src/Document.cxx index 7458120442..487262f8ad 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,13 +253,19 @@ 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 // Normalise a position so that it is not halfway through a two byte character. // This can occur in two situations - // When lines are terminated with \r\n pairs which should be treated as one character. @@ -271,17 +273,11 @@ int Document::LenChar(int pos) { // If moving, move the position in the indicated direction. int Document::MovePositionOutsideChar(int pos, int moveDir, bool checkLineEnd) { //Platform::DebugPrintf("NoCRLF %d %d\n", pos, moveDir); - // If out of range, just return value - should be fixed up after - if (pos < 0) - return pos; - if (pos > Length()) - return pos; - - // Position 0 and Length() can not be between any two characters - if (pos == 0) - return pos; - if (pos == Length()) - return pos; + // If out of range, just return minimum/maximum value. + if (pos <= 0) + return 0; + if (pos >= Length()) + return Length(); // assert pos > 0 && pos < Length() if (checkLineEnd && IsCrLf(pos - 1)) { @@ -307,27 +303,26 @@ int Document::MovePositionOutsideChar(int pos, int moveDir, bool checkLineEnd) { } 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--; - bool atLeadByte = false; - while (startLine < pos) { - if (atLeadByte) - atLeadByte = false; - else if (Platform::IsDBCSLeadByte(dbcsCodePage, cb.CharAt(startLine))) - atLeadByte = true; - else - atLeadByte = false; - startLine++; - } + int posCheck = LineStart(LineFromPosition(pos)); + while (posCheck < pos) { + 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 (posCheck + mbsize == pos) { + return pos; + } else if (posCheck + mbsize > pos) { + if (moveDir > 0) { + return posCheck + mbsize; + } else { + return posCheck; + } + } + posCheck += mbsize; } } } @@ -399,7 +394,7 @@ bool Document::InsertStyledString(int position, char *s, int insertLength) { DocModification( SC_MOD_BEFOREINSERT | SC_PERFORMED_USER, position / 2, insertLength / 2, - 0, 0)); + 0, s)); int prevLinesTotal = LinesTotal(); bool startSavePoint = cb.IsSavePoint(); const char *text = cb.InsertString(position, s, insertLength); @@ -524,7 +519,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 +540,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 +711,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 +765,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 +818,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 +865,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 +873,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 +892,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 +902,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+1; + } } + 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+1)) && (repetitions--)) { + success = pre->Execute(di, pos+1, endOfLine+1); + if (success) { + if (pre->eopat[0] <= (minPos+1)) { + pos = pre->bopat[0]; + lenRet = pre->eopat[0] - pre->bopat[0]; + } else { + success = 0; + } + } + } + } break; } } @@ -1033,16 +1067,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 +1102,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 +1127,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 +1242,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 +1257,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 +1303,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..738eca7a07 100644 --- a/contrib/src/stc/scintilla/src/DocumentAccessor.cxx +++ b/contrib/src/stc/scintilla/src/DocumentAccessor.cxx @@ -130,8 +130,8 @@ void DocumentAccessor::Flush() { lenDoc = -1; if (validLen > 0) { pdoc->SetStyles(validLen, styleBuf); - validLen = 0; startPosStyling += validLen; + validLen = 0; } } @@ -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/Editor.cxx b/contrib/src/stc/scintilla/src/Editor.cxx index f2ba9f088b..df260ed512 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; } @@ -682,7 +711,9 @@ void Editor::RedrawRect(PRectangle rc) { void Editor::Redraw() { //Platform::DebugPrintf("Redraw all\n"); - wMain.InvalidateAll(); + PRectangle rcClient = GetClientRectangle(); + wMain.InvalidateRectangle(rcClient); + //wMain.InvalidateAll(); } void Editor::RedrawSelMargin() { @@ -820,18 +851,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 +903,9 @@ int Editor::MovePositionTo(int newPos, bool extend, bool ensureVisible) { } else { SetEmptySelection(newPos); } + ShowCaretAtCurrentPosition(); if (ensureVisible) EnsureCaretVisible(); - ShowCaretAtCurrentPosition(); NotifyMove(newPos); return 0; } @@ -877,7 +935,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 +948,9 @@ void Editor::ScrollTo(int line) { } else { Redraw(); } - SetVerticalScrollPos(); + if (moveThumb) { + SetVerticalScrollPos(); + } } } @@ -916,32 +976,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 +1151,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 +1225,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 +1260,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 +1316,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 +1332,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,12 +1365,75 @@ 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 += static_cast(strlen(eol)); + } + } + } + pdoc->EndUndoAction(); + } +} + int Editor::SubstituteMarkerIfEmpty(int markerCheck, int markerDefault) { if (vs.markers[markerCheck].markType == SC_MARK_EMPTY) return markerDefault; return markerCheck; } +// Avoid 64 bit compiler warnings. +// Scintilla does not support text buffers larger than 2**31 +static int istrlen(const char *s) { + return static_cast(strlen(s)); +} + void Editor::PaintSelMargin(Surface *surfWindow, PRectangle &rc) { if (vs.fixedColumnWidth == 0) return; @@ -1371,9 +1500,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 +1514,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,17 +1584,24 @@ void Editor::PaintSelMargin(Surface *surfWindow, PRectangle &rc) { number[0] = '\0'; if (firstSubLine) sprintf(number, "%d", lineDoc + 1); - if (foldFlags & 64) - sprintf(number, "%X", pdoc->GetLevel(lineDoc)); + if (foldFlags & SC_FOLDFLAG_LEVELNUMBERS) { + int lev = pdoc->GetLevel(lineDoc); + sprintf(number, "%c%c %03X %03X", + (lev & SC_FOLDLEVELHEADERFLAG) ? 'H' : '_', + (lev & SC_FOLDLEVELWHITEFLAG) ? 'W' : '_', + lev & SC_FOLDLEVELNUMBERMASK, + lev >> 16 + ); + } PRectangle rcNumber = rcMarker; // Right justify - int width = surface->WidthText(vs.styles[STYLE_LINENUMBER].font, number, strlen(number)); + int width = surface->WidthText(vs.styles[STYLE_LINENUMBER].font, number, istrlen(number)); 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, istrlen(number), + vs.styles[STYLE_LINENUMBER].fore.allocated, + vs.styles[STYLE_LINENUMBER].back.allocated); } if (marks) { @@ -1518,8 +1654,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 +1676,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 +1690,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 +1735,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,21 +1766,21 @@ 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: - ll->positions[charInLine + 1] = surface->WidthText(ctrlCharsFont, ctrlChar, strlen(ctrlChar)) + 3; + ll->positions[charInLine + 1] = surface->WidthText(ctrlCharsFont, ctrlChar, istrlen(ctrlChar)) + 3; } 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 +1792,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 +1833,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 +1856,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 +1870,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 +1981,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 +2017,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 +2106,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 +2141,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, istrlen(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 +2171,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 +2186,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 +2196,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 +2241,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 +2254,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 +2311,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 +2360,16 @@ 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; + } + RefreshPixMaps(surfaceWindow); // In case pixmaps invalidated by scrollbar change + } + PLATFORM_ASSERT(pixmapSelPattern->Initialised()); + PRectangle rcRightMargin = rcClient; rcRightMargin.left = rcRightMargin.right - vs.rightMarginWidth; if (rcArea.Intersects(rcRightMargin)) { @@ -2117,8 +2397,10 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { Surface *surface = surfaceWindow; if (bufferedDraw) { surface = pixmapLine; + PLATFORM_ASSERT(pixmapLine->Initialised()); } surface->SetUnicodeMode(IsUnicodeMode()); + surface->SetDBCSMode(CodePage()); int visibleLine = topLine + screenLinePaintFirst; @@ -2140,7 +2422,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 +2435,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 +2451,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 +2460,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 +2470,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) & ~(0xFFF0000); + 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 +2569,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 +2583,6 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { visibleLine++; //gdk_flush(); } - llc.Dispose(ll); //if (durPaint < 0.00000001) // durPaint = 0.00000001; @@ -2307,10 +2631,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 +2688,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 + istrlen(lineNumberPrintSpace)); vsPrint.ms[lineNumberIndex].width = lineNumberWidth; } @@ -2373,12 +2697,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,71 +2712,110 @@ 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, istrlen(number)); + surface->FlushCachedState(); + surface->DrawTextNoClip(rcNumber, vsPrint.styles[STYLE_LINENUMBER].font, + ypos + vsPrint.maxAscent, number, istrlen(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)); + return surface->WidthText(vs.styles[style].font, text, istrlen(text)); } else { return 1; } } // Empty method is overridden on GTK+ to show / hide scrollbars -void Editor::ReconfigureScrollBars() { -} +void Editor::ReconfigureScrollBars() {} void Editor::SetScrollBars() { RefreshStyleData(); @@ -2499,9 +2862,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 +2879,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 +2905,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 +2916,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 +2968,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 +2984,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 +3013,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 +3050,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 +3135,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 +3230,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 +3392,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 +3402,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 +3424,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,13 +3444,17 @@ 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: case SCI_DELLINERIGHT: + case SCI_LINECOPY: case SCI_LINECUT: case SCI_LINEDELETE: case SCI_LINETRANSPOSE: + case SCI_LINEDUPLICATE: case SCI_LOWERCASE: case SCI_UPPERCASE: case SCI_LINESCROLLDOWN: @@ -3070,7 +3471,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 +3555,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 + istrlen(eol), thisLine, end - start); + delete []thisLine; +} + void Editor::CancelModes() {} void Editor::NewLine() { @@ -3165,7 +3577,7 @@ void Editor::NewLine() { eol = "\r"; } // else SC_EOL_LF -> "\n" already set if (pdoc->InsertString(currentPos, eol)) { - SetEmptySelection(currentPos + strlen(eol)); + SetEmptySelection(currentPos + istrlen(eol)); while (*eol) { NotifyChar(*eol); eol++; @@ -3178,7 +3590,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 +3608,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 +3645,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 +3661,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 +3727,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 +3776,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 +3793,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 +3831,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++; @@ -3414,18 +3889,21 @@ int Editor::KeyCommand(unsigned int iMessage) { pdoc->DeleteChars(currentPos, end - currentPos); } break; + case SCI_LINECOPY: { + int lineStart = pdoc->LineFromPosition(SelectionStart()); + int lineEnd = pdoc->LineFromPosition(SelectionEnd()); + CopyRangeToClipboard(pdoc->LineStart(lineStart), + pdoc->LineStart(lineEnd + 1)); + } + break; case SCI_LINECUT: { - int lineStart = pdoc->LineFromPosition(currentPos); - int lineEnd = pdoc->LineFromPosition(anchor); - if (lineStart > lineEnd) { - int t = lineEnd; - lineEnd = lineStart; - lineStart = t; - } + int lineStart = pdoc->LineFromPosition(SelectionStart()); + int lineEnd = pdoc->LineFromPosition(SelectionEnd()); int start = pdoc->LineStart(lineStart); int end = pdoc->LineStart(lineEnd + 1); SetSelection(start, end); Cut(); + SetLastXChosen(); } break; case SCI_LINEDELETE: { @@ -3438,6 +3916,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 +3943,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,17 +4073,18 @@ 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); - int lengthFound = strlen(ft->lpstrText); + int lengthFound = istrlen(ft->lpstrText); int pos = pdoc->FindText(ft->chrg.cpMin, ft->chrg.cpMax, ft->lpstrText, (wParam & SCFIND_MATCHCASE) != 0, (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,20 +4114,21 @@ 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. const char *txt = reinterpret_cast(lParam); int pos; - int lengthFound = strlen(txt); + int lengthFound = istrlen(txt); if (iMessage == SCI_SEARCHNEXT) { pos = pdoc->FindText(searchAnchor, pdoc->Length(), txt, (wParam & SCFIND_MATCHCASE) != 0, (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 +4136,7 @@ long Editor::SearchText( (wParam & SCFIND_WHOLEWORD) != 0, (wParam & SCFIND_WORDSTART) != 0, (wParam & SCFIND_REGEXP) != 0, + (wParam & SCFIND_POSIX) != 0, &lengthFound); } @@ -3674,6 +4158,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; @@ -3715,10 +4200,14 @@ char *Editor::CopyRange(int start, int end) { return text; } +void Editor::CopySelectionFromRange(SelectionText *ss, int start, int end) { + ss->Set(CopyRange(start, end), end - start + 1, false); +} + void Editor::CopySelectionRange(SelectionText *ss) { - char *text = 0; - int size = 0; if (selType == selRectangle) { + char *text = 0; + int size = 0; int lineStart = pdoc->LineFromPosition(SelectionStart()); int lineEnd = pdoc->LineFromPosition(SelectionEnd()); int line; @@ -3743,11 +4232,24 @@ void Editor::CopySelectionRange(SelectionText *ss) { text[size] = '\0'; } } + ss->Set(text, size + 1, true); } else { - size = SelectionEnd() - SelectionStart(); - text = CopyRange(SelectionStart(), SelectionEnd()); + CopySelectionFromRange(ss, SelectionStart(), SelectionEnd()); } - ss->Set(text, size, selType == selRectangle); +} + +void Editor::CopyRangeToClipboard(int start, int end) { + start = pdoc->ClampPositionIntoDocument(start); + end = pdoc->ClampPositionIntoDocument(end); + SelectionText selectedText; + selectedText.Set(CopyRange(start, end), end - start + 1); + CopyToClipboard(selectedText); +} + +void Editor::CopyText(int length, const char *text) { + SelectionText selectedText; + selectedText.Copy(text, length); + CopyToClipboard(selectedText); } void Editor::SetDragPosition(int newPos) { @@ -3822,14 +4324,14 @@ void Editor::DropAt(int position, const char *value, bool moving, bool rectangul position = positionAfterDeletion; if (rectangular) { - PasteRectangular(position, value, strlen(value)); + PasteRectangular(position, value, istrlen(value)); pdoc->EndUndoAction(); // Should try to select new rectangle but it may not be a rectangle now so just select the drop position SetSelection(position, position); } else { position = MovePositionOutsideChar(position, currentPos - position); if (pdoc->InsertString(position, value)) { - SetSelection(position + strlen(value), position); + SetSelection(position + istrlen(value), position); } pdoc->EndUndoAction(); } @@ -3943,7 +4445,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 +4469,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 +4507,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 +4536,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 +4626,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 +4638,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 +4649,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 +4669,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 +4683,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 +4735,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 +4751,7 @@ void Editor::SetFocusState(bool focusState) { if (hasFocus) { ShowCaretAtCurrentPosition(); } else { + CancelModes(); DropCaret(); } } @@ -4329,6 +4896,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); @@ -4407,7 +4981,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(); @@ -4425,7 +4999,7 @@ void Editor::EnsureLineVisible(int lineDoc, bool enforcePolicy) { int Editor::ReplaceTarget(bool replacePatterns, const char *text, int length) { pdoc->BeginUndoAction(); if (length == -1) - length = strlen(text); + length = istrlen(text); if (replacePatterns) { text = pdoc->SubstituteByPosition(text, &length); if (!text) @@ -4444,6 +5018,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 +5042,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 +5055,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()); @@ -4497,6 +5076,14 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { Copy(); break; + case SCI_COPYRANGE: + CopyRangeToClipboard(wParam, lParam); + break; + + case SCI_COPYTEXT: + CopyText(wParam, CharPtrFromSPtr(lParam)); + break; + case SCI_PASTE: Paste(); SetLastXChosen(); @@ -4593,7 +5180,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()))) @@ -4608,7 +5195,7 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { char *replacement = CharPtrFromSPtr(lParam); pdoc->InsertString(currentPos, replacement); pdoc->EndUndoAction(); - SetEmptySelection(currentPos + strlen(replacement)); + SetEmptySelection(currentPos + istrlen(replacement)); EnsureCaretVisible(); } break; @@ -4627,6 +5214,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); @@ -4646,6 +5243,12 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { case SCI_GETSEARCHFLAGS: return searchFlags; + case SCI_POSITIONBEFORE: + return pdoc->MovePositionOutsideChar(wParam-1, -1, true); + + case SCI_POSITIONAFTER: + return pdoc->MovePositionOutsideChar(wParam+1, 1, true); + case SCI_LINESCROLL: ScrollTo(topLine + lParam); HorizontalScrollTo(xOffset + wParam * vs.spaceWidth); @@ -4653,12 +5256,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; @@ -4758,11 +5366,15 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { char *sz = CharPtrFromSPtr(lParam); pdoc->InsertString(insertPos, sz); if (newCurrent > insertPos) - newCurrent += strlen(sz); + newCurrent += istrlen(sz); SetEmptySelection(newCurrent); return 0; } + case SCI_APPENDTEXT: + pdoc->InsertString(pdoc->Length(), CharPtrFromSPtr(lParam), wParam); + return 0; + case SCI_CLEARALL: ClearAll(); return 0; @@ -4848,6 +5460,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 +5567,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 +5580,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 +5679,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 +5696,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 +5720,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 +5820,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 +5959,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 +6072,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 +6130,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 +6178,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 +6196,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,15 +6217,19 @@ 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: case SCI_DELWORDRIGHT: case SCI_DELLINELEFT: case SCI_DELLINERIGHT: + case SCI_LINECOPY: case SCI_LINECUT: case SCI_LINEDELETE: case SCI_LINETRANSPOSE: + case SCI_LINEDUPLICATE: case SCI_LOWERCASE: case SCI_UPPERCASE: case SCI_LINESCROLLDOWN: @@ -5629,12 +6303,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 +6393,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..bd4669192f 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; @@ -129,37 +133,18 @@ public: len = 0; rectangular = rectangular_; } -}; - -/** - * 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); + void Copy(const char *s_, int len_, bool rectangular_=false) { + delete []s; + s = new char[len_]; + if (s) { + len = len_; + for (int i = 0; i < len_; i++) { + s[i] = s_[i]; + } + } else { + len = 0; } - } - 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; + rectangular = rectangular_; } }; @@ -184,6 +169,7 @@ protected: // ScintillaBase subclass needs access to much of Editor int printMagnification; int printColourMode; + int printWrapState; int cursorMode; int controlCharSymbol; @@ -196,11 +182,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 +265,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 +315,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 +334,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 +389,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 +409,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); @@ -422,10 +429,14 @@ protected: // ScintillaBase subclass needs access to much of Editor long SearchInTarget(const char *text, int length); void GoToLine(int lineNo); + virtual void CopyToClipboard(const SelectionText &selectedText) = 0; char *CopyRange(int start, int end); + void CopySelectionFromRange(SelectionText *ss, int start, int end); void CopySelectionRange(SelectionText *ss); + void CopyRangeToClipboard(int start, int end); + void CopyText(int length, const char *text); void SetDragPosition(int newPos); - void DisplayCursor(Window::Cursor c); + virtual void DisplayCursor(Window::Cursor c); virtual void StartDrag(); void DropAt(int position, const char *value, bool moving, bool rectangular); /** PositionInSelection returns 0 if position in selection, -1 if position before selection, and 1 if after. @@ -456,6 +467,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 +483,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/ExternalLexer.cxx b/contrib/src/stc/scintilla/src/ExternalLexer.cxx new file mode 100644 index 0000000000..88be76f249 --- /dev/null +++ b/contrib/src/stc/scintilla/src/ExternalLexer.cxx @@ -0,0 +1,256 @@ +// Scintilla source code edit control +/** @file ExternalLexer.cxx + ** Support external lexers in DLLs. + **/ +// Copyright 2001 Simon Steele , portions copyright Neil Hodgson. +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include + +#include "Platform.h" + +#include "SciLexer.h" +#include "PropSet.h" +#include "Accessor.h" +#include "DocumentAccessor.h" +#include "KeyWords.h" +#include "ExternalLexer.h" + +LexerManager *LexerManager::theInstance = NULL; + +//------------------------------------------ +// +// ExternalLexerModule +// +//------------------------------------------ + +char **WordListsToStrings(WordList *val[]) { + int dim = 0; + while (val[dim]) + dim++; + char **wls = new char * [dim + 1]; + for (int i = 0;i < dim;i++) { + SString words; + words = ""; + for (int n = 0; n < val[i]->len; n++) { + words += val[i]->words[n]; + if (n != val[i]->len - 1) + words += " "; + } + wls[i] = new char[words.length() + 1]; + strcpy(wls[i], words.c_str()); + } + wls[dim] = 0; + return wls; +} + +void DeleteWLStrings(char *strs[]) { + int dim = 0; + while (strs[dim]) { + delete strs[dim]; + dim++; + } + delete [] strs; +} + +void ExternalLexerModule::Lex(unsigned int startPos, int lengthDoc, int initStyle, + WordList *keywordlists[], Accessor &styler) const { + if (!fneLexer) + return ; + + char **kwds = WordListsToStrings(keywordlists); + char *ps = styler.GetProperties(); + + // The accessor passed in is always a DocumentAccessor so this cast and the subsequent + // access will work. Can not use the stricter dynamic_cast as that requires RTTI. + DocumentAccessor &da = static_cast(styler); + WindowID wID = da.GetWindow(); + + fneLexer(externalLanguage, startPos, lengthDoc, initStyle, kwds, wID, ps); + + delete ps; + DeleteWLStrings(kwds); +} + +void ExternalLexerModule::Fold(unsigned int startPos, int lengthDoc, int initStyle, + WordList *keywordlists[], Accessor &styler) const { + if (!fneFolder) + return ; + + char **kwds = WordListsToStrings(keywordlists); + char *ps = styler.GetProperties(); + + // The accessor passed in is always a DocumentAccessor so this cast and the subsequent + // access will work. Can not use the stricter dynamic_cast as that requires RTTI. + DocumentAccessor &da = static_cast(styler); + WindowID wID = da.GetWindow(); + + fneFolder(externalLanguage, startPos, lengthDoc, initStyle, kwds, wID, ps); + + delete ps; + DeleteWLStrings(kwds); +} + +void ExternalLexerModule::SetExternal(ExtLexerFunction fLexer, ExtFoldFunction fFolder, int index) { + fneLexer = fLexer; + fneFolder = fFolder; + externalLanguage = index; +} + +//------------------------------------------ +// +// LexerLibrary +// +//------------------------------------------ + +LexerLibrary::LexerLibrary(const char* ModuleName) { + // Initialise some members... + first = NULL; + last = NULL; + + // Load the DLL + lib = DynamicLibrary::Load(ModuleName); + if (lib->IsValid()) { + m_sModuleName = ModuleName; + //Cannot use reinterpret_cast because: ANSI C++ forbids casting between pointers to functions and objects + GetLexerCountFn GetLexerCount = (GetLexerCountFn)lib->FindFunction("GetLexerCount"); + + if (GetLexerCount) { + ExternalLexerModule *lex; + LexerMinder *lm; + + // Find functions in the DLL + GetLexerNameFn GetLexerName = (GetLexerNameFn)lib->FindFunction("GetLexerName"); + ExtLexerFunction Lexer = (ExtLexerFunction)lib->FindFunction("Lex"); + ExtFoldFunction Folder = (ExtFoldFunction)lib->FindFunction("Fold"); + + // Assign a buffer for the lexer name. + char lexname[100]; + strcpy(lexname, ""); + + int nl = GetLexerCount(); + + for (int i = 0; i < nl; i++) { + GetLexerName(i, lexname, 100); + lex = new ExternalLexerModule(SCLEX_AUTOMATIC, NULL, lexname, NULL); + + // Create a LexerMinder so we don't leak the ExternalLexerModule... + lm = new LexerMinder; + lm->self = lex; + lm->next = NULL; + if (first != NULL) { + last->next = lm; + last = lm; + } else { + first = lm; + last = lm; + } + + // The external lexer needs to know how to call into its DLL to + // do its lexing and folding, we tell it here. Folder may be null. + lex->SetExternal(Lexer, Folder, i); + } + } + } + next = NULL; +} + +LexerLibrary::~LexerLibrary() { + Release(); + delete lib; +} + +void LexerLibrary::Release() { + //TODO maintain a list of lexers created, and delete them! + LexerMinder *lm; + LexerMinder *next; + lm = first; + while (NULL != lm) { + next = lm->next; + delete lm->self; + delete lm; + lm = next; + } + + first = NULL; + last = NULL; +} + +//------------------------------------------ +// +// LexerManager +// +//------------------------------------------ + +/// Return the single LexerManager instance... +LexerManager *LexerManager::GetInstance() { + if(!theInstance) + theInstance = new LexerManager; + return theInstance; +} + +/// Delete any LexerManager instance... +void LexerManager::DeleteInstance() +{ + if(theInstance) { + delete theInstance; + theInstance = NULL; + } +} + +/// protected constructor - this is a singleton... +LexerManager::LexerManager() { + first = NULL; + last = NULL; +} + +LexerManager::~LexerManager() { + Clear(); +} + +void LexerManager::Load(const char* path) +{ + LoadLexerLibrary(path); +} + +void LexerManager::LoadLexerLibrary(const char* module) +{ + LexerLibrary *lib = new LexerLibrary(module); + if (NULL != first) { + last->next = lib; + last = lib; + } else { + first = lib; + last = lib; + } +} + +void LexerManager::Clear() +{ + if (NULL != first) { + LexerLibrary *cur = first; + LexerLibrary *next = first->next; + while (cur) { + delete cur; + cur = next; + } + first = NULL; + last = NULL; + } +} + +//------------------------------------------ +// +// LexerManager +// +//------------------------------------------ + +LMMinder::~LMMinder() +{ + LexerManager::DeleteInstance(); +} + +LMMinder minder; diff --git a/contrib/src/stc/scintilla/src/ExternalLexer.h b/contrib/src/stc/scintilla/src/ExternalLexer.h new file mode 100644 index 0000000000..6308fc28be --- /dev/null +++ b/contrib/src/stc/scintilla/src/ExternalLexer.h @@ -0,0 +1,95 @@ +// Scintilla source code edit control +/** @file ExternalLexer.h + ** Support external lexers in DLLs. + **/ +// Copyright 2001 Simon Steele , portions copyright Neil Hodgson. +// The License.txt file describes the conditions under which this software may be distributed. + +#ifndef EXTERNALLEXER_H +#define EXTERNALLEXER_H + +#if PLAT_WIN +#define EXT_LEXER_DECL __stdcall +#else +#define EXT_LEXER_DECL +#endif + +// External Lexer function definitions... +typedef void (EXT_LEXER_DECL *ExtLexerFunction)(unsigned int lexer, unsigned int startPos, int length, int initStyle, + char *words[], WindowID window, char *props); +typedef void (EXT_LEXER_DECL *ExtFoldFunction)(unsigned int lexer, unsigned int startPos, int length, int initStyle, + char *words[], WindowID window, char *props); +typedef void* (EXT_LEXER_DECL *GetLexerFunction)(unsigned int Index); +typedef int (EXT_LEXER_DECL *GetLexerCountFn)(); +typedef void (EXT_LEXER_DECL *GetLexerNameFn)(unsigned int Index, char *name, int buflength); + +//class DynamicLibrary; + +/// Sub-class of LexerModule to use an external lexer. +class ExternalLexerModule : protected LexerModule { +protected: + ExtLexerFunction fneLexer; + ExtFoldFunction fneFolder; + int externalLanguage; + char name[100]; +public: + ExternalLexerModule(int language_, LexerFunction fnLexer_, + const char *languageName_=0, LexerFunction fnFolder_=0) : LexerModule(language_, fnLexer_, 0, fnFolder_){ + strncpy(name, languageName_, sizeof(name)); + languageName = name; + }; + virtual void Lex(unsigned int startPos, int lengthDoc, int initStyle, + WordList *keywordlists[], Accessor &styler) const; + virtual void Fold(unsigned int startPos, int lengthDoc, int initStyle, + WordList *keywordlists[], Accessor &styler) const; + virtual void SetExternal(ExtLexerFunction fLexer, ExtFoldFunction fFolder, int index); +}; + +/// LexerMinder points to an ExternalLexerModule - so we don't leak them. +class LexerMinder { +public: + ExternalLexerModule *self; + LexerMinder *next; +}; + +/// LexerLibrary exists for every External Lexer DLL, contains LexerMinders. +class LexerLibrary { + DynamicLibrary *lib; + LexerMinder *first; + LexerMinder *last; + +public: + LexerLibrary(const char* ModuleName); + ~LexerLibrary(); + void Release(); + + LexerLibrary *next; + SString m_sModuleName; +}; + +/// LexerManager manages external lexers, contains LexerLibrarys. +class LexerManager { +public: + ~LexerManager(); + + static LexerManager *GetInstance(); + static void DeleteInstance(); + + void Load(const char* path); + void Clear(); + +private: + LexerManager(); + static LexerManager *theInstance; + + void LoadLexerLibrary(const char* module); + LexerLibrary *first; + LexerLibrary *last; +}; + +class LMMinder { +public: + ~LMMinder(); +}; + +#endif diff --git a/contrib/src/stc/scintilla/src/Indicator.cxx b/contrib/src/stc/scintilla/src/Indicator.cxx index 580e9f86da..1e386b68e3 100644 --- a/contrib/src/stc/scintilla/src/Indicator.cxx +++ b/contrib/src/stc/scintilla/src/Indicator.cxx @@ -55,6 +55,8 @@ void Indicator::Draw(Surface *surface, PRectangle &rc) { } else if (style == INDIC_STRIKE) { surface->MoveTo(rc.left, rc.top - 4); surface->LineTo(rc.right, rc.top - 4); + } else if (style == INDIC_HIDDEN) { + // Draw nothing } else { // Either INDIC_PLAIN or unknown surface->MoveTo(rc.left, ymid); surface->LineTo(rc.right, ymid); diff --git a/contrib/src/stc/scintilla/src/KeyMap.cxx b/contrib/src/stc/scintilla/src/KeyMap.cxx index c91e6c6ccc..f15842af68 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}, @@ -126,7 +130,9 @@ const KeyToCommand KeyMap::MapDefault[] = { //'L', SCI_CTRL, SCI_FORMFEED, {'L', SCI_CTRL, SCI_LINECUT}, {'L', SCI_CSHIFT, SCI_LINEDELETE}, + {'T', SCI_CSHIFT, SCI_LINECOPY}, {'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..ae22baf2f2 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) { @@ -112,18 +112,6 @@ void LexerModule::Fold(unsigned int startPos, int lengthDoc, int initStyle, } } -static void ColouriseNullDoc(unsigned int startPos, int length, int, WordList *[], - Accessor &styler) { - // Null language means all style bytes are 0 so just mark the end - no need to fill in. - if (length > 0) { - styler.StartAt(startPos + length - 1); - styler.StartSegment(startPos + length - 1); - styler.ColourTo(startPos + length - 1, 0); - } -} - -LexerModule lmNull(SCLEX_NULL, ColouriseNullDoc, "null"); - // Alternative historical name for Scintilla_LinkLexers int wxForceScintillaLexers(void) { return Scintilla_LinkLexers(); @@ -142,32 +130,45 @@ 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(lmESCRIPT); + LINK_LEXER(lmFortran); + LINK_LEXER(lmF77); LINK_LEXER(lmHTML); LINK_LEXER(lmXML); LINK_LEXER(lmASP); LINK_LEXER(lmPHP); LINK_LEXER(lmLISP); + LINK_LEXER(lmLout); LINK_LEXER(lmLua); LINK_LEXER(lmMatlab); + LINK_LEXER(lmMMIXAL); + LINK_LEXER(lmNsis); LINK_LEXER(lmBatch); LINK_LEXER(lmDiff); LINK_LEXER(lmProps); LINK_LEXER(lmMake); LINK_LEXER(lmErrorList); LINK_LEXER(lmLatex); + LINK_LEXER(lmNull); LINK_LEXER(lmPascal); LINK_LEXER(lmPerl); + LINK_LEXER(lmPOV); + LINK_LEXER(lmPS); LINK_LEXER(lmPython); LINK_LEXER(lmRuby); + LINK_LEXER(lmScriptol); LINK_LEXER(lmSQL); LINK_LEXER(lmVB); LINK_LEXER(lmVBScript); 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..2e5f891b4b 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; + + size_t 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 (size_t 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; + + size_t i = 0; + size_t 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..9c8ea416ae 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,11 +55,12 @@ 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]; WordList &keywords3 = *keywordlists[2]; + WordList &keywords4 = *keywordlists[3]; bool stylingWithinPreprocessor = styler.GetPropertyInt("styling.within.preprocessor") != 0; @@ -71,7 +75,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,12 +102,18 @@ 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); } else if (keywords2.InList(s)) { sc.ChangeState(SCE_C_WORD2); + } else if (keywords4.InList(s)) { + sc.ChangeState(SCE_C_GLOBALCLASS); } sc.SetState(SCE_C_DEFAULT); } @@ -141,8 +151,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 +251,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 +259,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,22 +276,29 @@ 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 *[], +// Store both the current line's fold level and the next lines in the +// level store to make it easy to pick up with each increment +// and to make it possible to fiddle the current level for "} else {". +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; bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0; + bool foldAtElse = styler.GetPropertyInt("fold.at.else", 0) != 0; unsigned int endPos = startPos + length; int visibleChars = 0; int lineCurrent = styler.GetLine(startPos); - int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK; - int levelCurrent = levelPrev; + int levelCurrent = SC_FOLDLEVELBASE; + if (lineCurrent > 0) + levelCurrent = styler.LevelAt(lineCurrent-1) >> 16; + int levelMinCurrent = levelCurrent; + int levelNext = levelCurrent; char chNext = styler[startPos]; int styleNext = styler.StyleAt(startPos); int style = initStyle; @@ -290,69 +311,94 @@ static void FoldCppDoc(unsigned int startPos, int length, int initStyle, WordLis bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); if (foldComment && IsStreamCommentStyle(style)) { if (!IsStreamCommentStyle(stylePrev)) { - levelCurrent++; + levelNext++; } else if (!IsStreamCommentStyle(styleNext) && !atEOL) { // Comments don't end at end of line and the next character may be unstyled. - levelCurrent--; + levelNext--; } } if (foldComment && (style == SCE_C_COMMENTLINE)) { if ((ch == '/') && (chNext == '/')) { char chNext2 = styler.SafeGetCharAt(i + 2); if (chNext2 == '{') { - levelCurrent++; + levelNext++; } else if (chNext2 == '}') { - levelCurrent--; + levelNext--; } } } if (foldPreprocessor && (style == SCE_C_PREPROCESSOR)) { if (ch == '#') { - unsigned int j=i+1; - while ((j levelNext) { + levelMinCurrent = levelNext; + } + levelNext++; } else if (ch == '}') { - levelCurrent--; + levelNext--; } } if (atEOL) { - int lev = levelPrev; + int levelUse = levelCurrent; + if (foldAtElse) { + levelUse = levelMinCurrent; + } + int lev = levelUse | levelNext << 16; if (visibleChars == 0 && foldCompact) lev |= SC_FOLDLEVELWHITEFLAG; - if ((levelCurrent > levelPrev) && (visibleChars > 0)) + if (levelUse < levelNext) lev |= SC_FOLDLEVELHEADERFLAG; if (lev != styler.LevelAt(lineCurrent)) { styler.SetLevel(lineCurrent, lev); } lineCurrent++; - levelPrev = levelCurrent; + levelCurrent = levelNext; + levelMinCurrent = 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 FoldCppDoc(unsigned int startPos, int length, int initStyle, WordList *[], + Accessor &styler) { + FoldNoBoxCppDoc(startPos, length, initStyle, styler); } static const char * const cppWordLists[] = { - "Primary keywords and identifiers", - "Secondary keywords and identifiers", - "Documentation comment keywords", - 0, -}; + "Primary keywords and identifiers", + "Secondary keywords and identifiers", + "Documentation comment keywords", + "Unused", + "Global classes and typedefs", + 0, + }; -LexerModule lmCPP(SCLEX_CPP, ColouriseCppDoc, "cpp", FoldCppDoc, cppWordLists); -LexerModule lmTCL(SCLEX_TCL, ColouriseCppDoc, "tcl", FoldCppDoc, cppWordLists); +static void ColouriseCppDocSensitive(unsigned int startPos, int length, int initStyle, WordList *keywordlists[], + Accessor &styler) { + ColouriseCppDoc(startPos, length, initStyle, keywordlists, styler, true); +} + +static void ColouriseCppDocInsensitive(unsigned int startPos, int length, int initStyle, WordList *keywordlists[], + Accessor &styler) { + ColouriseCppDoc(startPos, length, initStyle, keywordlists, styler, false); +} + +LexerModule lmCPP(SCLEX_CPP, ColouriseCppDocSensitive, "cpp", FoldCppDoc, cppWordLists); +LexerModule lmCPPNoCase(SCLEX_CPPNOCASE, ColouriseCppDocInsensitive, "cppnocase", FoldCppDoc, cppWordLists); +LexerModule lmTCL(SCLEX_TCL, ColouriseCppDocSensitive, "tcl", FoldCppDoc, cppWordLists); diff --git a/contrib/src/stc/scintilla/src/LexCSS.cxx b/contrib/src/stc/scintilla/src/LexCSS.cxx new file mode 100644 index 0000000000..11daa14238 --- /dev/null +++ b/contrib/src/stc/scintilla/src/LexCSS.cxx @@ -0,0 +1,261 @@ +// Scintilla source code edit control +/** @file LexCSS.cxx + ** Lexer for Cascade Style Sheets + ** Written by Jakub Vrána + **/ +// 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 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 || lastState == SCE_CSS_UNKNOWN_PSEUDOCLASS) + 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/LexEScript.cxx b/contrib/src/stc/scintilla/src/LexEScript.cxx new file mode 100644 index 0000000000..49411588aa --- /dev/null +++ b/contrib/src/stc/scintilla/src/LexEScript.cxx @@ -0,0 +1,270 @@ +// Scintilla source code edit control +/** @file LexESCRIPT.cxx + ** Lexer for ESCRIPT + **/ +// Copyright 2003 by Patrizio Bekerle (patrizio@bekerle.com) + +#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) || ch == '_'); +} + + + +static void ColouriseESCRIPTDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[], + Accessor &styler) { + + WordList &keywords = *keywordlists[0]; + WordList &keywords2 = *keywordlists[1]; + WordList &keywords3 = *keywordlists[2]; + + // Do not leak onto next line + /*if (initStyle == SCE_ESCRIPT_STRINGEOL) + initStyle = SCE_ESCRIPT_DEFAULT;*/ + + StyleContext sc(startPos, length, initStyle, styler); + + bool caseSensitive = styler.GetPropertyInt("escript.case.sensitive", 0) != 0; + + for (; sc.More(); sc.Forward()) { + + /*if (sc.atLineStart && (sc.state == SCE_ESCRIPT_STRING)) { + // Prevent SCE_ESCRIPT_STRINGEOL from leaking back to previous line + sc.SetState(SCE_ESCRIPT_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_ESCRIPT_OPERATOR || sc.state == SCE_ESCRIPT_BRACE) { + sc.SetState(SCE_ESCRIPT_DEFAULT); + } else if (sc.state == SCE_ESCRIPT_NUMBER) { + if (!IsADigit(sc.ch) || sc.ch != '.') { + sc.SetState(SCE_ESCRIPT_DEFAULT); + } + } else if (sc.state == SCE_ESCRIPT_IDENTIFIER) { + if (!IsAWordChar(sc.ch) || (sc.ch == '.')) { + char s[100]; + if (caseSensitive) { + sc.GetCurrent(s, sizeof(s)); + } else { + sc.GetCurrentLowered(s, sizeof(s)); + } + +// sc.GetCurrentLowered(s, sizeof(s)); + + if (keywords.InList(s)) { + sc.ChangeState(SCE_ESCRIPT_WORD); + } else if (keywords2.InList(s)) { + sc.ChangeState(SCE_ESCRIPT_WORD2); + } else if (keywords3.InList(s)) { + sc.ChangeState(SCE_ESCRIPT_WORD3); + // sc.state = SCE_ESCRIPT_IDENTIFIER; + } + sc.SetState(SCE_ESCRIPT_DEFAULT); + } + } else if (sc.state == SCE_ESCRIPT_COMMENT) { + if (sc.Match('*', '/')) { + sc.Forward(); + sc.ForwardSetState(SCE_ESCRIPT_DEFAULT); + } + } else if (sc.state == SCE_ESCRIPT_COMMENTDOC) { + if (sc.Match('*', '/')) { + sc.Forward(); + sc.ForwardSetState(SCE_ESCRIPT_DEFAULT); + } + } else if (sc.state == SCE_ESCRIPT_COMMENTLINE) { + if (sc.atLineEnd) { + sc.SetState(SCE_ESCRIPT_DEFAULT); + } + } else if (sc.state == SCE_ESCRIPT_STRING) { + if (sc.ch == '\\') { + if (sc.chNext == '\"' || sc.chNext == '\\') { + sc.Forward(); + } + } else if (sc.ch == '\"') { + sc.ForwardSetState(SCE_ESCRIPT_DEFAULT); + } + } + + // Determine if a new state should be entered. + if (sc.state == SCE_ESCRIPT_DEFAULT) { + if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) { + sc.SetState(SCE_ESCRIPT_NUMBER); + } else if (IsAWordStart(sc.ch) || (sc.ch == '#')) { + sc.SetState(SCE_ESCRIPT_IDENTIFIER); + } else if (sc.Match('/', '*')) { + sc.SetState(SCE_ESCRIPT_COMMENT); + sc.Forward(); // Eat the * so it isn't used for the end of the comment + } else if (sc.Match('/', '/')) { + sc.SetState(SCE_ESCRIPT_COMMENTLINE); + } else if (sc.ch == '\"') { + sc.SetState(SCE_ESCRIPT_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_ESCRIPT_OPERATOR); + } else if (sc.ch == '{' || sc.ch == '}') { + sc.SetState(SCE_ESCRIPT_BRACE); + } + } + + } + sc.Complete(); +} + + +static int classifyFoldPointESCRIPT(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, "for") == 0 || strcmp(s, "foreach") == 0 + || strcmp(s, "program") == 0 || strcmp(s, "function") == 0 + || strcmp(s, "while") == 0 || strcmp(s, "case") == 0 + || strcmp(s, "if") == 0 ) { + lev = 1; + } else if ( strcmp(s, "endfor") == 0 || strcmp(s, "endforeach") == 0 + || strcmp(s, "endprogram") == 0 || strcmp(s, "endfunction") == 0 + || strcmp(s, "endwhile") == 0 || strcmp(s, "endcase") == 0 + || strcmp(s, "endif") == 0 ) { + lev = -1; + } + + return lev; +} + + +static bool IsStreamCommentStyle(int style) { + return style == SCE_ESCRIPT_COMMENT || + style == SCE_ESCRIPT_COMMENTDOC || + style == SCE_ESCRIPT_COMMENTLINE; +} + +static void FoldESCRIPTDoc(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; + bool foldComment = true; + 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 (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_ESCRIPT_COMMENTLINE)) { + if ((ch == '/') && (chNext == '/')) { + char chNext2 = styler.SafeGetCharAt(i + 2); + if (chNext2 == '{') { + levelCurrent++; + } else if (chNext2 == '}') { + levelCurrent--; + } + } + } + + if (stylePrev == SCE_ESCRIPT_DEFAULT && style == SCE_ESCRIPT_WORD3) + { + // Store last word start point. + lastStart = i; + } + + if (style == SCE_ESCRIPT_WORD3) { + 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 += classifyFoldPointESCRIPT(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 ESCRIPTWordLists[] = { + "Primary keywords and identifiers", + "Intrinsic functions", + "Extended and user defined functions", + 0, +}; + +LexerModule lmESCRIPT(SCLEX_ESCRIPT, ColouriseESCRIPTDoc, "escript", FoldESCRIPTDoc, ESCRIPTWordLists); 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..e442054b36 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 @@ -127,7 +127,7 @@ static int stateForPrintState(int StateToPrint) { } static inline bool IsNumber(unsigned int start, Accessor &styler) { - return isdigit(styler[start]) || (styler[start] == '.') || + return IsADigit(styler[start]) || (styler[start] == '.') || (styler[start] == '-') || (styler[start] == '#'); } @@ -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] == '!') { @@ -232,7 +246,7 @@ static int classifyTagHTML(unsigned int start, unsigned int end, static void classifyWordHTJS(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler, script_mode inScriptType) { char chAttr = SCE_HJ_WORD; - bool wordIsNumber = isdigit(styler[start]) || (styler[start] == '.'); + bool wordIsNumber = IsADigit(styler[start]) || (styler[start] == '.'); if (wordIsNumber) chAttr = SCE_HJ_NUMBER; else { @@ -250,7 +264,7 @@ static void classifyWordHTJS(unsigned int start, unsigned int end, static int classifyWordHTVB(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler, script_mode inScriptType) { char chAttr = SCE_HB_IDENTIFIER; - bool wordIsNumber = isdigit(styler[start]) || (styler[start] == '.'); + bool wordIsNumber = IsADigit(styler[start]) || (styler[start] == '.'); if (wordIsNumber) chAttr = SCE_HB_NUMBER; else { @@ -274,7 +288,7 @@ static int classifyWordHTVB(unsigned int start, unsigned int end, WordList &keyw } static void classifyWordHTPy(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler, char *prevWord, script_mode inScriptType) { - bool wordIsNumber = isdigit(styler[start]) != 0; + bool wordIsNumber = IsADigit(styler[start]); char s[30 + 1]; unsigned int i = 0; for (; i < end - start + 1 && i < 30; i++) { @@ -298,7 +312,7 @@ static void classifyWordHTPy(unsigned int start, unsigned int end, WordList &key // Called when in a PHP word static void classifyWordHTPHP(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler) { char chAttr = SCE_HPHP_DEFAULT; - bool wordIsNumber = isdigit(styler[start]) != 0; + bool wordIsNumber = IsADigit(styler[start]); if (wordIsNumber) chAttr = SCE_HPHP_NUMBER; else { @@ -361,11 +375,21 @@ static int StateForScript(script_type scriptLanguage) { } static inline bool ishtmlwordchar(char ch) { - return isalnum(ch) || ch == '.' || ch == '-' || ch == '_' || ch == ':' || ch == '!' || ch == '#'; + return !isascii(ch) || + (isalnum(ch) || ch == '.' || ch == '-' || ch == '_' || ch == ':' || ch == '!' || ch == '#'); } static inline bool issgmlwordchar(char ch) { - return isalnum(ch) || ch == '.' || ch == '_' || ch == ':' || ch == '!' || ch == '#' || ch == '['; + return !isascii(ch) || + (isalnum(ch) || ch == '.' || ch == '_' || ch == ':' || ch == '!' || ch == '#' || ch == '['); +} + +static inline bool IsPhpWordStart(const unsigned char ch) { + return (isascii(ch) && (isalpha(ch) || (ch == '_'))) || (ch >= 0x7f); +} + +static inline bool IsPhpWordChar(char ch) { + return IsADigit(ch) || IsPhpWordStart(ch); } static bool InTagState(int state) { @@ -433,6 +457,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 +465,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 +508,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 +629,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 +671,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 +697,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 +755,8 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty inScriptType = eHtml; scriptLanguage = eScriptNone; // unfold all scripting languages - levelCurrent--; + if (foldHTMLPreprocessor) + levelCurrent--; continue; } ///////////////////////////////////// @@ -756,7 +789,7 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty } else if ((ch == '-') && (chPrev == '-')) { styler.ColourTo(i - 2, StateToPrint); state = SCE_H_SGML_COMMENT; - } else if (isalpha(ch) && (chPrev == '%')) { + } else if (isascii(ch) && isalpha(ch) && (chPrev == '%')) { styler.ColourTo(i - 2, StateToPrint); state = SCE_H_SGML_ENTITY; } else if (ch == '#') { @@ -874,7 +907,7 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty } break; case SCE_H_SGML_SPECIAL: - if (!isupper(ch)) { + if (!(isascii(ch) && isupper(ch))) { styler.ColourTo(i - 1, StateToPrint); if (isalnum(ch)) { state = SCE_H_SGML_ERROR; @@ -887,7 +920,7 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty if (ch == ';') { styler.ColourTo(i, StateToPrint); state = SCE_H_SGML_DEFAULT; - } else if (!isalnum(ch) && ch != '-' && ch != '.') { + } else if (!(isascii(ch) && isalnum(ch)) && ch != '-' && ch != '.') { styler.ColourTo(i, SCE_H_SGML_ERROR); state = SCE_H_SGML_DEFAULT; } @@ -897,14 +930,15 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty styler.ColourTo(i, StateToPrint); state = SCE_H_DEFAULT; } - if (ch != '#' && !isalnum(ch)) { // Should check that '#' follows '&', but it is unlikely anyway... + if (ch != '#' && !(isascii(ch) && isalnum(ch))) { // Should check that '#' follows '&', but it is unlikely anyway... styler.ColourTo(i, SCE_H_TAGUNKNOWN); state = SCE_H_DEFAULT; } 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 +957,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 +1005,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 +1031,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 +1086,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 +1105,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 +1442,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 +1456,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; @@ -1421,7 +1466,7 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty } break; case SCE_HPHP_NUMBER: - if (!isdigit(ch)) { + if (!IsADigit(ch)) { styler.ColourTo(i - 1, SCE_HPHP_NUMBER); if (isoperator(ch)) state = SCE_HPHP_OPERATOR; @@ -1430,7 +1475,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 +1499,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 +1517,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; @@ -1481,7 +1526,7 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty case SCE_HPHP_OPERATOR: case SCE_HPHP_DEFAULT: styler.ColourTo(i - 1, StateToPrint); - if (isdigit(ch)) { + if (IsADigit(ch)) { state = SCE_HPHP_NUMBER; } else if (iswordstart(ch)) { state = SCE_HPHP_WORD; @@ -1497,7 +1542,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 +1598,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 +1746,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 +1825,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 +1847,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 +1867,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 +1881,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/LexLout.cxx b/contrib/src/stc/scintilla/src/LexLout.cxx new file mode 100644 index 0000000000..9d1a45a028 --- /dev/null +++ b/contrib/src/stc/scintilla/src/LexLout.cxx @@ -0,0 +1,208 @@ +// Scintilla source code edit control +/** @file LexLout.cxx + ** Lexer for the Basser Lout (>= version 3) typesetting language + **/ +// Copyright 2003 by Kein-Hong Man +// 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) && (isalpha(ch) || ch == '@' || ch == '_'); +} + +static inline bool IsAnOther(const int ch) { + return (ch < 0x80) && (ch == '{' || ch == '}' || + ch == '!' || ch == '$' || ch == '%' || ch == '&' || ch == '\'' || + ch == '(' || ch == ')' || ch == '*' || ch == '+' || ch == ',' || + ch == '-' || ch == '.' || ch == '/' || ch == ':' || ch == ';' || + ch == '<' || ch == '=' || ch == '>' || ch == '?' || ch == '[' || + ch == ']' || ch == '^' || ch == '`' || ch == '|' || ch == '~'); +} + +static void ColouriseLoutDoc(unsigned int startPos, int length, int initStyle, + WordList *keywordlists[], Accessor &styler) { + + WordList &keywords = *keywordlists[0]; + WordList &keywords2 = *keywordlists[1]; + WordList &keywords3 = *keywordlists[2]; + + int visibleChars = 0; + int firstWordInLine = 0; + int leadingAtSign = 0; + + StyleContext sc(startPos, length, initStyle, styler); + + for (; sc.More(); sc.Forward()) { + + if (sc.atLineStart && (sc.state == SCE_LOUT_STRING)) { + // Prevent SCE_LOUT_STRINGEOL from leaking back to previous line + sc.SetState(SCE_LOUT_STRING); + } + + // Determine if the current state should terminate. + if (sc.state == SCE_LOUT_COMMENT) { + if (sc.atLineEnd) { + sc.SetState(SCE_LOUT_DEFAULT); + visibleChars = 0; + } + } else if (sc.state == SCE_LOUT_NUMBER) { + if (!IsADigit(sc.ch) && sc.ch != '.') { + sc.SetState(SCE_LOUT_DEFAULT); + } + } else if (sc.state == SCE_LOUT_STRING) { + if (sc.ch == '\\') { + if (sc.chNext == '\"' || sc.chNext == '\\') { + sc.Forward(); + } + } else if (sc.ch == '\"') { + sc.ForwardSetState(SCE_LOUT_DEFAULT); + } else if (sc.atLineEnd) { + sc.ChangeState(SCE_LOUT_STRINGEOL); + sc.ForwardSetState(SCE_LOUT_DEFAULT); + visibleChars = 0; + } + } else if (sc.state == SCE_LOUT_IDENTIFIER) { + if (!IsAWordChar(sc.ch)) { + char s[100]; + sc.GetCurrent(s, sizeof(s)); + + if (leadingAtSign) { + if (keywords.InList(s)) { + sc.ChangeState(SCE_LOUT_WORD); + } else { + sc.ChangeState(SCE_LOUT_WORD4); + } + } else if (firstWordInLine && keywords3.InList(s)) { + sc.ChangeState(SCE_LOUT_WORD3); + } + sc.SetState(SCE_LOUT_DEFAULT); + } + } else if (sc.state == SCE_LOUT_OPERATOR) { + if (!IsAnOther(sc.ch)) { + char s[100]; + sc.GetCurrent(s, sizeof(s)); + + if (keywords2.InList(s)) { + sc.ChangeState(SCE_LOUT_WORD2); + } + sc.SetState(SCE_LOUT_DEFAULT); + } + } + + // Determine if a new state should be entered. + if (sc.state == SCE_LOUT_DEFAULT) { + if (sc.ch == '#') { + sc.SetState(SCE_LOUT_COMMENT); + } else if (sc.ch == '\"') { + sc.SetState(SCE_LOUT_STRING); + } else if (IsADigit(sc.ch) || + (sc.ch == '.' && IsADigit(sc.chNext))) { + sc.SetState(SCE_LOUT_NUMBER); + } else if (IsAWordChar(sc.ch)) { + firstWordInLine = (visibleChars == 0); + leadingAtSign = (sc.ch == '@'); + sc.SetState(SCE_LOUT_IDENTIFIER); + } else if (IsAnOther(sc.ch)) { + sc.SetState(SCE_LOUT_OPERATOR); + } + } + + if (sc.atLineEnd) { + // Reset states to begining of colourise so no surprises + // if different sets of lines lexed. + visibleChars = 0; + } + if (!IsASpace(sc.ch)) { + visibleChars++; + } + } + sc.Complete(); +} + +static void FoldLoutDoc(unsigned int startPos, int length, int, WordList *[], + Accessor &styler) { + + 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 foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0; + int styleNext = styler.StyleAt(startPos); + char s[10]; + + 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 (style == SCE_LOUT_WORD) { + if (ch == '@') { + for (unsigned int j = 0; j < 8; j++) { + if (!IsAWordChar(styler[i + j])) { + break; + } + s[j] = styler[i + j]; + s[j + 1] = '\0'; + } + if (strcmp(s, "@Begin") == 0) { + levelCurrent++; + } else if (strcmp(s, "@End") == 0) { + levelCurrent--; + } + } + } else if (style == SCE_LOUT_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 loutWordLists[] = { + "Predefined identifiers", + "Predefined delimiters", + "Predefined keywords", + 0, + }; + +LexerModule lmLout(SCLEX_LOUT, ColouriseLoutDoc, "lout", FoldLoutDoc, loutWordLists); diff --git a/contrib/src/stc/scintilla/src/LexLua.cxx b/contrib/src/stc/scintilla/src/LexLua.cxx index fc9607e25d..18612c9ee3 100644 --- a/contrib/src/stc/scintilla/src/LexLua.cxx +++ b/contrib/src/stc/scintilla/src/LexLua.cxx @@ -23,10 +23,8 @@ #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 == '_'); + return (ch < 0x80) && (isalnum(ch) || ch == '_' || ch == '.'); } inline bool IsAWordStart(const int ch) { @@ -60,15 +58,19 @@ static void ColouriseLuaDoc( WordList &keywords4 = *keywordlists[3]; WordList &keywords5 = *keywordlists[4]; WordList &keywords6 = *keywordlists[5]; + WordList &keywords7 = *keywordlists[6]; + WordList &keywords8 = *keywordlists[7]; - // 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 +80,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 +109,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') { @@ -102,11 +123,15 @@ static void ColouriseLuaDoc( if (sc.state == SCE_LUA_OPERATOR) { sc.SetState(SCE_LUA_DEFAULT); } else if (sc.state == SCE_LUA_NUMBER) { - if (!IsAWordChar(sc.ch)) { - sc.SetState(SCE_LUA_DEFAULT); + // We stop the number definition on non-numerical non-dot non-eE non-sign char + if (!(isdigit(sc.ch) || sc.ch == '.' || + toupper(sc.ch) == 'E' || sc.ch == '-' || sc.ch == '+')) { + // Not exactly following number definition (several dots are seen as OK, etc.) + // but probably enough in most cases. + sc.SetState(SCE_LUA_DEFAULT); } } else if (sc.state == SCE_LUA_IDENTIFIER) { - if (!IsAWordChar(sc.ch) || (sc.ch == '.')) { + if (!IsAWordChar(sc.ch)) { char s[100]; sc.GetCurrent(s, sizeof(s)); if (keywords.InList(s)) { @@ -121,6 +146,12 @@ static void ColouriseLuaDoc( sc.ChangeState(SCE_LUA_WORD5); } else if (keywords6.InList(s)) { sc.ChangeState(SCE_LUA_WORD6); + } else if (keywords6.InList(s)) { + sc.ChangeState(SCE_LUA_WORD6); + } else if (keywords7.InList(s)) { + sc.ChangeState(SCE_LUA_WORD7); + } else if (keywords8.InList(s)) { + sc.ChangeState(SCE_LUA_WORD8); } sc.SetState(SCE_LUA_DEFAULT); } @@ -154,22 +185,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 +224,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 +241,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 +309,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, (table) & math functions", + "(coroutines), I/O & system facilities", + "XXX", + "XXX", + 0 +}; + +LexerModule lmLua(SCLEX_LUA, ColouriseLuaDoc, "lua", FoldLuaDoc, luaWordListDesc); diff --git a/contrib/src/stc/scintilla/src/LexMMIXAL.cxx b/contrib/src/stc/scintilla/src/LexMMIXAL.cxx new file mode 100644 index 0000000000..f447899899 --- /dev/null +++ b/contrib/src/stc/scintilla/src/LexMMIXAL.cxx @@ -0,0 +1,183 @@ +// Scintilla source code edit control +/** @file LexMMIXAL.cxx + ** Lexer for MMIX Assembler Language. + ** Written by Christoph Hösler + ** For information about MMIX visit http://www-cs-faculty.stanford.edu/~knuth/mmix.html + **/ +// Copyright 1998-2003 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 == '_'); +} + +inline bool isMMIXALOperator(char ch) { + if (isalnum(ch)) + return false; + if (ch == '+' || ch == '-' || ch == '|' || ch == '^' || + ch == '*' || ch == '/' || ch == '/' || + ch == '%' || ch == '<' || ch == '>' || ch == '&' || + ch == '~' || ch == '$' || + ch == ',' || ch == '(' || ch == ')' || + ch == '[' || ch == ']') + return true; + return false; +} + +static void ColouriseMMIXALDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[], + Accessor &styler) { + + WordList &opcodes = *keywordlists[0]; + WordList &special_register = *keywordlists[1]; + WordList &predef_symbols = *keywordlists[2]; + + StyleContext sc(startPos, length, initStyle, styler); + + for (; sc.More(); sc.Forward()) + { + // No EOL continuation + if (sc.atLineStart) { + if (sc.ch == '@' && sc.chNext == 'i') { + sc.SetState(SCE_MMIXAL_INCLUDE); + } else { + sc.SetState(SCE_MMIXAL_LEADWS); + } + } + + // Check if first non whitespace character in line is alphanumeric + if (sc.state == SCE_MMIXAL_LEADWS && !isspace(sc.ch)) { // LEADWS + if(!IsAWordChar(sc.ch)) { + sc.SetState(SCE_MMIXAL_COMMENT); + } else { + if(sc.atLineStart) { + sc.SetState(SCE_MMIXAL_LABEL); + } else { + sc.SetState(SCE_MMIXAL_OPCODE_PRE); + } + } + } + + // Determine if the current state should terminate. + if (sc.state == SCE_MMIXAL_OPERATOR) { // OPERATOR + sc.SetState(SCE_MMIXAL_OPERANDS); + } else if (sc.state == SCE_MMIXAL_NUMBER) { // NUMBER + if (!isdigit(sc.ch)) { + if (IsAWordChar(sc.ch)) { + char s[100]; + sc.GetCurrent(s, sizeof(s)); + sc.ChangeState(SCE_MMIXAL_REF); + sc.SetState(SCE_MMIXAL_REF); + } else { + sc.SetState(SCE_MMIXAL_OPERANDS); + } + } + } else if (sc.state == SCE_MMIXAL_LABEL) { // LABEL + if (!IsAWordChar(sc.ch) ) { + sc.SetState(SCE_MMIXAL_OPCODE_PRE); + } + } else if (sc.state == SCE_MMIXAL_REF) { // REF + if (!IsAWordChar(sc.ch) ) { + char s[100]; + sc.GetCurrent(s, sizeof(s)); + if (*s == ':') { // ignore base prefix for match + for (size_t i = 0; i != sizeof(s); ++i) { + *(s+i) = *(s+i+1); + } + } + if (special_register.InList(s)) { + sc.ChangeState(SCE_MMIXAL_REGISTER); + } else if (predef_symbols.InList(s)) { + sc.ChangeState(SCE_MMIXAL_SYMBOL); + } + sc.SetState(SCE_MMIXAL_OPERANDS); + } + } else if (sc.state == SCE_MMIXAL_OPCODE_PRE) { // OPCODE_PRE + if (!isspace(sc.ch)) { + sc.SetState(SCE_MMIXAL_OPCODE); + } + } else if (sc.state == SCE_MMIXAL_OPCODE) { // OPCODE + if (!IsAWordChar(sc.ch) ) { + char s[100]; + sc.GetCurrent(s, sizeof(s)); + if (opcodes.InList(s)) { + sc.ChangeState(SCE_MMIXAL_OPCODE_VALID); + } else { + sc.ChangeState(SCE_MMIXAL_OPCODE_UNKNOWN); + } + sc.SetState(SCE_MMIXAL_OPCODE_POST); + } + } else if (sc.state == SCE_MMIXAL_STRING) { // STRING + if (sc.ch == '\"') { + sc.ForwardSetState(SCE_MMIXAL_OPERANDS); + } else if (sc.atLineEnd) { + sc.ForwardSetState(SCE_MMIXAL_OPERANDS); + } + } else if (sc.state == SCE_MMIXAL_CHAR) { // CHAR + if (sc.ch == '\'') { + sc.ForwardSetState(SCE_MMIXAL_OPERANDS); + } else if (sc.atLineEnd) { + sc.ForwardSetState(SCE_MMIXAL_OPERANDS); + } + } else if (sc.state == SCE_MMIXAL_REGISTER) { // REGISTER + if (!isdigit(sc.ch)) { + sc.SetState(SCE_MMIXAL_OPERANDS); + } + } else if (sc.state == SCE_MMIXAL_HEX) { // HEX + if (!isxdigit(sc.ch)) { + sc.SetState(SCE_MMIXAL_OPERANDS); + } + } + + // Determine if a new state should be entered. + if (sc.state == SCE_MMIXAL_OPCODE_POST || // OPCODE_POST + sc.state == SCE_MMIXAL_OPERANDS) { // OPERANDS + if (sc.state == SCE_MMIXAL_OPERANDS && isspace(sc.ch)) { + if (!sc.atLineEnd) { + sc.SetState(SCE_MMIXAL_COMMENT); + } + } else if (isdigit(sc.ch)) { + sc.SetState(SCE_MMIXAL_NUMBER); + } else if (IsAWordChar(sc.ch) || sc.Match('@')) { + sc.SetState(SCE_MMIXAL_REF); + } else if (sc.Match('\"')) { + sc.SetState(SCE_MMIXAL_STRING); + } else if (sc.Match('\'')) { + sc.SetState(SCE_MMIXAL_CHAR); + } else if (sc.Match('$')) { + sc.SetState(SCE_MMIXAL_REGISTER); + } else if (sc.Match('#')) { + sc.SetState(SCE_MMIXAL_HEX); + } else if (isMMIXALOperator(static_cast(sc.ch))) { + sc.SetState(SCE_MMIXAL_OPERATOR); + } + } + } + sc.Complete(); +} + +static const char * const MMIXALWordListDesc[] = { + "Operation Codes", + "Special Register", + "Predefined Symbols", + 0 +}; + +LexerModule lmMMIXAL(SCLEX_MMIXAL, ColouriseMMIXALDoc, "mmixal", 0, MMIXALWordListDesc); + 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/LexNsis.cxx b/contrib/src/stc/scintilla/src/LexNsis.cxx new file mode 100644 index 0000000000..c09a8ae865 --- /dev/null +++ b/contrib/src/stc/scintilla/src/LexNsis.cxx @@ -0,0 +1,346 @@ +// Scintilla source code edit control +/** @file LexNsis.cxx + ** Lexer for NSIS + **/ +// Copyright 2003 by Angelo Mandato +// 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 "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +/* +// Put in SciLexer.h +#define SCLEX_NSIS 34 + +#define SCE_NSIS_DEFAULT 0 +#define SCE_NSIS_COMMENT 1 +#define SCE_NSIS_STRINGDQ 2 +#define SCE_NSIS_STRINGLQ 3 +#define SCE_NSIS_STRINGRQ 4 +#define SCE_NSIS_FUNCTION 5 +#define SCE_NSIS_VARIABLE 6 +#define SCE_NSIS_LABEL 7 +#define SCE_NSIS_USERDEFINED 8 +#define SCE_NSIS_SECTIONDEF 9 +#define SCE_NSIS_SUBSECTIONDEF 10 +#define SCE_NSIS_IFDEFINEDEF 11 +#define SCE_NSIS_MACRODEF 12 +#define SCE_NSIS_STRINGVAR 13 +*/ + +static int classifyWordNsis(unsigned int start, unsigned int end, WordList *keywordLists[], Accessor &styler) +{ + char s[100]; + + WordList &Functions = *keywordLists[0]; + WordList &Variables = *keywordLists[1]; + WordList &Lables = *keywordLists[2]; + WordList &UserDefined = *keywordLists[3]; + + for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) + { + s[i] = static_cast( styler[ start + i ] ); + s[i + 1] = '\0'; + } + + // Check for special words... + + if( strcmp(s, "!macro") == 0 || strcmp(s, "!macroend") == 0 ) // Covers !micro and !microend + return SCE_NSIS_MACRODEF; + + if( strcmp(s, "!ifdef") == 0 || strcmp(s, "!ifndef") == 0 || strcmp(s, "!endif") == 0 ) + return SCE_NSIS_IFDEFINEDEF; + + if( strcmp(s, "Section") == 0 || strcmp(s, "SectionEnd") == 0 ) // Covers Section and SectionEnd + return SCE_NSIS_SECTIONDEF; + + if( strcmp(s, "SubSection") == 0 || strcmp(s, "SubSectionEnd") == 0 ) // Covers SubSection and SubSectionEnd + return SCE_NSIS_SUBSECTIONDEF; + + if( strcmp(s, "Function") == 0 || strcmp(s, "FunctionEnd") == 0 ) // Covers SubSection and SubSectionEnd + return SCE_NSIS_FUNCTION; + + if ( Functions.InList(s) ) + return SCE_NSIS_FUNCTION; + + if ( Variables.InList(s) ) + return SCE_NSIS_VARIABLE; + + if ( Lables.InList(s) ) + return SCE_NSIS_LABEL; + + if( UserDefined.InList(s) ) + return SCE_NSIS_USERDEFINED; + + if( strlen(s) > 2 ) + { + if( s[1] == '{' && s[strlen(s)-1] == '}' ) + return SCE_NSIS_VARIABLE; + } + + return SCE_NSIS_DEFAULT; +} + +static void ColouriseNsisDoc(unsigned int startPos, int length, int, WordList *keywordLists[], Accessor &styler) +{ + int state = SCE_NSIS_DEFAULT; + styler.StartAt( startPos ); + styler.GetLine( startPos ); + + unsigned int nLengthDoc = startPos + length; + styler.StartSegment( startPos ); + + char cCurrChar; + bool bVarInString = true; + + unsigned int i; + for( i = startPos; i < nLengthDoc; i++ ) + { + cCurrChar = styler.SafeGetCharAt( i ); + char cNextChar = styler.SafeGetCharAt( i+1, EOF ); + + + + switch(state) + { + case SCE_NSIS_DEFAULT: + if( cNextChar == EOF ) + { + styler.ColourTo(i,SCE_NSIS_DEFAULT); + break; + } + if( cCurrChar == ';' || cCurrChar == '#' ) // we have a comment line + { + styler.ColourTo(i-1, state ); + state = SCE_NSIS_COMMENT; + break; + } + if( cCurrChar == '"' ) + { + styler.ColourTo(i-1, state ); + state = SCE_NSIS_STRINGDQ; + bVarInString = false; + break; + } + if( cCurrChar == '\'' ) + { + styler.ColourTo(i-1, state ); + state = SCE_NSIS_STRINGRQ; + bVarInString = false; + break; + } + if( cCurrChar == '`' ) + { + styler.ColourTo(i-1, state ); + state = SCE_NSIS_STRINGLQ; + bVarInString = false; + break; + } + + // NSIS KeyWord,Function, Variable, UserDefined: + if( cCurrChar == '$' || iswordchar(cCurrChar) || cCurrChar == '!' ) + { + styler.ColourTo(i-1,state); + state = SCE_NSIS_FUNCTION; + break; + } + break; + case SCE_NSIS_COMMENT: + if( cNextChar == '\n' || cNextChar == '\r' || cNextChar == EOF ) + { + styler.ColourTo(i,state); + state = SCE_NSIS_DEFAULT; + } + break; + case SCE_NSIS_STRINGDQ: + if( cCurrChar == '"' || cNextChar == '\r' || cNextChar == '\n' ) + { + styler.ColourTo(i,SCE_NSIS_STRINGDQ); + state = SCE_NSIS_DEFAULT; + } + break; + case SCE_NSIS_STRINGLQ: + if( cCurrChar == '`' || cNextChar == '\r' || cNextChar == '\n' ) + { + styler.ColourTo(i,SCE_NSIS_STRINGLQ); + state = SCE_NSIS_DEFAULT; + } + break; + case SCE_NSIS_STRINGRQ: + if( cCurrChar == '\'' || cNextChar == '\r' || cNextChar == '\n' ) + { + styler.ColourTo(i,SCE_NSIS_STRINGRQ); + state = SCE_NSIS_DEFAULT; + } + break; + case SCE_NSIS_FUNCTION: + + // NSIS KeyWord: + if( (iswordchar(cCurrChar) && !iswordchar( cNextChar) && cNextChar != '}') || cCurrChar == '}' ) + { + state = classifyWordNsis( styler.GetStartSegment(), i, keywordLists, styler); + styler.ColourTo( i, state); + state = SCE_NSIS_DEFAULT; // Everything after goes back to the default state + } + else if( !iswordchar( cCurrChar ) && cCurrChar != '{' && cCurrChar != '}' ) + { + state = SCE_NSIS_DEFAULT; + + if( cCurrChar == '"' ) // Next + { + state = SCE_NSIS_STRINGDQ; + bVarInString = false; + } + if( cCurrChar == '`' ) + { + state = SCE_NSIS_STRINGLQ; + bVarInString = false; + } + if( cCurrChar == '\'' ) + { + state = SCE_NSIS_STRINGRQ; + bVarInString = false; + } + if( cCurrChar == '#' || cCurrChar == ';' ) + state = SCE_NSIS_COMMENT; + + styler.ColourTo( i, state); + } + break; + } + + if( state == SCE_NSIS_COMMENT ) + { + styler.ColourTo(i,state); + } + else if( state == SCE_NSIS_STRINGDQ || state == SCE_NSIS_STRINGLQ || state == SCE_NSIS_STRINGRQ ) + { + // Check for var in String.. + if( bVarInString && (iswordchar(cCurrChar) || cCurrChar == '}') ) // || cCurrChar == '{' ) ) + { + int nWordState = classifyWordNsis( styler.GetStartSegment(), i, keywordLists, styler); + if( nWordState == SCE_NSIS_VARIABLE ) + { + styler.ColourTo( i, SCE_NSIS_STRINGVAR); + bVarInString = false; + } + } + if( cCurrChar == '$' ) + { + styler.ColourTo( i-1, state); + bVarInString = true; + } + } + } +} + + +static void FoldNsisDoc(unsigned int startPos, int length, int, WordList *[], Accessor &styler) +{ + // No folding enabled, no reason to continue... + if( styler.GetPropertyInt("fold") == 0 ) + return; + + unsigned int endPos = startPos + length; + int lineCurrent = styler.GetLine(startPos); + int levelCurrent = SC_FOLDLEVELBASE; + if (lineCurrent > 0) + levelCurrent = styler.LevelAt(lineCurrent-1) >> 16; + int levelNext = levelCurrent; + char chNext = styler[startPos]; + int styleNext = styler.StyleAt(startPos); + int style; + + for (unsigned int i = startPos; i < endPos; i++) + { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + style = styleNext; + styleNext = styler.StyleAt(i + 1); + bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); + // Functions Start: Function, Section, SubSection + // Functions End: FunctionEnd, SectionEnd, SubSectionEnd + // Label Start: !ifdef, !ifndef + // Label End: !endif + + if( style == SCE_NSIS_FUNCTION ) + { + if( styler.Match(i, "FunctionEnd") ) + levelNext--; + else if( styler.Match(i, "Function") ) + levelNext++; + } + else if( style == SCE_NSIS_SECTIONDEF ) + { + if( styler.Match(i, "SectionEnd") ) + levelNext--; + else if( styler.Match(i, "Section") ) + levelNext++; + } + else if( style == SCE_NSIS_SUBSECTIONDEF ) + { + if( styler.Match(i, "SubSectionEnd") ) + levelNext--; + else if( styler.Match(i, "SubSection") ) + levelNext++; + } + else if( style == SCE_NSIS_IFDEFINEDEF ) + { + if( styler.Match(i, "!endif") ) + levelNext--; + else if( styler.Match(i, "!ifdef") || styler.Match(i, "!ifndef")) + levelNext++; + } + else if( style == SCE_NSIS_MACRODEF ) + { + if( styler.Match(i, "!macroend") ) + levelNext--; + else if( styler.Match(i, "!macro") ) + levelNext++; + } + + if( atEOL ) + { + int levelUse = levelCurrent; + int lev = levelUse | levelNext << 16; + if (levelUse < levelNext) + lev |= SC_FOLDLEVELHEADERFLAG; + if (lev != styler.LevelAt(lineCurrent)) + { + styler.SetLevel(lineCurrent, lev); + } + lineCurrent++; + levelCurrent = levelNext; + } + } + + int levelUse = levelCurrent; + int lev = levelUse | levelNext << 16; + if (levelUse < levelNext) + lev |= SC_FOLDLEVELHEADERFLAG; + if (lev != styler.LevelAt(lineCurrent)) + { + styler.SetLevel(lineCurrent, lev); + } +} + +static const char * const nsisWordLists[] = { + "Functions", + "Variables", + "Lables", + "UserDefined", + 0, }; + + +LexerModule lmNsis(SCLEX_NSIS, ColouriseNsisDoc, "nsis", FoldNsisDoc, nsisWordLists); diff --git a/contrib/src/stc/scintilla/src/LexOthers.cxx b/contrib/src/stc/scintilla/src/LexOthers.cxx index babb3a0d37..31ac415ad4 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); @@ -256,6 +268,59 @@ static void ColourisePropsDoc(unsigned int startPos, int length, int, WordList * } } +// adaption by ksc, using the "} else {" trick of 1.53 +// 030721 +static void FoldPropsDoc(unsigned int startPos, int length, int, WordList *[], Accessor &styler) { + bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0; + + unsigned int endPos = startPos + length; + int visibleChars = 0; + int lineCurrent = styler.GetLine(startPos); + + char chNext = styler[startPos]; + int styleNext = styler.StyleAt(startPos); + bool headerPoint = false; + + for (unsigned int i = startPos; i < endPos; i++) { + char ch = chNext; + chNext = styler[i+1]; + + int style = styleNext; + styleNext = styler.StyleAt(i + 1); + bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); + + if (style==2) { + headerPoint = true; + } + + if (atEOL) { + int lev = SC_FOLDLEVELBASE+1; + if (headerPoint) + lev = SC_FOLDLEVELBASE; + + if (visibleChars == 0 && foldCompact) + lev |= SC_FOLDLEVELWHITEFLAG; + + if (headerPoint) + lev |= SC_FOLDLEVELHEADERFLAG; + + if (lev != styler.LevelAt(lineCurrent)) { + styler.SetLevel(lineCurrent, lev); + } + + lineCurrent++; + visibleChars = 0; + headerPoint=false; + } + if (!isspacechar(ch)) + visibleChars++; + } + + int lev = headerPoint ? SC_FOLDLEVELBASE : SC_FOLDLEVELBASE+1; + int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK; + styler.SetLevel(lineCurrent, lev | flagsNext); +} + static void ColouriseMakeLine( char *lineBuffer, unsigned int lengthLine, @@ -264,7 +329,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 +356,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 +404,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 +431,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 +455,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 +543,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 +667,32 @@ 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 +}; + +static void ColouriseNullDoc(unsigned int startPos, int length, int, WordList *[], + Accessor &styler) { + // Null language means all style bytes are 0 so just mark the end - no need to fill in. + if (length > 0) { + styler.StartAt(startPos + length - 1); + styler.StartSegment(startPos + length - 1); + styler.ColourTo(startPos + length - 1, 0); + } +} + +LexerModule lmBatch(SCLEX_BATCH, ColouriseBatchDoc, "batch", 0, batchWordListDesc); +LexerModule lmDiff(SCLEX_DIFF, ColouriseDiffDoc, "diff", 0, emptyWordListDesc); +LexerModule lmProps(SCLEX_PROPERTIES, ColourisePropsDoc, "props", FoldPropsDoc, 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); +LexerModule lmNull(SCLEX_NULL, ColouriseNullDoc, "null"); diff --git a/contrib/src/stc/scintilla/src/LexPOV.cxx b/contrib/src/stc/scintilla/src/LexPOV.cxx new file mode 100644 index 0000000000..33ba6a490f --- /dev/null +++ b/contrib/src/stc/scintilla/src/LexPOV.cxx @@ -0,0 +1,305 @@ +// Scintilla source code edit control +/** @file LexPOV.cxx + ** Lexer for POV-Ray SDL (Persistance of Vision Raytracer, Scene Description Language). + ** Written by Philippe Lhoste but this is mostly a derivative of LexCPP... + **/ +// Copyright 1998-2003 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +// Some points that distinguish from a simple C lexer: +// Identifiers start only by a character. +// No line continuation character. +// Strings are limited to 256 characters. +// Directives are similar to preprocessor commands, +// but we match directive keywords and colorize incorrect ones. +// Block comments can be nested (code stolen from my code in LexLua). + +#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 == '_'); +} + +inline bool IsAWordStart(const int ch) { + return ch < 0x80 && isalpha(ch); +} + +static void ColourisePovDoc( + unsigned int startPos, + int length, + int initStyle, + WordList *keywordlists[], + Accessor &styler) { + + WordList &keywords1 = *keywordlists[0]; + WordList &keywords2 = *keywordlists[1]; + WordList &keywords3 = *keywordlists[2]; + WordList &keywords4 = *keywordlists[3]; + WordList &keywords5 = *keywordlists[4]; + WordList &keywords6 = *keywordlists[5]; + WordList &keywords7 = *keywordlists[6]; + WordList &keywords8 = *keywordlists[7]; + + int currentLine = styler.GetLine(startPos); + // Initialize the block comment /* */ nesting level, if we are inside such a comment. + int blockCommentLevel = 0; + if (initStyle == SCE_POV_COMMENT) { + blockCommentLevel = styler.GetLineState(currentLine - 1); + } + + // Do not leak onto next line + if (initStyle == SCE_POV_STRINGEOL) { + initStyle = SCE_POV_DEFAULT; + } + + StyleContext sc(startPos, length, initStyle, styler); + short stringLen = 0; + + 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); + if (sc.state == SCE_POV_COMMENT) { + // Inside a block comment, we set the line state + styler.SetLineState(currentLine, blockCommentLevel); + } else { + // Reset the line state + styler.SetLineState(currentLine, 0); + } + } + + if (sc.atLineStart && (sc.state == SCE_POV_STRING)) { + // Prevent SCE_POV_STRINGEOL from leaking back to previous line + sc.SetState(SCE_POV_STRING); + } + + // Determine if the current state should terminate. + if (sc.state == SCE_POV_OPERATOR) { + sc.SetState(SCE_POV_DEFAULT); + } else if (sc.state == SCE_POV_NUMBER) { + // We stop the number definition on non-numerical non-dot non-eE non-sign char + if (!(isdigit(sc.ch) || sc.ch == '.' || + toupper(sc.ch) == 'E' || sc.ch == '-' || sc.ch == '+')) { + // Not exactly following number definition (several dots are seen as OK, etc.) + // but probably enough in most cases. + sc.SetState(SCE_POV_DEFAULT); + } + } else if (sc.state == SCE_POV_IDENTIFIER) { + if (!IsAWordChar(sc.ch)) { + char s[100]; + sc.GetCurrent(s, sizeof(s)); + if (keywords2.InList(s)) { + sc.ChangeState(SCE_POV_WORD2); + } else if (keywords3.InList(s)) { + sc.ChangeState(SCE_POV_WORD3); + } else if (keywords4.InList(s)) { + sc.ChangeState(SCE_POV_WORD4); + } else if (keywords5.InList(s)) { + sc.ChangeState(SCE_POV_WORD5); + } else if (keywords6.InList(s)) { + sc.ChangeState(SCE_POV_WORD6); + } else if (keywords7.InList(s)) { + sc.ChangeState(SCE_POV_WORD7); + } else if (keywords8.InList(s)) { + sc.ChangeState(SCE_POV_WORD8); + } + sc.SetState(SCE_POV_DEFAULT); + } + } else if (sc.state == SCE_POV_DIRECTIVE) { + if (!IsAWordChar(sc.ch)) { + char s[100], *p; + sc.GetCurrent(s, sizeof(s)); + p = s; + // Skip # and whitespace between # and directive word + do { + p++; + } while ((*p == ' ' || *p == '\t') && *p != '\0'); + if (!keywords1.InList(p)) { + sc.ChangeState(SCE_POV_BADDIRECTIVE); + } + sc.SetState(SCE_POV_DEFAULT); + } + } else if (sc.state == SCE_POV_COMMENT) { + if (sc.Match('/', '*')) { + blockCommentLevel++; + sc.Forward(); + } else if (sc.Match('*', '/') && blockCommentLevel > 0) { + blockCommentLevel--; + sc.Forward(); + if (blockCommentLevel == 0) { + 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 == '\\') { + stringLen++; + if (strchr("abfnrtuv0'\"", sc.chNext)) { + // Compound characters are counted as one. + // Note: for Unicode chars \u, we shouldn't count the next 4 digits... + sc.Forward(); + } + } else if (sc.ch == '\"') { + sc.ForwardSetState(SCE_POV_DEFAULT); + } else if (sc.atLineEnd) { + sc.ChangeState(SCE_POV_STRINGEOL); + sc.ForwardSetState(SCE_POV_DEFAULT); + } else { + stringLen++; + } + if (stringLen > 256) { + // Strings are limited to 256 chars + sc.SetState(SCE_POV_STRINGEOL); + } + } else if (sc.state == SCE_POV_STRINGEOL) { + if (sc.ch == '\\') { + if (sc.chNext == '\"' || sc.chNext == '\\') { + sc.Forward(); + } + } else if (sc.ch == '\"') { + sc.ForwardSetState(SCE_C_DEFAULT); + } else if (sc.atLineEnd) { + 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.SetState(SCE_POV_IDENTIFIER); + } else if (sc.Match('/', '*')) { + blockCommentLevel = 1; + 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); + stringLen = 0; + } else if (sc.ch == '#') { + sc.SetState(SCE_POV_DIRECTIVE); + // Skip whitespace between # and directive word + do { + sc.Forward(); + } while ((sc.ch == ' ' || sc.ch == '\t') && sc.More()); + if (sc.atLineEnd) { + sc.SetState(SCE_POV_DEFAULT); + } + } else if (isoperator(static_cast(sc.ch))) { + sc.SetState(SCE_POV_OPERATOR); + } + } + } + sc.Complete(); +} + +static void FoldPovDoc( + unsigned int startPos, + int length, + int initStyle, + WordList *[], + Accessor &styler) { + + bool foldComment = styler.GetPropertyInt("fold.comment") != 0; + bool foldDirective = styler.GetPropertyInt("fold.directive") != 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 && (style == SCE_POV_COMMENT)) { + if (stylePrev != SCE_POV_COMMENT) { + levelCurrent++; + } else if ((styleNext != SCE_POV_COMMENT) && !atEOL) { + // Comments don't end at end of line and the next character may be unstyled. + levelCurrent--; + } + } + if (foldComment && (style == SCE_POV_COMMENTLINE)) { + if ((ch == '/') && (chNext == '/')) { + char chNext2 = styler.SafeGetCharAt(i + 2); + if (chNext2 == '{') { + levelCurrent++; + } else if (chNext2 == '}') { + levelCurrent--; + } + } + } + if (foldDirective && (style == SCE_POV_DIRECTIVE)) { + if (ch == '#') { + unsigned int j=i+1; + while ((j 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 povWordLists[] = { + "Language directives", + "Objects & CSG & Appearance", + "Types & Modifiers & Items", + "Predefined Identifiers", + "Predefined Functions", + "User defined 1", + "User defined 2", + "User defined 3", + 0, +}; + +LexerModule lmPOV(SCLEX_POV, ColourisePovDoc, "pov", FoldPovDoc, povWordLists); diff --git a/contrib/src/stc/scintilla/src/LexPS.cxx b/contrib/src/stc/scintilla/src/LexPS.cxx new file mode 100644 index 0000000000..a44f3cefcc --- /dev/null +++ b/contrib/src/stc/scintilla/src/LexPS.cxx @@ -0,0 +1,344 @@ +// Scintilla source code edit control +/** @file LexPS.cxx + ** Lexer for PostScript + ** + ** Written by Nigel Hathaway . + ** The License.txt file describes the conditions under which this software may be distributed. + **/ + +#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 inline bool IsASelfDelimitingChar(const int ch) { + return (ch == '[' || ch == ']' || ch == '{' || ch == '}' || + ch == '/' || ch == '<' || ch == '>' || + ch == '(' || ch == ')' || ch == '%'); +} + +static inline bool IsAWhitespaceChar(const int ch) { + return (ch == ' ' || ch == '\t' || ch == '\r' || + ch == '\n' || ch == '\f' || ch == '\0'); +} + +static bool IsABaseNDigit(const int ch, const int base) { + int maxdig = '9'; + int letterext = -1; + + if (base <= 10) + maxdig = '0' + base - 1; + else + letterext = base - 11; + + return ((ch >= '0' && ch <= maxdig) || + (ch >= 'A' && ch <= ('A' + letterext)) || + (ch >= 'a' && ch <= ('a' + letterext))); +} + +static inline bool IsABase85Char(const int ch) { + return ((ch >= '!' && ch <= 'u') || ch == 'z'); +} + +static void ColourisePSDoc( + unsigned int startPos, + int length, + int initStyle, + WordList *keywordlists[], + Accessor &styler) { + + WordList &keywords1 = *keywordlists[0]; + WordList &keywords2 = *keywordlists[1]; + WordList &keywords3 = *keywordlists[2]; + WordList &keywords4 = *keywordlists[3]; + WordList &keywords5 = *keywordlists[4]; + + StyleContext sc(startPos, length, initStyle, styler); + + bool tokenizing = styler.GetPropertyInt("ps.tokenize") != 0; + int pslevel = styler.GetPropertyInt("ps.level", 3); + int lineCurrent = styler.GetLine(startPos); + int nestTextCurrent = 0; + if (lineCurrent > 0 && initStyle == SCE_PS_TEXT) + nestTextCurrent = styler.GetLineState(lineCurrent - 1); + int numRadix = 0; + bool numHasPoint = false; + bool numHasExponent = false; + bool numHasSign = false; + + // Clear out existing tokenization + if (tokenizing && length > 0) { + styler.StartAt(startPos, static_cast(INDIC2_MASK)); + styler.ColourTo(startPos + length-1, 0); + styler.Flush(); + styler.StartAt(startPos); + styler.StartSegment(startPos); + } + + for (; sc.More(); sc.Forward()) { + if (sc.atLineStart) + lineCurrent = styler.GetLine(sc.currentPos); + + // Determine if the current state should terminate. + if (sc.state == SCE_PS_COMMENT || sc.state == SCE_PS_DSC_VALUE) { + if (sc.atLineEnd) { + sc.SetState(SCE_C_DEFAULT); + } + } else if (sc.state == SCE_PS_DSC_COMMENT) { + if (sc.ch == ':') { + sc.Forward(); + if (!sc.atLineEnd) + sc.SetState(SCE_PS_DSC_VALUE); + else + sc.SetState(SCE_C_DEFAULT); + } else if (sc.atLineEnd) { + sc.SetState(SCE_C_DEFAULT); + } else if (IsAWhitespaceChar(sc.ch)) { + sc.ChangeState(SCE_PS_COMMENT); + } + } else if (sc.state == SCE_PS_NUMBER) { + if (IsASelfDelimitingChar(sc.ch) || IsAWhitespaceChar(sc.ch)) { + if ((sc.chPrev == '+' || sc.chPrev == '-' || + sc.chPrev == 'E' || sc.chPrev == 'e') && numRadix == 0) + sc.ChangeState(SCE_PS_NAME); + sc.SetState(SCE_C_DEFAULT); + } else if (sc.ch == '#') { + if (numHasPoint || numHasExponent || numHasSign || numRadix != 0) { + sc.ChangeState(SCE_PS_NAME); + } else { + char szradix[5]; + sc.GetCurrent(szradix, 4); + numRadix = atoi(szradix); + if (numRadix < 2 || numRadix > 36) + sc.ChangeState(SCE_PS_NAME); + } + } else if ((sc.ch == 'E' || sc.ch == 'e') && numRadix == 0) { + if (numHasExponent) { + sc.ChangeState(SCE_PS_NAME); + } else { + numHasExponent = true; + if (sc.chNext == '+' || sc.chNext == '-') + sc.Forward(); + } + } else if (sc.ch == '.') { + if (numHasPoint || numHasExponent || numRadix != 0) { + sc.ChangeState(SCE_PS_NAME); + } else { + numHasPoint = true; + } + } else if (numRadix == 0) { + if (!IsABaseNDigit(sc.ch, 10)) + sc.ChangeState(SCE_PS_NAME); + } else { + if (!IsABaseNDigit(sc.ch, numRadix)) + sc.ChangeState(SCE_PS_NAME); + } + } else if (sc.state == SCE_PS_NAME || sc.state == SCE_PS_KEYWORD) { + if (IsASelfDelimitingChar(sc.ch) || IsAWhitespaceChar(sc.ch)) { + char s[100]; + sc.GetCurrent(s, sizeof(s)); + if ((pslevel >= 1 && keywords1.InList(s)) || + (pslevel >= 2 && keywords2.InList(s)) || + (pslevel >= 3 && keywords3.InList(s)) || + keywords4.InList(s) || keywords5.InList(s)) { + sc.ChangeState(SCE_PS_KEYWORD); + } + sc.SetState(SCE_C_DEFAULT); + } + } else if (sc.state == SCE_PS_LITERAL || sc.state == SCE_PS_IMMEVAL) { + if (IsASelfDelimitingChar(sc.ch) || IsAWhitespaceChar(sc.ch)) + sc.SetState(SCE_C_DEFAULT); + } else if (sc.state == SCE_PS_PAREN_ARRAY || sc.state == SCE_PS_PAREN_DICT || + sc.state == SCE_PS_PAREN_PROC) { + sc.SetState(SCE_C_DEFAULT); + } else if (sc.state == SCE_PS_TEXT) { + if (sc.ch == '(') { + nestTextCurrent++; + } else if (sc.ch == ')') { + if (--nestTextCurrent == 0) + sc.ForwardSetState(SCE_PS_DEFAULT); + } else if (sc.ch == '\\') { + sc.Forward(); + } + } else if (sc.state == SCE_PS_HEXSTRING) { + if (sc.ch == '>') { + sc.ForwardSetState(SCE_PS_DEFAULT); + } else if (!IsABaseNDigit(sc.ch, 16) && !IsAWhitespaceChar(sc.ch)) { + sc.SetState(SCE_PS_HEXSTRING); + styler.ColourTo(sc.currentPos, SCE_PS_BADSTRINGCHAR); + } + } else if (sc.state == SCE_PS_BASE85STRING) { + if (sc.Match('~', '>')) { + sc.Forward(); + sc.ForwardSetState(SCE_PS_DEFAULT); + } else if (!IsABase85Char(sc.ch) && !IsAWhitespaceChar(sc.ch)) { + sc.SetState(SCE_PS_BASE85STRING); + styler.ColourTo(sc.currentPos, SCE_PS_BADSTRINGCHAR); + } + } + + // Determine if a new state should be entered. + if (sc.state == SCE_C_DEFAULT) { + unsigned int tokenpos = sc.currentPos; + + if (sc.ch == '[' || sc.ch == ']') { + sc.SetState(SCE_PS_PAREN_ARRAY); + } else if (sc.ch == '{' || sc.ch == '}') { + sc.SetState(SCE_PS_PAREN_PROC); + } else if (sc.ch == '/') { + if (sc.chNext == '/') { + sc.SetState(SCE_PS_IMMEVAL); + sc.Forward(); + } else { + sc.SetState(SCE_PS_LITERAL); + } + } else if (sc.ch == '<') { + if (sc.chNext == '<') { + sc.SetState(SCE_PS_PAREN_DICT); + sc.Forward(); + } else if (sc.chNext == '~') { + sc.SetState(SCE_PS_BASE85STRING); + sc.Forward(); + } else { + sc.SetState(SCE_PS_HEXSTRING); + } + } else if (sc.ch == '>' && sc.chNext == '>') { + sc.SetState(SCE_PS_PAREN_DICT); + sc.Forward(); + } else if (sc.ch == '>' || sc.ch == ')') { + sc.SetState(SCE_C_DEFAULT); + styler.ColourTo(sc.currentPos, SCE_PS_BADSTRINGCHAR); + } else if (sc.ch == '(') { + sc.SetState(SCE_PS_TEXT); + nestTextCurrent = 1; + } else if (sc.ch == '%') { + if (sc.chNext == '%' && sc.atLineStart) { + sc.SetState(SCE_PS_DSC_COMMENT); + sc.Forward(); + if (sc.chNext == '+') { + sc.Forward(); + sc.ForwardSetState(SCE_PS_DSC_VALUE); + } + } else { + sc.SetState(SCE_PS_COMMENT); + } + } else if ((sc.ch == '+' || sc.ch == '-' || sc.ch == '.') && + IsABaseNDigit(sc.chNext, 10)) { + sc.SetState(SCE_PS_NUMBER); + numRadix = 0; + numHasPoint = (sc.ch == '.'); + numHasExponent = false; + numHasSign = (sc.ch == '+' || sc.ch == '-'); + } else if ((sc.ch == '+' || sc.ch == '-') && sc.chNext == '.' && + IsABaseNDigit(sc.GetRelative(2), 10)) { + sc.SetState(SCE_PS_NUMBER); + numRadix = 0; + numHasPoint = false; + numHasExponent = false; + numHasSign = true; + } else if (IsABaseNDigit(sc.ch, 10)) { + sc.SetState(SCE_PS_NUMBER); + numRadix = 0; + numHasPoint = false; + numHasExponent = false; + numHasSign = false; + } else if (!IsAWhitespaceChar(sc.ch)) { + sc.SetState(SCE_PS_NAME); + } + + // Mark the start of tokens + if (tokenizing && sc.state != SCE_C_DEFAULT && sc.state != SCE_PS_COMMENT && + sc.state != SCE_PS_DSC_COMMENT && sc.state != SCE_PS_DSC_VALUE) { + styler.Flush(); + styler.StartAt(tokenpos, static_cast(INDIC2_MASK)); + styler.ColourTo(tokenpos, INDIC2_MASK); + styler.Flush(); + styler.StartAt(tokenpos); + styler.StartSegment(tokenpos); + } + } + + if (sc.atLineEnd) + styler.SetLineState(lineCurrent, nestTextCurrent); + } + + sc.Complete(); +} + +static void FoldPSDoc(unsigned int startPos, int length, int, WordList *[], + Accessor &styler) { + bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0; + bool foldAtElse = styler.GetPropertyInt("fold.at.else", 0) != 0; + unsigned int endPos = startPos + length; + int visibleChars = 0; + int lineCurrent = styler.GetLine(startPos); + int levelCurrent = SC_FOLDLEVELBASE; + if (lineCurrent > 0) + levelCurrent = styler.LevelAt(lineCurrent-1) >> 16; + int levelMinCurrent = levelCurrent; + int levelNext = levelCurrent; + char chNext = styler[startPos]; + int styleNext = styler.StyleAt(startPos); + int style; + for (unsigned int i = startPos; i < endPos; i++) { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + style = styleNext; + styleNext = styler.StyleAt(i + 1); + bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); //mac?? + if ((style & 31) == SCE_PS_PAREN_PROC) { + if (ch == '{') { + // Measure the minimum before a '{' to allow + // folding on "} {" + if (levelMinCurrent > levelNext) { + levelMinCurrent = levelNext; + } + levelNext++; + } else if (ch == '}') { + levelNext--; + } + } + if (atEOL) { + int levelUse = levelCurrent; + if (foldAtElse) { + levelUse = levelMinCurrent; + } + int lev = levelUse | levelNext << 16; + if (visibleChars == 0 && foldCompact) + lev |= SC_FOLDLEVELWHITEFLAG; + if (levelUse < levelNext) + lev |= SC_FOLDLEVELHEADERFLAG; + if (lev != styler.LevelAt(lineCurrent)) { + styler.SetLevel(lineCurrent, lev); + } + lineCurrent++; + levelCurrent = levelNext; + levelMinCurrent = levelCurrent; + visibleChars = 0; + } + if (!isspacechar(ch)) + visibleChars++; + } +} + +static const char * const psWordListDesc[] = { + "PS Level 1 operators", + "PS Level 2 operators", + "PS Level 3 operators", + "RIP-specific operators", + "User-defined operators", + 0 +}; + +LexerModule lmPS(SCLEX_PS, ColourisePSDoc, "ps", FoldPSDoc, psWordListDesc); diff --git a/contrib/src/stc/scintilla/src/LexPascal.cxx b/contrib/src/stc/scintilla/src/LexPascal.cxx index 37e5e995fb..434f88d4fe 100644 --- a/contrib/src/stc/scintilla/src/LexPascal.cxx +++ b/contrib/src/stc/scintilla/src/LexPascal.cxx @@ -3,6 +3,7 @@ ** Lexer for Pascal. ** Written by Laurent le Tynevez ** Updated by Simon Steele September 2002 + ** Updated by Mathias Rauen May 2003 (Delphi adjustments) **/ #include @@ -34,45 +35,58 @@ 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; } -static inline bool IsAWordChar(const int ch) { - return (ch < 0x80) && (isalnum(ch) || ch == '.' || ch == '_'); +static void ColourTo(Accessor &styler, unsigned int end, unsigned int attr, bool bInAsm) { + if ((bInAsm) && (attr == SCE_C_OPERATOR || attr == SCE_C_NUMBER || attr == SCE_C_DEFAULT || attr == SCE_C_WORD || attr == SCE_C_IDENTIFIER)) { + styler.ColourTo(end, SCE_C_REGEX); + } else + styler.ColourTo(end, attr); } -// returns 1 if the item starts a class definition, and -1 if the word is "end". -static int classifyWordPascal(unsigned int start, unsigned int end, /*WordList &keywords*/WordList *keywordlists[], Accessor &styler, bool bInClass) { +// returns 1 if the item starts a class definition, and -1 if the word is "end", and 2 if the word is "asm" +static int classifyWordPascal(unsigned int start, unsigned int end, /*WordList &keywords*/WordList *keywordlists[], Accessor &styler, bool bInClass, bool bInAsm) { int ret = 0; WordList& keywords = *keywordlists[0]; WordList& classwords = *keywordlists[1]; - + char s[100]; getRange(start, end, styler, s, sizeof(s)); char chAttr = SCE_C_IDENTIFIER; - if (isdigit(s[0]) || (s[0] == '.')) { + if (isdigit(s[0]) || (s[0] == '.') ||(s[0] == '$')) { chAttr = SCE_C_NUMBER; } else { - if (keywords.InList(s)) { - chAttr = SCE_C_WORD; - - if(strcmp(s, "class") == 0) - ret = 1; - else if(strcmp(s, "end") == 0) - ret = -1; - } else if (bInClass) { - if (classwords.InList(s)) { + if (s[0] == '#') { + chAttr = SCE_C_CHARACTER; + } + else { + if (keywords.InList(s)) { chAttr = SCE_C_WORD; + + if(strcmp(s, "class") == 0) { + ret = 1; + } + else if (strcmp(s, "asm") == 0) { + ret = 2; + } + else if (strcmp(s, "end") == 0) { + ret = -1; + } + } else if (bInClass) { + if (classwords.InList(s)) { + chAttr = SCE_C_WORD; + } } } } - styler.ColourTo(end, chAttr); + ColourTo(styler, end, chAttr, (bInAsm && ret != -1)); return ret; } @@ -99,14 +113,14 @@ static void ColourisePascalDoc(unsigned int startPos, int length, int initStyle, styler.StartAt(startPos); int state = initStyle; - if (state == SCE_C_STRINGEOL) // Does not leak onto next line + if (state == SCE_C_CHARACTER) // Does not leak onto next line state = SCE_C_DEFAULT; char chPrev = ' '; char chNext = styler[startPos]; unsigned int lengthDoc = startPos + length; - int visibleChars = 0; bool bInClassDefinition; + int currentLine = styler.GetLine(startPos); if (currentLine > 0) { styler.SetLineState(currentLine, styler.GetLineState(currentLine-1)); @@ -116,26 +130,27 @@ static void ColourisePascalDoc(unsigned int startPos, int length, int initStyle, bInClassDefinition = false; } + bool bInAsm = (state == SCE_C_REGEX); + if (bInAsm) + state = SCE_C_DEFAULT; + 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')) { // 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_C_STRINGEOL) { - styler.ColourTo(i, state); + if (state == SCE_C_CHARACTER) { + ColourTo(styler, i, state, bInAsm); state = SCE_C_DEFAULT; } - visibleChars = 0; currentLine++; styler.SetLineState(currentLine, (bInClassDefinition ? 1 : 0)); } - if (!isspacechar(ch)) - visibleChars++; if (styler.IsLeadByte(ch)) { chNext = styler.SafeGetCharAt(i + 2); @@ -145,41 +160,50 @@ static void ColourisePascalDoc(unsigned int startPos, int length, int initStyle, } if (state == SCE_C_DEFAULT) { - if (iswordstart(ch) || (ch == '@')) { - styler.ColourTo(i-1, state); + if (iswordstart(ch) || ch == '#' || ch == '$' || (ch == '@' && bInAsm)) { + ColourTo(styler, i-1, state, bInAsm); state = SCE_C_IDENTIFIER; } else if (ch == '{' && chNext != '$' && chNext != '&') { - styler.ColourTo(i-1, state); + ColourTo(styler, i-1, state, bInAsm); state = SCE_C_COMMENT; } else if (ch == '(' && chNext == '*' && styler.SafeGetCharAt(i + 2) != '$' && styler.SafeGetCharAt(i + 2) != '&') { - styler.ColourTo(i-1, state); + ColourTo(styler, i-1, state, bInAsm); state = SCE_C_COMMENTDOC; } else if (ch == '/' && chNext == '/') { - styler.ColourTo(i-1, state); + ColourTo(styler, i-1, state, bInAsm); state = SCE_C_COMMENTLINE; } else if (ch == '\'') { - styler.ColourTo(i-1, state); + ColourTo(styler, i-1, state, bInAsm); state = SCE_C_CHARACTER; - } else if (ch == '{' && (chNext == '$' || chNext=='&') && visibleChars == 1) { - styler.ColourTo(i-1, state); + } else if (ch == '{' && (chNext == '$' || chNext=='&')) { + ColourTo(styler, i-1, state, bInAsm); state = SCE_C_PREPROCESSOR; } else if (isoperator(ch)) { - styler.ColourTo(i-1, state); - styler.ColourTo(i, SCE_C_OPERATOR); + ColourTo(styler, i-1, state, bInAsm); + ColourTo(styler, i, SCE_C_OPERATOR, bInAsm); } } else if (state == SCE_C_IDENTIFIER) { - if (!iswordchar(ch)) { - int lStateChange = classifyWordPascal(styler.GetStartSegment(), i - 1, keywordlists, styler, bInClassDefinition); + bool bDoublePoint = ((ch == '.') && (chPrev == '.')); + if ((!iswordchar(ch) && ch != '$' && ch != '#' && (ch != '@' || !bInAsm)) || bDoublePoint) { + if (bDoublePoint) i--; + int lStateChange = classifyWordPascal(styler.GetStartSegment(), i - 1, keywordlists, styler, bInClassDefinition, bInAsm); if(lStateChange == 1) { styler.SetLineState(currentLine, 1); bInClassDefinition = true; + } else if(lStateChange == 2) { + bInAsm = true; } else if(lStateChange == -1) { styler.SetLineState(currentLine, 0); bInClassDefinition = false; + bInAsm = false; + } + if (bDoublePoint) { + i++; + ColourTo(styler, i-1, SCE_C_DEFAULT, bInAsm); } state = SCE_C_DEFAULT; @@ -189,30 +213,30 @@ static void ColourisePascalDoc(unsigned int startPos, int length, int initStyle, } else if (ch == '(' && chNext == '*' && styler.SafeGetCharAt(i + 2) != '$' && styler.SafeGetCharAt(i + 2) != '&') { - styler.ColourTo(i-1, state); + ColourTo(styler, i-1, state, bInAsm); state = SCE_C_COMMENTDOC; } else if (ch == '/' && chNext == '/') { state = SCE_C_COMMENTLINE; } else if (ch == '\'') { state = SCE_C_CHARACTER; } else if (isoperator(ch)) { - styler.ColourTo(i, SCE_C_OPERATOR); + ColourTo(styler, i, SCE_C_OPERATOR, bInAsm); } } } else { if (state == SCE_C_PREPROCESSOR) { if (ch=='}'){ - styler.ColourTo(i, state); + ColourTo(styler, i, state, bInAsm); state = SCE_C_DEFAULT; } else { if ((ch == '\r' || ch == '\n') && !(chPrev == '\\' || chPrev == '\r')) { - styler.ColourTo(i-1, state); + ColourTo(styler, i-1, state, bInAsm); state = SCE_C_DEFAULT; } } } else if (state == SCE_C_COMMENT) { if (ch == '}' ) { - styler.ColourTo(i, state); + ColourTo(styler, i, state, bInAsm); state = SCE_C_DEFAULT; } } else if (state == SCE_C_COMMENTDOC) { @@ -220,28 +244,25 @@ static void ColourisePascalDoc(unsigned int startPos, int length, int initStyle, if (((i > styler.GetStartSegment() + 2) || ( (initStyle == SCE_C_COMMENTDOC) && (styler.GetStartSegment() == static_cast(startPos))))) { - styler.ColourTo(i, state); + ColourTo(styler, i, state, bInAsm); state = SCE_C_DEFAULT; } } } else if (state == SCE_C_COMMENTLINE) { if (ch == '\r' || ch == '\n') { - styler.ColourTo(i-1, state); + ColourTo(styler, i-1, state, bInAsm); state = SCE_C_DEFAULT; } } else if (state == SCE_C_CHARACTER) { - if ((ch == '\r' || ch == '\n')) { - styler.ColourTo(i-1, SCE_C_STRINGEOL); - state = SCE_C_STRINGEOL; - } else if (ch == '\'') { - styler.ColourTo(i, state); + if (ch == '\'') { + ColourTo(styler, i, state, bInAsm); state = SCE_C_DEFAULT; } } } chPrev = ch; } - styler.ColourTo(lengthDoc - 1, state); + ColourTo(styler, lengthDoc - 1, state, bInAsm); } static void FoldPascalDoc(unsigned int startPos, int length, int initStyle, WordList *[], @@ -329,7 +350,7 @@ static void FoldPascalDoc(unsigned int startPos, int length, int initStyle, Word levelPrev = levelCurrent; visibleChars = 0; } - + if (!isspacechar(ch)) visibleChars++; } @@ -339,4 +360,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..3f65b12097 100644 --- a/contrib/src/stc/scintilla/src/LexSQL.cxx +++ b/contrib/src/stc/scintilla/src/LexSQL.cxx @@ -23,7 +23,7 @@ static void classifyWordSQL(unsigned int start, unsigned int end, WordList &keyw char s[100]; bool wordIsNumber = isdigit(styler[start]) || (styler[start] == '.'); for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) { - s[i] = static_cast(toupper(styler[start + i])); + s[i] = static_cast(tolower(styler[start + i])); s[i + 1] = '\0'; } char chAttr = SCE_C_IDENTIFIER; @@ -88,7 +88,7 @@ static void ColouriseSQLDoc(unsigned int startPos, int length, } else if (ch == '-' && chNext == '-') { styler.ColourTo(i - 1, state); state = SCE_C_COMMENTLINE; - } else if (ch == '\'') { + } else if ((ch == '\'') || (ch == '"')) { styler.ColourTo(i - 1, state); state = SCE_C_STRING; } else if (isoperator(ch)) { @@ -103,7 +103,7 @@ static void ColouriseSQLDoc(unsigned int startPos, int length, state = SCE_C_COMMENT; } else if (ch == '-' && chNext == '-') { state = SCE_C_COMMENTLINE; - } else if (ch == '\'') { + } else if ((ch == '\'') || (ch == '"')) { state = SCE_C_STRING; } else if (isoperator(ch)) { styler.ColourTo(i, SCE_C_OPERATOR); @@ -134,6 +134,16 @@ static void ColouriseSQLDoc(unsigned int startPos, int length, } ch = chNext; chNext = styler.SafeGetCharAt(i + 1); + } else if (ch == '"') { + if (chNext == '"') { + i++; + } else { + styler.ColourTo(i, state); + state = SCE_C_DEFAULT; + i++; + } + ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); } } if (state == SCE_C_DEFAULT) { // One of the above succeeded @@ -141,7 +151,7 @@ static void ColouriseSQLDoc(unsigned int startPos, int length, state = SCE_C_COMMENT; } else if (ch == '-' && chNext == '-') { state = SCE_C_COMMENTLINE; - } else if (ch == '\'') { + } else if ((ch == '\'') || (ch == '"')) { state = SCE_C_STRING; } else if (iswordstart(ch)) { state = SCE_C_WORD; @@ -155,4 +165,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/LexScriptol.cxx b/contrib/src/stc/scintilla/src/LexScriptol.cxx new file mode 100644 index 0000000000..fda10e316c --- /dev/null +++ b/contrib/src/stc/scintilla/src/LexScriptol.cxx @@ -0,0 +1,427 @@ +// Scintilla source code edit control +/** @file LexScriptol.cxx + ** Lexer for Scriptol. + **/ + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "PropSet.h" +#include "Accessor.h" +#include "KeyWords.h" +#include "Scintilla.h" +#include "SciLexer.h" + +static void ClassifyWordSol(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler, char *prevWord) +{ + char s[100]; + bool wordIsNumber = isdigit(styler[start]) != 0; + for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) + { + s[i] = styler[start + i]; + s[i + 1] = '\0'; + } + char chAttr = SCE_P_IDENTIFIER; + if (0 == strcmp(prevWord, "class")) chAttr = SCE_P_CLASSNAME; + else if (wordIsNumber) chAttr = SCE_P_NUMBER; + else if (keywords.InList(s)) chAttr = SCE_P_WORD; + else for (unsigned int i = 0; i < end - start + 1; i++) // test dotted idents + { + if (styler[start + i] == '.') + { + styler.ColourTo(start + i - 1, chAttr); + styler.ColourTo(start + i, SCE_P_OPERATOR); + } + } + styler.ColourTo(end, chAttr); + strcpy(prevWord, s); +} + +static bool IsSolComment(Accessor &styler, int pos, int len) +{ +// return len > 0 && styler[pos]=='`'; + char c; + if(len > 0) + { + c = styler[pos]; + if(c == '`') return true; + if(len > 1) + { + if(c == '/') + { + c = styler[pos + 1]; + if(c == '/') return true; + if(c == '*') return true; + } + } + } + return false; +} + +static bool IsSolStringStart(char ch, char /*chNext*/) +{ + if (ch == '\'' || ch == '"') return true; + //chNext = chNext; // for future use + + return false; +} + +static bool IsSolWordStart(char ch, char chNext) +{ + return (iswordchar(ch) && !IsSolStringStart(ch, chNext)); +} + +/* 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 GetSolStringState(Accessor &styler, int i, int *nextIndex) +{ + char ch = styler.SafeGetCharAt(i); + char chNext = styler.SafeGetCharAt(i + 1); + + if (ch != '"' && ch != '\'') { + *nextIndex = i + 1; + return SCE_P_DEFAULT; + } + + if (ch == chNext && ch == styler.SafeGetCharAt(i + 2)) + { + *nextIndex = i + 3; + if (ch == '"') return SCE_P_TRIPLEDOUBLE; + else return SCE_P_TRIPLE; + } + else + { + *nextIndex = i + 1; + if (ch == '"') return SCE_P_STRING; + else return SCE_P_CHARACTER; + } +} + +static void ColouriseSolDoc(unsigned int startPos, int length, int initStyle, + WordList *keywordlists[], Accessor &styler) + { + + int lengthDoc = startPos + length; + + // Backtrack to previous line in case need to fix its tab whinging + if (startPos > 0) + { + int lineCurrent = styler.GetLine(startPos); + if (lineCurrent > 0) + { + startPos = styler.LineStart(lineCurrent-1); + if (startPos == 0) initStyle = SCE_P_DEFAULT; + else initStyle = styler.StyleAt(startPos-1); + } + } + + styler.StartAt(startPos, 127); + + WordList &keywords = *keywordlists[0]; + + int whingeLevel = styler.GetPropertyInt("tab.timmy.whinge.level"); + char prevWord[200]; + prevWord[0] = '\0'; + if (length == 0) return ; + + int state = initStyle & 31; + + int nextIndex = 0; + char chPrev = ' '; + //char chPrev2 = ' '; + char chNext = styler[startPos]; + styler.StartSegment(startPos); + bool atStartLine = true; + int spaceFlags = 0; + for (int i = startPos; i < lengthDoc; i++) + { + + if (atStartLine) + { + char chBad = static_cast(64); + char chGood = static_cast(0); + char chFlags = chGood; + + if (whingeLevel == 1) + { + chFlags = (spaceFlags & wsInconsistent) ? chBad : chGood; + } + else if (whingeLevel == 2) + { + chFlags = (spaceFlags & wsSpaceTab) ? chBad : chGood; + } + else if (whingeLevel == 3) + { + chFlags = (spaceFlags & wsSpace) ? chBad : chGood; + } + else if (whingeLevel == 4) + { + chFlags = (spaceFlags & wsTab) ? chBad : chGood; + } + styler.SetFlags(chFlags, static_cast(state)); + atStartLine = false; + } + + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + + if ((ch == '\r' && chNext != '\n') || (ch == '\n') || (i == lengthDoc)) + { + if ((state == SCE_P_DEFAULT) || (state == SCE_P_TRIPLE) || (state == SCE_P_TRIPLEDOUBLE)) + { + styler.ColourTo(i, state); + } + atStartLine = true; + } + + if (styler.IsLeadByte(ch)) + { + chNext = styler.SafeGetCharAt(i + 2); + chPrev = ' '; + //chPrev2 = ' '; + i += 1; + continue; + } + + if (state == SCE_P_STRINGEOL) + { + if (ch != '\r' && ch != '\n') + { + styler.ColourTo(i - 1, state); + state = SCE_P_DEFAULT; + } + } + + if (state == SCE_P_DEFAULT) + { + if (IsSolWordStart(ch, chNext)) + { + styler.ColourTo(i - 1, state); + state = SCE_P_WORD; + } + else if (ch == '`') + { + styler.ColourTo(i - 1, state); + state = SCE_P_COMMENTLINE; + } + else if (ch == '/') + { + styler.ColourTo(i - 1, state); + if(chNext == '/') state = SCE_P_COMMENTLINE; + if(chNext == '*') state = SCE_P_COMMENTBLOCK; + } + + else if (ch == '=' && chNext == 'b') + { + // =begin indicates the start of a comment (doc) block + if(styler.SafeGetCharAt(i + 2) == 'e' && styler.SafeGetCharAt(i + 3) == 'g' && styler.SafeGetCharAt(i + 4) == 'i' && styler.SafeGetCharAt(i + 5) == 'n') + { + styler.ColourTo(i - 1, state); + state = SCE_P_TRIPLEDOUBLE; //SCE_C_COMMENT; + } + } + else if (IsSolStringStart(ch, chNext)) + { + styler.ColourTo(i - 1, state); + state = GetSolStringState(styler, i, &nextIndex); + if (nextIndex != i + 1) + { + i = nextIndex - 1; + ch = ' '; + //chPrev = ' '; + chNext = styler.SafeGetCharAt(i + 1); + } + } + else if (isoperator(ch)) + { + styler.ColourTo(i - 1, state); + styler.ColourTo(i, SCE_P_OPERATOR); + } + } + else if (state == SCE_P_WORD) + { + if (!iswordchar(ch)) + { + ClassifyWordSol(styler.GetStartSegment(), i - 1, keywords, styler, prevWord); + state = SCE_P_DEFAULT; + if (ch == '`') + { + state = chNext == '`' ? SCE_P_COMMENTBLOCK : SCE_P_COMMENTLINE; + } + else if (IsSolStringStart(ch, chNext)) + { + styler.ColourTo(i - 1, state); + state = GetSolStringState(styler, i, &nextIndex); + if (nextIndex != i + 1) + { + i = nextIndex - 1; + ch = ' '; + //chPrev = ' '; + chNext = styler.SafeGetCharAt(i + 1); + } + } + else if (isoperator(ch)) + { + styler.ColourTo(i, SCE_P_OPERATOR); + } + } + } + else + { + if (state == SCE_P_COMMENTLINE) + { + if (ch == '\r' || ch == '\n') + { + styler.ColourTo(i - 1, state); + state = SCE_P_DEFAULT; + } + } + else if(state == SCE_P_COMMENTBLOCK) + { + if(ch == '*' && chNext == '/') state = SCE_P_DEFAULT; + } + else if (state == SCE_P_STRING) + { + if ((ch == '\r' || ch == '\n') && (chPrev != '\\')) + { + styler.ColourTo(i - 1, state); + state = SCE_P_STRINGEOL; + } + else if (ch == '\\') + { + if (chNext == '\"' || chNext == '\'' || chNext == '\\') + { + i++; + ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + } + } + else if (ch == '\"') + { + styler.ColourTo(i, state); + state = SCE_P_DEFAULT; + } + } + else if (state == SCE_P_CHARACTER) + { + if ((ch == '\r' || ch == '\n') && (chPrev != '\\')) + { + styler.ColourTo(i - 1, state); + state = SCE_P_STRINGEOL; + } + else if (ch == '\\') + { + if (chNext == '\"' || chNext == '\'' || chNext == '\\') + { + i++; + ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + } + } + else if (ch == '\'') + { + styler.ColourTo(i, state); + state = SCE_P_DEFAULT; + } + } + /* + else if (state == SCE_P_TRIPLE) + { + if (ch == '\'' && chPrev == '\'' && chPrev2 == '\'') + { + styler.ColourTo(i, state); + state = SCE_P_DEFAULT; + } + } + else if (state == SCE_P_TRIPLEDOUBLE) + { + // =end terminates the comment block + if (ch == 'd' && chPrev == 'n' && chPrev2 == 'e') + { + if (styler.SafeGetCharAt(i - 3) == '=') + { + styler.ColourTo(i, state); + state = SCE_P_DEFAULT; + } + } + } + */ + } + //chPrev2 = chPrev; + chPrev = ch; + } + if (state == SCE_P_WORD) + { + ClassifyWordSol(styler.GetStartSegment(), lengthDoc-1, keywords, styler, prevWord); + } + else + { + styler.ColourTo(lengthDoc-1, state); + } +} + +static void FoldSolDoc(unsigned int startPos, int length, int initStyle, + WordList *[], Accessor &styler) + { + int lengthDoc = startPos + length; + + // Backtrack to previous line in case need to fix its fold status + int lineCurrent = styler.GetLine(startPos); + if (startPos > 0) { + if (lineCurrent > 0) + { + lineCurrent--; + startPos = styler.LineStart(lineCurrent); + if (startPos == 0) + initStyle = SCE_P_DEFAULT; + else + initStyle = styler.StyleAt(startPos-1); + } + } + int state = initStyle & 31; + int spaceFlags = 0; + int indentCurrent = styler.IndentAmount(lineCurrent, &spaceFlags, IsSolComment); + if ((state == SCE_P_TRIPLE) || (state == SCE_P_TRIPLEDOUBLE)) + indentCurrent |= SC_FOLDLEVELWHITEFLAG; + char chNext = styler[startPos]; + for (int i = startPos; i < lengthDoc; i++) + { + char ch = chNext; + chNext = styler.SafeGetCharAt(i + 1); + int style = styler.StyleAt(i) & 31; + + if ((ch == '\r' && chNext != '\n') || (ch == '\n') || (i == lengthDoc)) + { + int lev = indentCurrent; + int indentNext = styler.IndentAmount(lineCurrent + 1, &spaceFlags, IsSolComment); + if ((style == SCE_P_TRIPLE) || (style== SCE_P_TRIPLEDOUBLE)) + indentNext |= SC_FOLDLEVELWHITEFLAG; + if (!(indentCurrent & SC_FOLDLEVELWHITEFLAG)) + { + // Only non whitespace lines can be headers + if ((indentCurrent & SC_FOLDLEVELNUMBERMASK) < (indentNext & SC_FOLDLEVELNUMBERMASK)) + { + lev |= SC_FOLDLEVELHEADERFLAG; + } else if (indentNext & SC_FOLDLEVELWHITEFLAG) + { + // Line after is blank so check the next - maybe should continue further? + int spaceFlags2 = 0; + int indentNext2 = styler.IndentAmount(lineCurrent + 2, &spaceFlags2, IsSolComment); + if ((indentCurrent & SC_FOLDLEVELNUMBERMASK) < (indentNext2 & SC_FOLDLEVELNUMBERMASK)) + { + lev |= SC_FOLDLEVELHEADERFLAG; + } + } + } + indentCurrent = indentNext; + styler.SetLevel(lineCurrent, lev); + lineCurrent++; + } + } +} + +LexerModule lmScriptol(SCLEX_SCRIPTOL, ColouriseSolDoc, "scriptol", FoldSolDoc); 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..021a657273 100644 --- a/contrib/src/stc/scintilla/src/PropSet.cxx +++ b/contrib/src/stc/scintilla/src/PropSet.cxx @@ -2,14 +2,13 @@ /** @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 "Platform.h" @@ -30,6 +29,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) { @@ -68,16 +71,6 @@ bool EqualCaseInsensitive(const char *a, const char *b) { return 0 == CompareCaseInsensitive(a, b); } -inline unsigned int HashString(const char *s, size_t len) { - unsigned int ret = 0; - while (len--) { - ret <<= 4; - ret ^= *s; - s++; - } - return ret; -} - PropSet::PropSet() { superPS = 0; for (int root = 0; root < hashRoots; root++) @@ -98,13 +91,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 +112,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')) @@ -157,7 +150,7 @@ SString PropSet::Get(const char *key) { } } -static bool IncludesVar(const char *value, const char *key) { +bool PropSet::IncludesVar(const char *value, const char *key) { const char *var = strstr(value, "$("); while (var) { if (isprefix(var + 2, key) && (var[2 + strlen(key)] == ')')) { @@ -178,25 +171,28 @@ SString PropSet::GetExpanded(const char *key) { return Expand(val.c_str()); } -SString PropSet::Expand(const char *withVars) { +SString PropSet::Expand(const char *withVars, int maxExpands) { char *base = StringDup(withVars); char *cpvar = strstr(base, "$("); - while (cpvar) { + while (cpvar && (maxExpands > 0)) { char *cpendvar = strchr(cpvar, ')'); - if (cpendvar) { - int lenvar = cpendvar - cpvar - 2; // Subtract the $() - char *var = StringDup(cpvar + 2, lenvar); - SString val = GetExpanded(var); - size_t newlenbase = strlen(base) + val.length() - lenvar; - char *newbase = new char[newlenbase]; - strncpy(newbase, base, cpvar - base); - strcpy(newbase + (cpvar - base), val.c_str()); - strcpy(newbase + (cpvar - base) + val.length(), cpendvar + 1); - delete []var; - delete []base; - base = newbase; - } + if (!cpendvar) + break; + int lenvar = cpendvar - cpvar - 2; // Subtract the $() + char *var = StringDup(cpvar + 2, lenvar); + SString val = Get(var); + if (IncludesVar(val.c_str(), var)) + break; + size_t newlenbase = strlen(base) + val.length() - lenvar; + char *newbase = new char[newlenbase]; + strncpy(newbase, base, cpvar - base); + strcpy(newbase + (cpvar - base), val.c_str()); + strcpy(newbase + (cpvar - base) + val.length(), cpendvar + 1); + delete []var; + delete []base; + base = newbase; cpvar = strstr(base, "$("); + maxExpands--; } SString sret = base; delete []base; @@ -257,7 +253,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 +296,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 +313,7 @@ SString PropSet::GetNewExpand(const char *keybase, const char *filename) { base = newbase; } cpvar = strstr(base, "$("); + maxExpands--; } SString sret = base; delete []base; @@ -328,9 +326,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 +624,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 +667,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 +693,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..98c8717941 100644 --- a/contrib/src/stc/scintilla/src/RESearch.cxx +++ b/contrib/src/stc/scintilla/src/RESearch.cxx @@ -30,8 +30,29 @@ * Modification history: * * $Log$ - * Revision 1.5 2002/09/11 00:55:27 RD - * Update to Scintilla 1.48 + * Revision 1.5.2.4 2003/09/18 18:14:11 RD + * Updated wxSTC in 2.4 branch to Scintilla 1.54. + * Also includes patches from ABX and new sample from Otto Wyss + * + * Revision 1.8 2003/09/18 05:05:38 RD + * Updated to Scintilla 1.54 + * Applied most of patch #806092 + * Added new wxSTC sample from Otto Wyss + * + * 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 @@ -332,10 +353,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 */ @@ -353,6 +375,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) { @@ -467,25 +491,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 +529,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 +586,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; @@ -688,7 +729,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; diff --git a/contrib/src/stc/scintilla/src/RESearch.h b/contrib/src/stc/scintilla/src/RESearch.h index 28238bfb7c..8ca9cd0b82 100644 --- a/contrib/src/stc/scintilla/src/RESearch.h +++ b/contrib/src/stc/scintilla/src/RESearch.h @@ -13,7 +13,7 @@ * 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 @@ -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/ScintillaBase.cxx b/contrib/src/stc/scintilla/src/ScintillaBase.cxx index a5e5a065d1..039539ad3c 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); @@ -202,16 +203,16 @@ void ScintillaBase::AutoCompleteStart(int lenEntered, const char *list) { pdoc->DeleteChars(currentPos, lenEntered); SetEmptySelection(currentPos); pdoc->InsertString(currentPos, list); - SetEmptySelection(currentPos + strlen(list)); + SetEmptySelection(currentPos + static_cast(strlen(list))); } else { SetEmptySelection(currentPos); pdoc->InsertString(currentPos, list + lenEntered); - SetEmptySelection(currentPos + strlen(list + lenEntered)); + SetEmptySelection(currentPos + static_cast(strlen(list + lenEntered))); } 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); @@ -337,11 +340,41 @@ void ScintillaBase::AutoCompleteCompleted() { if (item != -1) { SString piece = selected; pdoc->InsertString(firstPos, piece.c_str()); - SetEmptySelection(firstPos + piece.length()); + SetEmptySelection(firstPos + static_cast(piece.length())); } 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..bb09e3f5b3 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=KEYWORDSET_MAX+1}; 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..c37bcac900 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; @@ -68,7 +69,7 @@ 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 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 @@ -101,7 +103,8 @@ void Style::ClearTo(const Style &source) { source.underline, source.caseForce, source.visible, - source.changeable); + 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..6ee930b6bb 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; @@ -45,11 +46,11 @@ public: const char *fontName_, int characterSet_, bool bold_, bool italic_, bool eolFilled_, bool underline_, ecaseForced caseForce_, - bool visible_, bool changeable_); + 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/XPM.cxx b/contrib/src/stc/scintilla/src/XPM.cxx new file mode 100644 index 0000000000..c3f66c2e40 --- /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]; + size_t 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..68ce31cba3 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+2); + 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,12 +1612,17 @@ 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); } +// Copy the line containing the caret. +void wxStyledTextCtrl::LineCopy() { + SendMsg(2455, 0, 0); +} + // Move the caret inside current view if it's not there already. void wxStyledTextCtrl::MoveCaretInsideView() { SendMsg(2401, 0, 0); @@ -1532,12 +1660,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 +1753,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. @@ -1674,12 +1802,12 @@ bool wxStyledTextCtrl::GetMouseDownCaptures() { } // Sets the cursor to one of the SC_CURSOR* values. -void wxStyledTextCtrl::SetCursor(int cursorType) { +void wxStyledTextCtrl::SetSTCCursor(int cursorType) { SendMsg(2386, cursorType, 0); } // Get cursor type. -int wxStyledTextCtrl::GetCursor() { +int wxStyledTextCtrl::GetSTCCursor() { return SendMsg(2387, 0, 0); } @@ -1740,6 +1868,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 +1885,53 @@ 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); +} + +// Given a valid document position, return the previous position taking code +// page into account. Returns 0 if passed 0. +int wxStyledTextCtrl::PositionBefore(int pos) { + return SendMsg(2417, pos, 0); +} + +// Given a valid document position, return the next position taking code +// page into account. Maximum value returned is the last position in the document. +int wxStyledTextCtrl::PositionAfter(int pos) { + return SendMsg(2418, pos, 0); +} + +// Copy a range of text to the clipboard. Positions are clipped into the document. +void wxStyledTextCtrl::CopyRange(int start, int end) { + SendMsg(2419, start, end); +} + +// Copy argument text to the clipboard. +void wxStyledTextCtrl::CopyText(int length, const wxString& text) { + SendMsg(2420, length, (long)(const char*)wx2stc(text)); +} + // Start notifying the container of all key presses and commands. void wxStyledTextCtrl::StartRecord() { SendMsg(3001, 0, 0); @@ -1857,6 +2037,11 @@ void wxStyledTextCtrl::StyleSetSpec(int styleNum, const wxString& spec) { // Set style size, face, bold, italic, and underline attributes from // a wxFont's attributes. void wxStyledTextCtrl::StyleSetFont(int styleNum, wxFont& font) { +#ifdef __WXGTK__ + // Ensure that the native font is initialized + int x, y; + GetTextExtent(wxT("X"), &x, &y, NULL, NULL, &font); +#endif int size = font.GetPointSize(); wxString faceName = font.GetFaceName(); bool bold = font.GetWeight() == wxBOLD; @@ -1923,15 +2108,77 @@ 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(), *wxConvCurrent); + + if (success) + SetSavePoint(); + + return success; +} + +bool wxStyledTextCtrl::LoadFile(const wxString& filename) +{ + bool success = false; + wxFile file(filename, wxFile::read); + + if (file.IsOpened()) + { + wxString contents; +#if wxUSE_UNICODE + wxMemoryBuffer buffer; +#else + wxString buffer; +#endif + off_t len = file.Length(); + if (len > 0) + { + void *bufptr = buffer.GetWriteBuf(len); + success = (file.Read(bufptr, len) == len); + buffer.UngetWriteBuf(len); +#if wxUSE_UNICODE + contents = wxString(buffer, *wxConvCurrent); +#else + contents = buffer; +#endif + } + else + success = true; // empty file is ok + + if (success) + { + SetText(contents); + EmptyUndoBuffer(); + SetSavePoint(); + } + } + + return success; +} + +#if wxUSE_DRAG_AND_DROP +wxDragResult wxStyledTextCtrl::DoDragOver(wxCoord x, wxCoord y, wxDragResult def) { + return m_swx->DoDragOver(x, y, def); +} + + +bool wxStyledTextCtrl::DoDropText(long x, long y, const wxString& data) { + return m_swx->DoDropText(x, y, data); +} +#endif //---------------------------------------------------------------------- // Event handlers -void wxStyledTextCtrl::OnPaint(wxPaintEvent& evt) { +void wxStyledTextCtrl::OnPaint(wxPaintEvent& WXUNUSED(evt)) { wxPaintDC dc(this); - wxRegion region = GetUpdateRegion(); - - m_swx->DoPaint(&dc, region.GetBox()); + m_swx->DoPaint(&dc, GetUpdateRegion().GetBox()); } void wxStyledTextCtrl::OnScrollWin(wxScrollWinEvent& evt) { @@ -1951,7 +2198,7 @@ void wxStyledTextCtrl::OnScroll(wxScrollEvent& evt) { } } -void wxStyledTextCtrl::OnSize(wxSizeEvent& evt) { +void wxStyledTextCtrl::OnSize(wxSizeEvent& WXUNUSED(evt)) { wxSize sz = GetClientSize(); m_swx->DoSize(sz.x, sz.y); } @@ -1959,18 +2206,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 +2228,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 +2250,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 +2258,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; } @@ -2023,9 +2276,10 @@ void wxStyledTextCtrl::OnKeyDown(wxKeyEvent& evt) { int key = evt.GetKeyCode(); bool shift = evt.ShiftDown(), ctrl = evt.ControlDown(), - alt = evt.AltDown(); + alt = evt.AltDown(), + meta = evt.MetaDown(); - int processed = m_swx->DoKeyDown(key, shift, ctrl, alt, &m_lastKeyDownConsumed); + int processed = m_swx->DoKeyDown(key, shift, ctrl, alt, meta, &m_lastKeyDownConsumed); // printf("KeyDn key:%d shift:%d ctrl:%d alt:%d processed:%d consumed:%d\n", // key, shift, ctrl, alt, processed, m_lastKeyDownConsumed); @@ -2035,22 +2289,22 @@ void wxStyledTextCtrl::OnKeyDown(wxKeyEvent& evt) { } -void wxStyledTextCtrl::OnLoseFocus(wxFocusEvent& evt) { +void wxStyledTextCtrl::OnLoseFocus(wxFocusEvent& WXUNUSED(evt)) { m_swx->DoLoseFocus(); } -void wxStyledTextCtrl::OnGainFocus(wxFocusEvent& evt) { +void wxStyledTextCtrl::OnGainFocus(wxFocusEvent& WXUNUSED(evt)) { m_swx->DoGainFocus(); } -void wxStyledTextCtrl::OnSysColourChanged(wxSysColourChangedEvent& evt) { +void wxStyledTextCtrl::OnSysColourChanged(wxSysColourChangedEvent& WXUNUSED(evt)) { m_swx->DoSysColourChange(); } -void wxStyledTextCtrl::OnEraseBackground(wxEraseEvent& evt) { +void wxStyledTextCtrl::OnEraseBackground(wxEraseEvent& WXUNUSED(evt)) { // do nothing to help avoid flashing } @@ -2061,7 +2315,7 @@ void wxStyledTextCtrl::OnMenu(wxCommandEvent& evt) { } -void wxStyledTextCtrl::OnListBox(wxCommandEvent& evt) { +void wxStyledTextCtrl::OnListBox(wxCommandEvent& WXUNUSED(evt)) { m_swx->DoOnListBox(); } @@ -2076,6 +2330,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 +2389,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 +2421,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 +2445,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..b9fe7c99c1 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) @@ -235,6 +242,11 @@ void wxStyledTextCtrl::StyleSetSpec(int styleNum, const wxString& spec) { // Set style size, face, bold, italic, and underline attributes from // a wxFont's attributes. void wxStyledTextCtrl::StyleSetFont(int styleNum, wxFont& font) { +#ifdef __WXGTK__ + // Ensure that the native font is initialized + int x, y; + GetTextExtent(wxT("X"), &x, &y, NULL, NULL, &font); +#endif int size = font.GetPointSize(); wxString faceName = font.GetFaceName(); bool bold = font.GetWeight() == wxBOLD; @@ -301,15 +313,77 @@ 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(), *wxConvCurrent); + + if (success) + SetSavePoint(); + + return success; +} + +bool wxStyledTextCtrl::LoadFile(const wxString& filename) +{ + bool success = false; + wxFile file(filename, wxFile::read); + + if (file.IsOpened()) + { + wxString contents; +#if wxUSE_UNICODE + wxMemoryBuffer buffer; +#else + wxString buffer; +#endif + off_t len = file.Length(); + if (len > 0) + { + void *bufptr = buffer.GetWriteBuf(len); + success = (file.Read(bufptr, len) == len); + buffer.UngetWriteBuf(len); +#if wxUSE_UNICODE + contents = wxString(buffer, *wxConvCurrent); +#else + contents = buffer; +#endif + } + else + success = true; // empty file is ok + + if (success) + { + SetText(contents); + EmptyUndoBuffer(); + SetSavePoint(); + } + } + + return success; +} + +#if wxUSE_DRAG_AND_DROP +wxDragResult wxStyledTextCtrl::DoDragOver(wxCoord x, wxCoord y, wxDragResult def) { + return m_swx->DoDragOver(x, y, def); +} + + +bool wxStyledTextCtrl::DoDropText(long x, long y, const wxString& data) { + return m_swx->DoDropText(x, y, data); +} +#endif //---------------------------------------------------------------------- // Event handlers -void wxStyledTextCtrl::OnPaint(wxPaintEvent& evt) { +void wxStyledTextCtrl::OnPaint(wxPaintEvent& WXUNUSED(evt)) { wxPaintDC dc(this); - wxRegion region = GetUpdateRegion(); - - m_swx->DoPaint(&dc, region.GetBox()); + m_swx->DoPaint(&dc, GetUpdateRegion().GetBox()); } void wxStyledTextCtrl::OnScrollWin(wxScrollWinEvent& evt) { @@ -329,7 +403,7 @@ void wxStyledTextCtrl::OnScroll(wxScrollEvent& evt) { } } -void wxStyledTextCtrl::OnSize(wxSizeEvent& evt) { +void wxStyledTextCtrl::OnSize(wxSizeEvent& WXUNUSED(evt)) { wxSize sz = GetClientSize(); m_swx->DoSize(sz.x, sz.y); } @@ -337,18 +411,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 +433,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 +455,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 +463,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; } @@ -401,9 +481,10 @@ void wxStyledTextCtrl::OnKeyDown(wxKeyEvent& evt) { int key = evt.GetKeyCode(); bool shift = evt.ShiftDown(), ctrl = evt.ControlDown(), - alt = evt.AltDown(); + alt = evt.AltDown(), + meta = evt.MetaDown(); - int processed = m_swx->DoKeyDown(key, shift, ctrl, alt, &m_lastKeyDownConsumed); + int processed = m_swx->DoKeyDown(key, shift, ctrl, alt, meta, &m_lastKeyDownConsumed); // printf("KeyDn key:%%d shift:%%d ctrl:%%d alt:%%d processed:%%d consumed:%%d\n", // key, shift, ctrl, alt, processed, m_lastKeyDownConsumed); @@ -413,22 +494,22 @@ void wxStyledTextCtrl::OnKeyDown(wxKeyEvent& evt) { } -void wxStyledTextCtrl::OnLoseFocus(wxFocusEvent& evt) { +void wxStyledTextCtrl::OnLoseFocus(wxFocusEvent& WXUNUSED(evt)) { m_swx->DoLoseFocus(); } -void wxStyledTextCtrl::OnGainFocus(wxFocusEvent& evt) { +void wxStyledTextCtrl::OnGainFocus(wxFocusEvent& WXUNUSED(evt)) { m_swx->DoGainFocus(); } -void wxStyledTextCtrl::OnSysColourChanged(wxSysColourChangedEvent& evt) { +void wxStyledTextCtrl::OnSysColourChanged(wxSysColourChangedEvent& WXUNUSED(evt)) { m_swx->DoSysColourChange(); } -void wxStyledTextCtrl::OnEraseBackground(wxEraseEvent& evt) { +void wxStyledTextCtrl::OnEraseBackground(wxEraseEvent& WXUNUSED(evt)) { // do nothing to help avoid flashing } @@ -439,7 +520,7 @@ void wxStyledTextCtrl::OnMenu(wxCommandEvent& evt) { } -void wxStyledTextCtrl::OnListBox(wxCommandEvent& evt) { +void wxStyledTextCtrl::OnListBox(wxCommandEvent& WXUNUSED(evt)) { m_swx->DoOnListBox(); } @@ -454,6 +535,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 +594,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 +626,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 +650,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..8a189db347 100644 --- a/contrib/src/stc/stc.h.in +++ b/contrib/src/stc/stc.h.in @@ -24,6 +24,39 @@ #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 + + +// SWIG can't handle "#if" type of conditionals, only "#ifdef" +#ifdef SWIG +#define STC_USE_DND 1 +#else +#if wxUSE_DRAG_AND_DROP +#define STC_USE_DND 1 +#endif +#endif + //---------------------------------------------------------------------- // Should a wxPopupWindow be used for the call tips and autocomplete windows? @@ -38,6 +71,13 @@ %(VALUES)s + +//----------------------------------------- +// Commands that can be bound to keystrokes + +%(CMDS)s + + // END of generated section //---------------------------------------------------------------------- @@ -45,8 +85,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 +203,19 @@ 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); + +#ifdef STC_USE_DND + // Allow for simulating a DnD DragOver + wxDragResult DoDragOver(wxCoord x, wxCoord y, wxDragResult def); + + // Allow for simulating a DnD DropText + bool DoDropText(long x, long y, const wxString& data); +#endif //---------------------------------------------------------------------- @@ -175,6 +231,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 +248,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,15 +267,6 @@ private: //---------------------------------------------------------------------- -// SWIG can't handle "#if" type of conditionals, onlu "#ifdef" -#ifdef SWIG -#define STC_USE_DND 1 -#else -#if wxUSE_DRAG_AND_DROP -#define STC_USE_DND 1 -#endif -#endif - class wxStyledTextEvent : public wxCommandEvent { public: wxStyledTextEvent(wxEventType commandType=0, int id=0); @@ -314,31 +362,36 @@ private: #endif }; + + #ifndef SWIG BEGIN_DECLARE_EVENT_TYPES() - DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_CHANGE, 1650) - DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_STYLENEEDED, 1651) - DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_CHARADDED, 1652) - DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_SAVEPOINTREACHED, 1653) - DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_SAVEPOINTLEFT, 1654) - DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_ROMODIFYATTEMPT, 1655) - DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_KEY, 1656) - DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_DOUBLECLICK, 1657) - DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_UPDATEUI, 1658) - DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_MODIFIED, 1659) - DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_MACRORECORD, 1660) - DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_MARGINCLICK, 1661) - DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_NEEDSHOWN, 1662) - DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_POSCHANGED, 1663) - DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_PAINTED, 1664) - DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_USERLISTSELECTION, 1665) - DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_URIDROPPED, 1666) - DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_DWELLSTART, 1667) - DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_DWELLEND, 1668) - DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_START_DRAG, 1669) - 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_EXPORTED_LOCAL_EVENT_TYPE(WXSTC_DECLSPEC, wxEVT_STC_CHANGE, 1650) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE(WXSTC_DECLSPEC, wxEVT_STC_STYLENEEDED, 1651) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE(WXSTC_DECLSPEC, wxEVT_STC_CHARADDED, 1652) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE(WXSTC_DECLSPEC, wxEVT_STC_SAVEPOINTREACHED, 1653) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE(WXSTC_DECLSPEC, wxEVT_STC_SAVEPOINTLEFT, 1654) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE(WXSTC_DECLSPEC, wxEVT_STC_ROMODIFYATTEMPT, 1655) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE(WXSTC_DECLSPEC, wxEVT_STC_KEY, 1656) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE(WXSTC_DECLSPEC, wxEVT_STC_DOUBLECLICK, 1657) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE(WXSTC_DECLSPEC, wxEVT_STC_UPDATEUI, 1658) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE(WXSTC_DECLSPEC, wxEVT_STC_MODIFIED, 1659) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE(WXSTC_DECLSPEC, wxEVT_STC_MACRORECORD, 1660) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE(WXSTC_DECLSPEC, wxEVT_STC_MARGINCLICK, 1661) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE(WXSTC_DECLSPEC, wxEVT_STC_NEEDSHOWN, 1662) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE(WXSTC_DECLSPEC, wxEVT_STC_POSCHANGED, 1663) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE(WXSTC_DECLSPEC, wxEVT_STC_PAINTED, 1664) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE(WXSTC_DECLSPEC, wxEVT_STC_USERLISTSELECTION, 1665) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE(WXSTC_DECLSPEC, wxEVT_STC_URIDROPPED, 1666) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE(WXSTC_DECLSPEC, wxEVT_STC_DWELLSTART, 1667) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE(WXSTC_DECLSPEC, wxEVT_STC_DWELLEND, 1668) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE(WXSTC_DECLSPEC, wxEVT_STC_START_DRAG, 1669) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE(WXSTC_DECLSPEC, wxEVT_STC_DRAG_OVER, 1670) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE(WXSTC_DECLSPEC, wxEVT_STC_DO_DROP, 1671) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE(WXSTC_DECLSPEC, wxEVT_STC_ZOOM, 1672) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE(WXSTC_DECLSPEC, wxEVT_STC_HOTSPOT_CLICK, 1673) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE(WXSTC_DECLSPEC, wxEVT_STC_HOTSPOT_DCLICK, 1674) + DECLARE_EXPORTED_LOCAL_EVENT_TYPE(WXSTC_DECLSPEC, wxEVT_STC_CALLTIP_CLICK, 1675) END_DECLARE_EVENT_TYPES() #else enum { @@ -365,6 +418,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 +452,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 //---------------------------------------------------------------------- @@ -411,13 +471,14 @@ inline wxString stc2wx(const char* str) { #endif } -inline wxString stc2wx(const char* str, size_t len) { #if wxUSE_UNICODE - return wxString(str, wxConvUTF8, len); +wxString stc2wx(const char* str, size_t len); #else +inline wxString stc2wx(const char* str, size_t len) { return wxString(str, len); -#endif } +#endif + #if wxUSE_UNICODE inline const wxWX2MBbuf wx2stc(const wxString& str) { 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.sc b/contrib/src/svg/makefile.sc new file mode 100644 index 0000000000..854884f275 --- /dev/null +++ b/contrib/src/svg/makefile.sc @@ -0,0 +1,20 @@ +############################################################################## +# Name: src/zlib/makefile.sc +# Purpose: build zlib Digital Mars 8.33 compiler +# Author: Chris Elliott +# Created: 21.01.03 +# RCS-ID: $Id$ +# Licence: wxWindows licence +############################################################################## + +WXDIR = ..\..\.. +include $(WXDIR)\src\makesc.env +LIBTARGET=$(WXDIR)\lib\dcsvg$(SC_SUFFIX).lib +THISDIR=$(WXDIR)\contrib\src\svg + +# variables +OBJECTS = \ + $(THISDIR)\dcsvg.obj + +include $(WXDIR)\src\makelib.sc + 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..3aad23ac60 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 @@ -19,21 +19,22 @@ HEADER_SUBDIR=xrc EXPAT_DEFS=-I$(expat_dir)/xmlparse -I$(expat_dir)/xmltok 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 \ +HEADERS=xh_all.h xh_bttn.h xh_chckb.h xh_tglbtn.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 xh_statbar.h OBJECTS=$(EXPAT_OBJECTS) \ xml.o xmlres.o xmlrsall.o \ - xh_bttn.o xh_chckb.o xh_chckl.o xh_choic.o xh_combo.o xh_dlg.o \ + xh_bttn.o xh_chckb.o xh_tglbtn.o xh_chckl.o xh_choic.o xh_combo.o xh_dlg.o \ xh_gauge.o xh_html.o xh_menu.o xh_notbk.o xh_panel.o xh_radbt.o \ 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 xh_statbar.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..db286c0ba4 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 /O2 /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 /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 "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /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 /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\wxxrc24d.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 "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /O2 /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 /O2 /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\wxxrc24.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 "" @@ -120,6 +174,10 @@ SOURCE=.\xh_chckb.cpp # End Source File # Begin Source File +SOURCE=.\xh_tglbtn.cpp +# End Source File +# Begin Source File + SOURCE=.\xh_chckl.cpp # End Source File # Begin Source File @@ -184,6 +242,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 +258,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 +294,14 @@ SOURCE=.\xh_unkwn.cpp # End Source File # Begin Source File +SOURCE=.\xh_wizrd.cpp +# End Source File +# Begin Source File + +SOURCE=.\xh_statbar.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..8723742ee5 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) @@ -22,12 +22,12 @@ LIBTARGET=$(WXDIR)\lib\wxxrc.lib OBJECTS=$(EXPAT_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_bttn.obj xh_chckb.obj xh_tglbtn.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 xh_gdctl.obj + xh_tree.obj xh_unkwn.obj xh_frame.obj xh_gdctl.obj xh_scwin.obj xh_split.obj xh_wizrd.obj xh_statbar.obj !include $(WXDIR)\src\makelib.b32 diff --git a/contrib/src/xrc/makefile.g95 b/contrib/src/xrc/makefile.g95 index 8a4bfb322f..37408b8deb 100644 --- a/contrib/src/xrc/makefile.g95 +++ b/contrib/src/xrc/makefile.g95 @@ -23,12 +23,12 @@ LIBTARGET=$(WXDIR)/lib/libwxxrc.a OBJECTS= $(XMLPARSEDIR_OBJECTS) $(XMLTOKDIR_OBJECTS) \ xml.o xmlres.o xmlrsall.o \ - xh_bttn.o xh_chckb.o xh_chckl.o xh_choic.o xh_combo.o xh_dlg.o \ + xh_bttn.o xh_chckb.o xh_tglbtn.o xh_chckl.o xh_choic.o xh_combo.o xh_dlg.o \ xh_gauge.o xh_html.o xh_menu.o xh_notbk.o xh_panel.o xh_radbt.o \ 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 xh_statbar.o include $(WXDIR)/src/makelib.g95 diff --git a/contrib/src/xrc/makefile.vc b/contrib/src/xrc/makefile.vc index 51bf90f9b4..c491434403 100644 --- a/contrib/src/xrc/makefile.vc +++ b/contrib/src/xrc/makefile.vc @@ -47,8 +47,8 @@ LIBTARGET=$(WXDIR)\lib\wxxrc$(LIBEXT).lib EXTRATARGETS=$(D) OBJECTS=$(EXPAT_OBJS) \ - $(D)\xml.obj xmlres.obj \ - $(D)\xmlrsall.obj $(D)\xh_bttn.obj $(D)\xh_chckb.obj $(D)\xh_chckl.obj \ + $(D)\xml.obj $(D)\xmlres.obj \ + $(D)\xmlrsall.obj $(D)\xh_bttn.obj $(D)\xh_chckb.obj $(D)\xh_tglbtn.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 \ $(D)\xh_notbk.obj $(D)\xh_panel.obj $(D)\xh_radbt.obj \ @@ -57,7 +57,8 @@ 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 $(D)\xh_statbar.obj !include $(WXDIR)\src\makelib.vc diff --git a/contrib/src/xrc/makefile.wat b/contrib/src/xrc/makefile.wat index 43cfc46647..88f6a31ed6 100644 --- a/contrib/src/xrc/makefile.wat +++ b/contrib/src/xrc/makefile.wat @@ -2,30 +2,54 @@ 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_tglbtn.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_statbar.obj & + $(OUTPUTDIR)\xh_wizrd.obj +!include $(WXDIR)\src\makelib.wat diff --git a/contrib/src/xrc/xh_bttn.cpp b/contrib/src/xrc/xh_bttn.cpp index ff2d4813d0..432e33ccc9 100644 --- a/contrib/src/xrc/xh_bttn.cpp +++ b/contrib/src/xrc/xh_bttn.cpp @@ -30,6 +30,7 @@ wxButtonXmlHandler::wxButtonXmlHandler() XRC_ADD_STYLE(wxBU_RIGHT); XRC_ADD_STYLE(wxBU_TOP); XRC_ADD_STYLE(wxBU_BOTTOM); + XRC_ADD_STYLE(wxBU_EXACTFIT); AddWindowStyles(); } diff --git a/contrib/src/xrc/xh_chckl.cpp b/contrib/src/xrc/xh_chckl.cpp index 408c02570d..48a55892c2 100644 --- a/contrib/src/xrc/xh_chckl.cpp +++ b/contrib/src/xrc/xh_chckl.cpp @@ -19,21 +19,27 @@ #pragma hdrstop #endif +#if wxUSE_OWNER_DRAWN || !defined(__WXMSW__) + #include "wx/xrc/xh_chckl.h" #include "wx/checklst.h" #include "wx/intl.h" +#include "wx/log.h" -wxCheckListXmlHandler::wxCheckListXmlHandler() +wxCheckListBoxXmlHandler::wxCheckListBoxXmlHandler() : wxXmlResourceHandler(), m_insideBox(FALSE) { // no styles AddWindowStyles(); } -wxObject *wxCheckListXmlHandler::DoCreateResource() +wxObject *wxCheckListBoxXmlHandler::DoCreateResource() { - if (m_class == wxT("wxCheckList")) + if (m_class == wxT("wxCheckListBox") || m_class == wxT("wxCheckList")) { + if (m_class == wxT("wxCheckList")) + wxLogDebug(wxT("'wxCheckList' name is deprecated, use 'wxCheckListBox' instead.")); + // need to build the list of strings from children m_insideBox = TRUE; CreateChildrenPrivately(NULL, GetParamNode(wxT("content"))); @@ -99,10 +105,11 @@ wxObject *wxCheckListXmlHandler::DoCreateResource() } } -bool wxCheckListXmlHandler::CanHandle(wxXmlNode *node) +bool wxCheckListBoxXmlHandler::CanHandle(wxXmlNode *node) { - return (IsOfClass(node, wxT("wxCheckList")) || + return (IsOfClass(node, wxT("wxCheckListBox")) || + IsOfClass(node, wxT("wxCheckList")) /*backward compatibility*/ || (m_insideBox && node->GetName() == wxT("item"))); } - +#endif diff --git a/contrib/src/xrc/xh_dlg.cpp b/contrib/src/xrc/xh_dlg.cpp index d44ad16a91..2ef929be65 100644 --- a/contrib/src/xrc/xh_dlg.cpp +++ b/contrib/src/xrc/xh_dlg.cpp @@ -36,11 +36,14 @@ wxDialogXmlHandler::wxDialogXmlHandler() : wxXmlResourceHandler() XRC_ADD_STYLE(wxRESIZE_BOX); XRC_ADD_STYLE(wxDIALOG_MODAL); XRC_ADD_STYLE(wxDIALOG_MODELESS); + XRC_ADD_STYLE(wxDIALOG_NO_PARENT); XRC_ADD_STYLE(wxNO_3D); 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_listc.cpp b/contrib/src/xrc/xh_listc.cpp index 6f9f6b2ab4..fc25d81bde 100644 --- a/contrib/src/xrc/xh_listc.cpp +++ b/contrib/src/xrc/xh_listc.cpp @@ -40,6 +40,7 @@ wxListCtrlXmlHandler::wxListCtrlXmlHandler() XRC_ADD_STYLE(wxLC_SINGLE_SEL); XRC_ADD_STYLE(wxLC_SORT_ASCENDING); XRC_ADD_STYLE(wxLC_SORT_DESCENDING); + XRC_ADD_STYLE(wxLC_VIRTUAL); 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_notbk.cpp b/contrib/src/xrc/xh_notbk.cpp index 3c427b6365..b8b459cc82 100644 --- a/contrib/src/xrc/xh_notbk.cpp +++ b/contrib/src/xrc/xh_notbk.cpp @@ -50,8 +50,8 @@ wxObject *wxNotebookXmlHandler::DoCreateResource() { bool old_ins = m_isInside; m_isInside = FALSE; - m_isInside = old_ins; wxObject *item = CreateResFromNode(n, m_notebook, NULL); + m_isInside = old_ins; wxWindow *wnd = wxDynamicCast(item, wxWindow); if (wnd) diff --git a/contrib/src/xrc/xh_panel.cpp b/contrib/src/xrc/xh_panel.cpp index 07653815f7..2e3ceb7266 100644 --- a/contrib/src/xrc/xh_panel.cpp +++ b/contrib/src/xrc/xh_panel.cpp @@ -28,6 +28,7 @@ wxPanelXmlHandler::wxPanelXmlHandler() : wxXmlResourceHandler() XRC_ADD_STYLE(wxNO_3D); XRC_ADD_STYLE(wxTAB_TRAVERSAL); XRC_ADD_STYLE(wxWS_EX_VALIDATE_RECURSIVELY); + XRC_ADD_STYLE(wxWS_EX_BLOCK_EVENTS); XRC_ADD_STYLE(wxCLIP_CHILDREN); AddWindowStyles(); } diff --git a/contrib/src/xrc/xh_scrol.cpp b/contrib/src/xrc/xh_scrol.cpp index 8077a49101..c9bcf49f81 100644 --- a/contrib/src/xrc/xh_scrol.cpp +++ b/contrib/src/xrc/xh_scrol.cpp @@ -48,6 +48,7 @@ wxObject *wxScrollBarXmlHandler::DoCreateResource() GetLong( wxT("pagesize"),1)); SetupWindow(control); + CreateChildren(control); return control; } diff --git a/contrib/src/xrc/xh_scwin.cpp b/contrib/src/xrc/xh_scwin.cpp new file mode 100644 index 0000000000..81c8b31573 --- /dev/null +++ b/contrib/src/xrc/xh_scwin.cpp @@ -0,0 +1,53 @@ +///////////////////////////////////////////////////////////////////////////// +// 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); + CreateChildren(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..44a1c002e1 100644 --- a/contrib/src/xrc/xh_sizer.cpp +++ b/contrib/src/xrc/xh_sizer.cpp @@ -21,6 +21,7 @@ #include "wx/xrc/xh_sizer.h" #include "wx/sizer.h" +#include "wx/panel.h" #include "wx/log.h" #include "wx/statbox.h" #include "wx/notebook.h" @@ -138,10 +139,12 @@ wxObject *wxSizerXmlHandler::DoCreateResource() wxXmlNode *parentNode = m_node->GetParent(); wxCHECK_MSG(m_parentSizer != NULL || - ((IsOfClass(parentNode, wxT("wxPanel")) || - IsOfClass(parentNode, wxT("wxFrame")) || - IsOfClass(parentNode, wxT("wxDialog"))) && - parentNode->GetType() == wxXML_ELEMENT_NODE), NULL, + (parentNode && parentNode->GetType() == wxXML_ELEMENT_NODE && + m_parentAsWindow != NULL && + (m_parentAsWindow->IsKindOf(CLASSINFO(wxPanel)) || + m_parentAsWindow->IsKindOf(CLASSINFO(wxFrame)) || + m_parentAsWindow->IsKindOf(CLASSINFO(wxDialog))) + ), NULL, wxT("Incorrect use of sizer: parent is not 'wxDialog', 'wxFrame' or 'wxPanel'.")); if (m_class == wxT("wxBoxSizer")) @@ -150,7 +153,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_statbar.cpp b/contrib/src/xrc/xh_statbar.cpp new file mode 100644 index 0000000000..df25e13d9f --- /dev/null +++ b/contrib/src/xrc/xh_statbar.cpp @@ -0,0 +1,81 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: xh_statbar.cpp +// Purpose: XRC resource for wxStatusBar +// Author: Brian Ravnsgaard Riis +// Created: 2004/01/21 +// RCS-ID: $Id$ +// Copyright: (c) 2004 Brian Ravnsgaard Riis +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifdef __GNUG__ +#pragma implementation "xh_statbar.h" +#endif + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#include "wx/frame.h" +#include "wx/string.h" + +#if wxUSE_STATUSBAR + +#include "wx/xrc/xh_statbar.h" +#include "wx/statusbr.h" + +wxStatusBarXmlHandler::wxStatusBarXmlHandler() : + wxXmlResourceHandler() +{ + XRC_ADD_STYLE(wxST_SIZEGRIP); + AddWindowStyles(); +} + +wxObject *wxStatusBarXmlHandler::DoCreateResource() +{ + XRC_MAKE_INSTANCE(statbar, wxStatusBar) + + statbar->Create(m_parentAsWindow, + GetID(), + GetStyle(), + GetName()); + + int fields = GetLong(wxT("fields"), 1); + wxString widths = GetParamValue(wxT("widths")); + + if (fields > 1 && !widths.IsEmpty()) + { + int *width = new int[fields]; + + for (unsigned int i = 0; i < (unsigned)fields; ++i) + { + width[i] = wxAtoi(widths.BeforeFirst(wxT(','))); + if(widths.Find(wxT(','))) + widths.Remove(0, widths.Find(wxT(',')) + 1); + } + statbar->SetFieldsCount(fields, width); + delete[] width; + } + else + statbar->SetFieldsCount(fields); + + if (m_parentAsWindow) + { + wxFrame *parentFrame = wxDynamicCast(m_parent, wxFrame); + if (parentFrame) + parentFrame->SetStatusBar(statbar); + } + + return statbar; +} + +bool wxStatusBarXmlHandler::CanHandle(wxXmlNode *node) +{ + return IsOfClass(node, wxT("wxStatusBar")); +} + +#endif + diff --git a/contrib/src/xrc/xh_text.cpp b/contrib/src/xrc/xh_text.cpp index 32ca49658c..a6d1c711c1 100644 --- a/contrib/src/xrc/xh_text.cpp +++ b/contrib/src/xrc/xh_text.cpp @@ -24,6 +24,8 @@ wxTextCtrlXmlHandler::wxTextCtrlXmlHandler() : wxXmlResourceHandler() { + XRC_ADD_STYLE(wxTE_AUTO_SCROLL); + XRC_ADD_STYLE(wxTE_NO_VSCROLL); XRC_ADD_STYLE(wxTE_PROCESS_ENTER); XRC_ADD_STYLE(wxTE_PROCESS_TAB); XRC_ADD_STYLE(wxTE_MULTILINE); diff --git a/contrib/src/xrc/xh_tglbtn.cpp b/contrib/src/xrc/xh_tglbtn.cpp new file mode 100644 index 0000000000..1e6219ca12 --- /dev/null +++ b/contrib/src/xrc/xh_tglbtn.cpp @@ -0,0 +1,58 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: xh_tglbtn.cpp +// Purpose: XRC resource for wxCheckBox +// Author: Bob Mitchell +// Created: 2000/03/21 +// RCS-ID: $Id$ +// Copyright: (c) 2000 Bob Mitchell and Verant Interactive +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifdef __GNUG__ +#pragma implementation "xh_tglbtn.h" +#endif + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#include "wx/xrc/xh_tglbtn.h" +#include "wx/tglbtn.h" + +#if wxUSE_TOGGLEBTN + +IMPLEMENT_DYNAMIC_CLASS(wxToggleButtonXmlHandler, wxXmlResourceHandler) + +wxToggleButtonXmlHandler::wxToggleButtonXmlHandler() +: wxXmlResourceHandler() +{ + AddWindowStyles(); +} + +wxObject *wxToggleButtonXmlHandler::DoCreateResource() +{ + XRC_MAKE_INSTANCE(control, wxToggleButton) + + control->Create(m_parentAsWindow, + GetID(), + GetText(wxT("label")), + GetPosition(), GetSize(), + GetStyle(), + wxDefaultValidator, + GetName()); + + control->SetValue(GetBool( wxT("checked"))); + SetupWindow(control); + + return control; +} + +bool wxToggleButtonXmlHandler::CanHandle(wxXmlNode *node) +{ + return IsOfClass(node, wxT("wxToggleButton")); +} + +#endif diff --git a/contrib/src/xrc/xh_toolb.cpp b/contrib/src/xrc/xh_toolb.cpp index 6fe844c348..ad772ee357 100644 --- a/contrib/src/xrc/xh_toolb.cpp +++ b/contrib/src/xrc/xh_toolb.cpp @@ -32,6 +32,12 @@ 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); + AddWindowStyles(); } wxObject *wxToolBarXmlHandler::DoCreateResource() @@ -39,15 +45,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 } @@ -118,8 +147,7 @@ wxObject *wxToolBarXmlHandler::DoCreateResource() toolbar->Realize(); - // FIXME: how can I create a toolbar without immediately setting it to the frame? - if (m_parentAsWindow) + if (m_parentAsWindow && !GetBool(wxT("dontattachtoframe"))) { wxFrame *parentFrame = wxDynamicCast(m_parent, wxFrame); if (parentFrame) diff --git a/contrib/src/xrc/xh_unkwn.cpp b/contrib/src/xrc/xh_unkwn.cpp index 99a514c18f..1d3d7ce023 100644 --- a/contrib/src/xrc/xh_unkwn.cpp +++ b/contrib/src/xrc/xh_unkwn.cpp @@ -33,8 +33,11 @@ public: const wxString& controlName, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize) - : wxPanel(parent, id, pos, size, wxTAB_TRAVERSAL | wxNO_BORDER, + const wxSize& size = wxDefaultSize, + long style = 0) + // Always add the wxTAB_TRAVERSAL and wxNO_BORDER styles to what comes + // from the XRC if anything. + : wxPanel(parent, id, pos, size, style | wxTAB_TRAVERSAL | wxNO_BORDER, controlName + wxT("_container")), m_controlName(controlName), m_controlAdded(FALSE) { @@ -43,6 +46,7 @@ public: } virtual void AddChild(wxWindowBase *child); + virtual void RemoveChild(wxWindowBase *child); protected: wxString m_controlName; @@ -68,19 +72,29 @@ void wxUnknownControlContainer::AddChild(wxWindowBase *child) Layout(); } - +void wxUnknownControlContainer::RemoveChild(wxWindowBase *child) +{ + wxPanel::RemoveChild(child); + m_controlAdded = FALSE; + GetSizer()->Remove((wxWindow*)child); +} wxUnknownWidgetXmlHandler::wxUnknownWidgetXmlHandler() : wxXmlResourceHandler() { + XRC_ADD_STYLE(wxNO_FULL_REPAINT_ON_RESIZE); } wxObject *wxUnknownWidgetXmlHandler::DoCreateResource() { + wxASSERT_MSG( m_instance == NULL, + _T("'unknown' controls can't be subclassed, use wxXmlResource::AttachUnknownControl") ); + wxPanel *panel = new wxUnknownControlContainer(m_parentAsWindow, GetName(), -1, - GetPosition(), GetSize()); + GetPosition(), GetSize(), + GetStyle(wxT("style"))); SetupWindow(panel); return panel; } 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..62abce457a 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,22 +531,35 @@ 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(); done = (len < BUFSIZE); if (!XML_Parse(parser, buf, len, done)) { + wxString error(XML_ErrorString(XML_GetErrorCode(parser)), + *wxConvCurrent); wxLogError(_("XML parsing error: '%s' at line %d"), - XML_ErrorString(XML_GetErrorCode(parser)), + error.c_str(), XML_GetCurrentLineNumber(parser)); - return FALSE; + ok = FALSE; + break; } } while (!done); - SetVersion(ctx.version); - SetFileEncoding(ctx.encoding); - SetRoot(ctx.root); + if (ok) + { + if (!ctx.version.IsEmpty()) + SetVersion(ctx.version); + if (!ctx.encoding.IsEmpty()) + SetFileEncoding(ctx.encoding); + SetRoot(ctx.root); + } + else + { + delete ctx.root; + } XML_ParserFree(parser); #if !wxUSE_UNICODE @@ -544,7 +567,7 @@ bool wxXmlDocument::Load(wxInputStream& stream, const wxString& encoding) delete ctx.conv; #endif - return TRUE; + return ok; } @@ -560,7 +583,7 @@ inline static void OutputString(wxOutputStream& stream, const wxString& str, { if (str.IsEmpty()) return; #if wxUSE_UNICODE - const wxWX2MBbuf buf(str.mb_str(convFile ? *convFile : wxConvUTF8)); + const wxWX2MBbuf buf(str.mb_str(*(convFile ? convFile : &wxConvUTF8))); stream.Write((const char*)buf, strlen((const char*)buf)); #else if ( convFile == NULL ) diff --git a/contrib/src/xrc/xmlres.cpp b/contrib/src/xrc/xmlres.cpp index 0a1b72cd3a..34c7f505e4 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,11 +100,30 @@ 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)) + { + // 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 + fnd = wxFileSystem::FileNameToURL(fnd); +#endif + } + +#if wxUSE_FILESYSTEM + if (fnd.Lower().Matches(wxT("*.zip")) || + fnd.Lower().Matches(wxT("*.xrs"))) { - rt = rt && Load(fnd + wxT("#zip:*.xmlbin")); rt = rt && Load(fnd + wxT("#zip:*.xrc")); } else @@ -146,7 +166,6 @@ void wxXmlResource::ClearHandlers() } - wxMenu *wxXmlResource::LoadMenu(const wxString& name) { return (wxMenu*)CreateResFromNode(FindResource(name, wxT("wxMenu")), NULL, NULL); @@ -261,7 +280,7 @@ static void ProcessPlatformProperty(wxXmlNode *node) isok = TRUE; else { - wxStringTokenizer tkn(s, " |"); + wxStringTokenizer tkn(s, wxT(" |")); while (tkn.HasMoreTokens()) { @@ -311,9 +330,9 @@ void wxXmlResource::UpdateResources() #if !wxUSE_UNICODE && wxUSE_INTL if ( (GetFlags() & wxXRC_USE_LOCALE) == 0 ) { - // In case we are not using wxLocale to translate strings, convert the strings - // GUI's charset. This must not be done when wxXRC_USE_LOCALE is on, because - // it could break wxGetTranslation lookup. + // In case we are not using wxLocale to translate strings, convert the + // strings GUI's charset. This must not be done when wxXRC_USE_LOCALE + // is on, because it could break wxGetTranslation lookup. encoding = wxLocale::GetSystemEncodingName(); } #endif @@ -380,7 +399,11 @@ void wxXmlResource::UpdateResources() wxLogError(_("Resource files must have same version number!")); ProcessPlatformProperty(m_data[i].Doc->GetRoot()); +#if wxUSE_FILESYSTEM m_data[i].Time = file->GetModificationTime(); +#else + m_data[i].Time = wxDateTime(wxFileModificationTime(m_data[i].File)); +#endif } # if wxUSE_FILESYSTEM @@ -408,10 +431,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 +525,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 +541,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 +573,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 +602,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 +657,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; @@ -618,6 +712,7 @@ void wxXmlResourceHandler::AddWindowStyles() XRC_ADD_STYLE(wxTRANSPARENT_WINDOW); XRC_ADD_STYLE(wxWANTS_CHARS); XRC_ADD_STYLE(wxNO_FULL_REPAINT_ON_RESIZE); + XRC_ADD_STYLE(wxWS_EX_BLOCK_EVENTS); } @@ -634,7 +729,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 +809,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 +904,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 +913,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) @@ -1027,7 +1097,7 @@ void wxXmlResourceHandler::SetupWindow(wxWindow *wnd) //FIXME : add cursor if (HasParam(wxT("exstyle"))) - wnd->SetExtraStyle(GetStyle(wxT("exstyle"))); + wnd->SetExtraStyle(wnd->GetExtraStyle()|GetStyle(wxT("exstyle"))); if (HasParam(wxT("bg"))) wnd->SetBackgroundColour(GetColour(wxT("bg"))); if (HasParam(wxT("fg"))) @@ -1054,12 +1124,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 +1170,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 +1194,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 +1236,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 +1276,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..4075660f26 100644 --- a/contrib/src/xrc/xmlrsall.cpp +++ b/contrib/src/xrc/xmlrsall.cpp @@ -43,7 +43,7 @@ void wxXmlResource::InitAllHandlers() #endif AddHandler(new wxListCtrlXmlHandler); #if wxUSE_CHECKLISTBOX - AddHandler(new wxCheckListXmlHandler); + AddHandler(new wxCheckListBoxXmlHandler); #endif #if wxUSE_CHOICE AddHandler(new wxChoiceXmlHandler); @@ -94,4 +94,15 @@ void wxXmlResource::InitAllHandlers() AddHandler(new wxGenericDirCtrlXmlHandler); #endif AddHandler(new wxFrameXmlHandler); + AddHandler(new wxScrolledWindowXmlHandler); + AddHandler(new wxSplitterWindowXmlHandler); +#if wxUSE_WIZARDDLG + AddHandler(new wxWizardXmlHandler); +#endif +#if wxUSE_STATUSBAR + AddHandler(new wxStatusBarXmlHandler); +#endif +#if wxUSE_TOGGLEBTN + AddHandler(new wxToggleButtonXmlHandler); +#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..5820dee366 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" @@ -47,6 +48,8 @@ public: #if wxUSE_GUI bool OnInit(); + int OnRun() { return 0; } + int OnExit() { return retCode; } #else virtual int OnRun(); #endif @@ -84,18 +87,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 }, @@ -118,7 +121,7 @@ int XmlResApp::OnRun() else CompileRes(); #if wxUSE_GUI - return FALSE; + return TRUE; #else return retCode; #endif @@ -139,33 +142,47 @@ 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++) + { +#ifdef __WINDOWS__ + wxString fn=wxFindFirstFile(cmdline.GetParam(i), wxFILE); + while (!fn.IsEmpty()) + { + parFiles.Add(fn); + fn=wxFindNextFile(); + } +#else parFiles.Add(cmdline.GetParam(i)); +#endif + } } @@ -194,19 +211,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 +238,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 +256,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 +344,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 +354,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 +386,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 +397,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 +410,7 @@ static wxString FileToCppArray(wxString filename, int num) delete[] buffer; - output += "};\n\n"; + output += _T("};\n\n"); return output; } @@ -369,61 +422,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 +490,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 +505,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 +521,7 @@ static wxString FileToPythonArray(wxString filename, int num) delete[] buffer; - output += "\"\"\"\n\n"; + output += _T("\"\"\"\n\n"); return output; } @@ -479,26 +533,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 +566,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 +583,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 +622,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/bitmaps/open.bmp b/contrib/utils/wxrcedit/bitmaps/open.bmp index 9ba2e2f71b..25396b577b 100644 Binary files a/contrib/utils/wxrcedit/bitmaps/open.bmp and b/contrib/utils/wxrcedit/bitmaps/open.bmp differ diff --git a/contrib/utils/wxrcedit/bitmaps/open.xpm b/contrib/utils/wxrcedit/bitmaps/open.xpm index c47593fffc..8fad48daaa 100644 --- a/contrib/utils/wxrcedit/bitmaps/open.xpm +++ b/contrib/utils/wxrcedit/bitmaps/open.xpm @@ -1,229 +1,88 @@ /* XPM */ -static char * open_xpm[] = { -"24 24 202 2", -" c None", -". c #020202", -"+ c #5A5226", -"@ c #9A8A46", -"# c #C6AE52", -"$ c #EEDE7E", -"% c #FEB26A", -"& c #06060A", -"* c #B6AE7A", -"= c #CEA272", -"- c #E2D27E", -"; c #FEDEA2", -"> c #7A6E4E", -", c #BEAA56", -"' c #1E1E22", -") c #826A4E", -"! c #FEDEA6", -"~ c #F6F6F2", -"{ c #9A7E5A", -"] c #C2BE86", -"^ c #3E3A2A", -"/ c #7E5E3A", -"( c #EADA82", -"_ c #FEDEAE", -": c #FEBE7A", -"< c #BABAB6", -"[ c #7E7E7E", -"} c #625A3A", -"| c #E2DA9A", -"1 c #322212", -"2 c #D2BA5A", -"3 c #9E9E9E", -"4 c #9E7A52", -"5 c #EAEAE6", -"6 c #969262", -"7 c #AEAEAA", -"8 c #826E52", -"9 c #FED69A", -"0 c #DEBE8A", -"a c #DEB67E", -"b c #9E8A66", -"c c #6E5A42", -"d c #C2C2BE", -"e c #32322E", -"f c #EEA256", -"g c #664226", -"h c #BEA67A", -"i c #8A8A8A", -"j c #969692", -"k c #C68246", -"l c #CECECA", -"m c #7A7256", -"n c #DEDEDE", -"o c #362E22", -"p c #6E563A", -"q c #A66A3A", -"r c #625E4A", -"s c #DADAD6", -"t c #4A4A4A", -"u c #FEC282", -"v c #D2BE6A", -"w c #464646", -"x c #363636", -"y c #A6A6A2", -"z c #6E6E72", -"A c #666666", -"B c #261A12", -"C c #B6B6B2", -"D c #FECE92", -"E c #4E3A2A", -"F c #DECA6A", -"G c #DEAE76", -"H c #2A2A26", -"I c #CACAC6", -"J c #3E2A1A", -"K c #5E4A3A", -"L c #F2F2EE", -"M c #929292", -"N c #767676", -"O c #5A5242", -"P c #EEE692", -"Q c #D2D2CE", -"R c #766A3E", -"S c #3E2E1A", -"T c #E6E6E6", -"U c #FAFAFA", -"V c #121212", -"W c #5A5A56", -"X c #EEE69A", -"Y c #968A4E", -"Z c #3E321E", -"` c #867642", -" . c #FEC686", -".. c #423626", -"+. c #3E3E3E", -"@. c #4E4E52", -"#. c #A69246", -"$. c #4A3E36", -"%. c #6E5E3A", -"&. c #E2E2E2", -"*. c #5E5E5A", -"=. c #565246", -"-. c #BEBEBA", -";. c #DAC666", -">. c #4E422A", -",. c #E2D272", -"'. c #8E8E8A", -"). c #D6D6D2", -"!. c #AAAAA6", -"~. c #C6C6C6", -"{. c #FEBA76", -"]. c #868686", -"^. c #969266", -"/. c #F6AA62", -"(. c #9A9A96", -"_. c #5A523A", -":. c #5E5236", -"<. c #525252", -"[. c #A2A29E", -"}. c #7A7A76", -"|. c #FEFEFE", -"1. c #7E6A4E", -"2. c #FEDA9E", -"3. c #EADE8E", -"4. c #EEEEEA", -"5. c #42321E", -"6. c #7E7672", -"7. c #FED296", -"8. c #2E2E2E", -"9. c #F2EA96", -"0. c #826E56", -"a. c #7E6A42", -"b. c #FECA8A", -"c. c #3E3226", -"d. c #5E5E5E", -"e. c #82764E", -"f. c #4E4236", -"g. c #626262", -"h. c #020206", -"i. c #423A2E", -"j. c #422E1A", -"k. c #CEA672", -"l. c #7E6242", -"m. c #727272", -"n. c #6A6A6E", -"o. c #CACACA", -"p. c #F2F2F6", -"q. c #C6C286", -"r. c #828286", -"s. c #F2EAA2", -"t. c #5A564A", -"u. c #565656", -"v. c #AEAEAE", -"w. c #EEE696", -"x. c #8E8E92", -"y. c #7A7A7E", -"z. c #FEDAA6", -"A. c #423226", -"B. c #B6B6B6", -"C. c #AAAAAA", -"D. c #BABABA", -"E. c #DADADA", -"F. c #422A16", -"G. c #F2E68E", -"H. c #16120E", -"I. c #DEC666", -"J. c #EAEAEA", -"K. c #969696", -"L. c #CECECE", -"M. c #BEBEBE", -"N. c #F6F6F6", -"O. c #F2F2F2", -"P. c #C2C2C2", -"Q. c #42362A", -"R. c #FECA8E", -"S. c #8A8A8E", -"T. c #D2D2D2", -"U. c #3E3222", -"V. c #8E8E8E", -"W. c #D6D6D6", -"X. c #A2A2A2", -"Y. c #423222", -"Z. c #422E1E", -"`. c #FED69E", -" + c #323232", -".+ c #362E26", -"++ c #46464A", -"@+ c #FECE96", -"#+ c #9A9A9A", -"$+ c #7A7A7A", -"%+ c #2E2E32", -"&+ c #5E5E62", -"*+ c #CACACE", -"=+ c #9A8A4A", -"-+ c #DEBE8E", -";+ c #DECA6E", -">+ c #2A2A2A", -",+ c #5A5A5A", -"'+ c #FEDAA2", -")+ c #EEEEEE", -"!+ c #FED29A", -"~+ c #727276", -" .+i.c. ", -" 0._ -+8 o ", -" 1.9 c .k.{ h. ", -" H / S ] ^ 4 k.b.a.>. c.Q.o ", -">+x.A . g 1 - w.^.m l.G a 1.0 9 h ) ", -"x n T 3 6.8.+ F G.| * :.p b.D ! ; ; h c ", -" +*+|.L 5 E.g.} Y ,.P X ] ^ 4 = @+2.! b ", -" N N.|.N.p.T.C.+.#.;.$ 9.9.6 > l.G `.z.Q. ", -" n.O.|.|.N.J.W.K.=.R # , e.v 3.* :. .`.i. ", -" W &.U O.O.J.&.T.~.x.u.> $+@.` ;+w.Y.7.Q. ", -" . v.U L )+5 &.E.T.*+P.S.< !.W =+( U.@+i. ", -" . X.O.J.T &.n W.T.L.~.P.D.v.y.} ;.S D Q. ", -" $+4.5 &.E.s T.o.~.P.D.B.7 r._.2 S b.Q. ", -" . n &.n s Q l I ~.-.C C 7 S.O =+U. ... ", -" . T.E.W.T.l ~.d -.< C v.y K.&+%.Z b.Q. ", -" . M v.~.l ~.d D.C B.C.y y M &+%.S u .. ", -" V t ,+B.-.M.B.C v.C.y X.M ~+O S {.A. ", -" +N y v.C.!.X.X.#+M i ++S {.Y. ", -" ' z ].3 #+3 (.j i ++J % Y. ", -" . %+<.M M j j '.d.E /.Z. ", -" >+,+].i '.}.K f j.h.h. ", -" . *.m.}.$.k J . . h.", -" & %+w $.q 1 h.. ", -" H.B "}; +static char *open_xpm[] = { +/* columns rows colors chars-per-pixel */ +"24 24 58 1", +"o c #8AA3B5", +"& c #9AEA53", +"8 c #94A5BD", +"@ c #ABBFCD", +"l c #8399B4", +"c c #EEF0F2", +"$ c #376485", +"+ c #5A809C", +"d c #D1D9E5", +"3 c #446A8C", +"g c #CAD2DC", +"N c #718BA7", +"n c #DCE2EA", +"6 c #4A7291", +"m c #E1E6EE", +"x c #E6EAF1", +"0 c #9EAFC5", +"z c #F5F6F7", +"< c #597B9A", +"= c #8DA0B9", +" c None", +"B c #467291", +"p c #BFC8D9", +"5 c #BFDC9B", +", c #557B9A", +"X c #305F81", +"b c #7393AB", +"4 c #49708B", +"a c #8AB872", +"O c #799BA6", +"% c #6F90A6", +"v c #D7E0E9", +"w c #CAE2AA", +": c #6A89A2", +"2 c #8CB28A", +"> c #B2D58C", +"; c #4F7592", +"f c #FAFCFE", +"h c #A8B6CA", +"t c #ADBACE", +"j c #CBD5E1", +"1 c #A1B2C6", +"k c #F8F9FA", +"r c #FDFDFE", +"* c #7DA09E", +"s c #8FC457", +"# c #215579", +"9 c #9AABC1", +"- c #7F97B0", +"y c #B3BFD1", +"V c #D6DEE6", +"7 c #7A90AC", +"i c #C2CBDB", +". c #829EB5", +"e c #EFF2F5", +"q c #5D7C93", +"M c #B9CAD5", +"u c #BBC4D6", +/* pixels */ +" ", +" ", +" .XoO+@ ", +"######$ @%&&*+ ", +"#=====-; @:&&>, ", +"#======<1 12&&2. ", +"#=======3$$4&&54$$$+ ", +"#==========6>&>2+==+ ", +"#==========+2&&&3==+ ", +"#==7<<< c #D6DEE6", -", c #727272", -"' c #DEE6E6", -") c #2A3E42", -"! c #0A36BE", -"~ c #9ECAEA", -"{ c #7EB2E2", -"] c #565652", -"^ c #8A8A86", -"/ c #96B2BE", -"( c #A2CAE2", -"_ c #DEEEF6", -": c #2A36BA", -"< c #06262A", -"[ c #4A4A4A", -"} c #E6EEF2", -"| c #0E3ABA", -"1 c #2276C6", -"2 c #B2C6DE", -"3 c #6E72BA", -"4 c #566EBE", -"5 c #A6A6B2", -"6 c #9EBEDE", -"7 c #2A2A2A", -"8 c #3A72BE", -"9 c #F6F6F2", -"0 c #6E8EBE", -"a c #727E86", -"b c #0A8AFA", -"c c #3E92D6", -"d c #C6C6C2", -"e c #BADAEE", -"f c #D2D6DA", -"g c #6E76B2", -"h c #464642", -"i c #469AF2", -"j c #86A2C2", -"k c #B6B6B2", -"l c #52AADE", -"m c #BED2EA", -"n c #1252BE", -"o c #222E2E", -"p c #9696B2", -"q c #6EAADA", -"r c #126ECA", -"s c #F2FAFA", -"t c #AEBED6", -"u c #92928E", -"v c #1E1E1E", -"w c #3E7EF6", -"x c #1686F6", -"y c #3E3E3E", -"z c #C6DAE6", -"A c #4A86D2", -"B c #3AAAF6", -"C c #0A76F6", -"D c #62625E", -"E c #B2C2D6", -"F c #C2CEEA", -"G c #7E7E7E", -"H c #62BED6", -"I c #828AAE", -"J c #2E2E2E", -"K c #CAD2DE", -"L c #D2E6F2", -"M c #4E4E4E", -"N c #CECECA", -"O c #5E86C2", -"P c #6A6A6A", -"Q c #F2EEEA", -"R c #5E5E5A", -"S c #767676", -"T c #AEAEAA", -"U c #363636", -"V c #868686", -"W c #A2A2A2", -"X c #E2E2DA", -"Y c #4A6EBE", -"Z c #92AEF6", -"` c #E6E6E2", -" . c #226EFE", -".. c #F6FAFA", -"+. c #8A96AE", -"@. c #96A2BE", -"#. c #3A3A36", -"$. c #BEBEBE", -"%. c #8AD2EE", -"&. c #8AB2CE", -"*. c #3292F6", -"=. c #225ABE", -"-. c #76B6DE", -";. c #FAFEFE", -">. c #222222", -",. c #96B2DA", -"'. c #0296F6", -"). c #CACAC6", -"!. c #BAE6FA", -"~. c #9E9EAA", -"{. c #5A5A5A", -"]. c #B2B2BE", -"^. c #8E8E8E", -"/. c #7A8286", -"(. c #BABAB6", -"_. c #D2D2CE", -":. c #9E9E9A", -"<. c #DADAD6", -"[. c #D2DAEE", -"}. c #3276CA", -"|. c #AEC6EE", -"1. c #96D2EE", -"2. c #52524E", -"3. c #7A7A76", -"4. c #42423E", -"5. c #DADEDE", -"6. c #323232", -"7. c #9A9696", -"8. c #0A0A0E", -"9. c #161616", -"0. c #9AD2EE", -"a. c #B2CED6", -"b. c #3EB2F6", -"c. c #666662", -"d. c #82827E", -"e. c #B2B2AE", -"f. c #B6B6C2", -"g. c #524A4A", -"h. c #BEC2C2", -"i. c #7292CE", -"j. c #92B2DE", -"k. c #969696", -"l. c #EEEEEA", -"m. c #FAF2EE", -"n. c #EAEAEA", -"o. c #262626", -"p. c #F2F2F6", -"q. c #5E6EBA", -"r. c #76AEE6", -"s. c #FEFEFE", -"t. c #3A7AD2", -"u. c #3A3E3A", -"v. c #7A7A7A", -"w. c #86A2CE", -"x. c #76B2EA", -"y. c #DEF2FA", -"z. c #6E6E6E", -"A. c #56565A", -"B. c #E2E2DE", -"C. c #CACACE", -"D. c #464646", -"E. c #3A3A3A", -"F. c #96CAEA", -"G. c #DEEAEE", -"H. c #E6F2F6", -"I. c #AAAAAA", -"J. c #BABABA", -"K. c #828286", -"L. c #B2B2B6", -"M. c #CAC6C6", -"N. c #D6D2CE", -"O. c #464242", -"P. c #C2C2C2", -"Q. c #121212", -"R. c #AADEEE", -"S. c #9ECEEE", -"T. c #6A7AAA", -"U. c #D2EAFA", -"V. c #CEDEEA", -"W. c #DEDEDA", -"X. c #E6E2E2", -"Y. c #36363A", -"Z. c #46464A", -"`. c #3A3A3E", -" + c #FAFAF6", -".+ c #D6D6D2", -"++ c #EAE6E6", -"@+ c #DAE6EE", -"#+ c #C6C6CA", -"$+ c #5E5E62", -"%+ c #9E9EA2", -"&+ c #FAFAFE", -"*+ c #BAB6B6", -"=+ c #DEDADA", -"-+ c #9A9A9A", -";+ c #8A8A8A", -">+ c #2A2A2E", -",+ c #F6F6F6", -"'+ c #CACACA", -")+ c #565656", -"!+ c #828282", -"~+ c #7A7A7E", -"{+ c #E2E2E2", -"]+ c #DEDEDE", -"^+ c #0E36BE", -"/+ c #EAEEEE", -"(+ c #F6F2F6", -"_+ c #727276", -":+ c #525252", -"<+ c #D2D2D2", -"[+ c #424242", -"}+ c #C2C2C6", -"|+ c #C6C6C6", -"1+ c #86868A", -"2+ c #929292", -"3+ c #626262", -"4+ c #CECECE", -"5+ c #4A4A4E", -"6+ c #7E7E82", -"7+ c #A2A2A6", -"8+ c #8E8E92", -"9+ c #BABABE", -"0+ c #3E3E42", -"a+ c #4E4E52", -"b+ c #5E5E5E", -"c+ c #AEAEAE", -"d+ c #E6E6E6", -"e+ c #9E9E9E", -"f+ c #666666", -"g+ c #B2B2B2", -"h+ c #FAFAFA", -"i+ c #D6D6D6", -"j+ c #06060A", -"k+ c #B6B6B6", -"l+ c #1E1E22", -"m+ c #BEBEC2", -"n+ c #225AC2", -"o+ c #DADADA", -"p+ c #96CAEE", -"q+ c #AAAAAE", -" 3.D S v., P c.R )+:+[ h Z.Z.) 7 ", -"v.<+!+]+s.s.s.s.s.s.s.s.s.;.U.1.a ", -"3+!+c.]+s.s.s.s.s.s.s.s. +!.B i - 8.8. ", -"v.o+]+n.s.s.s.s.p.W.<.i+X F.x .T.2+; 8. ", -"3.s.s.s.s.s.9 ).^ )+2.)+M a O Z ~.;+2+8. ", -"P s.s.s.s.s.W [+3.'+#+4+J.R J I.T ^ 2+8. ", -"b+ +s.s.9 W D <+ +H.% [.n./+h.M {.G ^ 8. ", -"{.s.s.s.(.)+<+s.s.G.# 2 a.-.m c+6.f+^ 8. ", -"M s.s.p.G ^. +s.s.,+> > &.r i..+$+)+V 8. ", -"h s.s.).[+<+s.s.s.y.~ j.h.@.]._.; U V 8. ", -"h s. +).4.<+s y._ e r.}.@.j 0 ).:.7 V 8. ", -"D.h+ +P.`._._ F.S.{ A n+4 8 ! f.k.7 G 8. ", -"D.9 9 4+D.).U.l c 8 =.! g I 3 (.V U v.8. ", -"D.p.p.l.G V @+q 1 n | : 5 e.k c+2.[ 3.8. ", -"D.9 p.R./ [ $.> w.Y q.p c+L.$._+Q.g.S 8. ", -"O.m.%.'.*.+.:+e+4+_.P.m+$.c+, 7 @ = d.8. ", -"[+Q # C w f -+U M v.8+^.P 5+6.+ & :+h v ", -"[+++' |.F {+=+J.^ D.o.J )+!+7.< 7 {.:+$ ", -"[+` {+{+B.H f K <+P.(.(.g+k+h.N , 6.{.:+ ", -"4.{+B.5.~ x.6 t _.C.'+'+#+'+P.}+k.:+E.b+:+ ", -"0+{+{+z b.b * ,.E '+'+'+|+}+P.P.;+P b+7 {.)+ ", -"8.j+. >.l+6.E.y y y E.U 6.6.J >+7 4.V >.o.{.:+ ", -" . I.e+e+:.-+7.; k.u u ;+V !+G v.!+8. 7 {.v ", -" 8.E.E.E.Y.E.E.Y.#.Y.Y.E.U U Y.U J 8. Q. "}; +static char *preview_xpm[] = { +/* columns rows colors chars-per-pixel */ +"24 24 39 1", +"5 c Black", +": c #97C4E7", +"# c #4381AA", +"8 c #FFFFFF", +", c #71B2DE", +"+ c #538BB1", +"% c #D1E5F5", +"0 c #63B3DE", +"& c #CAE1F3", +"u c #7AC4E5", +"* c #C3DDF1", +"X c #74A1BD", +"= c #BCD9EF", +"3 c #619BC4", +"1 c #4B8EBF", +"o c #6B97B6", +". c #4B82A8", +" c None", +"9 c #54A6D8", +"< c #71A8D1", +"> c #85BBE2", +"4 c #DEEDF8", +"@ c #4388B4", +"t c #F7FBFD", +"w c #FAFCFE", +"2 c #DAEAF7", +"q c #E9F3FA", +"p c #76BAE2", +"$ c #7FA6C0", +"i c #C00000", +"y c #FDFDFE", +"O c #5896BE", +"e c #B6D5EE", +"6 c #87ABC3", +"; c #A5CCEA", +"7 c #E5F0F9", +"- c #AFD1EC", +"a c #F4F9FD", +"r c #8FB0C3", +/* pixels */ +" ", +" ", +" .XXXooOO++@# ", +" $%&*=-;::>,<1 ", +" $2%&*=-;::><:3 ", +" $42%555-;::<&:3 ", +" 67558885590+ ", +" 58888888885=e;::+ ", +" 58888888885*=e;:O ", +" r5888888850000e;O ", +" r5t88888852%&*=eo ", +" rw55t8855542%&*=o ", +" rywu5555ii5pp0&*X ", +" ryywwtta5ii542%&X ", +" r8yywwtta5ii542%X ", +" r88uuuuuuu5ii542$ ", +" r888yywwtta5ii54$ ", +" r8888yywwttt5ii5$ ", +" r88888yywwttt5i56 ", +" r888888yywwtta556 ", +" rrrrrrrrrrrrrr66r " +}; diff --git a/contrib/utils/wxrcedit/bitmaps/save.bmp b/contrib/utils/wxrcedit/bitmaps/save.bmp index 24ff5cf10f..5293ab24ca 100644 Binary files a/contrib/utils/wxrcedit/bitmaps/save.bmp and b/contrib/utils/wxrcedit/bitmaps/save.bmp differ diff --git a/contrib/utils/wxrcedit/bitmaps/save.xpm b/contrib/utils/wxrcedit/bitmaps/save.xpm index d00895a81e..6ee4a03724 100644 --- a/contrib/utils/wxrcedit/bitmaps/save.xpm +++ b/contrib/utils/wxrcedit/bitmaps/save.xpm @@ -1,222 +1,69 @@ /* XPM */ -static char * save_xpm[] = { -"24 24 195 2", -" c None", -". c #2B2B3B", -"+ c #3F3F55", -"@ c #9191DF", -"# c #51516D", -"$ c #A4A4DF", -"% c #B2B2FF", -"& c #47479C", -"* c #525252", -"= c #28283B", -"- c #9C9CEF", -"; c #5252B0", -"> c #F2F2F2", -", c #E7E7E7", -"' c #585858", -") c #373755", -"! c #9292DF", -"~ c #9494EF", -"{ c #6969BE", -"] c #DDDDED", -"^ c #DFDFDF", -"/ c #EEEEEE", -"( c #24243B", -"_ c #8989DF", -": c #9E9EFF", -"< c #4E4EAF", -"[ c #C6C6D6", -"} c #FAFAFA", -"| c #D6D6D6", -"1 c #21213B", -"2 c #9292FF", -"3 c #8181EF", -"4 c #4C4CB0", -"5 c #F3F3F3", -"6 c #FFFFFF", -"7 c #DCDCDC", -"8 c #F0F0F0", -"9 c #FDFDFD", -"0 c #2C2C55", -"a c #7777DF", -"b c #8989FF", -"c c #4444C0", -"d c #BFBFDF", -"e c #EFEFEF", -"f c #FEFEFE", -"g c #E6E6E6", -"h c #1D1D3B", -"i c #6E6EDF", -"j c #7F7FFF", -"k c #6E6EEF", -"l c #4747B0", -"m c #FBFBFB", -"n c #D7D7D7", -"o c #19193B", -"p c #7373FF", -"q c #5F5FE7", -"r c #4444B0", -"s c #DFDFEF", -"t c #DBDBDB", -"u c #34344C", -"v c #222255", -"w c #5B5BDF", -"x c #6969FF", -"y c #5050DF", -"z c #7E7ED7", -"A c #5555A7", -"B c #5B5BEF", -"C c #5959C0", -"D c #ECECEC", -"E c #4646BF", -"F c #2B2B6D", -"G c #16163B", -"H c #5353DF", -"I c #6060FF", -"J c #4E4EE7", -"K c #5454A8", -"L c #B3B3BB", -"M c #9494A9", -"N c #5353EF", -"O c #4141B0", -"P c #E0E0E0", -"Q c #CFCFE7", -"R c #4343C0", -"S c #5959F7", -"T c #1382C7", -"U c #000060", -"V c #101C3C", -"W c #4A63F8", -"X c #4545E7", -"Y c #54549C", -"Z c #A8A8B7", -"` c #3232A1", -" . c #4949CF", -".. c #9798B2", -"+. c #5454FF", -"@. c #3E3EB0", -"#. c #2424B8", -"$. c #4A63F7", -"%. c #108CD4", -"&. c #0000C5", -"*. c #000052", -"=. c #001934", -"-. c #1445C8", -";. c #5151A7", -">. c #3F3FAD", -",. c #3636E7", -"'. c #656BD2", -"). c #9FA1BC", -"!. c #BFBFBF", -"~. c #3939DF", -"{. c #4A4AFF", -"]. c #4040EF", -"^. c #5151C0", -"/. c #3A3ABF", -"(. c #415AF8", -"_. c #1477D9", -":. c #0019D0", -"<. c #00005C", -"[. c #B3B3D3", -"}. c #A5A8BA", -"|. c #474ECB", -"1. c #5A62D2", -"2. c #B1B4BD", -"3. c #5050A8", -"4. c #3434E7", -"5. c #4040FF", -"6. c #3737EF", -"7. c #3B3BB0", -"8. c #8F8FD7", -"9. c #3737C0", -"0. c #3C3CF7", -"a. c #0D89D4", -"b. c #000056", -"c. c #666666", -"d. c #E1E1E1", -"e. c #A5AABE", -"f. c #A7A9B3", -"g. c #B3B3B3", -"h. c #A8A8B0", -"i. c #4444A4", -"j. c #0000A0", -"k. c #2B2BE7", -"l. c #3434FF", -"m. c #2E47F7", -"n. c #0A86D4", -"o. c #757575", -"p. c #D5D5D5", -"q. c #A8A8A8", -"r. c #4141A0", -"s. c #0303DF", -"t. c #0202FF", -"u. c #0606BF", -"v. c #2121DF", -"w. c #2B2BFF", -"x. c #263FF8", -"y. c #0C6FD9", -"z. c #DEDEDE", -"A. c #9C9C9C", -"B. c #46468E", -"C. c #0808E7", -"D. c #0707FF", -"E. c #0505FF", -"F. c #0202DF", -"G. c #1111C0", -"H. c #2121FF", -"I. c #0783D4", -"J. c #CBCBD2", -"K. c #393996", -"L. c #0D0DE7", -"M. c #0D0DFF", -"N. c #0C0CFF", -"O. c #0808B8", -"P. c #132CF7", -"Q. c #0480D4", -"R. c #404060", -"S. c #0536B1", -"T. c #112AF8", -"U. c #1111FF", -"V. c #0C0CDF", -"W. c #0404BF", -"X. c #0A23F8", -"Y. c #0467D9", -"Z. c #001988", -"`. c #1111E7", -" + c #0202C0", -".+ c #0101F7", -"++ c #017DD4", -"@+ c #00009D", -"#+ c #000C9C", -"$+ c #0031F0", -"%+ c #007CD4", -"&+ c #001B6A", -"*+ c #0068C2", -"=+ c #000230", -"-+ c #000032", -" . ", -" + @ # ", -" . $ % & * ", -" = % - ; > , ' ", -" ) ! ~ { ] ^ / , * ", -" ( _ : < [ > } ^ > | * ", -" 1 2 3 4 5 6 7 8 9 7 > , ' ", -" 0 a b c d ^ e 6 ^ / f ^ e g * ", -" h i j j k l m ^ 5 m ^ e } ^ 5 n * ", -" o p p p q p p r s 7 5 6 7 > 9 t 5 , u ", -" v w x y z A y x B C s ^ e 6 ^ D f , d E F ", -"G H I J K L M K J I N O m P 5 m ^ 5 Q R S T U ", -"V W X Y Z ` ...Y X +.+.@.s 7 5 6 Q #.$.%.&.*. ", -"=.-.;.Z >.,.'.).!.;.~.{.].^.s , d /.(._.:.*. ", -" <.[.}.|.1.2.!.!.L 3.4.5.6.7.8.9.0.a.:.b. ", -" c.d.e.f.g.g.g.h.i.j.k.l.l.l.m.n.&.*. ", -" o.p.g.q.q.q.r.s.t.u.v.w.x.y.:.*. ", -" o.z.A.A.B.C.D.E.F.G.H.I.:.b. ", -" c.J.K.L.M.N.C.O.P.Q.&.*. ", -" R.S.T.U.V.W.X.Y.:.*. ", -" Z.Q.`. +.+++:.b. ", -" @+#+$+%+&.*. ", -" &+*+:.*. ", -" =+-+ "}; +static char *save_xpm[] = { +/* columns rows colors chars-per-pixel */ +"24 24 39 1", +"4 c #AAC1E8", +"* c #B9CDED", +"7 c #DCE6F6", +"3 c #2E5BA6", +"% c #FFFFFF", +"$ c #C6D6F0", +"O c #4A7CCE", +"9 c #B0C6EA", +"+ c #2D59A3", +"< c #6992D7", +"- c #D9E4F5", +"2 c #214279", +"& c #1C3866", +"5 c #C3D4EF", +"> c #E1E9F7", +": c #ADC4E9", +"q c #CBD9F1", +"w c #DAE5F6", +"a c #366BC2", +". c #3161B1", +" c None", +"1 c #4377CD", +"e c #9FB9E5", +"r c #98B5E4", +"@ c #5584D1", +"u c #82A5DE", +"i c #305FAC", +"8 c #A5BEE7", +"6 c #D2DFF4", +"t c #3366B9", +"y c #8FAEE1", +"X c #2E5CA8", +"; c #F5F8FD", +"# c #3467BC", +"o c #3C72CA", +"p c #3264B6", +"0 c #C0D1EE", +", c #CFDDF3", +"= c #87A8DF", +/* pixels */ +" ", +" ..XoOOOOOOOOOOOOO+.. ", +" .@@#$%%%%%%%%%%%%%.@@. ", +" .@&#*============-.&@. ", +" .@@#$------------;.@@. ", +" .@@#*::::::::::::>.@@. ", +" .@@#*::::::::::::>.@@. ", +" .@@#$------------;.@@. ", +" .@@#*============,.@@. ", +" .@@#$%%%%%%%%%%%%%.@@. ", +" .@@#<=============.@@. ", +" .@@O111111111111111@@. ", +" .@@@@@@@@@@@@@@@@@@@@. ", +" .@@@@@@@@@@@@@@@@@@@@. ", +" .@@@#..............@@. ", +" .@@@.%%%%%%%%%%%%%.@@. ", +" .@@@.%&22234*5677%.@@. ", +" .@@@.%&2223890qw7%.@@. ", +" .@@@.%&2223e9*q67%.@@. ", +" .@@@.%&2223e495,,%.@@. ", +" .@@@.%&2223r890qq%.@@. ", +" ot@@.%&222+ye9*55%.@@. ", +" ot@.%uuuuuye495%%.@@. ", +" oi+..ppttaaaoooti..+ " +}; 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..2b5973a211 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); @@ -194,7 +197,7 @@ void PreviewFrame::Preview(wxXmlNode *node,const wxString &version) void PreviewFrame::PreviewMenu() { - wxMenuBar *mbar; + wxMenuBar *mbar = NULL; if (XmlGetClass(m_Node) == _T("wxMenuBar")) mbar = m_RC->LoadMenuBar(m_Node->GetPropVal(_T("name"), _T("-1"))); @@ -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..c4eededefe 100644 --- a/debian/README.Debian +++ b/debian/README.Debian @@ -1,6 +1,30 @@ wxwindows for Debian ---------------------- +Note: After some eleven years, the wxWindows project has undergone a + change of name and is now formally known upstream as wxWidgets. + This will not be altered retroactively for the existing Debian + packages of 2.4, since forcing a recompile for every dependent + package just to change this is simply unwarranted. The Debian + packages will adopt the name wxwidgets for use from 2.5 onward. + + The name change itself will not cause source incompatibilities, + and the library api will not be altered because of it, however + other maintainers will need to update their build dependencies + to accommodate a name as well as a version change for this one. + + wxwindows.org will continue to refer to the existing project + site probably until sometime in 2005. You should update any + references to use wxwidgets.org before then. + + Why have we done this? + The new owners of the wxwindows.org domain have requested it. + + Why have they done this? + Who can say... I see pat@sf is crowing about a project named + WiX that they just accepted. Perhaps they can tell you more. + + The following packages are built from the wxWindows CVS source. libwxbase wxBase runtime shared libraries @@ -24,15 +48,15 @@ wxwin-examples wxWindows and wxPython demos and samples (source) wxwin-i18n message catalogs for native language support - The following three can be built from the source package + The following binaries 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 +68,28 @@ 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. + You can build all of these extra packages using the binary-cross + target in debian/rules. + + + It is also possible to build a libwxgtk-dbg-python package. + There are some limitations (like this package cannot be installed + concurrently with the release version), but some developers may + find such a thing useful in any case. It will transparently + replace the release package for installed apps that depend on the + release package, but should NEVER be used when preparing packages + for upload. This package may be created from the source using the + binary-dbg-py target in debian/rules. (note that doing this will + also destroy any release build that exists in the same tree, they + cannot coexist there either yet) + + + Finally, because all of these packages can take quite some time to + build, the source package supports the use of distcc. The package + builds will automatically parallelise to suit the number of hosts + you have listed in DISTCC_HOSTS. This will work for both native + and cross builds of the c++ libraries, if you have the relevant + compilers on all your build hosts. -- Ron Lee , Sun, 13 Feb 2000 18:40:00 +1030 diff --git a/debian/README.examples b/debian/README.examples new file mode 100644 index 0000000000..e9beaf70e9 --- /dev/null +++ b/debian/README.examples @@ -0,0 +1,22 @@ + +These examples are provided as extended documentation for the wxWindows +package. If you wish to actually run them rather than just browse them +as documents you should copy them into a working directory elsewhere +first. Note that some of them will attempt to write to the current +working directory, or to the home directory of the user they are run as. + +Some of the files have been compressed in accordance with Debian policy +regarding documentation, you will need to uncompress such files before +building or executing them. + +The examples provided here typically show a minimal implementation of +the feature(s) they are demonstrating. There are examples of more +complete (mini) applications, available in the /wxPython/samples and +/demos directories of the wxWidgets cvs repository (which is browsable +via http://cvs.wxwidgets.org), or of course you can always apt-get the +source of any wx using package for some less contrived examples of +real world wx applications. + + Ron + + diff --git a/debian/changelog b/debian/changelog index f50761b210..23adc8e773 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,278 @@ +wxwindows2.4 (2.4.3.1) unstable; urgency=high + + * This one is for Sarge. + * Restore some symbols inadvertantly removed before the last snapshot. + We are going to tolerate the newly added symbols that should have + resulted in an soname change. Not as a habit though. + * Restore the static builds for sarge, we can't be easily certain + of no package, or no build script they use, doing something + stupid that relies on them, even tangentially. Too late to + test that now, so be on notice, its a sign-o-the-times for etch. + * New artwork. See below. + * Forge the internal version number to be wx2.4.2 / wxPy2.4.2.4 for + this release, to be 100% compatible with the binaries already in + testing. Some packages (boa-constructor being the first reported) + check this at runtime and cannot tolerate a library version upgrade + without modification to their own code. This is an issue to resolve + after the freeze. + + -- Ron Lee Wed, 25 May 2005 11:36:49 +0930 + +wxwindows2.4 (2.4.3) unstable; urgency=medium + + * Really should be high urgency, as this resolves more licence + trouble found in 2.4.2.6.1, but we are well frozen and the + changes are extensive where not major, so I'm a little more + cautious of pushing this through as hard as the last upload. + - Much of the artwork has been replaced by images from a known + good source. + - Many files with missing or wrong licence/attribution have been + amended or replaced. + - The afm files have been removed as they are GPL and it is not + clear they can be (universally) distributed with wx under its + more relaxed licence. We should source these via a dependency + on some other Debian package. Printing with wx2.4 may be + affected without those files. + The most promising option is probably to backport the printing + code from 2.6 but that cannot be considered even remotely viable + for sarge. My apologies to the clear-felling industry while we + sort this one out. + Many thanks to all the people who found and reported potential for + trouble, and who lent their support to ensure it would be fixed. + + * The library package names themselves now incorporate the soname, + this should have been done long ago (per common best practice), + but this branch again feigned stability well. + We're going to need this for clean upgrades if more changes are + made after the freeze. Provides the old package names at present + for compatibility with existing dependent packages, but may simply + conflict/replace or ignore them in future if and as required. + + Correction: we cannot seamlessly make this transition at present, + since some dependent packages use a versioned dependency which + ignores the virtual package that would be provided. Take out its + teeth again until we can. + + * Drop support for the 'universal' builds. In 2.4 they have always + been universally useless to us, no need to keep the cruft for them + any longer. + * Drop the static builds also, time is proving them worse than useless + and there is already sufficient danger to be found in wx build + combinations without encouraging trouble down that avenue too. + + Neither of these two prunings affect any existing package, + but both are consistent with existing long term plans. + + -- Ron Lee Fri, 20 May 2005 11:42:40 +0930 + +wxwindows2.4 (2.4.2.6.1) unstable; urgency=high + + * High urgency because this removes some source files we appear + not to have permssion to distribute. Fortunately their removal + does not effect any of the existing package binaries. This must + propagate through the archive before we freeze. Closes: #306013 + * Remove typo apostrophe in control.in Closes: #268527 + * There are no other changes in this otherwise unintended release, + it should have no effect on dependent packages. + + -- Ron Lee Sun, 24 Apr 2005 01:14:56 +0930 + +wxwindows2.4 (2.4.2.7) unstable; urgency=low + + * vapourware bugfix release... + + -- Ron Lee Thu, 2 Dec 2004 01:30:28 +1030 + +wxwindows2.4 (2.4.2.6) unstable; urgency=high + + * High urgency so as not to reset the shotclock for getting wx and + its deps moving into testing. All changes since the last release + are superficial. + * Reapply HURD/K*BSD patch fragment that should not have been reverted. + Closes: #217726 (Make a wish, the third time is lucky so I'm told.) + * Updated .po files. + + -- Ron Lee Mon, 2 Aug 2004 14:50:07 +0930 + +wxwindows2.4 (2.4.2.5) unstable; urgency=medium + + * Medium urgency to keep things moving for the libtiff fudge. + * Switch to dhv4, libtiff4. + * Fix menu quoting. + * Whittled down on some of the build config scripts that weren't + really earning their weight. + * Check for DISTCC_HOSTS and set the number of make -j jobs according + to the number of hosts it contains. + * Purge the .pyc from site-packages/wx too. They are generated on + site at install time. + * Includes type correctness fix for 64bit arch's. Closes: #197661 + * Merged patches from Robert Millan for HURD/K*BSD support back from + cvs head. Closes: #217726 + * Store the python version we preconfigure virgin source with, then + people don't need the default python package installed to build + from source, just the packages declared in the build-deps. Fix + the -python postinst to use this when byte compiling too. + Closes: #259128 (and fixes #258529) + * Added README.examples to explain that these examples are extended + documentation for coders, rather than trial apps for users. + Closes: #212894 + * Dropped the examples from the demos subdir, the samples cover a lot + more ground than they used to and are generally more up to date, + it's also no longer hard to find a broad range of real applications + with source. Provided more external pointers in the README. + Closes: #258530 after discussion with the submitter. This is a bit + less c++ for your python, but I'm not convinced yet that either half + is such a burden on the other as to warrant an extra package here + at this stage. + * Fix linking of wxgtk_gl to include the proper dependency on wxgtk. + Remove suggestion of libgl1, by declaring the full library dependency + we now automatically insist on it. Closes: #262027 + * Include wxrc and wxrcedit in contrib-dev. Added a simple man page + and a menu entry for wxrcedit. Closes: #261811 + * Update gl sample makefiles to use --gl-libs. Thanks to Rich Walker + for picking this up. Closes: #246169 + * Enable the building of a libwxgtk-dbg-python package, but do not + build and upload it by default at this stage. Closes: #220568 + * Does not fix #239782, sorry. + + -- Ron Lee Wed, 28 Jul 2004 03:21:42 +0930 + +wxwindows2.4 (2.4.2.4) unstable; urgency=low + + * Modified build scripts to use pythonX.Y instead of python(>=X.Y) + * Removed bogus hard coded python2.2-xml. Closes: #216182 + * Enabled iostream support despite my opinion of this c++ 'feature'. + Closes: #211050 + * Event handling for menus with bitmaps fixed. Closes: #214788 + * Includes fixed from cvs for wxHTTP and wxURL. Closes: #211023, #213600 + + -- Ron Lee Sat, 25 Oct 2003 13:48:07 +0930 + +wxwindows2.4 (2.4.1.2) unstable; urgency=low + + * New stable release. Closes: #198622 + * Ack python NMU changes, Thanks Josselin! + * Hurd support added to configure. Closes: #191581 + * Fixes ctrl-tab problem with pyslsk. Closes: #187923 + * Fixed configure for autoconf 2.57-3. Closes: #190755 + * Added conflict/replace for -doc. Closes: #202242 + + -- Ron Lee Fri, 22 Aug 2003 15:59:12 +0930 + +wxwindows2.4 (2.4.0.8-0.1) unstable; urgency=low + + * NMU for python transition. + * Build-depend and depend on python 2.3 (closes: #204737). + + -- Josselin Mouette Wed, 13 Aug 2003 22:21:48 +0200 + +wxwindows2.4 (2.4.0.9) unstable; urgency=low + + * Updated package sections to suit the new taxonomy. + * No public release of this version. + + -- Ron Lee Sat, 19 Apr 2003 20:13:39 -0700 + +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/compat b/debian/compat new file mode 100644 index 0000000000..b8626c4cff --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +4 diff --git a/debian/control.in b/debian/control.in index 3d02a9e5f0..64e499df2a 100644 --- a/debian/control.in +++ b/debian/control.in @@ -1,11 +1,11 @@ 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 (>=4.0), flex, bison, gettext, libgtk1.2-dev, =PY, =PY-dev, zlib1g-dev, libjpeg62-dev, libpng2-dev, libtiff4-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.6.1.1 -Package: libwxbase=V +Package: libwxbase=SOV Architecture: any Section: libs Depends: ${shlibs:Depends} @@ -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 +Section: libdevel +Depends: wxwin=V-headers (= ${Source-Version}), libwxbase=SOV (= ${Source-Version}), libc6-dev Suggests: wxwin=V-doc, gettext Conflicts: libwxbase-dev Replaces: libwxbase-dev @@ -36,14 +36,15 @@ 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 -Section: devel +Section: libdevel Priority: extra Depends: wxwin=V-headers (= ${Source-Version}), libc6-dev Conflicts: libwxbase-dbg @@ -55,19 +56,18 @@ 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 provides many internal checks by wxWindows itself that are not performed on apps compiled with the 'release version' libs in the -dev package. -Package: libwxgtk=V +Package: libwxgtk=SOV Architecture: any Section: libs Depends: ${shlibs:Depends} -Suggests: libgl1 Replaces: wxgtk2.1 Description: wxWindows Cross-platform C++ GUI toolkit (GTK+ runtime) wxWindows is a class library for C++ providing GUI (Graphical User @@ -80,9 +80,9 @@ 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 -Suggests: wxwin=V-doc, libstdc++-dev, gettext, libgl-dev +Section: libdevel +Depends: wxwin=V-headers (= ${Source-Version}), libwxgtk=SOV (= ${Source-Version}), libc6-dev +Suggests: wxwin=V-doc, libstdc++-dev, gettext, xlibmesa-gl-dev | libgl-dev, xlibmesa-glu-dev | libglu-dev Conflicts: libwxgtk-dev Replaces: libwxgtk-dev, wxgtk2.1-dev Provides: libwxgtk-dev @@ -97,7 +97,7 @@ Description: wxWindows Cross-platform C++ GUI toolkit (GTK+ development) Package: libwxgtk=V-dbg Architecture: any -Section: devel +Section: libdevel Priority: extra Depends: wxwin=V-headers (= ${Source-Version}), libc6-dev Conflicts: libwxgtk-dbg @@ -108,55 +108,43 @@ Description: wxWindows Cross-platform C++ GUI toolkit (GTK+ development) Interface) and other facilities on more than one platform. Version =V currently supports subsets of GTK+, Motif, and MS Windows. . - This package provides a debug version of the wxGtk library. It is compiled + This package provides a debug version of the wxGTK library. It is compiled both with -g for normal debugger tracing and with the __WXDEBUG__ flag which provides many internal checks by wxWindows itself that are not performed on apps compiled with the 'release version' libs in the -dev package. -Package: libwxgtk=V-python +Package: libwxgtk=SOV-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 +Section: python +Depends: =PY, ${shlibs:Depends} +Suggests: wxwin=V-doc, wxwin=V-examples, =PY-xml +Conflicts: libwxgtk-python, libwxgtk=SOV-dbg-python, python-wxwin, libwxgtk2.2-python-contrib, libwxgtk2.2-python, libwxgtk2.3-python +Replaces: libwxgtk-python, libwxgtk=SOV-dbg-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. + This package provides a Python binding to the wxGTK library and its + contrib libs. If you wish to use xrced you'll also need the python-xml + package installed. -Package: libwxgtk=V-contrib +Package: libwxgtk=SOV-contrib Architecture: any Section: libs -Depends: libwxgtk=V (= ${Source-Version}), ${shlibs:Depends} +Depends: libwxgtk=SOV (= ${Source-Version}), ${shlibs:Depends} Description: wxWindows Cross-platform C++ GUI toolkit (runtime contrib libs) 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 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 -Section: devel -Depends: wxwin=V-headers (= ${Source-Version}), libwxgtk=V-dev (= ${Source-Version}), libwxgtk=V-contrib (= ${Source-Version}), libc6-dev +Section: libdevel +Depends: wxwin=V-headers (= ${Source-Version}), libwxgtk=V-dev (= ${Source-Version}), libwxgtk=SOV-contrib (= ${Source-Version}), libc6-dev Conflicts: libwxgtk-contrib-dev Replaces: libwxgtk-contrib-dev Provides: libwxgtk-contrib-dev @@ -166,13 +154,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 @@ -198,6 +186,9 @@ Description: wxWindows Cross-platform C++ GUI toolkit (i18n support) Package: wxwin=V-doc Architecture: all Section: doc +Conflicts: wxwin2.2-doc, wxwin-doc +Replaces: wxwin-doc +Provides: wxwin-doc Suggests: doc-base, www-browser Description: wxWindows Cross-platform C++ GUI toolkit (documentation) wxWindows is a class library for C++ providing GUI (Graphical User @@ -215,7 +206,30 @@ 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=SOV-dbg-python +Architecture: any +Section: python +Depends: =PY, ${shlibs:Depends} +Suggests: wxwin=V-doc, wxwin=V-examples, =PY-xml +Conflicts: libwxgtk=SOV-python +Replaces: libwxgtk=SOV-python +Provides: libwxgtk=SOV-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 debug library. + It is useful for developers as many common errors may be caught. + Unfortunately it cannot be installed at the same time as the release + packages, but it will replace them for other applications that require + wxPython. You should _never_ upload packages to Debian that depend upon + this package explicitly, use the libwxgtk=SOV-python package instead. + . + If you wish to use xrced you'll also need the python-xml package installed. Package: libwxbase-msw=V-dev Architecture: i386 @@ -269,3 +283,4 @@ Provides: wxwin-headers-msw Description: Extra wxWindows headers for mingw32msvc-cross Headers required by the wxWindows mingw32msvc-cross libraries. + diff --git a/debian/copyright b/debian/copyright index 55c8d06dfc..031863d2c0 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. @@ -190,4 +191,32 @@ under two different licences: DOCUMENTATION TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. +----------------------------------------------------------------------------- + +XRCed is released under the following terms: + +Copyright (c) 2002, Roman Rolinsky +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + diff --git a/debian/libwxbase-dbg.dirs b/debian/libwxbase-dbg.dirs deleted file mode 100644 index c5ba0318f3..0000000000 --- a/debian/libwxbase-dbg.dirs +++ /dev/null @@ -1,5 +0,0 @@ -usr/bin -usr/lib/wx/include/based-=V/wx -usr/share/man/man1 -usr/share/lintian/overrides - diff --git a/debian/libwxbase-dbg.postinst b/debian/libwxbase-dbg.postinst index 2aae1122d4..b6c9d158f2 100644 --- a/debian/libwxbase-dbg.postinst +++ b/debian/libwxbase-dbg.postinst @@ -3,9 +3,5 @@ set -e update-alternatives --install /usr/bin/wx-config wx-config /usr/bin/wxbased-=V-config 50 -if [ "$1" = "configure" ]; then - ldconfig -fi - #DEBHELPER# diff --git a/debian/libwxbase-dev.dirs b/debian/libwxbase-dev.dirs deleted file mode 100644 index adecdf7a7e..0000000000 --- a/debian/libwxbase-dev.dirs +++ /dev/null @@ -1,3 +0,0 @@ -usr/bin -usr/lib/wx/include/base-=V/wx -usr/share/man/man1 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 deleted file mode 100644 index 99e2a10872..0000000000 --- a/debian/libwxbase.dirs +++ /dev/null @@ -1,3 +0,0 @@ -usr/bin -usr/lib - diff --git a/debian/libwxbase.postinst b/debian/libwxbase.postinst deleted file mode 100644 index 881b6e24e2..0000000000 --- a/debian/libwxbase.postinst +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -set -e - -if [ "$1" = "configure" ]; then - ldconfig -fi - -#DEBHELPER# - diff --git a/debian/libwxgtk-contrib-dev.dirs b/debian/libwxgtk-contrib-dev.dirs deleted file mode 100644 index 7e033b0c69..0000000000 --- a/debian/libwxgtk-contrib-dev.dirs +++ /dev/null @@ -1,2 +0,0 @@ -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-contrib-dev.menu b/debian/libwxgtk-contrib-dev.menu new file mode 100644 index 0000000000..95566ea24a --- /dev/null +++ b/debian/libwxgtk-contrib-dev.menu @@ -0,0 +1,3 @@ +?package(libwxgtk=V-contrib-dev):needs="X11" section="Apps/Programming"\ + title="wxrcedit" command="/usr/bin/wxrcedit" + diff --git a/debian/libwxgtk-contrib.dirs b/debian/libwxgtk-contrib.dirs deleted file mode 100644 index 7e033b0c69..0000000000 --- a/debian/libwxgtk-contrib.dirs +++ /dev/null @@ -1,2 +0,0 @@ -usr/lib/ - diff --git a/debian/libwxgtk-contrib.postinst b/debian/libwxgtk-contrib.postinst deleted file mode 100644 index 881b6e24e2..0000000000 --- a/debian/libwxgtk-contrib.postinst +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -set -e - -if [ "$1" = "configure" ]; then - ldconfig -fi - -#DEBHELPER# - diff --git a/debian/libwxgtk-dbg-python.menu b/debian/libwxgtk-dbg-python.menu new file mode 100644 index 0000000000..1b463966d2 --- /dev/null +++ b/debian/libwxgtk-dbg-python.menu @@ -0,0 +1,7 @@ +?package(libwxgtk=SOV-dbg-python):needs="X11" section="Apps/Programming"\ + title="pycrust" command="/usr/bin/pycrust" +?package(libwxgtk=SOV-dbg-python):needs="X11" section="Apps/Programming"\ + title="pyshell" command="/usr/bin/pyshell" +?package(libwxgtk=SOV-dbg-python):needs="X11" section="Apps/Programming"\ + title="xrced" command="/usr/bin/xrced" + diff --git a/debian/libwxgtk-dbg-python.prerm b/debian/libwxgtk-dbg-python.prerm new file mode 100644 index 0000000000..c58c90229c --- /dev/null +++ b/debian/libwxgtk-dbg-python.prerm @@ -0,0 +1,9 @@ +#!/bin/sh + +set -e + +PACKAGE="libwxgtk=V-dbg-python" +dpkg --listfiles $PACKAGE | awk '$0~/\.py$/ {print $0"c\n" $0"o"}' | xargs rm -f >&2 + +#DEBHELPER# + diff --git a/debian/libwxgtk-dbg.dirs b/debian/libwxgtk-dbg.dirs deleted file mode 100644 index f20b3d0ecb..0000000000 --- a/debian/libwxgtk-dbg.dirs +++ /dev/null @@ -1,5 +0,0 @@ -usr/bin -usr/lib/wx/include/gtkd-=V/wx -usr/share/man/man1 -usr/share/lintian/overrides - diff --git a/debian/libwxgtk-dbg.postinst b/debian/libwxgtk-dbg.postinst index d5c1795ebf..dbcb88df23 100644 --- a/debian/libwxgtk-dbg.postinst +++ b/debian/libwxgtk-dbg.postinst @@ -3,9 +3,5 @@ set -e update-alternatives --install /usr/bin/wx-config wx-config /usr/bin/wxgtkd-=V-config 50 -if [ "$1" = "configure" ]; then - ldconfig -fi - #DEBHELPER# diff --git a/debian/libwxgtk-dev.dirs b/debian/libwxgtk-dev.dirs deleted file mode 100644 index 32b01a1202..0000000000 --- a/debian/libwxgtk-dev.dirs +++ /dev/null @@ -1,4 +0,0 @@ -usr/bin -usr/lib/wx/include/gtk-=V/wx -usr/share/man/man1 - 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..bfe1eef9c9 --- /dev/null +++ b/debian/libwxgtk-python.menu @@ -0,0 +1,7 @@ +?package(libwxgtk=SOV-python):needs="X11" section="Apps/Programming"\ + title="pycrust" command="/usr/bin/pycrust" +?package(libwxgtk=SOV-python):needs="X11" section="Apps/Programming"\ + title="pyshell" command="/usr/bin/pyshell" +?package(libwxgtk=SOV-python):needs="X11" section="Apps/Programming"\ + title="xrced" command="/usr/bin/xrced" + diff --git a/debian/libwxgtk-python.postinst b/debian/libwxgtk-python.postinst index 440a4ac991..d3b70adfeb 100644 --- a/debian/libwxgtk-python.postinst +++ b/debian/libwxgtk-python.postinst @@ -5,8 +5,8 @@ set -e WXPYTHONDIR="/usr/lib/=PY/site-packages/wxPython" if [ "$1" = "configure" ]; then - python /usr/lib/=PY/compileall.py -q ${WXPYTHONDIR} - python -O /usr/lib/=PY/compileall.py -q ${WXPYTHONDIR} + =PY /usr/lib/=PY/compileall.py -q ${WXPYTHONDIR} + =PY -O /usr/lib/=PY/compileall.py -q ${WXPYTHONDIR} fi #DEBHELPER# diff --git a/debian/libwxgtk-python.prerm b/debian/libwxgtk-python.prerm index 03d602c2d3..bf5a62b36c 100644 --- a/debian/libwxgtk-python.prerm +++ b/debian/libwxgtk-python.prerm @@ -3,11 +3,7 @@ set -e PACKAGE="libwxgtk=V-python" - -dpkg --listfiles $PACKAGE | - awk '$0~/\.py$/ {print $0"c\n" $0"o"}' | - xargs rm -f >&2 - +dpkg --listfiles $PACKAGE | awk '$0~/\.py$/ {print $0"c\n" $0"o"}' | xargs rm -f >&2 #DEBHELPER# diff --git a/debian/libwxgtk-univ.dirs b/debian/libwxgtk-univ.dirs deleted file mode 100644 index 4fb8eed3a5..0000000000 --- a/debian/libwxgtk-univ.dirs +++ /dev/null @@ -1,5 +0,0 @@ -usr/bin -usr/lib/wx/include/gtkuniv-=V/wx -usr/share/man/man1 -usr/share/lintian/overrides - diff --git a/debian/libwxgtk-univ.links b/debian/libwxgtk-univ.links deleted file mode 100644 index 4c0b43be12..0000000000 --- a/debian/libwxgtk-univ.links +++ /dev/null @@ -1,2 +0,0 @@ -usr/share/man/man1/wx-config.1.gz usr/share/man/man1/wxgtkuniv-=V-config.1.gz - diff --git a/debian/libwxgtk-univ.postinst b/debian/libwxgtk-univ.postinst deleted file mode 100644 index 2b87484262..0000000000 --- a/debian/libwxgtk-univ.postinst +++ /dev/null @@ -1,11 +0,0 @@ -#! /bin/sh -set -e - -update-alternatives --install /usr/bin/wx-config wx-config /usr/bin/wxgtkuniv-=V-config 50 - -if [ "$1" = "configure" ]; then - ldconfig -fi - -#DEBHELPER# - diff --git a/debian/libwxgtk-univ.prerm b/debian/libwxgtk-univ.prerm deleted file mode 100644 index 867ac76c25..0000000000 --- a/debian/libwxgtk-univ.prerm +++ /dev/null @@ -1,7 +0,0 @@ -#! /bin/sh -set -e - -update-alternatives --remove wx-config /usr/bin/wxgtkuniv-=V-config - -#DEBHELPER# - diff --git a/debian/libwxgtk.dirs b/debian/libwxgtk.dirs deleted file mode 100644 index d578dd55f1..0000000000 --- a/debian/libwxgtk.dirs +++ /dev/null @@ -1,3 +0,0 @@ -usr/lib -usr/share/wx/afm -usr/share/wx/gs_afm diff --git a/debian/libwxgtk.postinst b/debian/libwxgtk.postinst deleted file mode 100644 index 881b6e24e2..0000000000 --- a/debian/libwxgtk.postinst +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -set -e - -if [ "$1" = "configure" ]; then - ldconfig -fi - -#DEBHELPER# - 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..061a92c6e1 100755 --- a/debian/rules +++ b/debian/rules @@ -1,5 +1,5 @@ #!/usr/bin/make -f -# debian/rules file to build packages from wxWindows CVS source +# debian/rules file to build packages from wx CVS source # # Sculpted 13/2/2000 by Ron Lee from new and # variously stolen code :-) @@ -7,173 +7,184 @@ # Joey Hess and others. #export DH_VERBOSE=1 -export DH_COMPAT=2 export DH_OPTIONS -release:=$(shell dpkg-parsechangelog | sed -n 's/^Source: wxwindows//p') -python_dir:=python$(shell python -c "import sys;print sys.version[:3]") +ifdef DISTCC_HOSTS -cross_host=i586-mingw32msvc -cross_build=$(shell ./config.guess) + #JOB_COUNT := $(shell set $${DISTCC_HOSTS} > /dev/null 2>&1 ; echo $$(($$\# + $$\#))) + # Nearly as fast, but doesn't raise the room temperature + # or saturate the build machines quite so much. + JOB_COUNT := $(shell set $${DISTCC_HOSTS} > /dev/null 2>&1 ; echo $$\#) + FAST_MAKE = $(MAKE) -j $(JOB_COUNT) -config_cache=../config_deb.cache -config_cache_cross=../config_deb_cross.cache +else + + FAST_MAKE = $(MAKE) + +endif + +-include debian/python-version + +release := $(shell dpkg-parsechangelog | sed -n 's/^Source: wxwindows//p') +soversion := $(shell grep '^WX_CURRENT=' configure.in | sed 's/WX_CURRENT=\([0-9]\+\).*/\1/') + +# Disable package soname branding at present since there is no smooth +# way to make the transition without dpkg supporting versioned virtual +# deps or using a set of dummy transition packages. Look at reintroducing +# this after Sarge has safely sailed. +#sorelease := $(release:%-$(DEBIAN_WXFLAVOUR)=%).$(soversion)$(addprefix -,$(DEBIAN_WXFLAVOUR)) +sorelease := $(release) + + +cross_host = i586-mingw32msvc +cross_build = $(shell ./config.guess) + +config_cache = ../config_deb.cache +config_cache_cross = ../config_deb_cross.cache # Packages to build: -package_wxbase_lib=libwxbase$(release) -package_wxbase_dev=libwxbase$(release)-dev -package_wxbase_dbg=libwxbase$(release)-dbg -package_gtk_lib=libwxgtk$(release) -package_gtk_dev=libwxgtk$(release)-dev -package_gtk_dbg=libwxgtk$(release)-dbg -package_gtk_py=libwxgtk$(release)-python -package_gtk_contrib=libwxgtk$(release)-contrib -package_gtk_contrib_dev=libwxgtk$(release)-contrib-dev -package_headers=wxwin$(release)-headers -package_i18n=wxwin$(release)-i18n -package_doc=wxwin$(release)-doc -package_examples=wxwin$(release)-examples +package_wxbase_lib = libwxbase$(sorelease) +package_wxbase_dev = libwxbase$(release)-dev +package_wxbase_dbg = libwxbase$(release)-dbg +package_gtk_lib = libwxgtk$(sorelease) +package_gtk_dev = libwxgtk$(release)-dev +package_gtk_dbg = libwxgtk$(release)-dbg +package_gtk_py = libwxgtk$(sorelease)-python +package_gtk_contrib = libwxgtk$(sorelease)-contrib +package_gtk_contrib_dev = libwxgtk$(release)-contrib-dev +package_headers = wxwin$(release)-headers +package_i18n = wxwin$(release)-i18n +package_doc = wxwin$(release)-doc +package_examples = wxwin$(release)-examples -package_gtk_univ=libwxgtk$(release)-univ +package_gtk_dbg_py = libwxgtk$(sorelease)-dbg-python -package_wxbase_msw_dev=libwxbase-msw$(release)-dev -package_wxbase_msw_dbg=libwxbase-msw$(release)-dbg -package_msw_dev=libwxmsw$(release)-dev -package_msw_dbg=libwxmsw$(release)-dbg -package_headers_msw=wxwin$(release)-headers-msw + +package_wxbase_msw_dev = libwxbase-msw$(release)-dev +package_wxbase_msw_dbg = libwxbase-msw$(release)-dbg +package_msw_dev = libwxmsw$(release)-dev +package_msw_dbg = libwxmsw$(release)-dbg +package_headers_msw = wxwin$(release)-headers-msw # Build directories: -objdir_wxbase_shared=objs_wxbase_sh -objdir_wxbase_static=objs_wxbase_st -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_doc_cruft=objs_doc_con -objdir_doc=docs/wxWindows-manual.html -objdir_examples=docs/examples -objdir_i18n=locale +objdir_wxbase_shared = objs_wxbase_sh +objdir_wxbase_static = objs_wxbase_st +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_wxbase_msw_shared = objs_wxbase_msw_sh +objdir_wxbase_msw_static = objs_wxbase_msw_st +objdir_wxbase_msw_dbg = objs_wxbase_msw_d +objdir_msw_shared = objs_msw_sh +objdir_msw_static = objs_msw_st +objdir_msw_dbg = objs_msw_d -objdir_wxbase_msw_shared=objs_wxbase_msw_sh -objdir_wxbase_msw_static=objs_wxbase_msw_st -objdir_wxbase_msw_dbg=objs_wxbase_msw_d -objdir_msw_shared=objs_msw_sh -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) +objdirs = $(objdir_wxbase_shared) $(objdir_wxbase_static) $(objdir_wxbase_debug) \ + $(objdir_gtk_shared) $(objdir_gtk_static) $(objdir_gtk_debug) \ + $(objdir_gtk_install) $(objdir_gtk_contrib_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 -# it's pulled out of the wxGtk shared lib package. +# it's pulled out of the wxGTK shared lib package. # Build stamps: -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 +build_arch_stamps = build-wxbase-shared-stamp build-wxbase-debug-stamp \ + build-wxbase-static-stamp \ + build-gtk-shared-stamp build-gtk-debug-stamp \ + build-gtk-static-stamp \ + build-contrib-shared-stamp \ + build-contrib-static-stamp \ + build-gtk-py-stamp build-i18n-stamp -build_indep_stamps=build-examples-stamp build-doc-stamp +build_indep_stamps = build-examples-stamp build-doc-stamp -build_cross_stamps=build-wxbase-msw-shared-stamp build-wxbase-msw-static-stamp \ - build-wxbase-msw-dbg-stamp build-msw-shared-stamp \ - build-msw-static-stamp build-msw-dbg-stamp +build_cross_stamps = build-wxbase-msw-shared-stamp build-wxbase-msw-static-stamp \ + build-wxbase-msw-dbg-stamp build-msw-shared-stamp \ + build-msw-static-stamp build-msw-dbg-stamp -build_stamps_native=$(build_arch_stamps) $(build_indep_stamps) +build_stamps_native = $(build_arch_stamps) $(build_indep_stamps) -build_stamps=$(build_stamps_native) $(build_cross_stamps) +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 +install_all_arch = install-wxbase-lib install-wxbase-dev install-wxbase-dbg \ + install-gtk-lib install-gtk-dev install-gtk-dbg \ + install-gtk-contrib install-gtk-contrib-dev install-gtk-py \ + install-headers install-i18n -install_all_indep=install-examples install-doc +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 +install_all_cross = install-wxbase-msw-dev install-wxbase-msw-dbg install-msw-dev install-msw-dbg install-headers-msw -install_all_native=$(install_all_arch) $(install_all_indep) +install_all_native = $(install_all_arch) $(install_all_indep) -install_all=$(install_all_native) $(install_all_cross) +install_all = $(install_all_native) $(install_all_cross) -wxconfig:=$(shell pwd)/$(objdir_gtk_shared)/wx-config \ - --prefix=$(shell pwd) \ +wxconfig := $(shell pwd)/$(objdir_gtk_shared)/wx-config \ + --prefix=$(shell pwd) \ --exec-prefix=$(shell pwd)/$(objdir_gtk_shared) +wxconfig-dbg := $(shell pwd)/$(objdir_gtk_debug)/wx-config \ + --prefix=$(shell pwd) \ + --exec-prefix=$(shell pwd)/$(objdir_gtk_debug) + # The Rules: -debian/control: debian/control.in - sed -e 's/=V/$(release)/g' < debian/control.in > debian/control +debian/python-version: + echo python_ver := python$(shell python -c "import sys;print sys.version[:3]") > $@ + +debian/control: $(addprefix debian/,control.in python-version) + sed -e 's/=V/$(release)/g;s/=SOV/$(sorelease)/g;s/=PY/$(python_ver)/g' \ + < debian/control.in > debian/control control-files-stamp: debian/control dh_testdir - @for f in dirs postinst; do \ - 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 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; \ done; - @for f in dirs links postinst prerm; do \ + @for f in links postinst prerm; do \ echo "generating control file $(package_wxbase_dbg).$$f"; \ sed -e 's/=V/$(release)/g' < debian/libwxbase-dbg.$$f \ > debian/$(package_wxbase_dbg).$$f; \ done; - @for f in dirs postinst; do \ - 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 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; \ done; - @for f in dirs links postinst prerm; do \ + @for f in links postinst prerm; do \ echo "generating control file $(package_gtk_dbg).$$f"; \ 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; \ + @for f in dirs docs menu postinst prerm; do \ + echo "generating control file $(package_gtk_py).$$f"; \ + sed -e 's/=PY/$(python_ver)/g;s/=V/$(release)/g;s/=SOV/$(sorelease)/g' \ + < debian/libwxgtk-python.$$f \ + > debian/$(package_gtk_py).$$f; \ done; - @for f in dirs docs files 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; \ - done; - @for f in dirs postinst; do \ - 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 menu; do \ echo "generating control file $(package_gtk_contrib_dev).$$f"; \ - cp debian/libwxgtk-contrib-dev.$$f debian/$(package_gtk_contrib_dev).$$f; \ + sed -e 's/=V/$(release)/g' < debian/libwxgtk-contrib-dev.$$f \ + > debian/$(package_gtk_contrib_dev).$$f; \ done; - @for f in dirs files; do \ - echo "generating control file $(package_headers).$$f"; \ - cp debian/wxwin-headers.$$f debian/$(package_headers).$$f; \ - done; - @for f in dirs files; do \ - echo "generating control file $(package_i18n).$$f"; \ - cp debian/wxwin-i18n.$$f debian/$(package_i18n).$$f; \ - done; - @for f in dirs docs doc-base; do \ + @for f in docs doc-base; do \ echo "generating control file $(package_doc).$$f"; \ sed -e 's/=V/$(release)/g' < debian/wxwin-doc.$$f \ > debian/$(package_doc).$$f; \ @@ -182,6 +193,17 @@ control-files-stamp: debian/control echo "generating control file $(package_examples).$$f"; \ cp debian/wxwin-examples.$$f debian/$(package_examples).$$f; \ done; + @for f in dirs docs postinst; do \ + echo "generating control file $(package_gtk_dbg_py).$$f"; \ + sed -e 's/=PY/$(python_ver)/g;s/=V/$(release)/g' < debian/libwxgtk-python.$$f \ + > debian/$(package_gtk_dbg_py).$$f; \ + done; + @for f in menu prerm; do \ + echo "generating control file $(package_gtk_dbg_py).$$f"; \ + sed -e 's/=PY/$(python_ver)/g;s/=V/$(release)/g;s/=SOV/$(sorelease)/g' \ + < debian/libwxgtk-dbg-python.$$f \ + > debian/$(package_gtk_dbg_py).$$f; \ + done; @for f in dirs links postinst prerm; do \ echo "generating control file $(package_wxbase_msw_dev).$$f"; \ sed -e 's/=V/$(release)/g;s/=H/$(cross_host)/g' < debian/libwxbase-msw-dev.$$f \ @@ -221,136 +243,157 @@ 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) \ - && ../configure --prefix=/usr \ - --cache-file=$(config_cache) \ - --disable-gui \ - --enable-soname \ - --with-zlib=sys \ - && $(MAKE) + cd $(objdir_wxbase_shared) \ + && ../configure --prefix=/usr \ + --cache-file=$(config_cache) \ + --disable-gui \ + --enable-soname \ + --with-zlib=sys \ + --enable-std_iostreams touch $@ -build-wxbase-static-stamp: +build-wxbase-shared-stamp: configure-wxbase-shared-stamp + dh_testdir + cd $(objdir_wxbase_shared) && $(FAST_MAKE) + touch $@ + +configure-wxbase-static-stamp: dh_testdir mkdir -p $(objdir_wxbase_static) - cd $(objdir_wxbase_static) \ - && ../configure --prefix=/usr \ - --cache-file=$(config_cache) \ - --disable-gui \ - --disable-shared \ - --with-zlib=sys \ - && $(MAKE) + cd $(objdir_wxbase_static) \ + && ../configure --prefix=/usr \ + --cache-file=$(config_cache) \ + --disable-gui \ + --disable-shared \ + --with-zlib=sys \ + --enable-std_iostreams touch $@ -build-wxbase-debug-stamp: +build-wxbase-static-stamp: configure-wxbase-static-stamp + dh_testdir + cd $(objdir_wxbase_static) && $(FAST_MAKE) + touch $@ + +configure-wxbase-debug-stamp: dh_testdir mkdir -p $(objdir_wxbase_debug) - cd $(objdir_wxbase_debug) \ - && ../configure --prefix=/usr \ - --cache-file=$(config_cache) \ - --disable-gui \ - --enable-debug \ - --enable-soname \ - --with-zlib=sys \ - && $(MAKE) + cd $(objdir_wxbase_debug) \ + && ../configure --prefix=/usr \ + --cache-file=$(config_cache) \ + --disable-gui \ + --enable-debug \ + --enable-soname \ + --with-zlib=sys \ + --enable-std_iostreams touch $@ -build-gtk-shared-stamp: +build-wxbase-debug-stamp: configure-wxbase-debug-stamp + dh_testdir + cd $(objdir_wxbase_debug) && $(FAST_MAKE) + touch $@ + +configure-gtk-shared-stamp: dh_testdir mkdir -p $(objdir_gtk_shared) - cd $(objdir_gtk_shared) \ - && ../configure --prefix=/usr \ - --cache-file=$(config_cache) \ - --with-gtk \ - --with-opengl \ - --enable-soname \ - --with-zlib=sys \ - --with-libjpeg=sys \ - --with-libpng=sys \ - --with-libtiff=sys \ - --enable-dynamic-loader \ - && $(MAKE) + cd $(objdir_gtk_shared) \ + && ../configure --prefix=/usr \ + --cache-file=$(config_cache) \ + --with-gtk \ + --with-opengl \ + --enable-soname \ + --with-zlib=sys \ + --with-libjpeg=sys \ + --with-libpng=sys \ + --with-libtiff=sys \ + --enable-dynamic-loader \ + --enable-std_iostreams touch $@ -build-gtk-static-stamp: +build-gtk-shared-stamp: configure-gtk-shared-stamp + dh_testdir + cd $(objdir_gtk_shared) && $(FAST_MAKE) + touch $@ + +configure-gtk-static-stamp: dh_testdir mkdir -p $(objdir_gtk_static) - cd $(objdir_gtk_static) \ - && ../configure --prefix=/usr \ - --cache-file=$(config_cache) \ - --with-gtk \ - --with-opengl \ - --disable-shared \ - --with-zlib=sys \ - --with-libjpeg=sys \ - --with-libpng=sys \ - --with-libtiff=sys \ - --enable-dynamic-loader \ - && $(MAKE) + cd $(objdir_gtk_static) \ + && ../configure --prefix=/usr \ + --cache-file=$(config_cache) \ + --with-gtk \ + --with-opengl \ + --disable-shared \ + --with-zlib=sys \ + --with-libjpeg=sys \ + --with-libpng=sys \ + --with-libtiff=sys \ + --enable-dynamic-loader \ + --enable-std_iostreams touch $@ -build-gtk-debug-stamp: +build-gtk-static-stamp: configure-gtk-static-stamp + dh_testdir + cd $(objdir_gtk_static) && $(FAST_MAKE) + touch $@ + +configure-gtk-debug-stamp: dh_testdir mkdir -p $(objdir_gtk_debug) - cd $(objdir_gtk_debug) \ - && ../configure --prefix=/usr \ - --cache-file=$(config_cache) \ - --with-gtk \ - --with-opengl \ - --enable-debug \ - --enable-soname \ - --with-zlib=sys \ - --with-libjpeg=sys \ - --with-libpng=sys \ - --with-libtiff=sys \ - --enable-dynamic-loader \ - && $(MAKE) + cd $(objdir_gtk_debug) \ + && ../configure --prefix=/usr \ + --cache-file=$(config_cache) \ + --with-gtk \ + --with-opengl \ + --enable-debug \ + --enable-soname \ + --with-zlib=sys \ + --with-libjpeg=sys \ + --with-libpng=sys \ + --with-libtiff=sys \ + --enable-dynamic-loader \ + --enable-std_iostreams touch $@ -build-gtk-univ-stamp: +build-gtk-debug-stamp: configure-gtk-debug-stamp dh_testdir - mkdir -p $(objdir_gtk_univ) - cd $(objdir_gtk_univ) \ - && ../configure --prefix=/usr \ - --cache-file=$(config_cache) \ - --with-gtk \ - --with-opengl \ - --enable-universal \ - --enable-soname \ - --with-zlib=sys \ - --with-libjpeg=sys \ - --with-libpng=sys \ - --with-libtiff=sys \ - --enable-dynamic-loader \ - && $(MAKE) + cd $(objdir_gtk_debug) && $(FAST_MAKE) touch $@ + build-contrib-shared-stamp: build-gtk-shared-stamp dh_testdir - cd $(objdir_gtk_shared)/contrib/src \ - && $(MAKE) + cd $(objdir_gtk_shared)/contrib/src && $(FAST_MAKE) + cd $(objdir_gtk_shared)/contrib/utils/wxrc && $(FAST_MAKE) + cd $(objdir_gtk_shared)/contrib/utils/wxrcedit && $(FAST_MAKE) touch $@ build-contrib-static-stamp: build-gtk-static-stamp dh_testdir - cd $(objdir_gtk_static)/contrib/src \ - && $(MAKE) + cd $(objdir_gtk_static)/contrib/src && $(FAST_MAKE) touch $@ -build-gtk-py-stamp: build-gtk-shared-stamp +purge-dbg-py: + @if [ ! -e build-gtk-py-stamp ]; then \ + $(MAKE) -f debian/rules clean-py; \ + fi + $(RM) build-gtk-dbg-py-stamp + +build-gtk-py-stamp: build-gtk-shared-stamp purge-dbg-py dh_testdir touch docs/lgpl.txt cd wxPython \ - && ./setup.py build IN_CVS_TREE=1 WX_CONFIG='$(wxconfig)' + && $(python_ver) ./setup.py build IN_CVS_TREE=1 WX_CONFIG='$(wxconfig)' touch $@ build-doc-stamp: build-gtk-shared-stamp dh_testdir cd $(objdir_gtk_shared)/utils/tex2rtf/src \ - && $(MAKE) + && $(FAST_MAKE) + rm -rf $(objdir_doc) + rm -rf $(objdir_doc_cruft) mkdir $(objdir_doc) mkdir $(objdir_doc_cruft) cd $(objdir_doc_cruft) \ @@ -372,19 +415,18 @@ build-examples-stamp: build-gtk-shared-stamp rm -f $(objdir_examples)/samples/Makefile cp -a $(objdir_gtk_shared)/samples/Makefile $(objdir_examples)/samples - cp -a demos $(objdir_examples) + cd $(objdir_examples)/samples \ + && mv Makefile.in Makefile \ + && rm -f configure* \ + && find -name 'Makefile.in' -exec rm -f '{}' ';' \ + && for d in $$(find -type d); do \ + if [ -f $$d/makefile.unx ]; then \ + mv $$d/makefile.unx $$d/Makefile; \ + fi; \ + done + cp -a wxPython/demo $(objdir_examples)/wxPython - @for d in $(objdir_examples)/demos $(objdir_examples)/samples; do \ - (cd $$d \ - && mv Makefile.in Makefile \ - && rm -f configure* \ - && find -name 'Makefile.in' -exec rm -f '{}' ';' \ - && for f in $$(find -type d); do \ - if [ -f $$f/makefile.unx ]; then \ - mv $$f/makefile.unx $$f/Makefile; \ - fi; \ - done) \ - done; + touch $@ build-i18n-stamp: build-gtk-shared-stamp @@ -398,7 +440,20 @@ build-i18n-stamp: build-gtk-shared-stamp && $(MAKE) allmo touch $@ -build-wxbase-msw-shared-stamp: +purge-release-py: + @if [ ! -e build-gtk-dbg-py-stamp ]; then \ + $(MAKE) -f debian/rules clean-py; \ + fi + $(RM) build-gtk-py-stamp + +build-gtk-dbg-py-stamp: build-gtk-debug-stamp purge-release-py + dh_testdir + touch docs/lgpl.txt + cd wxPython \ + && $(python_ver) ./setup.py build IN_CVS_TREE=1 WX_CONFIG='$(wxconfig-dbg)' + touch $@ + +configure-wxbase-msw-shared-stamp: dh_testdir mkdir -p $(objdir_wxbase_msw_shared) cd $(objdir_wxbase_msw_shared) \ @@ -406,11 +461,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) && $(FAST_MAKE) + touch $@ + +configure-wxbase-msw-static-stamp: dh_testdir mkdir -p $(objdir_wxbase_msw_static) cd $(objdir_wxbase_msw_static) \ @@ -419,12 +478,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) && $(FAST_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,57 +496,64 @@ 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) && $(FAST_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) + cd $(objdir_msw_shared) \ + && ../configure --prefix=/usr/$(cross_host) \ + --cache-file=$(config_cache_cross) \ + --host=$(cross_host) \ + --build=$(cross_build) touch $@ -build-msw-static-stamp: +build-msw-shared-stamp: configure-msw-shared-stamp + dh_testdir + cd $(objdir_msw_shared) && $(FAST_MAKE) + touch $@ + +configure-msw-static-stamp: dh_testdir mkdir -p $(objdir_msw_static) - cd $(objdir_msw_static) \ - && ../configure --prefix=/usr/$(cross_host) \ - --cache-file=$(config_cache_cross) \ - --host=$(cross_host) \ - --build=$(cross_build) \ - --disable-shared \ - && $(MAKE) + cd $(objdir_msw_static) \ + && ../configure --prefix=/usr/$(cross_host) \ + --cache-file=$(config_cache_cross) \ + --host=$(cross_host) \ + --build=$(cross_build) \ + --disable-shared touch $@ -build-msw-dbg-stamp: +build-msw-static-stamp: configure-msw-static-stamp + dh_testdir + cd $(objdir_msw_static) && $(FAST_MAKE) + touch $@ + +configure-msw-dbg-stamp: dh_testdir mkdir -p $(objdir_msw_dbg) - cd $(objdir_msw_dbg) \ - && ../configure --prefix=/usr/$(cross_host) \ - --cache-file=$(config_cache_cross) \ - --host=$(cross_host) \ - --build=$(cross_build) \ - --enable-debug \ - && $(MAKE) + cd $(objdir_msw_dbg) \ + && ../configure --prefix=/usr/$(cross_host) \ + --cache-file=$(config_cache_cross) \ + --host=$(cross_host) \ + --build=$(cross_build) \ + --enable-debug + touch $@ + +build-msw-dbg-stamp: configure-msw-dbg-stamp + dh_testdir + cd $(objdir_msw_dbg) && $(FAST_MAKE) touch $@ -clean: debian/control - dh_testdir - dh_testroot - - rm -rf config_deb.cache config_deb_cross.cache control-files-stamp $(build_stamps) $(objdirs) - rm -f docs/lgpl.txt - rm -f docs/latex/wx/manual.bb - rm -f $(objdir_i18n)/*.mo - +clean-py: cd wxPython \ - && ./setup.py clean \ && rm -rf licence \ && rm -rf build \ && rm -rf contrib/gizmos/contrib \ @@ -492,6 +562,19 @@ 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 + +clean: debian/control clean-py + dh_testdir + dh_testroot + + 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 + dh_clean rm -f debian/$(package_wxbase_lib).* rm -f debian/$(package_wxbase_dev).* @@ -499,7 +582,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 +589,8 @@ clean: debian/control rm -f debian/$(package_i18n).* rm -f debian/$(package_doc).* rm -f debian/$(package_examples).* + + rm -f debian/$(package_gtk_dbg_py).* rm -f debian/$(package_wxbase_msw_dev).* rm -f debian/$(package_wxbase_msw_dbg).* rm -f debian/$(package_msw_dev).* @@ -523,85 +607,95 @@ 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 dh_testdir 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_installdirs usr/share/lintian/overrides + 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)/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 dh_testdir 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_installdirs usr/share/lintian/overrides + 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) -install-gtk-univ: build-gtk-univ-stamp +install-gtk-contrib-stamp: dh_testdir - 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/ - cp debian/lintian-override debian/$(package_gtk_univ)/usr/share/lintian/overrides/$(package_gtk_univ) + 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 + + dh_install $(objdir_gtk_shared)/contrib/utils/wxrc/wxrc usr/bin + dh_install $(objdir_gtk_shared)/contrib/utils/wxrcedit/wxrcedit usr/bin + + dh_installman debian/wxrc-tools.1 + dh_link usr/share/man/man1/wxrc-tools.1 usr/share/man/man1/wxrc.1 \ + usr/share/man/man1/wxrc-tools.1 usr/share/man/man1/wxrcedit.1 install-gtk-py: DH_OPTIONS=-p$(package_gtk_py) install-gtk-py: build-gtk-py-stamp @@ -609,33 +703,50 @@ install-gtk-py: build-gtk-py-stamp dh_testroot dh_clean -k dh_installdirs - cd wxPython \ - && ./setup.py install --prefix=`pwd`/../debian/$(package_gtk_py)/usr - find debian/$(package_gtk_py)/usr/lib/$(python_dir)/site-packages/wxPython \ + cd wxPython \ + && $(python_ver) ./setup.py install \ + --prefix=`pwd`/../debian/$(package_gtk_py)/usr \ + WX_CONFIG='$(wxconfig)' + + find debian/$(package_gtk_py)/usr/lib/$(python_ver)/site-packages \ -name '*.py?' -exec rm '{}' ';' + # This is rather bogus, its included in the main copyright file now though. + rm -f debian/$(package_gtk_py)/usr/lib/$(python_ver)/site-packages/wxPython/tools/XRCed/license.txt + + 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/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 \ + usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/pywxrc.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 + + 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 @@ -651,14 +762,43 @@ install-examples: build-examples-stamp dh_clean -k dh_installdirs +install-gtk-dbg-py: DH_OPTIONS=-p$(package_gtk_dbg_py) +install-gtk-dbg-py: build-gtk-dbg-py-stamp + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + cd wxPython \ + && $(python_ver) ./setup.py install \ + --prefix=`pwd`/../debian/$(package_gtk_dbg_py)/usr \ + WX_CONFIG='$(wxconfig-dbg)' + + find debian/$(package_gtk_dbg_py)/usr/lib/$(python_ver)/site-packages \ + -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/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 + + # This is rather bogus, its included in the main copyright file now though. + rm -f debian/$(package_gtk_dbg_py)/usr/lib/$(python_ver)/site-packages/wxPython/tools/XRCed/license.txt + install-wxbase-msw-dev: DH_OPTIONS=-p$(package_wxbase_msw_dev) install-wxbase-msw-dev: build-wxbase-msw-shared-stamp build-wxbase-msw-static-stamp dh_testdir dh_testroot dh_clean -k dh_installdirs - cp -a $(objdir_wxbase_msw_shared)/lib/* debian/$(package_wxbase_msw_dev)/usr/$(cross_host)/lib - cp -a $(objdir_wxbase_msw_static)/lib/*.a debian/$(package_wxbase_msw_dev)/usr/$(cross_host)/lib + dh_install $(objdir_wxbase_msw_shared)/lib/* usr/$(cross_host)/lib + dh_install $(objdir_wxbase_msw_static)/lib/*.a usr/$(cross_host)/lib cp $(objdir_wxbase_msw_shared)/wxbase-$(release)-$(cross_host)-config debian/$(package_wxbase_msw_dev)/usr/bin/ $(cross_host)-strip --strip-debug debian/$(package_wxbase_msw_dev)/usr/$(cross_host)/lib/*.a @@ -720,6 +860,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 @@ -730,7 +871,14 @@ binary-common: dh_compress dh_fixperms - dh_makeshlibs -N$(package_gtk_py) -V + + @# Don't do this for the dbg-py special build because dh_makeshlibs + @# will crap out if it is called with no packages to act on. + @if [ "x$(DH_OPTIONS)" != "-p$(package_gtk_dbg_py)" ]; then \ + echo "dh_makeshlibs -N$(package_gtk_py) -V"; \ + dh_makeshlibs -N$(package_gtk_py) -V; \ + fi + dh_installdeb dh_shlibdeps -ldebian/$(package_gtk_lib)/usr/lib dh_gencontrol @@ -742,18 +890,19 @@ 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_gtk_dbg_py) -N$(package_wxbase_msw_dev) -N$(package_wxbase_msw_dbg) -N$(package_msw_dev) -N$(package_msw_dbg) -N$(package_headers_msw)" \ 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_gtk_dbg_py) -N$(package_wxbase_msw_dev) -N$(package_wxbase_msw_dbg) -N$(package_msw_dev) -N$(package_msw_dbg) -N$(package_headers_msw)" \ binary-common # Build all packages target. binary: binary-arch binary-indep + # This is a special target for building the wxMSW-cross packages. # It's not currently called during the official package build run # but may be run separately to build the extra packages. @@ -765,6 +914,12 @@ binary-cross: control-files-stamp $(install_all_cross) binary-common +# Build wxPython against libwxgtk-dbg. This package will conflict +# with the release build one, but may be useful to some people. +binary-dbg-py: control-files-stamp install-gtk-dbg-py + $(MAKE) -f debian/rules DH_OPTIONS="-p$(package_gtk_dbg_py)" binary-common + + ############################################################################ # # Some rules to build a subset of the complete list of packages that can be @@ -785,20 +940,6 @@ binary-gtk-dev: control-files-stamp install-gtk-dev install-headers binary-gtk-dbg: control-files-stamp install-gtk-dbg install-headers $(MAKE) -f debian/rules DH_OPTIONS="-p$(package_gtk_dbg) -p$(package_headers)" binary-common -# libwxbase shared lib package -binary-wxbase: control-files-stamp install-wxbase-lib install-headers - $(MAKE) -f debian/rules DH_OPTIONS="-p$(package_wxbase_lib) -p$(package_headers)" binary-common - -binary-wxbase-dev: control-files-stamp install-wxbase-dev install-headers - $(MAKE) -f debian/rules \ - DH_OPTIONS="-p$(package_wxbase_lib) -p$(package_wxbase_dev) -p$(package_headers)" \ - binary-common - -binary-wxbase-dbg: control-files-stamp install-wxbase-dbg install-headers - $(MAKE) -f debian/rules DH_OPTIONS="-p$(package_wxbase_dbg) -p$(package_headers)" binary-common - -binary-univ: control-files-stamp install-gtk-univ - $(MAKE) -f debian/rules DH_OPTIONS="-p$(package_gtk_univ)" binary-common # docs package binary-doc: control-files-stamp install-doc @@ -808,13 +949,18 @@ binary-fast:control-files-stamp install-gtk-dbg install-msw-dev install-headers $(MAKE) -f debian/rules DH_OPTIONS="-p$(package_gtk_dbg) -p$(package_msw_dev) -p$(package_headers) -p$(package_headers_msw)" binary-common -.PHONY: build build_all build_arch clean binary-indep binary-arch binary binary-common \ - binary-gtk binary-gtk-dev binary-gtk-dbg binary-wxbase binary-wxbase-dev \ - binary-wxbase-dbg binary-doc binary-cross \ - install install_arch install-wxbase-lib \ - install-wxbase-dev install-wxbase-dbg install-gtk-lib install-gtk-dev \ - install-gtk-dbg install-gtk-contrib install-gtk-contrib-dev \ - install-gtk-py install-headers install-i18n install-doc install-examples \ - install-wxbase-msw-dev install-msw-dev install-headers-msw \ +.PHONY: build build_all build_arch \ + clean clean-py purge-release-py purge-dbg-py \ + binary-indep binary-arch binary binary-common \ + binary-gtk binary-gtk-dev binary-gtk-dbg \ + binary-wxbase binary-wxbase-dev binary-wxbase-dbg \ + binary-doc binary-cross binary-dbg-py \ + install install_arch \ + install-wxbase-lib install-wxbase-dev install-wxbase-dbg \ + install-gtk-lib install-gtk-dev install-gtk-dbg \ + install-gtk-contrib install-gtk-contrib-dev \ + install-gtk-py install-gtk-dbg-py \ + install-headers install-i18n install-doc install-examples \ + install-wxbase-msw-dev install-msw-dev install-headers-msw \ install-wxbase-msw-dbg install-msw-dbg diff --git a/debian/wx-config.1 b/debian/wx-config.1 index 72aeac5390..68adb1cd17 100644 --- a/debian/wx-config.1 +++ b/debian/wx-config.1 @@ -1,54 +1,64 @@ -.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 requirements for wxWindows applications .SH SYNOPSIS .nh -.B wxbase-config +.B wxbase\-config .br -.B wxgtk-config +.B wxgtk\-config .HP -.B wx-config -[\-\-version] [\-\-libs] [\-\-cflags] [\-\-cc] [\-\-cxx] [\-\-ld] +.B wx\-config +[\-\-version] +[\-\-libs] [\-\-gl\-libs] +[\-\-cppflags] [\-\-cflags] [\-\-cxxflags] +[\-\-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: -.TP 8 +\fIwx\-config\fP accepts the following options: +.TP 15 .B \-\-version What to .B ALWAYS include in a bug report. -.br -( But of course you already knew that ... ) -.TP 8 +.TP 15 .B \-\-libs -Generate linker flags for a \fIwxWindows\fP program. -.TP 8 +Output linker parameters for a \fIwxWindows\fP application. +.TP 15 +.B \-\-gl-libs +Output linker parameters for a \fIwxWindows\fP application that uses the glcanvas. +.TP 15 +.B \-\-cppflags +Output parameters required by the C preprocessor for wxWindows applications. +.TP 15 .B \-\-cflags -Generate compiler flags for the same. -.TP 8 +Output parameters required by the C compiler for wxWindows applications. +.TP 15 +.B \-\-cxxflags +Output parameters required by the C++ compiler for wxWindows applications. +.TP 15 .B \-\-cc Output the name of the C compiler \fB$(CC)\fP. -.TP 8 +.TP 15 .B \-\-cxx Output the name of the C++ compiler \fB$(CXX)\fP. -.TP 8 +.TP 15 .B \-\-ld -Output the Linker command \fB$(LD)\fP. -.TP 8 +Output the linker command \fB$(LD)\fP. +.TP 15 .B \-\-prefix=PREFIX If specified, use PREFIX instead of the installation prefix that \fIwxWindows\fP was built with when computing the output for the \-\-cflags and @@ -58,9 +68,9 @@ 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 +.TP 15 .B \-\-exec\-prefix=PREFIX If specified, use PREFIX instead of the installation exec prefix that \fIwxWindows\fP was built with when computing the output for the \-\-cflags @@ -69,18 +79,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 +wxGTK. It was subsequently 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/wxrc-tools.1 b/debian/wxrc-tools.1 new file mode 100644 index 0000000000..5c6153a54f --- /dev/null +++ b/debian/wxrc-tools.1 @@ -0,0 +1,17 @@ +.TH wxrc\-tools 1 "30 Jul 2004" "Debian GNU/Linux" "wxWindows" +.SH NAME +wxrc \- command line compiler for wx xml resources. +.br +wxrced \- graphical editing tool for wx xml resource files. + +.SH DESCRIPTION +The real documentation for these tools (what of it that exists) is available +in the wxWindows manual, which is packaged in html format in the wxwin2.4-doc +package and installed in /usr/share/doc/wxwin2.4-doc/wxWindows-manual.html on +Debian systems. + +.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-doc.dirs b/debian/wxwin-doc.dirs deleted file mode 100644 index c0a85e9e29..0000000000 --- a/debian/wxwin-doc.dirs +++ /dev/null @@ -1 +0,0 @@ -usr/share/doc-base diff --git a/debian/wxwin-doc.doc-base b/debian/wxwin-doc.doc-base index 653d988987..7605e988ee 100644 --- a/debian/wxwin-doc.doc-base +++ b/debian/wxwin-doc.doc-base @@ -5,6 +5,6 @@ Abstract: This manual describes the wxWindows cross-platform GUI toolkit. Section: Apps/Programming Format: HTML -Index: /usr/share/doc/wxwin=V-doc/wxWindows-manual.html/wxwin.htm +Index: /usr/share/doc/wxwin=V-doc/wxWindows-manual.html/wxwin_contents.html Files: /usr/share/doc/wxwin=V-doc/wxWindows-manual.html/* diff --git a/debian/wxwin-examples.examples b/debian/wxwin-examples.examples index 76daa91bce..c015b128b8 100644 --- a/debian/wxwin-examples.examples +++ b/debian/wxwin-examples.examples @@ -1,3 +1,4 @@ -docs/examples/demos +debian/README.examples docs/examples/samples docs/examples/wxPython + diff --git a/debian/wxwin-headers.dirs b/debian/wxwin-headers.dirs deleted file mode 100644 index d3e1cff74a..0000000000 --- a/debian/wxwin-headers.dirs +++ /dev/null @@ -1,3 +0,0 @@ -usr/include/wx -usr/share/man/man1 - 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.dirs b/debian/wxwin-i18n.dirs deleted file mode 100644 index d10fb40c7b..0000000000 --- a/debian/wxwin-i18n.dirs +++ /dev/null @@ -1,2 +0,0 @@ -/usr/share/locale - 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.bmp b/demos/bombs/bombs.bmp deleted file mode 100644 index 0fffb1f4d3..0000000000 Binary files a/demos/bombs/bombs.bmp and /dev/null differ 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/bombs.ico b/demos/bombs/bombs.ico index 249893a7e3..435cca2471 100644 Binary files a/demos/bombs/bombs.ico and b/demos/bombs/bombs.ico differ 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/bitmaps/col.ico b/demos/dbbrowse/bitmaps/col.ico index 954d8cd232..45ac0b7818 100644 Binary files a/demos/dbbrowse/bitmaps/col.ico and b/demos/dbbrowse/bitmaps/col.ico differ diff --git a/demos/dbbrowse/bitmaps/col.xpm b/demos/dbbrowse/bitmaps/col.xpm index 67e0e1a8fa..e3f1157a22 100644 --- a/demos/dbbrowse/bitmaps/col.xpm +++ b/demos/dbbrowse/bitmaps/col.xpm @@ -1,23 +1,25 @@ /* XPM */ -static char* COL_xpm[] = { -"16 16 4 1", -" c #000000", -"! c #000080", -"# c #C0C0C0", -"$ c #808080", -"$$$$$$$ $$$$", -"$######!!!!!### ", -"$######!!!!!### ", -"$######!!!!!### ", -"$######!###!### ", -"$# #!$$$!# # ", -"$# ####! !### ", -"$# #! ! !# # ", -"$# ####! !### ", -"$# #! ! !# # ", -"$# ####! !### ", -"$# #! ! !# # ", -"$$$$$$#! !### ", -" #! !# ", -" #!!!!!# ", -" "}; +static char *col_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 4 1", +"o c Black", +"X c #FFFFFF", +". c #808080", +" c None", +/* pixels */ +" ", +"................", +".XXXXXXXoooXXXX.", +".XXXXXXXoooXXXX.", +".XXXXXXXoooXXXX.", +".XXXXXXXoooXXXX.", +".XXXXXXXoooXXXX.", +".XXXXXXXoooXXXX.", +".XXXXXXXoooXXXX.", +".XXXXXXXoooXXXX.", +".XXXXXXXoooXXXX.", +".XXXXXXXoooXXXX.", +"................", +" ", +" " +}; diff --git a/demos/dbbrowse/bitmaps/dsn.ico b/demos/dbbrowse/bitmaps/dsn.ico index 4881d8a548..28e56224f3 100644 Binary files a/demos/dbbrowse/bitmaps/dsn.ico and b/demos/dbbrowse/bitmaps/dsn.ico differ diff --git a/demos/dbbrowse/bitmaps/dsn.xpm b/demos/dbbrowse/bitmaps/dsn.xpm index f8d88279e5..a7747413df 100644 --- a/demos/dbbrowse/bitmaps/dsn.xpm +++ b/demos/dbbrowse/bitmaps/dsn.xpm @@ -1,23 +1,25 @@ /* XPM */ -static char* DSN_xpm[] = { -"16 16 4 1", -" c #000000", -"! c #C0C0C0", -"# c #808080", -"$ c #FFFF00", -" # ####### ", -" ###!#!!!!## ", -" #!#!!!!!!!!# ", -"$## !!###!!!!# ", -" # #!!!!!!!!# ", -" #!#!#!!!### ", -" $#!#!### ## ", -" # $!!#### # ", -" # !### ## ", -" # !!!#### # ", -" # !### ## ", -" # !!!#### # ", -" # !### ## ", -" # !!!#### # ", -" ## !### ## ", -" ######## "}; +static char *dsn_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 16 3 1", +". c Black", +"X c #FFFFFF", +" c None", +/* pixels */ +" ", +" ", +" ..........", +" ..XXXXXXX...", +" ..XXXXXXX..XX.", +" ..........XXXX.", +" .XXXXXXXX.XXXX.", +" .XXXXXXXX.XXXX.", +" .XXXXXXXX.XXXX.", +" .XXXXXXXX.XXXX.", +" .XXXXXXXX.XXXX.", +" .XXXXXXXX.XXXX.", +" .XXXXXXXX.XX.. ", +" .XXXXXXXX... ", +" .......... ", +" " +}; diff --git a/demos/dbbrowse/bitmaps/dsnclose.ico b/demos/dbbrowse/bitmaps/dsnclose.ico index 45dbb73119..7187457ae0 100644 Binary files a/demos/dbbrowse/bitmaps/dsnclose.ico and b/demos/dbbrowse/bitmaps/dsnclose.ico differ diff --git a/demos/dbbrowse/bitmaps/dsnclose.xpm b/demos/dbbrowse/bitmaps/dsnclose.xpm index 481fb3d6f5..ae052e22cd 100644 --- a/demos/dbbrowse/bitmaps/dsnclose.xpm +++ b/demos/dbbrowse/bitmaps/dsnclose.xpm @@ -1,23 +1,26 @@ /* XPM */ -static char* DsnClosed_xpm[] = { +static char *dsnclose_xpm[] = { +/* columns rows colors chars-per-pixel */ "16 16 4 1", -" c #000000", -"! c #C0C0C0", -"# c #808080", -"$ c #FF0000", -" $ $##$### ", -" $#$!$!!!!## ", -" #!$!!!!!!!!# ", -"$$$ !!$$$!!!!# ", -" # $!!!!!!!!# ", -" $!$!$!!!### ", -" $!!$!#!$ ## ", -" # $!!#### # ", -" # !### ## ", -" # !!!#### # ", -" # !### ## ", -" # !!!#### # ", -" # !### ## ", -" # !!!#### # ", -" ## !### ## ", -" ######## "}; +"X c Black", +"o c #FFFFFF", +" c None", +". c #FF0000", +/* pixels */ +" .X ", +"X. .X.X ", +" X...XXXXXXXXXXX", +".......ooooooXXX", +"XX...XXooooXXooX", +" .X.X.XXXXXooooX", +" Xo.XoooooXooooX", +" XooooooooXooooX", +" XooooooooXooooX", +" XooooooooXooooX", +" XooooooooXooooX", +" XooooooooXooooX", +" XooooooooXooXX ", +" XooooooooXXX ", +" XXXXXXXXXX ", +" " +}; diff --git a/demos/dbbrowse/bitmaps/dsnopen.ico b/demos/dbbrowse/bitmaps/dsnopen.ico index 989fdc8d63..d9b76309e4 100644 Binary files a/demos/dbbrowse/bitmaps/dsnopen.ico and b/demos/dbbrowse/bitmaps/dsnopen.ico differ diff --git a/demos/dbbrowse/bitmaps/dsnopen.xpm b/demos/dbbrowse/bitmaps/dsnopen.xpm index 53546c8771..ee666969ff 100644 --- a/demos/dbbrowse/bitmaps/dsnopen.xpm +++ b/demos/dbbrowse/bitmaps/dsnopen.xpm @@ -1,23 +1,26 @@ /* XPM */ -static char* DsnOpen_xpm[] = { +static char *dsnopen_xpm[] = { +/* columns rows colors chars-per-pixel */ "16 16 4 1", -" c #000000", -"! c #C0C0C0", -"# c #808080", -"$ c #00FF00", -" $ $##$### ", -" $#$!$!!!!## ", -" #!$!!!!!!!!# ", -"$$$ !!$$$!!!!# ", -" # $!!!!!!!!# ", -" $!$!$!!!### ", -" $!!$!#!$ ## ", -" # $!!#### # ", -" # !### ## ", -" # !!!#### # ", -" # !### ## ", -" # !!!#### # ", -" # !### ## ", -" # !!!#### # ", -" ## !### ## ", -" ######## "}; +"X c Black", +"o c #FFFFFF", +" c None", +". c #00FF00", +/* pixels */ +" .X ", +"X. .X.X ", +" X...XXXXXXXXXXX", +".......ooooooXXX", +"XX...XXooooXXooX", +" .X.X.XXXXXooooX", +" Xo.XoooooXooooX", +" XooooooooXooooX", +" XooooooooXooooX", +" XooooooooXooooX", +" XooooooooXooooX", +" XooooooooXooooX", +" XooooooooXooXX ", +" XooooooooXXX ", +" XXXXXXXXXX ", +" " +}; diff --git a/demos/dbbrowse/bitmaps/f_closed.ico b/demos/dbbrowse/bitmaps/f_closed.ico index 387080ef43..806b900a30 100644 Binary files a/demos/dbbrowse/bitmaps/f_closed.ico and b/demos/dbbrowse/bitmaps/f_closed.ico differ diff --git a/demos/dbbrowse/bitmaps/f_closed.xpm b/demos/dbbrowse/bitmaps/f_closed.xpm index 8e17fcff85..c0930b4089 100644 --- a/demos/dbbrowse/bitmaps/f_closed.xpm +++ b/demos/dbbrowse/bitmaps/f_closed.xpm @@ -1,28 +1,134 @@ /* XPM */ -static char * FolderClosed_xpm[] = { -/* width height ncolors chars_per_pixel */ -"16 16 6 1", -/* colors */ -" s None c None", -". c #000000", -"+ c #c0c0c0", -"@ c #808080", -"# c #ffff00", -"$ c #ffffff", +static char *FolderClosed_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 16 112 2", +"r c #F7FAFD", +"%. c #3562AF", +"=. c #3F6AB2", +"- c #4975BE", +"O. c #A5BDE6", +"k c #446EB4", +"d c #B9CDEC", +"5 c #AFC5EA", +"@ c #6790D4", +".. c #769CDA", +"M c #6787BD", +"D c #CDDAF1", +"F c #D7E2F5", +"] c #99B5E4", +"% c #4772B8", +";. c #476FB3", +">. c #4C73B5", +"@. c #5B7FBA", +"` c #4F80CF", +"*. c #3B67B0", +"O c #406BB2", +"N c #406BB3", +"R c #6891D6", +"j c #6888BD", +"( c #D8E3F5", +"$ c #3460A9", +"& c #4873BA", +"' c #5C89D3", +"-. c #436CB2", +"u c #4870B4", +"[ c #B8CBEC", +"7 c #C2D3EF", +"H c #3C68B1", +"a c #A2BBE6", +"+ c #6E96D8", +": c #698FCE", +"9 c #D4E0F4", +"t c #FCFDFE", +":. c #4971B4", +"3 c #4E75B6", +"< c #6C93D1", +"6 c #B9CCEC", +"c c #C3D4EF", +"l c #80A3DD", +"| c #4276CC", +"q c #E6EDF9", +"e c #F0F5FC", +"#. c #2E5AA6", +"x c #A3BCE6", +"s c #ADC4E9", +"B c #749BDA", +"1. c #567AB7", +", c #6A90D0", +"# c #6589C5", +"G c #6586BD", +"8 c #CBD9F1", +"g c #D5E1F4", +"z c #8DACE0", +"p c #97B4E3", +" c None", +"* c #4A75BC", +"+. c #C4D5EF", +"V c #81A4DD", +"m c #ECF2FA", +"n c #E7EEF9", +"Y c #3966B1", +"Z c #A4BDE6", +"A c #AEC5E9", +"o c #436BAD", +"T c #5C88D2", +"J c #6690D5", +"<. c #5277B6", +") c #6183BC", +"f c #CCDAF1", +"v c #D6E2F5", +"o. c #98B5E3", +"Q c #8EADE1", +" . c #5080CF", +"= c #4B76BE", +"I c #B6CAEC", +"S c #BBCEED", +"_ c #3563AF", +"! c #A5BEE6", +"/ c #CDDBF2", +"X. c #8FAEE1", +"0 c #DFE8F7", +"$. c #3160AE", +"} c #3160AF", +"4 c #A1BBE5", +"1 c #6D93D1", +"{ c #5E81BB", +"U c #6385BC", +"^ c #C4D4EF", +"2 c #597DBC", +"K c #81A3DD", +"i c #8BABE0", +"w c #ECF1FA", +"h c #F1F5FC", +"&. c #3965B0", +"X c #3E69B1", +"P c #AEC4E9", +"~ c #B8CCEC", +"; c #5C84C6", +"E c #759BDA", +"y c #6B8ABE", +"b c #E0E9F7", +"C c #98B4E3", +". c #325EA7", +"> c #6990CE", +",. c #5076B6", +"W c #82A4DD", +"L c #8CACE0", /* pixels */ -" ", -" @@@@@ ", -" @#+#+#@ ", -" @#+#+#+#@@@@@@ ", -" @$$$$$$$$$$$$@.", -" @$#+#+#+#+#+#@.", -" @$+#+#+#+#+#+@.", -" @$#+#+#+#+#+#@.", -" @$+#+#+#+#+#+@.", -" @$#+#+#+#+#+#@.", -" @$+#+#+#+#+#+@.", -" @$#+#+#+#+#+#@.", -" @@@@@@@@@@@@@@.", -" ..............", -" ", -" "}; +" ", +" ", +" . X X X o ", +" O + + + @ # ", +" $ % & * = - ; : : > , < 1 2 ", +" 3 4 5 6 7 8 9 0 q w e r t y ", +" u i p a s d 7 f g 0 q w h j ", +" k l z p x 5 6 c f v b n m M ", +" N B V z C Z A S c D F b n G ", +" H J B K L C x P I c f v b U ", +" Y T R E W Q C ! P ~ ^ / ( ) ", +" _ ` ' R E W z ] Z P [ ^ / { ", +" } | .' R ..V X.o.O.P [ +.@. ", +" #.$.%.&.*.=.-.;.:.>.,.<.1.*. ", +" ", +" " +}; diff --git a/demos/dbbrowse/bitmaps/f_open.ico b/demos/dbbrowse/bitmaps/f_open.ico index 84c781f3b9..f0f581199a 100644 Binary files a/demos/dbbrowse/bitmaps/f_open.ico and b/demos/dbbrowse/bitmaps/f_open.ico differ diff --git a/demos/dbbrowse/bitmaps/f_open.xpm b/demos/dbbrowse/bitmaps/f_open.xpm index 81976bcca8..3603ca3290 100644 --- a/demos/dbbrowse/bitmaps/f_open.xpm +++ b/demos/dbbrowse/bitmaps/f_open.xpm @@ -1,28 +1,78 @@ /* XPM */ -static char * FolderOpen_xpm[] = { -/* width height ncolors chars_per_pixel */ -"16 16 6 1", -/* colors */ -" s None c None", -". c #000000", -"+ c #c0c0c0", -"@ c #808080", -"# c #ffff00", -"$ c #ffffff", +static char *FolderOpen_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 57 1", +"u c #83A5DD", +"h c #83A5DE", +"> c #DAE3F2", +": c #F3F7FC", +"t c #4A79C6", +"s c #274E8F", +"n c #4D71AB", +"5 c #C2D0E8", +"9 c #84A6DE", +"x c #3761A5", +"p c #ACC3E8", +"$ c #ACC3E9", +"= c #D9E4F5", +"o c #91AFE2", +"f c #5886D1", +"2 c #B9CCEC", +"& c #C3D4EF", +"; c #EBF1FA", +"7 c #4270BC", +"# c #9EB8E5", +"0 c #ADC4E9", +"y c #658FD5", +" c None", +"@ c #688DCA", +"< c #779CDA", +"r c #2A5498", +"l c #254A87", +"g c #6690D5", +"M c #5778AE", +"m c #5274AD", +"a c #D6E2F4", +", c #4672BA", +"v c #4168A8", +"c c #3C64A7", +". c #416BB2", +"- c #E3EBF8", +"z c #305CA3", +"X c #446CAE", +"O c #5882C8", +"N c #5D7DB0", +"3 c #C3D3EF", +"b c #476DAA", +"k c #ADC3E9", +"e c #E4ECF8", +"d c #4576C7", +"q c #C4D4EF", +"* c #CEDCF2", +"i c #90AFE1", +"4 c #ECF1FA", +"B c #4D72AE", +"% c #B8CCEC", +"8 c #759BDA", +"+ c #617FB1", +"1 c #9DB8E4", +"j c #9DB8E5", +"6 c #3762AA", +"w c #CFDDF2", /* pixels */ " ", -" @@@@@ ", -" @$$$$$@ ", -" @$#+#+#$@@@@@@ ", -" @$+#+#+$$$$$$@.", -" @$#+#+#+#+#+#@.", -"@@@@@@@@@@@@@#@.", -"@$$$$$$$$$$@@+@.", -"@$#+#+#+#+##.@@.", -" @$#+#+#+#+#+.@.", -" @$+#+#+#+#+#.@.", -" @$+#+#+#+##@..", -" @@@@@@@@@@@@@.", -" .............", " ", -" "}; +" .... ", +" Xooo. ", +" Xoooo....... ", +" Xoooooooooo. ", +" XoOOOOOOOOOOO+ ", +" Xo@#$%&*=-;:>+ ", +" X, c #A7A7A7", +"g c #C5C5C5", +"h c #191919", +"= c #737373", +"6 c #919191", +"< c #A0A0A0", +"f c #CDCDCD", +"q c #DCDCDC", +"% c #7B7B7B", +"d c #C6C6C6", +". c None", +"- c #838383", +"a c #929292", +"r c #B0B0B0", +"@ c #BFBFBF", +"9 c #7C7C7C", +"* c #9A9A9A", +"O c #B8B8B8", +"$ c #C7C7C7", +"i c #FF0000", +"X c #C0C0C0", +"# c #CFCFCF", +"s c #323232", +"0 c #B9B9B9", +"5 c #949494", +"4 c #C1C1C1", +"; c #D0D0D0", +"w c #6F6F6F", +": c #7E7E7E", +"u c #868686", +"7 c #A4A4A4", +"o c #D1D1D1", +"3 c #7F7F7F", +/* pixels */ +" ....", +" XXoO++@#XX ....", +" X$%&**=-$X ....", +" ;:>,,,,<12 ....", +" @3,,,,,,=4 ....", +" 5<,,,,,,67 ....", +" 5<,,,,,,67 ....", +" @8,,,,,,90 ....", +" qwe,,,,r=o ....", +" Xty7,,uii2 ....", +" XXp0a&riiis....", +" XXXdffggiii....", +" hiii...", +"...........iii..", +"............ii..", +"................" +}; diff --git a/demos/dbbrowse/bitmaps/pgmctrl.ico b/demos/dbbrowse/bitmaps/pgmctrl.ico index 2d650d58c9..dc8b6f7b14 100644 Binary files a/demos/dbbrowse/bitmaps/pgmctrl.ico and b/demos/dbbrowse/bitmaps/pgmctrl.ico differ diff --git a/demos/dbbrowse/bitmaps/pgmctrl.xpm b/demos/dbbrowse/bitmaps/pgmctrl.xpm index b66db2b56c..8e76e73904 100644 --- a/demos/dbbrowse/bitmaps/pgmctrl.xpm +++ b/demos/dbbrowse/bitmaps/pgmctrl.xpm @@ -1,27 +1,26 @@ -/* XPM */ -static char * PgmCtrl_xpm[] = { -/* width height ncolors chars_per_pixel */ -"16 16 5 1", -/* colors */ -" s None c None", -". c #000000", -"+ c #ff0000", -"@ c #0000ff", -"# c #ffffff", -/* pixels */ -" ", -" ", -" ########## ", -" #........# ", -" #........# ", -" #........# ", -" #..########### ", -" #..#+++++++++# ", -" ####++#####++# ", -" #+#@@@@@#+# ", -" #+#@@@@@#+# ", -" #+#@@@@@#+# ", -" #++#####++# ", -" #+++++++++# ", -" ########### ", -" "}; +/* XPM */ +static char *pgmctrl_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 16 4 1", +". c #FFFFFF", +" c None", +"o c #FF0000", +"X c #0000FF", +/* pixels */ +" ", +" .......... ", +" .XXXXXXXX. ", +" .XXXXXXXX. ", +" .XXXXXXXX. ", +" ............X. ", +" .oooooooooo.X. ", +" .oooooooooo... ", +" .oooooooooo. ", +" .oooooooooo. ", +" .oooooooooo. ", +" .oooooooooo. ", +" .oooooooooo. ", +" .oooooooooo. ", +" ............ ", +" " +}; diff --git a/demos/dbbrowse/bitmaps/tab.ico b/demos/dbbrowse/bitmaps/tab.ico index a6f34b2d09..bd46b6fb1a 100644 Binary files a/demos/dbbrowse/bitmaps/tab.ico and b/demos/dbbrowse/bitmaps/tab.ico differ diff --git a/demos/dbbrowse/bitmaps/tab.xpm b/demos/dbbrowse/bitmaps/tab.xpm index 910e9a415e..d838677a8c 100644 --- a/demos/dbbrowse/bitmaps/tab.xpm +++ b/demos/dbbrowse/bitmaps/tab.xpm @@ -1,26 +1,27 @@ /* XPM */ -static char* TAB_xpm[] = { -"16 16 7 1", -" c #000000", -"! c #800080", -"# c #008080", -"$ c #C0C0C0", -"% c #808080", -"& c #0000FF", -"' c #00FFFF", +static char *tab_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 16 5 1", +". c Black", +"O c #FFFFFF", +"o c #808080", +" c None", +"X c #C0C0C0", +/* pixels */ " ", " ", -"!!!!!!!!!!!!!!!!", -"!&&&&&&&&&&&&&&!", -"!!!!!!!!!!!!!!!!", -"!'$'#$'$$$#$$$$!", -"!$'$#'$$$$#$$$$!", -"!##############!", -"!$'$#$$$$$#$$%$!", -"!'$$#$$$$$#$%$%!", -"!##############!", -"!$$$#$$%$$#%%%%!", -"!$$%#$%$%%#%%%%!", -"!!!!!!!!!!!!!!!!", +"................", +".XXoXXoXXoXXoXX.", +".XXoXXoXXoXXoXX.", +".oooooooooooooo.", +".OOoOOoOOoOOoOO.", +".OOoOOoOOoOOoOO.", +".OOoOOoOOoOOoOO.", +".oooooooooooooo.", +".OOoOOoOOoOOoOO.", +".OOoOOoOOoOOoOO.", +".OOoOOoOOoOOoOO.", +"................", " ", -" "}; +" " +}; diff --git a/demos/dbbrowse/bitmaps/view.ico b/demos/dbbrowse/bitmaps/view.ico index bcbcc5a29a..e2d2ef622d 100644 Binary files a/demos/dbbrowse/bitmaps/view.ico and b/demos/dbbrowse/bitmaps/view.ico differ diff --git a/demos/dbbrowse/bitmaps/view.xpm b/demos/dbbrowse/bitmaps/view.xpm index 74189b7660..b74d65288e 100644 --- a/demos/dbbrowse/bitmaps/view.xpm +++ b/demos/dbbrowse/bitmaps/view.xpm @@ -1,24 +1,26 @@ -/* XPM */ -static char* VIEW_xpm[] = { -"16 16 5 1", -" c #000000", -"! c #000080", -"# c #C0C0C0", -"$ c #808080", -"% c #FFFFFF", -"$$$$$$$$$$$$$$$$", -"$$$$$$$$$$$$$$$$", -"$#############$ ", -"$#$$$$$$$$$$$$$ ", -"$$$$$$$$$$$$$$$ ", -"$$############# ", -"$$#$$$$$$$$$$$$ ", -"$$#$$$$$$$$$$$$ ", -"$$#$$$$$$$$$$$$ ", -"$$#%%%%%%%%%%%$ ", -"$$#%!!!%!!!%!%$ ", -"$$#%%%%%%%%%%%$ ", -"$$#%!!!%!!!%!%$ ", -"$$#%%%%%%%%%%%$ ", -" $#%!!!%!!!%!% ", -"%$$$$$$$$$$$$$$$"}; +/* XPM */ +static char *view_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 5 1", +" c Black", +"O c #FFFFFF", +"o c #808080", +". c None", +"X c #C0C0C0", +/* pixels */ +" ..", +" XXoXXoXXoXXo ..", +" XXoXXoXXoXXo ..", +" o .", +" O XXoXXoXXoXX .", +" O XXoXXoXXoXX .", +" O ooooooooooo .", +" o OOoOOoOOoOO .", +" O OOoOOoOOoOO .", +" O OOoOOoOOoOO .", +" O ooooooooooo .", +" OOoOOoOOoOO .", +".. OOoOOoOOoOO .", +".. OOoOOoOOoOO .", +".. ." +}; 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/help.png/col.png b/demos/dbbrowse/help.png/col.png index 3496d89e94..932100115a 100644 Binary files a/demos/dbbrowse/help.png/col.png and b/demos/dbbrowse/help.png/col.png differ diff --git a/demos/dbbrowse/help.png/dsn.png b/demos/dbbrowse/help.png/dsn.png index 326d01994a..9689cb662b 100644 Binary files a/demos/dbbrowse/help.png/dsn.png and b/demos/dbbrowse/help.png/dsn.png differ diff --git a/demos/dbbrowse/help.png/dsnclose.png b/demos/dbbrowse/help.png/dsnclose.png index 327f5b2270..912b92439f 100644 Binary files a/demos/dbbrowse/help.png/dsnclose.png and b/demos/dbbrowse/help.png/dsnclose.png differ diff --git a/demos/dbbrowse/help.png/dsnopen.png b/demos/dbbrowse/help.png/dsnopen.png index fb13f87ac2..0a14c4dfd4 100644 Binary files a/demos/dbbrowse/help.png/dsnopen.png and b/demos/dbbrowse/help.png/dsnopen.png differ diff --git a/demos/dbbrowse/help.png/f_closed.png b/demos/dbbrowse/help.png/f_closed.png index afb75a20f6..fe1f2cdf9f 100644 Binary files a/demos/dbbrowse/help.png/f_closed.png and b/demos/dbbrowse/help.png/f_closed.png differ diff --git a/demos/dbbrowse/help.png/f_open.png b/demos/dbbrowse/help.png/f_open.png index a4cc29c696..3ab2b7d1bf 100644 Binary files a/demos/dbbrowse/help.png/f_open.png and b/demos/dbbrowse/help.png/f_open.png differ diff --git a/demos/dbbrowse/help.png/gnu.png b/demos/dbbrowse/help.png/gnu.png index d4efb330c4..2a33f2c7ad 100644 Binary files a/demos/dbbrowse/help.png/gnu.png and b/demos/dbbrowse/help.png/gnu.png differ diff --git a/demos/dbbrowse/help.png/gtk.png b/demos/dbbrowse/help.png/gtk.png index fffa2d5c7e..9bb1ae6e6b 100644 Binary files a/demos/dbbrowse/help.png/gtk.png and b/demos/dbbrowse/help.png/gtk.png differ diff --git a/demos/dbbrowse/help.png/imbau.png b/demos/dbbrowse/help.png/imbau.png index 75ed3d0d7a..53ed04769f 100644 Binary files a/demos/dbbrowse/help.png/imbau.png and b/demos/dbbrowse/help.png/imbau.png differ diff --git a/demos/dbbrowse/help.png/kde.png b/demos/dbbrowse/help.png/kde.png index 05d95fd73f..09b3d71804 100644 Binary files a/demos/dbbrowse/help.png/kde.png and b/demos/dbbrowse/help.png/kde.png differ diff --git a/demos/dbbrowse/help.png/key.png b/demos/dbbrowse/help.png/key.png index 128a52a519..d2e112dfb5 100644 Binary files a/demos/dbbrowse/help.png/key.png and b/demos/dbbrowse/help.png/key.png differ diff --git a/demos/dbbrowse/help.png/keyf.png b/demos/dbbrowse/help.png/keyf.png index 4678d31a0a..d9df4449f9 100644 Binary files a/demos/dbbrowse/help.png/keyf.png and b/demos/dbbrowse/help.png/keyf.png differ diff --git a/demos/dbbrowse/help.png/linux.png b/demos/dbbrowse/help.png/linux.png index 47bdea6f39..9396066be5 100644 Binary files a/demos/dbbrowse/help.png/linux.png and b/demos/dbbrowse/help.png/linux.png differ diff --git a/demos/dbbrowse/help.png/logo.png b/demos/dbbrowse/help.png/logo.png index 03ab75e6a6..16203f21f5 100644 Binary files a/demos/dbbrowse/help.png/logo.png and b/demos/dbbrowse/help.png/logo.png differ diff --git a/demos/dbbrowse/help.png/motif.png b/demos/dbbrowse/help.png/motif.png index a0c096f8e0..8b551ef9fd 100644 Binary files a/demos/dbbrowse/help.png/motif.png and b/demos/dbbrowse/help.png/motif.png differ diff --git a/demos/dbbrowse/help.png/msvc.png b/demos/dbbrowse/help.png/msvc.png index 0b64785e7d..b8caf9139b 100644 Binary files a/demos/dbbrowse/help.png/msvc.png and b/demos/dbbrowse/help.png/msvc.png differ diff --git a/demos/dbbrowse/help.png/odbc.png b/demos/dbbrowse/help.png/odbc.png index 41d260f035..8effdf9ce2 100644 Binary files a/demos/dbbrowse/help.png/odbc.png and b/demos/dbbrowse/help.png/odbc.png differ diff --git a/demos/dbbrowse/help.png/pgmctrl.png b/demos/dbbrowse/help.png/pgmctrl.png index 907ce64b61..3a4cad1926 100644 Binary files a/demos/dbbrowse/help.png/pgmctrl.png and b/demos/dbbrowse/help.png/pgmctrl.png differ diff --git a/demos/dbbrowse/help.png/redh.png b/demos/dbbrowse/help.png/redh.png index 86cf230225..cda2f1e45e 100644 Binary files a/demos/dbbrowse/help.png/redh.png and b/demos/dbbrowse/help.png/redh.png differ diff --git a/demos/dbbrowse/help.png/remstar.png b/demos/dbbrowse/help.png/remstar.png index 502460fbec..d37a6c8add 100644 Binary files a/demos/dbbrowse/help.png/remstar.png and b/demos/dbbrowse/help.png/remstar.png differ diff --git a/demos/dbbrowse/help.png/server.png b/demos/dbbrowse/help.png/server.png index 4a03bb56f8..7fb74df1da 100644 Binary files a/demos/dbbrowse/help.png/server.png and b/demos/dbbrowse/help.png/server.png differ diff --git a/demos/dbbrowse/help.png/suse.png b/demos/dbbrowse/help.png/suse.png index 1f4be87e3f..5e8acbaa34 100644 Binary files a/demos/dbbrowse/help.png/suse.png and b/demos/dbbrowse/help.png/suse.png differ diff --git a/demos/dbbrowse/help.png/tab.png b/demos/dbbrowse/help.png/tab.png index c981d81cba..3f18486e46 100644 Binary files a/demos/dbbrowse/help.png/tab.png and b/demos/dbbrowse/help.png/tab.png differ diff --git a/demos/dbbrowse/help.png/view.png b/demos/dbbrowse/help.png/view.png index 51f776f12c..aaf2db57de 100644 Binary files a/demos/dbbrowse/help.png/view.png and b/demos/dbbrowse/help.png/view.png differ diff --git a/demos/dbbrowse/help.png/winnt.png b/demos/dbbrowse/help.png/winnt.png index 5e3cc64e3c..d4efac922f 100644 Binary files a/demos/dbbrowse/help.png/winnt.png and b/demos/dbbrowse/help.png/winnt.png differ diff --git a/demos/dbbrowse/help.png/wins.png b/demos/dbbrowse/help.png/wins.png index e692008c4e..2eee8fd1af 100644 Binary files a/demos/dbbrowse/help.png/wins.png and b/demos/dbbrowse/help.png/wins.png differ 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/dbbrowse/makefile.vc b/demos/dbbrowse/makefile.vc index a13526042c..e47a764c0d 100644 --- a/demos/dbbrowse/makefile.vc +++ b/demos/dbbrowse/makefile.vc @@ -4,6 +4,7 @@ # Created: 19990808 # Updated: # Copyright: (c) Mark Johnson +# Licence: wxWindows licence # # Makefile : Builds sample (VC++, WIN32) # Use FINAL=1 argument to nmake to build final version with no debug info. 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/bitmaps/open.bmp b/demos/life/bitmaps/open.bmp index bbf93fe033..35ad487487 100644 Binary files a/demos/life/bitmaps/open.bmp and b/demos/life/bitmaps/open.bmp differ diff --git a/demos/life/bitmaps/open.xpm b/demos/life/bitmaps/open.xpm index 54748e910d..36e058fc8e 100644 --- a/demos/life/bitmaps/open.xpm +++ b/demos/life/bitmaps/open.xpm @@ -1,26 +1,57 @@ /* XPM */ static char *open_xpm[] = { /* columns rows colors chars-per-pixel */ -"16 15 5 1", +"16 15 36 1", +", c #AAC1E8", +"1 c #9AEA53", +"q c #DCE6F6", +". c #295193", +"; c #A9D066", +"r c #C6D6F0", +"$ c #4A7CCE", +"9 c #779DDB", +"8 c #EAF0FA", +"O c #6E96D8", +"X c #214279", +"e c #BED0EE", +"6 c #85A7DF", +"5 c #F0F5FC", +"t c #ADC4E9", +": c #3161B1", " c None", -". c Black", -"X c Yellow", -"o c Gray100", -"O c #bfbf00", +"u c #274D8B", +"& c #BFDC9B", +"> c #9FB9E5", +"y c #5584D1", +"w c #3569BF", +"% c #3A70CA", +"+ c #305FAC", +"3 c #5D89D3", +"0 c #D2DFF4", +"@ c #CAE2AA", +"= c #B2D58C", +"2 c #FAFCFE", +"# c #638ED5", +"* c #CEDCF2", +"4 c #90AFE2", +"< c #B3C8EB", +"7 c #E5EDF9", +"- c #A2BCE6", +"o c #DFF0D0", /* pixels */ " ", -" ... ", -" . . .", -" ..", -" ... ...", -" .XoX....... ", -" .oXoXoXoXo. ", -" .XoXoXoXoX. ", -" .oXoX..........", -" .XoX.OOOOOOOOO.", -" .oo.OOOOOOOOO. ", -" .X.OOOOOOOOO. ", -" ..OOOOOOOOO. ", -" ........... ", +" .... ", +"XXXXX .oo. ", +"XOOOO+ .@o. ", +"XOOOO#$%.&*XXX ", +"XOOOOOOO.=*X-X ", +"XOXXXX...;*XXXX:", +"XOX>,<.11111*X2:", +"X3X4>,<.111*X5-:", +"XX#64>,,.1*X78: ", +"XXO964>,,.X0q7: ", +"Xw3O964>,,er0t: ", +"X%y3O964>, c #3366BB", +"$ c #2E5CA8", +"9 c #FAFCFE", +"4 c #F5F8FD", +"q c #638ED5", +"o c #5282D0", +"& c #B8CCEC", +"X c #376EC9", +"< c #ACE95B", +/* pixels */ +" .XoO+@#$. ", +" .%%&*=-O;: ", +" >>>>%&*=O,=o ", +" ><<>%%&*O,,=o ", +">>><<>>>%&OOo+@ ", +"><<<<<<>1%&*=-@ ", +"><<<<<<>21%&*=@ ", +">>><<>>>321%&*+ ", +" ><<>456321%&O ", +" >>>>7456321%o ", +" .,8974563210 ", +" .,,897456320 ", +" .,,,8974563q ", +" .,,,,897456w ", +" ............ " +}; 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/copy_src.bat b/distrib/msw/copy_src.bat index 56070dcdd0..747dcb3b85 100755 --- a/distrib/msw/copy_src.bat +++ b/distrib/msw/copy_src.bat @@ -67,17 +67,10 @@ copy *.* \wxmsw_dist\wxMSW\include\wx\msw rem del \wxmsw_dist\wxMSW\include\wx\msw\setup.h del \wxmsw_dist\wxMSW\include\wx\msw\Makefile.am del \wxmsw_dist\wxMSW\include\wx\msw\Makefile.in -md \wxmsw_dist\wxMSW\include\wx\msw\gnuwin32 -cd gnuwin32 -copy *.h \wxmsw_dist\wxMSW\include\wx\msw\gnuwin32 -cd .. md \wxmsw_dist\wxMSW\include\wx\msw\ole cd ole copy *.h \wxmsw_dist\wxMSW\include\wx\msw\ole cd .. -cd ctl3d -copy *.h \wxmsw_dist\wxMSW\include\wx\msw\ctl3d -cd .. cd .. md \wxmsw_dist\wxMSW\include\wx\protocol diff --git a/distrib/msw/copybase.bat b/distrib/msw/copybase.bat index 8512cde9d4..4aef8241f1 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.2 +set DEST=t:\wxBase-%VER% mkdir %DEST% mkdir %DEST%\include @@ -11,7 +12,6 @@ mkdir %DEST%\include\wx mkdir %DEST%\include\wx\msw mkdir %DEST%\include\wx\protocol mkdir %DEST%\include\wx\unix -mkdir %DEST%\locale mkdir %DEST%\samples mkdir %DEST%\samples\console mkdir %DEST%\src @@ -20,26 +20,47 @@ 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 - +rem +rem "/q" is 4NT-specific, remove it if you're using DOS +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..d3f3775586 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 @@ -172,8 +174,8 @@ utils/tex2rtf/src/*.mcp utils/hhp2cached/*M?.xml utils/hhp2cached/*.mcp -utils/helpgen/src/*M?.xml -utils/helpgen/src/*.mcp +utils/HelpGen/src/*M?.xml +utils/HelpGen/src/*.mcp demos/bombs/*M?.xml demos/bombs/*.mcp 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..668c0a3638 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 @@ -959,7 +940,7 @@ samples/rotate/*.def samples/rotate/*.ico samples/rotate/*.xpm samples/rotate/*.txt -samples/rotate/*.bmp +samples/rotate/*.png samples/rotate/*.pro samples/sashtest/*.cpp @@ -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..f2be36c7ed 100644 --- a/distrib/msw/innobott.txt +++ b/distrib/msw/innobott.txt @@ -1,21 +1,20 @@ [Icons] - Name: {group}\Dialog Editor; Filename: {app}\bin\dialoged.exe; WorkingDir: {app}\bin; IconFilename: {app}\bin\dialoged.exe; IconIndex: 0 - Name: {group}\Dialog Editor Help; Filename: {app}\bin\dialoged.chm; WorkingDir: {app}\bin; IconIndex: 0; Flags: useapppaths Name: {group}\Tex2rtf; Filename: {app}\bin\tex2rtf.exe; WorkingDir: {app}\bin; IconFilename: {app}\bin\tex2rtf.exe; IconIndex: 0 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 +; Name: {group}\Tutorial; Filename: {app}\docs\pdf\wxTutorial.pdf; WorkingDir: {app}; IconIndex: 0; Flags: useapppaths Name: {group}\Document Index; Filename: {app}\docs\html\index.htm; WorkingDir: {app}; IconIndex: 0; Flags: useapppaths Name: {group}\Widgets Sample; Filename: {app}\bin\widgets.exe; WorkingDir: {app}\bin; IconFilename: {app}\bin\widgets.exe; IconIndex: 0 + Name: "{group}\Uninstall wxWindows 2.4.2"; Filename: "{uninstallexe}" [INI] [Registry] + Root: HKCU; SubKey: Software\Environment\; ValueName: WXWIN; ValueType: string; ValueData: {app}; Flags: createvalueifdoesntexist [UninstallDelete] @@ -32,10 +31,10 @@ ; DO NOT DELETE THEM or you may be unable to reload the script ;[ScriptSetup] -;VerNum=2.3.3 +;VerNum=2.4.2 ;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..0091bf6fc2 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.2 AppId=wxWindows CreateUninstallRegKey=1 UsePreviousAppDir=0 UsePreviousGroup=0 - AppVersion=2.3.3 - AppVerName=wxWindows 2.3.3 + AppVersion=2.4.2 + AppVerName=wxWindows 2.4.2 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.2 UninstallLogMode=Append DirExistsWarning=auto UninstallFilesDir={app} @@ -27,20 +27,20 @@ DisableStartupPrompt=0 CreateAppDir=1 DisableProgramGroupPage=0 - AlwaysCreateUninstallIcon=1 - UninstallIconName=Uninstall wxWindows 2.3.3 +; AlwaysCreateUninstallIcon=1 +; UninstallIconName=Uninstall wxWindows 2.4.2 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 - MessagesFile=compiler:default.isl + DefaultDirName=c:\wxWindows-2.4.2 + DefaultGroupName=wxWindows 2.4.2 + 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 +; 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.2 + OutputDir=c:\wx24\wxWindows\deliver diff --git a/distrib/msw/makeall.bat b/distrib/msw/makeall.bat index ef0aa78564..31eabf2c83 100755 --- a/distrib/msw/makeall.bat +++ b/distrib/msw/makeall.bat @@ -97,7 +97,7 @@ Rem Euch, this is the only way I can think of right now Rem to copy them to the same directory. Daft but... erase %TEMP%\temp.zip zip16 -r %TEMP%\temp.zip *.exe -unzip32 -o %TEMP%\temp.zip -d %BUILDDEST%\VC6Release +unzip -o %TEMP%\temp.zip -d %BUILDDEST%\VC6Release nmake -f makefile.vc clean FINAL=1 cd %WXDIR%\demos @@ -106,7 +106,7 @@ nmake -f makefile.vc FINAL=1 Rem Copy all executables to VC6Release erase %TEMP%\temp.zip zip16 -r %TEMP%\temp.zip *.exe -unzip32 -o %TEMP%\temp.zip -d %BUILDDEST%\VC6Release +unzip -o %TEMP%\temp.zip -d %BUILDDEST%\VC6Release nmake -f makefile.vc clean FINAL=1 Rem Compile OGL @@ -247,7 +247,7 @@ make -f makefile.b32 FINAL=1 Rem Copy all executables to BC55Release erase %TEMP%\temp.zip zip16 -r %TEMP%\temp.zip *.exe -unzip32 -o %TEMP%\temp.zip -d %BUILDDEST%\BC55Release +unzip -o %TEMP%\temp.zip -d %BUILDDEST%\BC55Release make -f makefile.b32 clean FINAL=1 cd %WXDIR%\demos @@ -256,7 +256,7 @@ make -f makefile.b32 FINAL=1 Rem Copy all executables to BC55Release erase %TEMP%\temp.zip zip16 -r %TEMP%\temp.zip *.exe -unzip32 -o %TEMP%\temp.zip -d %BUILDDEST%\BC55Release +unzip -o %TEMP%\temp.zip -d %BUILDDEST%\BC55Release make -f makefile.b32 clean FINAL=1 Rem Compile OGL @@ -379,7 +379,7 @@ make -f makefile.g95 FINAL=1 Rem Copy all executables to Cygwin11Release erase %TEMP%\temp.zip zip16 -r %TEMP%\temp.zip *.exe -unzip32 -o %TEMP%\temp.zip -d %BUILDDEST%\Cygwin11Release +unzip -o %TEMP%\temp.zip -d %BUILDDEST%\Cygwin11Release make -f makefile.g95 clean FINAL=1 cd %WXDIR%\demos @@ -388,7 +388,7 @@ make -f makefile.g95 FINAL=1 Rem Copy all executables to Cygwin11Release erase %TEMP%\temp.zip zip16 -r %TEMP%\temp.zip *.exe -unzip32 -o %TEMP%\temp.zip -d %BUILDDEST%\Cygwin11Release +unzip -o %TEMP%\temp.zip -d %BUILDDEST%\Cygwin11Release make -f makefile.g95 clean FINAL=1 Rem Compile OGL @@ -459,7 +459,7 @@ make -f makefile.g95 FINAL=1 Rem Copy all executables to Ming2952Release erase %TEMP%\temp.zip zip16 -r %TEMP%\temp.zip *.exe -unzip32 -o %TEMP%\temp.zip -d %BUILDDEST%\Ming2952Release +unzip -o %TEMP%\temp.zip -d %BUILDDEST%\Ming2952Release make -f makefile.g95 clean FINAL=1 cd %WXDIR%\demos @@ -468,7 +468,7 @@ make -f makefile.g95 FINAL=1 Rem Copy all executables to Ming2952Release erase %TEMP%\temp.zip zip16 -r %TEMP%\temp.zip *.exe -unzip32 -o %TEMP%\temp.zip -d %BUILDDEST%\Ming2952Release +unzip -o %TEMP%\temp.zip -d %BUILDDEST%\Ming2952Release make -f makefile.g95 clean FINAL=1 Rem Compile OGL 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..54997ad674 --- /dev/null +++ b/distrib/msw/makerpm @@ -0,0 +1,341 @@ +#!/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 wxGTK 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. +} + +dospinwxmgl() +{ + echo Making wxMGL RPMs... + RPM_ROOT=$WXDEST/wxmgl/rpm-root + export MGL_ROOT=/usr/lib/mgl5 + + if [ ! -d $WXDEST ]; then + mkdir $WXDEST + fi + + rm -f -r $WXDEST/wxmgl + mkdir $WXDEST/wxmgl + mkdir $WXDEST/wxmgl/release + mkdir $RPM_ROOT + + cd $WXSRC + cd locale + make allmo + cd $WXDEST/wxmgl/release + echo Configuring... + $WXSRC/configure --with-mgl --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 wxMGL-$WXVER.tar.bz2 to $RPM_ROOT/SOURCES... + cp wxMGL-$WXVER.tar.bz2 $RPM_ROOT/SOURCES + echo Copying wxMGL.spec to $RPM_ROOT/SPECS... + cp $WXSRC/wxMGL.spec $RPM_ROOT/SPECS + + echo Starting wxMGL RPM build... + cd $RPM_ROOT + rpmbuild -ba SPECS/wxMGL.spec 2>&1 | tee wxMGL.out + + echo Finished wxMGL 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/wxmgl/release/*.tar.gz $WXDEST + cp $WXDEST/wxmgl/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 +SPINWXMGL=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 " --wxmgl Spin wxMGL 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 ;; + --wxmgl) SPINWXMGL=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 + +if [ "$SPINWXMGL" = "1" ] || [ "$SPINEVERYTHING" = "1" ]; then + dospinwxmgl +fi + diff --git a/distrib/msw/mgl.rsp b/distrib/msw/mgl.rsp index 52d61a9aa8..5790580c3f 100644 --- a/distrib/msw/mgl.rsp +++ b/distrib/msw/mgl.rsp @@ -1,2 +1,4 @@ include/wx/mgl/*.h src/mgl/*.cpp +src/mgl/*.lst + diff --git a/distrib/msw/msw.rsp b/distrib/msw/msw.rsp index e02fca6706..fc7b5e29c3 100644 --- a/distrib/msw/msw.rsp +++ b/distrib/msw/msw.rsp @@ -6,6 +6,8 @@ lib/watcom/*.txt lib/watcom/*.lib lib/watcom/*.bat lib/bcc16/*.lib +lib/_sc/*.txt +lib/_sc/*.def docs/licence.txt docs/msw/*.txt @@ -23,6 +25,8 @@ tools/gettext/*.sed src/makeb32.env src/makeprog.b32 src/makelib.b32 +src/makelib.sc +src/makeprog.sc src/makebcc.env src/makeprog.bcc src/makelib.bcc @@ -49,6 +53,7 @@ src/makelib.twn src/makefile.bcc src/makefile.dos src/makefile.vc +src/version.mak src/*.bat src/common/dosyacc.c @@ -73,10 +78,6 @@ src/msw/*.prj include/wx/msw/*.h include/wx/msw/*.rc -include/wx/msw/ctl3d/*.h -include/wx/msw/gnuwin32/*.h -include/wx/msw/gnuwin32/*.def -include/wx/msw/gnuwin32/gl/*.h include/wx/msw/ole/*.h include/wx/msw/*.cur include/wx/msw/*.ico diff --git a/distrib/msw/process_sample_bcb.bat b/distrib/msw/process_sample_bcb.bat index d1a3909c9b..42c3eba069 100755 --- a/distrib/msw/process_sample_bcb.bat +++ b/distrib/msw/process_sample_bcb.bat @@ -1,5 +1,5 @@ @echo off -if "%WXWIN%=="" goto nowxdir +if "%WXWIN%"=="" goto nowxdir if "%1"=="" goto bad if not exist %1.cpp goto nocpp find /c "BIDE" %1.cpp diff --git a/distrib/msw/rearchive.bat b/distrib/msw/rearchive.bat index 22a19696db..a380cdaadf 100755 --- a/distrib/msw/rearchive.bat +++ b/distrib/msw/rearchive.bat @@ -17,10 +17,10 @@ pushd %changeto% if direxist %dirname% erase /sxyz %dirname% mkdir %dirname% cd %dirname% -unzip32 ..\%archive% +unzip ..\%archive% cd .. erase %archive% -zip32 -r %archive% %dirname%/* +zip -r %archive% %dirname%/* popd 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..9c99e2455c 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/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/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/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 c5a50e246c..714224297c 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 @@ -1188,7 +1190,6 @@ radiobox.h MotifH radiobut.h MotifH region.h MotifH scrolbar.h MotifH -settings.h MotifH slider.h MotifH spinbutt.h MotifH statbmp.h MotifH @@ -1230,6 +1231,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 +1290,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 +1415,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 @@ -1453,6 +1475,7 @@ htmlcell.h HtmlH htmldefs.h HtmlH htmlfilt.h HtmlH htmlpars.h HtmlH +htmlproc.h HtmlH htmltag.h HtmlH htmlwin.h HtmlH winpars.h HtmlH @@ -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 6a1e34079c..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/; @@ -80,6 +78,8 @@ } foreach $file (sort keys %wxGENERICINCLUDE) { + next if $wxGENERICINCLUDE{$file} =~ /\bNotGTK\b/; + $project{"GTK_HEADERS"} .= "generic/" . $file . " " } 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..07e7bcceeb 100755 --- a/distrib/msw/tmake/makeall.bat +++ b/distrib/msw/tmake/makeall.bat @@ -4,6 +4,7 @@ rem Purpose: create wxWindows makefiles for all compilers rem Author: Vadim Zeitlin rem Created: 14.07.99 rem Copyright: (c) 1999 Vadim Zeitlin +rem Licence: wxWindows licence rem Version: $Id$ rem rem Makefile to create the makefiles for all compilers from the templates using @@ -48,7 +49,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..34454ad1cb 100755 --- a/distrib/msw/tmake/makeall.sh +++ b/distrib/msw/tmake/makeall.sh @@ -6,6 +6,7 @@ # Created: 29 Aug 1999 # Copyright: (c) 1999 Michael Bedward # Version: $Id$ +# Licence: wxWindows licence # # This creates the makefiles for all compilers from the templates using # tmake. The tmake executable should be in the path. @@ -22,7 +23,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/sc.t b/distrib/msw/tmake/sc.t index 9ac3bf7c9d..8e88b03128 100644 --- a/distrib/msw/tmake/sc.t +++ b/distrib/msw/tmake/sc.t @@ -26,6 +26,13 @@ $project{$tag} .= '$(GENDIR)\\' . $file . " " } + foreach $file (sort keys %wxHTML) { + next if $wxHTML{$file} =~ /\b16\b/; + + $file =~ s/cp?p?$/obj/; + $project{"WXHTMLOBJS"} .= '$(HTMLDIR)\\' . $file . " " + } + foreach $file (sort keys %wxCommon) { next if $wxCommon{$file} =~ /\b(16|U)\b/; @@ -35,9 +42,9 @@ foreach $file (sort keys %wxMSW) { #! these files don't compile with SC++ 6 - next if $file =~ /^(joystick|pnghand)\./; + #! next if $file =~ /^(joystick|pnghand)\./; - next if $wxGeneric{$file} =~ /\b16\b/; + next if $wxMSW{$file} =~ /\b16\b/; my $isOleObj = $wxMSW{$file} =~ /\bO\b/; $file =~ s/cp?p?$/obj/; @@ -50,18 +57,20 @@ # This file was automatically generated by tmake # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE SC.T! -# Symantec C++ makefile for the msw objects +# Digital mars makefile +# was Symantec C++ makefile for the msw objects +# # called from src\makefile.sc # configuration section (see src\makefile.sc) ########################### -WXDIR = $(WXWIN) +WXDIR = ..\.. include ..\makesc.env DEBUG=0 -LIBTARGET = $(LIBDIR)\wx.lib +LIBTARGET = $(LIBDIR)\wx$(SC_SUFFIX).lib OPTIONS= @@ -69,43 +78,90 @@ OPTIONS= GENDIR=$(WXDIR)\src\generic COMMDIR=$(WXDIR)\src\common +HTMLDIR=$(WXDIR)\src\html OLEDIR=ole MSWDIR=$(WXDIR)\src\msw GENERICOBJS= #$ ExpandList("WXGENERICOBJS"); -COMMONOBJS = \ - $(COMMDIR)\y_tab.obj \ - #$ ExpandList("WXCOMMONOBJS"); +COMMONOBJS = #$ ExpandList("WXCOMMONOBJS"); + +HTMLOBJS = #$ ExpandList ("WXHTMLOBJS"); MSWOBJS = #$ ExpandList("WXMSWOBJS"); # Add $(NONESSENTIALOBJS) if wanting generic dialogs, PostScript etc. -OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS) +OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS) $(HTMLOBJS) -all: $(LIBTARGET) +all: MAKEARCHDIR MAKELIBS PCH $(LIBTARGET) zlib png jpeg tiff regex + +MAKEARCHDIR: + @if not exist $(MSWINCDIR)\setup.h copy $(MSWINCDIR)\setup0.h $(MSWINCDIR)\setup.h + @if not exist $(ARCHINCDIR)\wx\setup.h mkdir $(ARCHINCDIR) + @if not exist $(ARCHINCDIR)\wx\setup.h mkdir $(ARCHINCDIR)\wx + @if not exist $(ARCHINCDIR)\wx\setup.h copy $(MSWINCDIR)\setup.h $(ARCHINCDIR)\wx\setup.h + @if not exist $(WXOUTDIR)\nul mkdir $(WXOUTDIR) + +#build our own copies of missing libraries +MAKELIBS: + implib /s $(LIBDIR)\$(SHELLLIB) $(LIBDIR)\$(SC_SUFFIX)\$(SHELLLIB).def + implib /s $(LIBDIR)\$(WINSOCKLIB) $(LIBDIR)\$(SC_SUFFIX)\$(WINSOCKLIB).def $(LIBTARGET): $(OBJECTS) -del $(LIBTARGET) *lib /PAGESIZE:512 $(LIBTARGET) y $(OBJECTS), nul; -clean: +clean: clean_msw clean_zlib clean_png clean_jpeg clean_tiff clean_regex clean_pch + +clean_msw: + -del $(COMMDIR)\*.obj + -del $(MSWDIR)\*.obj + -del $(GENDIR)\*.obj + -del $(HTMLDIR)\*.obj -del *.obj - -del $(LIBTARGET) + -del *.sym + -del ole\*.obj + -del $(LIBTARGET) -$(COMMDIR)\y_tab.obj: $(COMMDIR)\y_tab.c $(COMMDIR)\lex_yy.c +PCH: $(INCDIR)\wx\wxprec.h + dmc $(CPPFLAGS) $(CFLAGS) $(INCLUDE) -HF$(WXOUTDIR)\wxprec.SYM -o$(WXOUTDIR)\wxprec.PCO $(INCDIR)\wx\wxprec.h -$(COMMDIR)\y_tab.c: $(COMMDIR)\dosyacc.c - copy $(COMMDIR)\dosyacc.c $(COMMDIR)\y_tab.c +clean_pch: + del $(WXOUTDIR)\*.sym + del $(WXOUTDIR)\*.PCO -$(COMMDIR)\lex_yy.c: $(COMMDIR)\doslex.c - copy $(COMMDIR)\doslex.c $(COMMDIR)\lex_yy.c -# $(COMMDIR)\cmndata.obj: $(COMMDIR)\cmndata.cpp -# *$(CC) -c $(CFLAGS) -I$(INCLUDE) $(OPTIONS) $(COMMDIR)\cmndata.cpp -o$(COMMDIR)\cmndata.obj +png: + make -f $(WXDIR)\src\png\makefile.sc FINAL=$(FINAL) + +clean_png: + make -f $(WXDIR)\src\png\makefile.sc clean + +zlib: + make -f $(WXDIR)\src\zlib\makefile.sc FINAL=$(FINAL) + +clean_zlib: + make -f $(WXDIR)\src\zlib\makefile.sc clean + +jpeg: + make -f $(WXDIR)\src\jpeg\makefile.sc FINAL=$(FINAL) + +clean_jpeg: + make -f $(WXDIR)\src\jpeg\makefile.sc clean + +regex: + make -f $(WXDIR)\src\regex\makefile.sc FINAL=$(FINAL) + +clean_regex: + make -f $(WXDIR)\src\regex\makefile.sc clean + +tiff: + make -f $(WXDIR)\src\tiff\makefile.sc FINAL=$(FINAL) + +clean_tiff: + make -f $(WXDIR)\src\tiff\makefile.sc clean MFTYPE=sc -makefile.$(MFTYPE) : $(WXWIN)\distrib\msw\tmake\filelist.txt $(WXWIN)\distrib\msw\tmake\$(MFTYPE).t - cd $(WXWIN)\distrib\msw\tmake - tmake -t $(MFTYPE) wxwin.pro -o makefile.$(MFTYPE) - copy makefile.$(MFTYPE) $(WXWIN)\src\msw +self : $(WXWIN)\distrib\msw\tmake\filelist.txt $(WXWIN)\distrib\msw\tmake\$(MFTYPE).t + perl -x$(WXWIN)\distrib\msw\tmake -S tmake -t$(MFTYPE) wxwin.pro -o $(WXWIN)\distrib\msw\tmake\makefile.sc + copy $(WXWIN)\distrib\msw\tmake\makefile.$(MFTYPE) $(WXWIN)\src\msw 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..3deabc22dd 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,62 +218,62 @@ $(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"; } #$} png: .SYMBOLIC cd $(WXDIR)\src\png - wmake -f makefile.wat all + wmake $(__MAKEOPTS__) -f makefile.wat all cd $(WXDIR)\src\msw clean_png: .SYMBOLIC cd $(WXDIR)\src\png - wmake -f makefile.wat clean + wmake $(__MAKEOPTS__) -f makefile.wat clean cd $(WXDIR)\src\msw zlib: .SYMBOLIC cd $(WXDIR)\src\zlib - wmake -f makefile.wat all + wmake $(__MAKEOPTS__) -f makefile.wat all cd $(WXDIR)\src\msw clean_zlib: .SYMBOLIC cd $(WXDIR)\src\zlib - wmake -f makefile.wat clean + wmake $(__MAKEOPTS__) -f makefile.wat clean cd $(WXDIR)\src\msw jpeg: .SYMBOLIC cd $(WXDIR)\src\jpeg - wmake -f makefile.wat all + wmake $(__MAKEOPTS__) -f makefile.wat all cd $(WXDIR)\src\msw clean_jpeg: .SYMBOLIC cd $(WXDIR)\src\jpeg - wmake -f makefile.wat clean + wmake $(__MAKEOPTS__) -f makefile.wat clean cd $(WXDIR)\src\msw tiff: .SYMBOLIC cd $(WXDIR)\src\tiff - wmake -f makefile.wat all + wmake $(__MAKEOPTS__) -f makefile.wat all cd $(WXDIR)\src\msw clean_tiff: .SYMBOLIC cd $(WXDIR)\src\tiff - wmake -f makefile.wat clean + wmake $(__MAKEOPTS__) -f makefile.wat clean cd $(WXDIR)\src\msw regex: .SYMBOLIC cd $(WXDIR)\src\regex - wmake -f makefile.wat all + wmake $(__MAKEOPTS__) -f makefile.wat all cd $(WXDIR)\src\msw clean_regex: .SYMBOLIC cd $(WXDIR)\src\regex - wmake -f makefile.wat clean + wmake $(__MAKEOPTS__) -f makefile.wat clean cd $(WXDIR)\src\msw MFTYPE=wat diff --git a/distrib/msw/tmake/watbase.t b/distrib/msw/tmake/watbase.t new file mode 100644 index 0000000000..8b623be23b --- /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 $(__MAKEOPTS__) -f makefile.wat all + cd $(WXDIR)\src\msw + +clean_zlib: .SYMBOLIC + cd $(WXDIR)\src\zlib + wmake $(__MAKEOPTS__) -f makefile.wat clean + cd $(WXDIR)\src\msw + +regex: .SYMBOLIC + cd $(WXDIR)\src\regex + wmake $(__MAKEOPTS__) -f makefile.wat all + cd $(WXDIR)\src\msw + +clean_regex: .SYMBOLIC + cd $(WXDIR)\src\regex + wmake $(__MAKEOPTS__) -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/watmgl.t b/distrib/msw/tmake/watmgl.t index 416f8b16ce..3e1a042fcb 100644 --- a/distrib/msw/tmake/watmgl.t +++ b/distrib/msw/tmake/watmgl.t @@ -262,52 +262,52 @@ $(COMMDIR)\lex_yy.c: $(COMMDIR)\doslex.c png: .SYMBOLIC cd $(WXDIR)\src\png - wmake -f makefile.wat all + wmake $(__MAKEOPTS__) -f makefile.wat all cd $(WXDIR)\src\mgl clean_png: .SYMBOLIC cd $(WXDIR)\src\png - wmake -f makefile.wat clean + wmake $(__MAKEOPTS__) -f makefile.wat clean cd $(WXDIR)\src\mgl zlib: .SYMBOLIC cd $(WXDIR)\src\zlib - wmake -f makefile.wat all + wmake $(__MAKEOPTS__) -f makefile.wat all cd $(WXDIR)\src\mgl clean_zlib: .SYMBOLIC cd $(WXDIR)\src\zlib - wmake -f makefile.wat clean + wmake $(__MAKEOPTS__) -f makefile.wat clean cd $(WXDIR)\src\mgl jpeg: .SYMBOLIC cd $(WXDIR)\src\jpeg - wmake -f makefile.wat all + wmake $(__MAKEOPTS__) -f makefile.wat all cd $(WXDIR)\src\mgl clean_jpeg: .SYMBOLIC cd $(WXDIR)\src\jpeg - wmake -f makefile.wat clean + wmake $(__MAKEOPTS__) -f makefile.wat clean cd $(WXDIR)\src\mgl tiff: .SYMBOLIC cd $(WXDIR)\src\tiff - wmake -f makefile.wat all + wmake $(__MAKEOPTS__) -f makefile.wat all cd $(WXDIR)\src\mgl clean_tiff: .SYMBOLIC cd $(WXDIR)\src\tiff - wmake -f makefile.wat clean + wmake $(__MAKEOPTS__) -f makefile.wat clean cd $(WXDIR)\src\mgl regex: .SYMBOLIC cd $(WXDIR)\src\regex - wmake -f makefile.wat all + wmake $(__MAKEOPTS__) -f makefile.wat all cd $(WXDIR)\src\mgl clean_regex: .SYMBOLIC cd $(WXDIR)\src\regex - wmake -f makefile.wat clean + wmake $(__MAKEOPTS__) -f makefile.wat clean cd $(WXDIR)\src\mgl MFTYPE=watmgl 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..de988d164d 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 @@ -171,8 +173,8 @@ samples/notebook/notebook.dsw samples/oleauto/oleauto.dsp samples/oleauto/oleauto.dsw -samples/ownerdrw/ownerDrw.dsp -samples/ownerdrw/ownerDrw.dsw +samples/ownerdrw/ownerdrw.dsp +samples/ownerdrw/ownerdrw.dsw samples/png/png.dsp samples/png/png.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 @@ -301,10 +309,10 @@ contrib/samples/xrc/XrcDemoVC.dsp contrib/samples/xrc/XrcDemoVC.dsw contrib/src/mmedia/MmediaVC.dsp -contrib/src/mmedia/MMediaVC.dsw +contrib/src/mmedia/MmediaVC.dsw -contrib/samples/mmedia/MmboardVC.dsp -contrib/samples/mmedia/MmboardVC.dsw +contrib/samples/mmedia/MMboardVC.dsp +contrib/samples/mmedia/MMboardVC.dsw contrib/src/stc/StcVC.dsp contrib/src/stc/StcVC.dsw diff --git a/distrib/msw/zipdistinno.bat b/distrib/msw/zipdistinno.bat index 41d5b8e024..11d4c1c949 100755 --- a/distrib/msw/zipdistinno.bat +++ b/distrib/msw/zipdistinno.bat @@ -1,5 +1,5 @@ @echo off -rem Zip up an external, generic + Windows distribution of wxWindows 2 +rem Zip up an external, generic + Windows distribution of wxWidgets 2 rem using Inno Setup + ScriptMaker set src=%wxwin set dest=%src\deliver @@ -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.3 if "%src" == "" goto usage if "%dest" == "" goto usage @@ -17,7 +17,7 @@ if "%1" == "/?" goto usage if "%1" == "innoonly" goto dounzip if "%1" == "inno" set inno=1 if "%1" == "tidyup" goto tidyup -echo About to archive an external wxWindows distribution: +echo About to archive an external wxWidgets distribution: echo From %src echo To %dest if "%inno" == "1" echo with Inno Setup creation. @@ -43,9 +43,9 @@ erase %dest\make* if direxist %dest\wx erase /sxyz %dest\wx\ if not direxist %dest mkdir %dest -if direxist %dest%\wxWindows-%version% erase /sxyz %dest%\wxWindows-%version% +if direxist %dest%\wxWidgets-%version% erase /sxyz %dest%\wxWidgets-%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,33 +56,34 @@ 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... Rem Zip up the complete wxOS2-xxx.zip file -zip32 -@ %dest\wxOS2-%version%.zip < %src\distrib\msw\generic.rsp -zip32 -@ -u %dest%\wxOS2-%version%.zip < %src\distrib\msw\os2.rsp -zip32 -@ -u %dest%\wxOS2-%version%.zip < %src\distrib\msw\jpeg.rsp -zip32 -@ -u %dest%\wxOS2-%version%.zip < %src\distrib\msw\tiff.rsp -zip32 -u -@ %dest%\wxOS2-%version%.zip < %src%\distrib\msw\tiff.rsp -zip32 -u -@ %dest%\wxOS2-%version%.zip < %src%\distrib\msw\jpeg.rsp -zip32 -u -@ %dest%\wxOS2-%version%.zip < %src%\distrib\msw\utils.rsp -zip32 -u -@ %dest%\wxOS2-%version%.zip < %src%\distrib\msw\tex2rtf.rsp -zip32 -u -@ %dest%\wxOS2-%version%.zip < %src%\distrib\msw\dialoged.rsp -zip32 -u -@ %dest%\wxOS2-%version%.zip < %src%\distrib\msw\ogl.rsp -zip32 -u -@ %dest%\wxOS2-%version%.zip < %src%\distrib\msw\xml.rsp -zip32 -u -@ %dest%\wxOS2-%version%.zip < %src%\distrib\msw\contrib.rsp -zip32 -u -@ %dest%\wxOS2-%version%.zip < %src%\distrib\msw\makefile.rsp +zip -@ %dest\wxOS2-%version%.zip < %src\distrib\msw\generic.rsp +zip -@ -u %dest%\wxOS2-%version%.zip < %src\distrib\msw\os2.rsp +zip -@ -u %dest%\wxOS2-%version%.zip < %src\distrib\msw\jpeg.rsp +zip -@ -u %dest%\wxOS2-%version%.zip < %src\distrib\msw\tiff.rsp +zip -u -@ %dest%\wxOS2-%version%.zip < %src%\distrib\msw\tiff.rsp +zip -u -@ %dest%\wxOS2-%version%.zip < %src%\distrib\msw\jpeg.rsp +zip -u -@ %dest%\wxOS2-%version%.zip < %src%\distrib\msw\utils.rsp +zip -u -@ %dest%\wxOS2-%version%.zip < %src%\distrib\msw\tex2rtf.rsp +zip -u -@ %dest%\wxOS2-%version%.zip < %src%\distrib\msw\dialoged.rsp +zip -u -@ %dest%\wxOS2-%version%.zip < %src%\distrib\msw\ogl.rsp +zip -u -@ %dest%\wxOS2-%version%.zip < %src%\distrib\msw\xml.rsp +zip -u -@ %dest%\wxOS2-%version%.zip < %src%\distrib\msw\contrib.rsp +zip -u -@ %dest%\wxOS2-%version%.zip < %src%\distrib\msw\makefile.rsp -Rem Rearchive under wxWindows-%version% -if direxist %dest%\wxWindows-%version% erase /sxyz %dest%\wxWindows-%version% +Rem Rearchive under wxWidgets-%version% +if direxist %dest%\wxWidgets-%version% erase /sxyz %dest%\wxWidgets-%version% -mkdir %dest%\wxWindows-%version% -cd %dest%\wxWindows-%version% -unzip32 ..\wxOS2-%version%.zip +mkdir %dest%\wxWidgets-%version% +cd %dest%\wxWidgets-%version% +unzip ..\wxOS2-%version%.zip echo Overwriting with OS2-specific versions of configure files... -unzip32 -o %src%\distrib\os2\os2-specific.zip +unzip -o %src%\distrib\os2\os2-specific.zip erase /Y src\gtk\descrip.mms src\motif\descrip.mms docs\pdf\*.pdf erase /Y src\tiff\*.mcp src\jpeg\*.mcp src\png\*.mcp src\zlib\*.mcp erase /SXY docs\html\dialoged docs\html\tex2rtf @@ -96,7 +97,7 @@ call %src%\distrib\msw\lower.bat cd %dest% erase wxOS2-%version%.zip -zip32 -r wxOS2-%version%.zip wxWindows-%version%/* +zip -r wxOS2-%version%.zip wxWidgets-%version%/* cd %src% @@ -104,105 +105,127 @@ echo Zipping wxMac distribution copy %src%\include\wx\mac\setup0.h %src%\include\wx\setup.h -zip32 -@ %dest%\wxMac-%version%.zip < %src%\distrib\msw\generic.rsp -zip32 -u -@ %dest%\wxMac-%version%.zip < %src%\distrib\msw\mac.rsp -zip32 -u -@ %dest%\wxMac-%version%.zip < %src%\distrib\msw\cw_mac.rsp -zip32 -u -@ %dest%\wxMac-%version%.zip < %src%\distrib\msw\tiff.rsp -zip32 -u -@ %dest%\wxMac-%version%.zip < %src%\distrib\msw\jpeg.rsp -zip32 -u -@ %dest%\wxMac-%version%.zip < %src%\distrib\msw\utils.rsp -zip32 -u -@ %dest%\wxMac-%version%.zip < %src%\distrib\msw\tex2rtf.rsp -zip32 -u -@ %dest%\wxMac-%version%.zip < %src%\distrib\msw\dialoged.rsp -zip32 -u -@ %dest%\wxMac-%version%.zip < %src%\distrib\msw\ogl.rsp -zip32 -u -@ %dest%\wxMac-%version%.zip < %src%\distrib\msw\xml.rsp -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 +zip -@ %dest%\wxMac-%version%.zip < %src%\distrib\msw\generic.rsp +zip -u -@ %dest%\wxMac-%version%.zip < %src%\distrib\msw\mac.rsp +zip -u -@ %dest%\wxMac-%version%.zip < %src%\distrib\msw\cw_mac.rsp +zip -u -@ %dest%\wxMac-%version%.zip < %src%\distrib\msw\tiff.rsp +zip -u -@ %dest%\wxMac-%version%.zip < %src%\distrib\msw\jpeg.rsp +zip -u -@ %dest%\wxMac-%version%.zip < %src%\distrib\msw\utils.rsp +zip -u -@ %dest%\wxMac-%version%.zip < %src%\distrib\msw\tex2rtf.rsp +zip -u -@ %dest%\wxMac-%version%.zip < %src%\distrib\msw\dialoged.rsp +zip -u -@ %dest%\wxMac-%version%.zip < %src%\distrib\msw\ogl.rsp +zip -u -@ %dest%\wxMac-%version%.zip < %src%\distrib\msw\xml.rsp +zip -u -@ %dest%\wxMac-%version%.zip < %src%\distrib\msw\stc.rsp +zip -u -@ %dest%\wxMac-%version%.zip < %src%\distrib\msw\contrib.rsp +zip -u -@ %dest%\wxMac-%version%.zip < %src%\distrib\msw\makefile.rsp + +zip -@ %dest%\wxWidgets-%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% +if direxist %dest%\wxWidgets-%version% erase /sxyz %dest%\wxWidgets-%version% -mkdir %dest%\wxWindows-%version% -cd %dest%\wxWindows-%version% -unzip32 ..\wxMac-%version%.zip +mkdir %dest%\wxWidgets-%version% +cd %dest%\wxWidgets-%version% +unzip ..\wxMac-%version%.zip erase /Y src\gtk\descrip.mms src\motif\descrip.mms docs\pdf\*.pdf erase /SXY docs\html\dialoged docs\html\tex2rtf docs\htmlhelp cd %dest% erase wxMac-%version%.zip -zip32 -r wxMac-%version%.zip wxWindows-%version%/* +zip -r wxMac-%version%.zip wxWidgets-%version%/* cd %src% -Rem Create wxWindows-%version%-win.zip which is used to create wxMSW +Rem Create wxWidgets-%version%-win.zip which is used to create wxMSW echo Zipping individual components -zip32 -@ %dest\wxWindows-%version%-win.zip < %src\distrib\msw\generic.rsp -zip32 -@ -u %dest\wxWindows-%version%-win.zip < %src\distrib\msw\makefile.rsp -zip32 -@ -u %dest\wxWindows-%version%-win.zip < %src\distrib\msw\msw.rsp -zip32 -@ -u %dest\wxWindows-%version%-win.zip < %src\distrib\msw\ogl.rsp -zip32 -@ -u %dest\wxWindows-%version%-win.zip < %src\distrib\msw\mmedia.rsp -zip32 -@ -u %dest\wxWindows-%version%-win.zip < %src\distrib\msw\stc.rsp -zip32 -@ -u %dest\wxWindows-%version%-win.zip < %src\distrib\msw\tex2rtf.rsp -zip32 -@ -u %dest\wxWindows-%version%-win.zip < %src\distrib\msw\jpeg.rsp -zip32 -@ -u %dest\wxWindows-%version%-win.zip < %src\distrib\msw\tiff.rsp -zip32 -@ -u %dest\wxWindows-%version%-win.zip < %src\distrib\msw\xml.rsp -zip32 -@ -u %dest\wxWindows-%version%-win.zip < %src\distrib\msw\contrib.rsp -zip32 -@ -u %dest\wxWindows-%version%-win.zip < %src\distrib\msw\dialoged.rsp -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 +zip -@ %dest\wxWidgets-%version%-win.zip < %src\distrib\msw\generic.rsp +zip -@ -u %dest\wxWidgets-%version%-win.zip < %src\distrib\msw\makefile.rsp +zip -@ -u %dest\wxWidgets-%version%-win.zip < %src\distrib\msw\msw.rsp +zip -@ -u %dest\wxWidgets-%version%-win.zip < %src\distrib\msw\ogl.rsp +zip -@ -u %dest\wxWidgets-%version%-win.zip < %src\distrib\msw\mmedia.rsp +zip -@ -u %dest\wxWidgets-%version%-win.zip < %src\distrib\msw\stc.rsp +zip -@ -u %dest\wxWidgets-%version%-win.zip < %src\distrib\msw\tex2rtf.rsp +zip -@ -u %dest\wxWidgets-%version%-win.zip < %src\distrib\msw\jpeg.rsp +zip -@ -u %dest\wxWidgets-%version%-win.zip < %src\distrib\msw\tiff.rsp +zip -@ -u %dest\wxWidgets-%version%-win.zip < %src\distrib\msw\xml.rsp +zip -@ -u %dest\wxWidgets-%version%-win.zip < %src\distrib\msw\contrib.rsp +zip -@ -u %dest\wxWidgets-%version%-win.zip < %src\distrib\msw\dialoged.rsp +zip -@ -u %dest\wxWidgets-%version%-win.zip < %src\distrib\msw\utils.rsp +zip -@ -u %dest\wxWidgets-%version%-win.zip < %src\distrib\msw\utilmake.rsp +zip -@ -u %dest\wxWidgets-%version%-win.zip < %src\distrib\msw\univ.rsp -call %WXWIN%\distrib\msw\rearchive wxWindows-%version%-win.zip wxWindows-%version% %dest% +echo Re-archiving wxWidgets-%version%-win.zip +call %WXWIN%\distrib\msw\rearchive wxWidgets-%version%-win.zip wxWidgets-%version% %dest% -zip32 -d %dest%\wxWindows-%version%-win.zip %dest%/src/gtk/descrip.mms %dest%/src/motif/descrip.mms +echo Removing .mms files +zip -d %dest%\wxWidgets-%version%-win.zip wxWidgets-%version%/src/gtk/descrip.mms wxWidgets-%version%/src/motif/descrip.mms -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\wxWidgets-%version%-DocSource.zip +zip -@ %dest\wxWidgets-%version%-DocSource.zip < %src\distrib\msw\docsrc.rsp +call %WXWIN%\distrib\msw\rearchive wxWidgets-%version%-DocSource.zip wxWidgets-%version% %dest% -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\wxWidgets-%version%-WinHelp.zip +zip -@ %dest\wxWidgets-%version%-WinHelp.zip < %src\distrib\msw\wx_hlp.rsp +call %WXWIN%\distrib\msw\rearchive wxWidgets-%version%-WinHelp.zip wxWidgets-%version% %dest% -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\wxWidgets-%version%-HTML.zip +zip -@ %dest\wxWidgets-%version%-HTML.zip < %src\distrib\msw\wx_html.rsp +call %WXWIN%\distrib\msw\rearchive wxWidgets-%version%-HTML.zip wxWidgets-%version% %dest% -zip32 -@ %dest\wxWindows-%version%-PDF.zip < %src\distrib\msw\wx_pdf.rsp -call %WXWIN%\distrib\msw\rearchive wxWindows-%version%-PDF.zip wxWindows-%version% %dest% +echo Creating %dest\wxWidgets-%version%-PDF.zip +zip -@ %dest\wxWidgets-%version%-PDF.zip < %src\distrib\msw\wx_pdf.rsp +call %WXWIN%\distrib\msw\rearchive wxWidgets-%version%-PDF.zip wxWidgets-%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% +Rem zip -@ %dest\wxWidgets-%version%-Word.zip < %src\distrib\msw\wx_word.rsp +Rem call %WXWIN%\distrib\msw\rearchive wxWidgets-%version%-Word.zip wxWidgets-%version% %dest% -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\wxWidgets-%version%-HTB.zip +zip -@ %dest\wxWidgets-%version%-HTB.zip < %src\distrib\msw\wx_htb.rsp +call %WXWIN%\distrib\msw\rearchive wxWidgets-%version%-HTB.zip wxWidgets-%version% %dest% -zip32 -@ %dest\wxWindows-%version%-HTMLHelp.zip < %src\distrib\msw\wx_chm.rsp -call %WXWIN%\distrib\msw\rearchive wxWindows-%version%-HTMLHelp.zip wxWindows-%version% %dest% +echo Creating %dest\wxWidgets-%version%-HTMLHelp.zip +zip -@ %dest\wxWidgets-%version%-HTMLHelp.zip < %src\distrib\msw\wx_chm.rsp +call %WXWIN%\distrib\msw\rearchive wxWidgets-%version%-HTMLHelp.zip wxWidgets-%version% %dest% + +Rem Add Linuxy docs to a separate archive to be transported to Linux for the +Rem Linux-based releases +echo Creating %dest\wxWidgets-%version%-LinuxDocs.zip +zip -@ %dest\wxWidgets-%version%-LinuxDocs.zip < %src\distrib\msw\wx_html.rsp +zip -@ -u %dest\wxWidgets-%version%-LinuxDocs.zip < %src\distrib\msw\wx_pdf.rsp +zip -@ -u %dest\wxWidgets-%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 -zip32 -@ %dest\wxWindows-%version%-ExtraDoc.zip < %src\distrib\msw\extradoc.rsp -call %WXWIN%\distrib\msw\rearchive wxWindows-%version%-ExtraDoc.zip wxWindows-%version% %dest% +echo Creating %dest\wxWidgets-%version%-ExtraDoc.zip +zip -@ %dest\wxWidgets-%version%-ExtraDoc.zip < %src\distrib\msw\extradoc.rsp +call %WXWIN%\distrib\msw\rearchive wxWidgets-%version%-ExtraDoc.zip wxWidgets-%version% %dest% Rem zip up Univ-specific files -zip32 -@ %dest\wxWindows-%version%-Univ.zip < %src\distrib\msw\univ.rsp -call %WXWIN%\distrib\msw\rearchive wxWindows-%version%-Univ.zip wxWindows-%version% %dest% +echo Creating %dest\wxWidgets-%version%-Univ.zip +zip -@ %dest\wxWidgets-%version%-Univ.zip < %src\distrib\msw\univ.rsp +call %WXWIN%\distrib\msw\rearchive wxWidgets-%version%-Univ.zip wxWidgets-%version% %dest% rem VC++ project files -zip32 -@ %dest\wxWindows-%version%-VC.zip < %src\distrib\msw\vc.rsp -call %WXWIN%\distrib\msw\rearchive wxWindows-%version%-VC.zip wxWindows-%version% %dest% +echo Creating %dest\wxWidgets-%version%-VC.zip +zip -@ %dest\wxWidgets-%version%-VC.zip < %src\distrib\msw\vc.rsp +Rem call %WXWIN%\distrib\msw\rearchive wxWidgets-%version%-VC.zip wxWidgets-%version% %dest% rem BC++ project files -zip32 -@ %dest\wxWindows-%version%-BC.zip < %src\distrib\msw\bc.rsp -call %WXWIN%\distrib\msw\rearchive wxWindows-%version%-BC.zip wxWindows-%version% %dest% +echo Creating %dest\wxWidgets-%version%-BC.zip +zip -@ %dest\wxWidgets-%version%-BC.zip < %src\distrib\msw\bc.rsp +Rem call %WXWIN%\distrib\msw\rearchive wxWidgets-%version%-BC.zip wxWidgets-%version% %dest% rem CodeWarrior project files -zip32 -@ %dest\wxWindows-%version%-CW.zip < %src\distrib\msw\cw.rsp -call %WXWIN%\distrib\msw\rearchive wxWindows-%version%-CW.zip wxWindows-%version% %dest% +echo Creating %dest\wxWidgets-%version%-CW.zip +zip -@ %dest\wxWidgets-%version%-CW.zip < %src\distrib\msw\cw.rsp +Rem call %WXWIN%\distrib\msw\rearchive wxWidgets-%version%-CW.zip wxWidgets-%version% %dest% rem Dialog Editor source and binary Rem erase %dest\dialoged-source.zip -Rem zip32 -@ %dest\dialoged-source.zip < %src\distrib\msw\dialoged.rsp -Rem zip32 -j %dest\dialoged-%version%.zip %dest\dialoged-source.zip %src\bin\dialoged.exe %src\docs\winhelp\dialoged.hlp %src\docs\winhelp\dialoged.cnt +Rem zip -@ %dest\dialoged-source.zip < %src\distrib\msw\dialoged.rsp +Rem zip -j %dest\dialoged-%version%.zip %dest\dialoged-source.zip %src\bin\dialoged.exe %src\docs\winhelp\dialoged.hlp %src\docs\winhelp\dialoged.cnt Rem erase %dest\dialoged-source.zip copy %src\docs\changes.txt %dest\changes-%version%.txt @@ -233,32 +256,38 @@ if "%inno" == "0" goto end Rem Make dialoged-win32.zip and tex2rtf-win32.zip Rem cd %src\bin -Rem zip32 %dest\dialoged-win32-%version%.zip dialoged.* -Rem zip32 %dest\tex2rtf-win32-%version%.zip tex2rtf.* +Rem zip %dest\dialoged-win32-%version%.zip dialoged.* +Rem zip %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\wxWidgets-%version%-LinuxTransit.zip +erase %dest\wxWidgets-%version%-LinuxTransit.zip +zip %dest\wxWidgets-%version%-LinuxTransit.zip wxWidgets-%version%-LinuxDocs.zip wxWidgets-%version%-VC.zip wxWidgets-%version%-CW-Mac.zip -unzip32 -o wxWindows-%version%-win.zip -unzip32 -o wxWindows-%version%-VC.zip -unzip32 -o wxWindows-%version%-BC.zip -unzip32 -o wxWindows-%version%-HTMLHelp.zip -unzip32 -o wxWindows-%version%-ExtraDoc.zip +echo Unzipping the Windows files into wxWidgets-%version% + +unzip -o wxWidgets-%version%-win.zip +unzip -o wxWidgets-%version%-VC.zip -d wxWidgets-%version +unzip -o wxWidgets-%version%-BC.zip -d wxWidgets-%version +unzip -o wxWidgets-%version%-CW.zip -d wxWidgets-%version +unzip -o wxWidgets-%version%-HTMLHelp.zip +unzip -o wxWidgets-%version%-ExtraDoc.zip Rem Need Word file, for Remstar DB classes Rem Not any more -Rem unzip32 -o wxWindows-%version%-Word.zip +Rem unzip -o wxWidgets-%version%-Word.zip Rem After this change of directory, we're in the Rem temporary 'wx' directory and not acting on -Rem the source wxWindows directory. -cd %dest%\wxWindows-%version% +Rem the source wxWidgets directory. +cd %dest%\wxWidgets-%version% rem Now delete a few files that are unnecessary attrib -R * erase /Y BuildCVS.txt descrip.mms erase /Y setup.h_vms -erase /Y docs\html\wxbook.htm docs\html\roadmap.htm +erase /Y docs\html\roadmap.htm Rem erase /Y contrib\docs\winhelp\mmedia.* Rem erase /Y contrib\docs\winhelp\stc.* Rem erase /Y contrib\docs\htmlhelp\mmedia.* @@ -270,28 +299,28 @@ erase /Y distrib rem Now copy some binary files to 'bin' if not isdir bin mkdir bin -copy %src\bin\dialoged.exe bin -copy %src\bin\dialoged.hlp bin -copy %src\bin\dialoged.chm bin +Rem copy %src\bin\dialoged.exe bin +Rem copy %src\bin\dialoged.hlp bin +Rem copy %src\bin\dialoged.chm bin copy %src\bin\tex2rtf.exe bin copy %src\bin\tex2rtf.hlp bin copy %src\bin\tex2rtf.cnt bin -copy %src\bin\dbgview.* bin +Rem copy %src\bin\dbgview.* bin copy %src\bin\widgets.exe bin copy %src\bin\widgets.exe.manifest bin copy %src\bin\life.exe bin copy %src\bin\life.exe.manifest bin copy %src\demos\life\breeder.lif bin -copy %src\docs\htmlhelp\dialoged.chm bin +Rem copy %src\docs\htmlhelp\dialoged.chm bin copy %src\docs\htmlhelp\tex2rtf.chm bin if not direxist docs\pdf mkdir docs\pdf -copy %src\docs\pdf\wxTutorial.pdf docs\pdf +Rem copy %src\docs\pdf\wxTutorial.pdf docs\pdf Rem Make wxMSW-xxx.zip cd %dest% -zip32 -r wxMSW-%version%.zip wxWindows-%version%/* -cd wxWindows-%version% +zip -r wxMSW-%version%.zip wxWidgets-%version%/* +cd wxWidgets-%version% echo Calling 'makeinno' to generate wxwin2.iss... call %WXWIN\distrib\msw\makeinno.bat @@ -299,26 +328,26 @@ call %WXWIN\distrib\msw\makeinno.bat erase /Y %dest\setup.* rem Now invoke Inno Setup on the new wxwin2.iss -set innocmd="C:\Program Files\Inno Setup 2\compil32.exe" /cc %WXWIN\distrib\msw\wxwin2.iss +set innocmd="C:\Program Files\Inno Setup 5\compil32.exe" /cc %WXWIN\distrib\msw\wxwin2.iss echo Invoking %innocmd... start "Inno Setup" /w %innocmd% -Rem pause Press any key to continue with the wxWindows distribution... +Rem pause Press any key to continue with the wxWidgets distribution... :tidyup cd %dest rem Put all the setup files into a single zip archive. -zip32 wxMSW-%version%-setup.zip readme-%version%.txt setup*.* +zip wxMSW-%version%-setup.zip readme-%version%.txt setup*.* -erase /Y wxWindows-%version%-win.zip -erase /Y wxWindows-%version%-ExtraDoc.zip +erase /Y wxWidgets-%version%-win.zip +erase /Y wxWidgets-%version%-ExtraDoc.zip -echo wxWindows archived. +echo wxWidgets archived. goto end :usage -echo DOS wxWindows distribution. Zips up all MSW, OS/2, Mac and doc files, +echo DOS wxWidgets distribution. Zips up all MSW, OS/2, Mac and doc files, echo and optionally makes a setup.exe echo if you specify 'inno' echo (skipping the zipping if you use 'innoonly'). echo. 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/zippatch.bat b/distrib/msw/zippatch.bat index ef6cd9491c..a40efd40f2 100755 --- a/distrib/msw/zippatch.bat +++ b/distrib/msw/zippatch.bat @@ -26,7 +26,7 @@ erase /Q /E %dest%\wxWindows-*-patch*.zip cd %src% echo Zipping... -zip32 -@ %dest%\%patchname% < %src%\distrib\msw\patch.rsp +zip -@ %dest%\%patchname% < %src%\distrib\msw\patch.rsp echo wxWindows patch archived. cd %dest diff --git a/distrib/msw/zipstc.bat b/distrib/msw/zipstc.bat index 6110b39922..2695b56c87 100755 --- a/distrib/msw/zipstc.bat +++ b/distrib/msw/zipstc.bat @@ -13,7 +13,7 @@ inkey /W4 `Press any key to continue...` %%input erase %dest\stc.zip cd %src -zip32 -@ %dest\stc.zip < %src\distrib\msw\stc.rsp +zip -@ %dest\stc.zip < %src\distrib\msw\stc.rsp cd %dest diff --git a/distrib/msw/zipwxmac.bat b/distrib/msw/zipwxmac.bat index 2ae9621a16..db27807e05 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 @@ -31,34 +31,36 @@ echo Zipping wxMac distribution cd %src% copy %src%\include\wx\mac\setup0.h %src%\include\wx\setup.h -zip32 -@ %dest%\wxMac-%version%.zip < %src%\distrib\msw\generic.rsp -zip32 -u -@ %dest%\wxMac-%version%.zip < %src%\distrib\msw\mac.rsp -zip32 -u -@ %dest%\wxMac-%version%.zip < %src%\distrib\msw\cw_mac.rsp -zip32 -u -@ %dest%\wxMac-%version%.zip < %src%\distrib\msw\tiff.rsp -zip32 -u -@ %dest%\wxMac-%version%.zip < %src%\distrib\msw\jpeg.rsp -zip32 -u -@ %dest%\wxMac-%version%.zip < %src%\distrib\msw\utils.rsp -zip32 -u -@ %dest%\wxMac-%version%.zip < %src%\distrib\msw\tex2rtf.rsp -zip32 -u -@ %dest%\wxMac-%version%.zip < %src%\distrib\msw\dialoged.rsp -zip32 -u -@ %dest%\wxMac-%version%.zip < %src%\distrib\msw\ogl.rsp -zip32 -u -@ %dest%\wxMac-%version%.zip < %src%\distrib\msw\xml.rsp -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 +zip -@ %dest%\wxMac-%version%.zip < %src%\distrib\msw\generic.rsp +zip -u -@ %dest%\wxMac-%version%.zip < %src%\distrib\msw\mac.rsp +zip -u -@ %dest%\wxMac-%version%.zip < %src%\distrib\msw\cw_mac.rsp +zip -u -@ %dest%\wxMac-%version%.zip < %src%\distrib\msw\tiff.rsp +zip -u -@ %dest%\wxMac-%version%.zip < %src%\distrib\msw\jpeg.rsp +zip -u -@ %dest%\wxMac-%version%.zip < %src%\distrib\msw\utils.rsp +zip -u -@ %dest%\wxMac-%version%.zip < %src%\distrib\msw\tex2rtf.rsp +zip -u -@ %dest%\wxMac-%version%.zip < %src%\distrib\msw\dialoged.rsp +zip -u -@ %dest%\wxMac-%version%.zip < %src%\distrib\msw\ogl.rsp +zip -u -@ %dest%\wxMac-%version%.zip < %src%\distrib\msw\xml.rsp +zip -u -@ %dest%\wxMac-%version%.zip < %src%\distrib\msw\stc.rsp +zip -u -@ %dest%\wxMac-%version%.zip < %src%\distrib\msw\contrib.rsp +zip -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% -unzip32 ..\wxMac-%version%.zip +mkdir %dest%\wxMac-%version% +cd %dest%\wxMac-%version% +unzip ..\wxMac-%version%.zip erase /Y src\gtk\descrip.mms src\motif\descrip.mms docs\pdf\*.pdf erase /SXY docs\html\dialoged docs\html\tex2rtf cd %dest% erase wxMac-%version%.zip -zip32 -r wxMac-%version%.zip wxWindows-%version%/* +zip -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..82a6b230c1 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 @@ -28,29 +28,29 @@ echo Zipping wxOS2 distribution cd %src% Rem copy %src%\include\wx\os2\setup0.h %src%\include\wx\setup.h -zip32 -@ %dest\wxOS2-%version%.zip < %src\distrib\msw\generic.rsp -zip32 -@ -u %dest%\wxOS2-%version%.zip < %src\distrib\msw\os2.rsp -zip32 -@ -u %dest%\wxOS2-%version%.zip < %src\distrib\msw\jpeg.rsp -zip32 -@ -u %dest%\wxOS2-%version%.zip < %src\distrib\msw\tiff.rsp -zip32 -u -@ %dest%\wxOS2-%version%.zip < %src%\distrib\msw\tiff.rsp -zip32 -u -@ %dest%\wxOS2-%version%.zip < %src%\distrib\msw\jpeg.rsp -zip32 -u -@ %dest%\wxOS2-%version%.zip < %src%\distrib\msw\utils.rsp -zip32 -u -@ %dest%\wxOS2-%version%.zip < %src%\distrib\msw\tex2rtf.rsp -zip32 -u -@ %dest%\wxOS2-%version%.zip < %src%\distrib\msw\dialoged.rsp -zip32 -u -@ %dest%\wxOS2-%version%.zip < %src%\distrib\msw\ogl.rsp -zip32 -u -@ %dest%\wxOS2-%version%.zip < %src%\distrib\msw\xml.rsp -zip32 -u -@ %dest%\wxOS2-%version%.zip < %src%\distrib\msw\contrib.rsp -zip32 -u -@ %dest%\wxOS2-%version%.zip < %src%\distrib\msw\makefile.rsp +zip -@ %dest\wxOS2-%version%.zip < %src\distrib\msw\generic.rsp +zip -@ -u %dest%\wxOS2-%version%.zip < %src\distrib\msw\os2.rsp +zip -@ -u %dest%\wxOS2-%version%.zip < %src\distrib\msw\jpeg.rsp +zip -@ -u %dest%\wxOS2-%version%.zip < %src\distrib\msw\tiff.rsp +zip -u -@ %dest%\wxOS2-%version%.zip < %src%\distrib\msw\tiff.rsp +zip -u -@ %dest%\wxOS2-%version%.zip < %src%\distrib\msw\jpeg.rsp +zip -u -@ %dest%\wxOS2-%version%.zip < %src%\distrib\msw\utils.rsp +zip -u -@ %dest%\wxOS2-%version%.zip < %src%\distrib\msw\tex2rtf.rsp +zip -u -@ %dest%\wxOS2-%version%.zip < %src%\distrib\msw\dialoged.rsp +zip -u -@ %dest%\wxOS2-%version%.zip < %src%\distrib\msw\ogl.rsp +zip -u -@ %dest%\wxOS2-%version%.zip < %src%\distrib\msw\xml.rsp +zip -u -@ %dest%\wxOS2-%version%.zip < %src%\distrib\msw\contrib.rsp +zip -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% -unzip32 ..\wxOS2-%version%.zip +mkdir %dest%\wxOS2-%version% +cd %dest%\wxOS2-%version% +unzip ..\wxOS2-%version%.zip echo Overwriting with OS2-specific versions of configure files... -unzip32 -o %src%\distrib\os2\os2-specific.zip +unzip -o %src%\distrib\os2\os2-specific.zip erase /Y src\gtk\descrip.mms src\motif\descrip.mms docs\pdf\*.pdf erase /Y src\tiff\*.mcp src\jpeg\*.mcp src\png\*.mcp src\zlib\*.mcp erase /SXY docs\html\dialoged docs\html\tex2rtf @@ -64,7 +64,8 @@ call %src%\distrib\msw\lower.bat cd %dest% erase wxOS2-%version%.zip -zip32 -r wxOS2-%version%.zip wxWindows-%version%/* +zip -r wxOS2-%version%.zip wxOS2-%version%/* +erase /sxyz wxOS2-%version% echo wxOS2 archived. diff --git a/distrib/msw/zipxml.bat b/distrib/msw/zipxml.bat index fe2d7ee5c6..618ecdd462 100755 --- a/distrib/msw/zipxml.bat +++ b/distrib/msw/zipxml.bat @@ -13,7 +13,7 @@ inkey /W4 `Press any key to continue...` %%input erase %dest\xml.zip cd %src -zip32 -@ %dest\xml.zip < %src\distrib\msw\xml.rsp +zip -@ %dest\xml.zip < %src\distrib\msw\xml.rsp cd %dest diff --git a/distrib/os2/os2-specific.zip b/distrib/os2/os2-specific.zip index c1876468ee..90988d31dc 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..7525fadcac 100644 --- a/docs/base/readme.txt +++ b/docs/base/readme.txt @@ -2,7 +2,7 @@ ============= NB: this file applies to wxBase library only. If you are using a GUI version - of wxWindows, please refer to the documentation in the appropriate + of wxWidgets, please refer to the documentation in the appropriate subdirectory (msw, gtk, motif &c). @@ -11,7 +11,7 @@ NB: this file applies to wxBase library only. If you are using a GUI version 0. Introduction --------------- - wxBase is the library providing most of the non-GUI classes of the wxWindows + wxBase is the library providing most of the non-GUI classes of the wxWidgets cross-platform C++ framework. wxBase has some generic classes such as yet another C++ string class, typesafe dynamic arrays, hashes and lists and, more excitingly, wxDateTime - a very flexible and powerful class for manipulating @@ -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,19 +71,21 @@ 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 ----------------------------- -NB: If you're building wxBase from the wxWindows distribution and not from a +NB: If you're building wxBase from the wxWidgets 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 + % cd ..../wxWidgets + % mkdir base-release # or any other directory of your liking % cd base-release % ../configure # ignore the error messages about missing samples @@ -102,17 +108,17 @@ To build the sample then cd to samples/console and make there. wxBase classes. It doesn't do anything useful per itself but you may want to look at its code to see examples of usage of the class you are interested in. - There is no separate documentation for wxBase, please refer to wxWindows + There is no separate documentation for wxBase, please refer to wxWidgets documentation instead. - Support for wxBase is available from the same places as for wxWindows itself, + Support for wxBase is available from the same places as for wxWidgets itself, namely: * Usenet newsgroup comp.soft-sys.wxwindows -* Mailing lists: see http://lists.wxwindows.org/ for more information +* Mailing lists: see http://lists.wxwidgets.org/ for more information -* WWW page: http://www.wxwindows.org/ +* WWW page: http://www.wxwidgets.org/ Hope you will find wxBase useful! @@ -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.2 of wxBase. It was last modified on +June 13, 2003. diff --git a/docs/changes.txt b/docs/changes.txt index 56e0b2e446..018d76852d 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -1,5 +1,5 @@ -wxWindows 2 Change Log ----------------------- +wxWidgets Change Log +-------------------- INCOMPATIBLE CHANGES SINCE 2.2.x ================================ @@ -15,7 +15,7 @@ INCOMPATIBLE CHANGES SINCE 2.2.x 2.6 release. NB: if you want to build your program with different major versions - of wxWindows you will probably find the wxCHECK_VERSION() macro + of wxWidgets you will probably find the wxCHECK_VERSION() macro (see the documentation) useful. @@ -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 @@ -67,6 +68,12 @@ All (GUI): generated at all, so you must call event.Skip() in your OnKeyDown() if you want to get OnChar() as well +- the (command) events are not propagated beyond the first top level window + containing them because they now have wxWS_EX_BLOCK_EVENTS style by default, + you need to explicitly unset it if you want to have the old behaviour when + you could process the events from the controls in a dialog in its parent + frame. + - in general, the key events sent for the various non ASCII key combinations have been changed to make them consistent over all supported platforms, please see the wxKeyEvent documentation for details @@ -112,16 +119,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 +178,281 @@ wxThread and related classes: OTHER CHANGES ============= +2.4.3 +----- + +All: + +- Spanish translations updated (Javier San Jose) +- fixed DLL build of db.cpp with some OpenWatcom (ABX) +- fixed wxZlibOutputStream to properly close zlib stream +- removed SO_REUSEADDR from wxSocket + +All (GUI): + +- bug in wxWindow::RemoveEventHandler() fixed (Yingjun Zhang) +- bug in wxColourDatabase::FindColour() which could led to crashes fixed +- added ..._CMD_... variants for wxGrid event table entry macros + taking window identifiers + +Generic: + +- file dialog and directory dialog now support drive letters on OS/2 +- fixed scrollbar problem in wxGrid (not showing scrollbars + when sizing smaller) (Shane Harper) +- added wxStatusBar support to XRC (Brian Ravnsgaard Riis) + +Unix: + +- Unicode compilation fix in wxDateTime +- typo in configure which broke AIX build fixed (Swengtoo) +- fixed priorities of mailcap entries (David Hart) + +wxMSW: + +- strip ampersands from strings returned by wxMenuBar::GetLabelTop() +- fixed bug in wxIniConfig::DeleteEntry() (Parinya Thipchart) +- fixed hang (sometimes) in wxThread::Delete() (Carl-Friedrich Braun) +- wxLongLong formatting with MinGW corrected +- wxFileDialog now returns correct filter index for multiple-file dialogs +- fixed a bug in wxSpinCtrl::DoGetBestSize that would make wxSpinCtrl too tall +- fixed wxTextCtrl::SetMaxLength for rich edit controls +- fixed flat style for toolbars under XP, Windows Classic style + +wxGTK: + +- allow calling wxWindow::SetFont if window not yet created +- fixed compilation with newer GTK+ versions + +wxOS2: +- fixed various problems in file handling +- fixed bug in Refresh (was not taking reversed coordinate system into + account, so failed for most generic controls) +- partly fixed wxMouseEvent (reversed coordinate system again, handling of + CTRL and SHIFT keys. ALT still doesn't work as expected by wxWidgets, though) + +wxODBC: +- identifying DB VENDOR signatures updated in wxDb::Dbms() +- wxDb::getDbInfo() will no longer return failure if the return code was + SQL_SUCCESS_WITH_INFO +- attempted to port everything for BLOB support back to 2.4.x. I think it is + complete. +- table names now prepended to column names when joining tables. This is only + if there is not a '.' in the column name already. +- Null column support fixes (SF #766404) + + + +2.4.2 +----- + +All: + +- always NUL-terminate the log messages +- wxRegEx::Compile() now calculates the number of groups correctly +- wxHTTP::GetHeader() didn't find headers which were not all in upper case +- wxHTTP input stream didn't detect EOF correctly +- wxString::find_last_of() ignored "start" parameter (Robert Vazan) +- a bug in wxArrayString::Shrink() fixed (Gunnar Roth) +- added wxIPV4address::IPAddress() + +All (GUI): + +- rare crash in wxFontMapper fixed (Robert Vazan) +- added wxMenu::FindItemByPosition. +- copy wxImage options when copying the images + +Generic: + +- wxListCtrl: respect wxLC_NO_HEADER style when inserting first column + +Unix: + +- fixed build problems with OpenGL when libGL(U) were in different directories +- added --basename and --release flags to wx-config (Robert O'Connor) +- added support for GNU/Hurd in configure +- fixed wx-config --rezflags output on platforms different from Mac +- changed wxNativeFontInfo::FromXFontName to treat names with all + components being empty or '*' as default font (since default font is + converted to such a string by GetXFontName). +- wxLocale::Init now tries to set .utf8 locale in Unicode mode (Andreas Pflug) + +wxGTK + +- fixed compilation with --disable-compat-22 +- set the event object correctly for wxMenu events (Bob Balfour) +- fixed memory leak in wxFileDialog (Christian Sturmlechner) + +wxMSW: + +- compilation fix for VC++ command line build (missing version.mak) +- fixed release mode build with VC 7.x (Martin Ecker) +- fix iostream.h problem with VC 7.1 (it doesn't support it any longer) +- compilation fix for XRC with mingw32 + +wxMotif: + +- fixed "make install" + +wxXRC: + +- added wxNO_FULL_REPAINT_ON_RESIZE to "unknown" class handler (John Anderson) + + +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 wxWidgets >= 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 +- don't consume 100% CPU when showing a poup menu + +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 + wxWidgets 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