Compare commits
47 Commits
wxPy_2_3_2
...
COPY_OBJEC
Author | SHA1 | Date | |
---|---|---|---|
|
3e211ae1b7 | ||
|
8d9e8770da | ||
|
545a0b000f | ||
|
163f315474 | ||
|
0ded6bb695 | ||
|
1352efdf58 | ||
|
62d0491bf6 | ||
|
10916a4f7a | ||
|
8dba7bfb70 | ||
|
2d33aec94c | ||
|
050c9e3c90 | ||
|
badc44fe58 | ||
|
c5f9d1567c | ||
|
c10920deb8 | ||
|
3125528da3 | ||
|
07082b28a5 | ||
|
3cdd0895f4 | ||
|
d76048f514 | ||
|
8b81a824c4 | ||
|
990ff5eceb | ||
|
ca808bbfe8 | ||
|
a3e78c767d | ||
|
d7b766f5a8 | ||
|
1f5b2017df | ||
|
8065aebc48 | ||
|
81edbb3f00 | ||
|
51072df23f | ||
|
32037c4ed9 | ||
|
31e39e3c51 | ||
|
8fbdfa4faf | ||
|
f91bf72fb0 | ||
|
364f80ef96 | ||
|
6ce3e85a1e | ||
|
e4a2236693 | ||
|
d9f7f49ea3 | ||
|
c7821f944f | ||
|
7ecb8b06ad | ||
|
636d266b89 | ||
|
a9fd2e6f1b | ||
|
18134a1cd0 | ||
|
6495f2dd5d | ||
|
d1f2eb1dd0 | ||
|
d32011d406 | ||
|
3409ae1756 | ||
|
9a7d612157 | ||
|
c63767311f | ||
|
8b283bb88e |
20
Makefile.in
20
Makefile.in
@@ -539,10 +539,13 @@ ALL_DIST: distclean
|
||||
cp $(DOCDIR)/lgpl.txt $(DISTDIR)/COPYING.LIB
|
||||
cp $(DOCDIR)/licence.txt $(DISTDIR)/LICENCE.txt
|
||||
cp $(DOCDIR)/symbols.txt $(DISTDIR)/SYMBOLS.txt
|
||||
cp $(DOCDIR)/changes.txt $(DISTDIR)/CHANGES.txt
|
||||
cp $(DOCDIR)/readme.txt $(DISTDIR)/README.txt
|
||||
mkdir $(DISTDIR)/lib
|
||||
cp $(WXDIR)/lib/vms.opt $(DISTDIR)/lib
|
||||
cp $(WXDIR)/lib/vms_gtk.opt $(DISTDIR)/lib
|
||||
mkdir $(DISTDIR)/src
|
||||
cp $(SRCDIR)/files.lst $(DISTDIR)/src/
|
||||
mkdir $(DISTDIR)/src/zlib
|
||||
cp $(ZLIBDIR)/*.h $(DISTDIR)/src/zlib
|
||||
cp $(ZLIBDIR)/*.c $(DISTDIR)/src/zlib
|
||||
@@ -564,9 +567,10 @@ ALL_DIST: distclean
|
||||
# but is not used when building wxBase distribution
|
||||
ALL_GUI_DIST: ALL_DIST
|
||||
cp $(WXDIR)/wxBase.spec $(DISTDIR)
|
||||
cp $(DOCDIR)/$(TOOLKITDIR)/install.txt $(DISTDIR)/INSTALL.txt
|
||||
cp $(DOCDIR)/$(TOOLKITDIR)/changes.txt $(DISTDIR)/CHANGES.txt
|
||||
cp $(DOCDIR)/$(TOOLKITDIR)/readme.txt $(DISTDIR)/README.txt
|
||||
cp $(DOCDIR)/$(TOOLKITDIR)/install.txt $(DISTDIR)/INSTALL.txt
|
||||
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
|
||||
mkdir $(DISTDIR)/include
|
||||
mkdir $(DISTDIR)/include/wx
|
||||
@@ -593,7 +597,6 @@ ALL_GUI_DIST: ALL_DIST
|
||||
mkdir $(DISTDIR)/src/tiff
|
||||
mkdir $(DISTDIR)/src/iodbc
|
||||
mkdir $(DISTDIR)/src/unix
|
||||
cp $(SRCDIR)/files.lst $(DISTDIR)/src/
|
||||
cp $(SRCDIR)/*.in $(DISTDIR)/src
|
||||
cp $(COMMDIR)/*.cpp $(DISTDIR)/src/common
|
||||
cp $(COMMDIR)/*.c $(DISTDIR)/src/common
|
||||
@@ -636,11 +639,11 @@ BASE_DIST: ALL_DIST
|
||||
mkdir $(DISTDIR)/include/wx/unix
|
||||
mkdir $(DISTDIR)/src/common
|
||||
mkdir $(DISTDIR)/src/unix
|
||||
mkdir $(DISTDIR)/src/msw
|
||||
cp $(WXDIR)/wxBase.spec $(DISTDIR)
|
||||
cp @PORT_FILES@ $(DISTDIR)
|
||||
cp $(WXDIR)/@RPM_FILES@ $(DISTDIR)/@RPM_FILES@
|
||||
cp $(WXDIR)/wxBase*.dsp $(DISTDIR)
|
||||
cp $(WXDIR)/wxBase*.dsw $(DISTDIR)
|
||||
cp $(WXDIR)/src/wxBase*.dsp $(DISTDIR)
|
||||
cp $(WXDIR)/src/wxBase*.dsw $(DISTDIR)
|
||||
cp $(DOCDIR)/changes.txt $(DISTDIR)/CHANGES.txt
|
||||
cp $(DOCDIR)/readme.txt $(DISTDIR)/README.txt
|
||||
cp $(SRCDIR)/*.in $(DISTDIR)/src
|
||||
@@ -678,10 +681,11 @@ GTK_DIST: ALL_GUI_DIST
|
||||
cp -R $(WXDIR)/contrib $(DISTDIR)
|
||||
|
||||
MOTIF_DIST: ALL_GUI_DIST
|
||||
cp $(WXDIR)/wxMOTIF.spec $(DISTDIR)
|
||||
cp $(WXDIR)/wxMotif.spec $(DISTDIR)
|
||||
cp $(INCDIR)/wx/motif/*.h $(DISTDIR)/include/wx/motif
|
||||
cp $(MOTIFDIR)/files.lst $(DISTDIR)/src/motif
|
||||
cp $(MOTIFDIR)/*.cpp $(DISTDIR)/src/motif
|
||||
cp $(MOTIFDIR)/*.c $(DISTDIR)/src/motif
|
||||
cp $(MOTIFDIR)/*.xbm $(DISTDIR)/src/motif
|
||||
mkdir $(DISTDIR)/src/motif/xmcombo
|
||||
cp $(MOTIFDIR)/xmcombo/*.c $(DISTDIR)/src/motif/xmcombo
|
||||
|
102
configure.in
102
configure.in
@@ -60,7 +60,7 @@ AC_DEFUN(WX_INCLUDE_PATH_EXIST,
|
||||
if test $result = 0; then
|
||||
ac_path_to_include=""
|
||||
else
|
||||
ac_path_to_include="-I$1"
|
||||
ac_path_to_include=" -I$1"
|
||||
fi
|
||||
])
|
||||
|
||||
@@ -74,7 +74,7 @@ AC_DEFUN(WX_LINK_PATH_EXIST,
|
||||
if test $result = 0; then
|
||||
ac_path_to_link=""
|
||||
else
|
||||
ac_path_to_link="-L$1"
|
||||
ac_path_to_link=" -L$1"
|
||||
fi
|
||||
])
|
||||
|
||||
@@ -2133,8 +2133,8 @@ equivalent variable and GTK+ is version 1.2.3 or above.
|
||||
WX_INCLUDE_PATH_EXIST($ac_find_includes, $TOOLKIT_INCLUDE)
|
||||
WX_LINK_PATH_EXIST($ac_find_libraries, $GUI_TK_LIBRARY)
|
||||
|
||||
GUI_TK_LIBRARY="$GUI_TK_LIBRARY $ac_path_to_link"
|
||||
TOOLKIT_INCLUDE="$TOOLKIT_INCLUDE $ac_path_to_include"
|
||||
GUI_TK_LIBRARY="$GUI_TK_LIBRARY$ac_path_to_link"
|
||||
TOOLKIT_INCLUDE="$TOOLKIT_INCLUDE$ac_path_to_include"
|
||||
AC_MSG_RESULT(found at $ac_find_libraries)
|
||||
else
|
||||
dnl it might happen that we found headers in one of the standard
|
||||
@@ -2165,7 +2165,7 @@ equivalent variable and GTK+ is version 1.2.3 or above.
|
||||
WX_PATH_FIND_LIBRARIES($SEARCH_LIB,Xpm)
|
||||
if test "$ac_find_libraries" != "" ; then
|
||||
WX_LINK_PATH_EXIST($ac_find_libraries,$GUI_TK_LIBRARY)
|
||||
GUI_TK_LIBRARY="$GUI_TK_LIBRARY $ac_path_to_link"
|
||||
GUI_TK_LIBRARY="$GUI_TK_LIBRARY$ac_path_to_link"
|
||||
xpm_link=" -lXpm"
|
||||
AC_DEFINE(wxHAVE_LIB_XPM)
|
||||
AC_MSG_RESULT(found at $ac_find_libraries)
|
||||
@@ -2264,9 +2264,6 @@ equivalent variable and GTK+ is version 1.2.3 or above.
|
||||
ALL_OBJECTS="${ALL_OBJECTS} \$(FREETYPEOBJS)"
|
||||
fi
|
||||
|
||||
RPM_FILES="src/\$(TOOLKITDIR)/rpmfiles.lst"
|
||||
RPM_SPEC="wx\$(TOOLKIT).spec"
|
||||
|
||||
dnl distribute samples/demos/utils with GUI versions
|
||||
GUIDIST="${GUIDIST} SAMPLES_DIST DEMOS_DIST UTILS_DIST MISC_DIST"
|
||||
DISTDIR="wx\$(TOOLKIT)"
|
||||
@@ -2291,8 +2288,6 @@ else
|
||||
fi
|
||||
|
||||
PORT_FILES="\${top_srcdir}/src/files.lst"
|
||||
RPM_FILES="src/rpmfiles.lst"
|
||||
RPM_SPEC="wxBase.spec"
|
||||
|
||||
dnl distribute only wxBase sources/headers
|
||||
GUIDIST="BASE_DIST"
|
||||
@@ -2313,43 +2308,67 @@ dnl ---------------------------------------------------------------------------
|
||||
dnl OpenGL libraries
|
||||
dnl ---------------------------------------------------------------------------
|
||||
if test "$wxUSE_OPENGL" = "yes"; then
|
||||
if test "$wxUSE_MAC" = 1; then
|
||||
OPENGL_LIBS="-framework OpenGL -framework AGL"
|
||||
else
|
||||
if test "$wxUSE_MAC" = 1; then
|
||||
OPENGL_LIBS="-framework OpenGL -framework AGL"
|
||||
else
|
||||
|
||||
AC_CHECK_HEADER(GL/gl.h,
|
||||
[
|
||||
AC_MSG_CHECKING([for -lGL])
|
||||
WX_PATH_FIND_LIBRARIES([$SEARCH_LIB],[GL])
|
||||
if test "$ac_find_libraries" != "" ; then
|
||||
WX_LINK_PATH_EXIST([$ac_find_libraries],[$LDFLAGS])
|
||||
LDFLAGS_GL="$LDFLAGS$ac_path_to_link"
|
||||
OPENGL_LIBS="-lGL -lGLU"
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_CHECKING([for -lMesaGL])
|
||||
WX_PATH_FIND_LIBRARIES([$SEARCH_LIB],[MesaGL])
|
||||
if test "$ac_find_libraries" != "" ; then
|
||||
WX_LINK_PATH_EXIST([$ac_find_libraries],[$LDFLAGS])
|
||||
LDFLAGS_GL="$LDFLAGS$ac_path_to_link"
|
||||
OPENGL_LIBS="-lMesaGL -lMesaGLU"
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
dnl check for OpenGL libs availability first
|
||||
dnl -lGL requires -lm with soem OpenGL versions
|
||||
|
||||
AC_CHECK_HEADER(GL/gl.h,
|
||||
[
|
||||
AC_CHECK_LIB(GL, glFlush,
|
||||
[
|
||||
OPENGL_LIBS="-lGL -lGLU"
|
||||
],
|
||||
[
|
||||
AC_CHECK_LIB(MesaGL, glFlush,
|
||||
[
|
||||
OPENGL_LIBS="-lMesaGL -lMesaGLU"
|
||||
],
|
||||
[],
|
||||
[-lm])
|
||||
],
|
||||
[-lm])
|
||||
])
|
||||
# AC_CHECK_HEADER(GL/gl.h,
|
||||
# [
|
||||
# AC_CHECK_LIB(GL, glFlush,
|
||||
# [
|
||||
# OPENGL_LIBS="-lGL -lGLU"
|
||||
# ],
|
||||
# [
|
||||
# AC_CHECK_LIB(MesaGL, glFlush,
|
||||
# [
|
||||
# OPENGL_LIBS="-lMesaGL -lMesaGLU"
|
||||
# ],
|
||||
# [],
|
||||
# [-lm])
|
||||
# ],
|
||||
# [-lm])
|
||||
# ])
|
||||
|
||||
if test "x$OPENGL_LIBS" = "x"; then
|
||||
dnl it should be an error and not a warning because OpenGL is not on
|
||||
dnl by default and so if it had been explicitely requested, we
|
||||
dnl shouldn't just fall back to compiling the library without it
|
||||
AC_MSG_ERROR(OpenGL libraries not available)
|
||||
if test "x$OPENGL_LIBS" = "x"; then
|
||||
dnl it should be an error and not a warning because OpenGL is not on
|
||||
dnl by default and so if it had been explicitely requested, we
|
||||
dnl shouldn't just fall back to compiling the library without it
|
||||
AC_MSG_ERROR(OpenGL libraries not available)
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$wxUSE_OPENGL" = "yes"; then
|
||||
AC_DEFINE(wxUSE_OPENGL)
|
||||
AC_DEFINE(wxUSE_GLCANVAS)
|
||||
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS opengl"
|
||||
fi
|
||||
if test "$wxUSE_OPENGL" = "yes"; then
|
||||
AC_DEFINE(wxUSE_OPENGL)
|
||||
AC_DEFINE(wxUSE_GLCANVAS)
|
||||
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS opengl"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -z "$TOOLKIT_VPATH" ; then
|
||||
@@ -4773,14 +4792,13 @@ dnl distribution vars
|
||||
AC_SUBST(GUIDIST)
|
||||
AC_SUBST(PORT_FILES)
|
||||
AC_SUBST(DISTDIR)
|
||||
AC_SUBST(RPM_SPEC)
|
||||
AC_SUBST(RPM_FILES)
|
||||
|
||||
dnl additional subdirectories where we will build
|
||||
AC_SUBST(SAMPLES_SUBDIRS)
|
||||
|
||||
dnl additional libraries and linker settings
|
||||
AC_SUBST(LDFLAGS)
|
||||
AC_SUBST(LDFLAGS_GL)
|
||||
AC_SUBST(OPENGL_LIBS)
|
||||
AC_SUBST(DMALLOC_LIBS)
|
||||
AC_SUBST(EXTRADEFS)
|
||||
|
@@ -45,7 +45,7 @@ RSC=rc.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 "..\..\include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /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
|
||||
@@ -56,7 +56,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 wx.lib png.lib zlib.lib jpeg.lib tiff.lib regex.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/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 wxmsw.lib png.lib zlib.lib jpeg.lib tiff.lib regex.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/wxconvert.exe" /libpath:"..\..\..\lib"
|
||||
|
||||
!ELSEIF "$(CFG)" == "ConvertVC - Win32 Debug"
|
||||
|
||||
@@ -72,7 +72,7 @@ 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 "..\..\include" /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 /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" /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
|
||||
@@ -83,7 +83,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 wxd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib regexd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/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 wxmswd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib regexd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/wxconvert.exe" /pdbtype:sept /libpath:"..\..\..\lib"
|
||||
|
||||
!ELSEIF "$(CFG)" == "ConvertVC - Win32 Debug DLL"
|
||||
|
||||
@@ -99,7 +99,7 @@ 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 "..\..\include" /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
|
||||
# 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 /FD /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
|
||||
@@ -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 wxdlld.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 wxmsw232d.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"
|
||||
|
||||
@@ -126,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 "..\..\include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /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
|
||||
@@ -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 wxdll.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 wxmsw232.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/wxconvert.exe" /libpath:"..\..\..\lib"
|
||||
|
||||
!ENDIF
|
||||
|
||||
@@ -207,7 +207,7 @@ SOURCE=.\rc2xml.h
|
||||
|
||||
SOURCE=.\wxconvert.rc
|
||||
# ADD BASE RSC /l 0x809
|
||||
# ADD RSC /l 0x809
|
||||
# ADD RSC /l 0x809 /i "../../../include"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
|
@@ -45,7 +45,7 @@ RSC=rc.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 "..\..\..\include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /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
|
||||
@@ -56,7 +56,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 wx.lib png.lib zlib.lib jpeg.lib tiff.lib regex.lib wxxrc.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/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 wxmsw.lib png.lib zlib.lib jpeg.lib tiff.lib regex.lib wxxrc.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/wxrc.exe" /libpath:"..\..\..\lib"
|
||||
|
||||
!ELSEIF "$(CFG)" == "wxRcVC - Win32 Debug"
|
||||
|
||||
@@ -72,7 +72,7 @@ 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 "..\..\..\include" /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 /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" /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
|
||||
@@ -83,7 +83,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 wxd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib regexd.lib wxxrcd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/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 wxmswd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib regexd.lib wxxrcd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/wxrc.exe" /pdbtype:sept /libpath:"..\..\..\lib"
|
||||
|
||||
!ELSEIF "$(CFG)" == "wxRcVC - Win32 Debug DLL"
|
||||
|
||||
@@ -99,7 +99,7 @@ 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 "..\..\..\include" /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
|
||||
# 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 /FD /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
|
||||
@@ -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 wxdlld.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 wxmsw232d.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"
|
||||
|
||||
@@ -126,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 "..\..\..\include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /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
|
||||
@@ -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 wxdll.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 wxmsw232.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/wxrc.exe" /libpath:"..\..\..\lib"
|
||||
|
||||
!ENDIF
|
||||
|
||||
@@ -155,7 +155,7 @@ SOURCE=.\wxrc.cpp
|
||||
|
||||
SOURCE=.\wxrc.rc
|
||||
# ADD BASE RSC /l 0x809
|
||||
# ADD RSC /l 0x809
|
||||
# ADD RSC /l 0x809 /i "../../../include"
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
|
@@ -35,14 +35,13 @@
|
||||
#include "wx/wx.h"
|
||||
#endif
|
||||
|
||||
#include "wx/generic/treectlg.h"
|
||||
|
||||
#ifdef __WXMSW__
|
||||
#include "windows.h"
|
||||
#include <windows.h>
|
||||
#include "wx/msw/winundef.h"
|
||||
#endif
|
||||
|
||||
#include "splittree.h"
|
||||
#include "wx/gizmos/splittree.h"
|
||||
#include <math.h>
|
||||
|
||||
/*
|
||||
* wxRemotelyScrolledTreeCtrl
|
||||
@@ -78,7 +77,7 @@ wxRemotelyScrolledTreeCtrl::~wxRemotelyScrolledTreeCtrl()
|
||||
|
||||
void wxRemotelyScrolledTreeCtrl::HideVScrollbar()
|
||||
{
|
||||
#ifdef __WXMSW__
|
||||
#if defined(__WXMSW__) && USE_GENERIC_TREECTRL
|
||||
if (!IsKindOf(CLASSINFO(wxGenericTreeCtrl)))
|
||||
{
|
||||
::ShowScrollBar((HWND) GetHWND(), SB_VERT, FALSE);
|
||||
@@ -98,6 +97,7 @@ void wxRemotelyScrolledTreeCtrl::SetScrollbars(int pixelsPerUnitX, int pixelsPer
|
||||
int xPos, int yPos,
|
||||
bool noRefresh)
|
||||
{
|
||||
#if USE_GENERIC_TREECTRL || !defined(__WXMSW__)
|
||||
if (IsKindOf(CLASSINFO(wxGenericTreeCtrl)))
|
||||
{
|
||||
wxGenericTreeCtrl* win = (wxGenericTreeCtrl*) this;
|
||||
@@ -109,6 +109,7 @@ void wxRemotelyScrolledTreeCtrl::SetScrollbars(int pixelsPerUnitX, int pixelsPer
|
||||
scrolledWindow->SetScrollbars(0, pixelsPerUnitY, 0, noUnitsY, 0, yPos, noRefresh);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// In case we're using the generic tree control.
|
||||
@@ -116,6 +117,7 @@ int wxRemotelyScrolledTreeCtrl::GetScrollPos(int orient) const
|
||||
{
|
||||
wxScrolledWindow* scrolledWindow = GetScrolledWindow();
|
||||
|
||||
#if USE_GENERIC_TREECTRL || !defined(__WXMSW__)
|
||||
if (IsKindOf(CLASSINFO(wxGenericTreeCtrl)))
|
||||
{
|
||||
wxGenericTreeCtrl* win = (wxGenericTreeCtrl*) this;
|
||||
@@ -127,6 +129,7 @@ int wxRemotelyScrolledTreeCtrl::GetScrollPos(int orient) const
|
||||
return scrolledWindow->GetScrollPos(orient);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -137,6 +140,7 @@ void wxRemotelyScrolledTreeCtrl::GetViewStart(int *x, int *y) const
|
||||
{
|
||||
wxScrolledWindow* scrolledWindow = GetScrolledWindow();
|
||||
|
||||
#if USE_GENERIC_TREECTRL || !defined(__WXMSW__)
|
||||
if (IsKindOf(CLASSINFO(wxGenericTreeCtrl)))
|
||||
{
|
||||
|
||||
@@ -151,6 +155,7 @@ void wxRemotelyScrolledTreeCtrl::GetViewStart(int *x, int *y) const
|
||||
* y = y2;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
// x is wrong since the horizontal scrollbar is controlled by the
|
||||
// tree control, but we probably don't need it.
|
||||
@@ -161,6 +166,7 @@ void wxRemotelyScrolledTreeCtrl::GetViewStart(int *x, int *y) const
|
||||
// In case we're using the generic tree control.
|
||||
void wxRemotelyScrolledTreeCtrl::PrepareDC(wxDC& dc)
|
||||
{
|
||||
#if USE_GENERIC_TREECTRL || !defined(__WXMSW__)
|
||||
if (IsKindOf(CLASSINFO(wxGenericTreeCtrl)))
|
||||
{
|
||||
wxScrolledWindow* scrolledWindow = GetScrolledWindow();
|
||||
@@ -175,8 +181,9 @@ void wxRemotelyScrolledTreeCtrl::PrepareDC(wxDC& dc)
|
||||
scrolledWindow->GetScrollPixelsPerUnit(& xppu2, & yppu2);
|
||||
|
||||
dc.SetDeviceOrigin( -startX * xppu1, -startY * yppu2 );
|
||||
//dc.SetUserScale( win->GetScaleX(), win->GetScaleY() );
|
||||
// dc.SetUserScale( win->GetScaleX(), win->GetScaleY() );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// Scroll to the given line (in scroll units where each unit is
|
||||
@@ -184,14 +191,19 @@ void wxRemotelyScrolledTreeCtrl::PrepareDC(wxDC& dc)
|
||||
void wxRemotelyScrolledTreeCtrl::ScrollToLine(int posHoriz, int posVert)
|
||||
{
|
||||
#ifdef __WXMSW__
|
||||
#if USE_GENERIC_TREECTRL
|
||||
if (!IsKindOf(CLASSINFO(wxGenericTreeCtrl)))
|
||||
#endif
|
||||
{
|
||||
UINT sbCode = SB_THUMBPOSITION;
|
||||
HWND vertScrollBar = 0;
|
||||
MSWDefWindowProc((WXUINT) WM_VSCROLL, MAKELONG(sbCode, posVert), (WXHWND) vertScrollBar);
|
||||
}
|
||||
#if USE_GENERIC_TREECTRL
|
||||
else
|
||||
#endif
|
||||
#endif
|
||||
#if USE_GENERIC_TREECTRL || !defined(__WXMSW__)
|
||||
{
|
||||
wxGenericTreeCtrl* win = (wxGenericTreeCtrl*) this;
|
||||
win->Refresh();
|
||||
@@ -205,6 +217,7 @@ void wxRemotelyScrolledTreeCtrl::ScrollToLine(int posHoriz, int posVert)
|
||||
}
|
||||
*/
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void wxRemotelyScrolledTreeCtrl::OnSize(wxSizeEvent& event)
|
||||
@@ -231,6 +244,7 @@ void wxRemotelyScrolledTreeCtrl::OnExpand(wxTreeEvent& event)
|
||||
// Adjust the containing wxScrolledWindow's scrollbars appropriately
|
||||
void wxRemotelyScrolledTreeCtrl::AdjustRemoteScrollbars()
|
||||
{
|
||||
#if USE_GENERIC_TREECTRL || !defined(__WXMSW__)
|
||||
if (IsKindOf(CLASSINFO(wxGenericTreeCtrl)))
|
||||
{
|
||||
// This is for the generic tree control.
|
||||
@@ -241,6 +255,7 @@ void wxRemotelyScrolledTreeCtrl::AdjustRemoteScrollbars()
|
||||
return;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
// This is for the wxMSW tree control
|
||||
wxScrolledWindow* scrolledWindow = GetScrolledWindow();
|
||||
@@ -249,14 +264,18 @@ void wxRemotelyScrolledTreeCtrl::AdjustRemoteScrollbars()
|
||||
wxRect itemRect;
|
||||
if (GetBoundingRect(GetRootItem(), itemRect))
|
||||
{
|
||||
int itemHeight = itemRect.GetHeight();
|
||||
// Actually, the real height seems to be 1 less than reported
|
||||
// (e.g. 16 instead of 16)
|
||||
int itemHeight = itemRect.GetHeight() - 1;
|
||||
|
||||
int w, h;
|
||||
GetClientSize(&w, &h);
|
||||
|
||||
wxRect rect(0, 0, 0, 0);
|
||||
CalcTreeSize(rect);
|
||||
int treeViewHeight = rect.GetHeight()/itemHeight;
|
||||
|
||||
double f = ((double) (rect.GetHeight()) / (double) itemHeight) ;
|
||||
int treeViewHeight = (int) ceil(f);
|
||||
|
||||
int scrollPixelsPerLine = itemHeight;
|
||||
int scrollPos = - (itemRect.y / itemHeight);
|
||||
@@ -304,9 +323,6 @@ void wxRemotelyScrolledTreeCtrl::CalcTreeSize(wxRect& rect)
|
||||
|
||||
void wxRemotelyScrolledTreeCtrl::CalcTreeSize(const wxTreeItemId& id, wxRect& rect)
|
||||
{
|
||||
// TODO: implement GetFirst/NextVisibleItem
|
||||
// for wxGenericTreeCtrl, plus GetBoundingRect.
|
||||
|
||||
// More efficient implementation would be to find the last item (but how?)
|
||||
// Q: is the bounding rect relative to the top of the virtual tree workspace
|
||||
// or the top of the window? How would we convert?
|
||||
@@ -408,7 +424,7 @@ void wxTreeCompanionWindow::OnPaint(wxPaintEvent& event)
|
||||
if (!m_treeCtrl)
|
||||
return;
|
||||
|
||||
wxPen pen(wxColour(_T("BLACK")), 1, wxSOLID);
|
||||
wxPen pen(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DLIGHT), 1, wxSOLID);
|
||||
dc.SetPen(pen);
|
||||
dc.SetBrush(* wxTRANSPARENT_BRUSH);
|
||||
wxFont font(wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT));
|
||||
@@ -576,12 +592,15 @@ void wxSplitterScrolledWindow::OnScroll(wxScrollWinEvent& event)
|
||||
// don't cause an infinite loop
|
||||
static bool inOnScroll = FALSE;
|
||||
if (inOnScroll)
|
||||
{
|
||||
event.Skip();
|
||||
return;
|
||||
}
|
||||
inOnScroll = TRUE;
|
||||
|
||||
|
||||
int orient = event.GetOrientation();
|
||||
|
||||
int nScrollInc = 16;// FIXME CalcScrollInc(event);
|
||||
int nScrollInc = CalcScrollInc(event);
|
||||
if (nScrollInc == 0)
|
||||
{
|
||||
inOnScroll = FALSE;
|
||||
|
@@ -45,7 +45,7 @@ RSC=rc.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 "..\..\..\include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /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
|
||||
@@ -56,7 +56,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 wx.lib png.lib zlib.lib jpeg.lib tiff.lib regex.lib wxxrc.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/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 wxmsw.lib png.lib zlib.lib jpeg.lib tiff.lib regex.lib wxxrc.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/wxrcedit.exe" /libpath:"..\..\..\lib"
|
||||
|
||||
!ELSEIF "$(CFG)" == "wxRcEditVC - Win32 Debug"
|
||||
|
||||
@@ -72,7 +72,7 @@ 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 "..\..\..\include" /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 /Gm /GX /ZI /Od /I "../../../lib/mswd" /I "..\..\include" /I "..\..\..\include" /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 /Yc /Yu
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
|
||||
@@ -83,7 +83,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 wxd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib regexd.lib wxxrcd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/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 wxmswd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib regexd.lib wxxrcd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/wxrcedit.exe" /pdbtype:sept /libpath:"..\..\..\lib"
|
||||
|
||||
!ELSEIF "$(CFG)" == "wxRcEditVC - Win32 Debug DLL"
|
||||
|
||||
@@ -99,7 +99,7 @@ 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 "..\..\..\include" /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
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../lib/mswdlld" /I "..\..\include" /I "..\..\..\include" /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
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
|
||||
@@ -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 wxdlld.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 wxmsw232d.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"
|
||||
|
||||
@@ -126,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 "..\..\..\include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../lib/mswdll" /I "..\..\include" /I "..\..\..\include" /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
|
||||
@@ -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 wxdll.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 wxmsw232.lib wxxrc.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/wxrcedit.exe" /libpath:"..\..\..\lib"
|
||||
|
||||
!ENDIF
|
||||
|
||||
@@ -230,6 +230,8 @@ SOURCE=.\treedt.h
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\wxrcedit.rc
|
||||
# ADD BASE RSC /l 0x809
|
||||
# ADD RSC /l 0x809 /i "../../../include"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
|
7
debian/changelog
vendored
7
debian/changelog
vendored
@@ -22,6 +22,13 @@ wxwindows2.3 (2.3.0) unstable; urgency=low
|
||||
|
||||
-- Ron Lee <ron@debian.org> Sat, 27 Jan 2001 01:51:24 -0800
|
||||
|
||||
wxwindows2.2 (2.2.8.2) unstable; urgency=low
|
||||
|
||||
* python-dev doesn't get me python? More bytes in Build-Dep then
|
||||
I guess ... Closes: #119954
|
||||
|
||||
-- Ron Lee <ron@debian.org> Sun, 18 Nov 2001 04:28:41 -0800
|
||||
|
||||
wxwindows2.2 (2.2.8.1) unstable; urgency=low
|
||||
|
||||
* Rebuild for python2.1 Closes: #119226, #118835
|
||||
|
2
debian/control.in
vendored
2
debian/control.in
vendored
@@ -1,7 +1,7 @@
|
||||
Source: wxwindows=V
|
||||
Section: libs
|
||||
Priority: optional
|
||||
Build-Depends: debhelper (>=2.0), flex, bison, gettext, libgtk1.2-dev, python2.1-dev, zlib1g-dev, libjpeg62-dev, libpng2-dev, libtiff3g-dev, libgl-dev, libesd0-dev
|
||||
Build-Depends: debhelper (>=2.0), flex, bison, gettext, libgtk1.2-dev, python (>=2.1), python (<<2.2), python2.1-dev, zlib1g-dev, libjpeg62-dev, libpng2-dev, libtiff3g-dev, libgl-dev, libesd0-dev
|
||||
Maintainer: Ron Lee <ron@debian.org>
|
||||
Standards-Version: 3.5.6.0
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -113,6 +113,19 @@ src/zlib/makefile*
|
||||
src/zlib/*.com
|
||||
src/zlib/*.3
|
||||
|
||||
src/regex/COPYRIGHT
|
||||
src/regex/makefile*
|
||||
src/regex/README
|
||||
src/regex/WHATSNEW
|
||||
src/regex/mkh
|
||||
src/regex/makefile*
|
||||
src/regex/*.h
|
||||
src/regex/*.ih
|
||||
src/regex/*.c
|
||||
src/regex/tests
|
||||
src/regex/regex.3
|
||||
src/regex/regex.7
|
||||
|
||||
include/wx/*.h
|
||||
include/wx/*.inl
|
||||
include/wx/*.cpp
|
||||
@@ -612,17 +625,6 @@ samples/dnd/*.ico
|
||||
samples/dnd/*.txt
|
||||
samples/dnd/*.cur
|
||||
|
||||
samples/tab/*.cpp
|
||||
samples/tab/*.h
|
||||
samples/tab/makefile*
|
||||
samples/tab/*.rc
|
||||
samples/tab/*.def
|
||||
samples/tab/*.bmp
|
||||
samples/tab/*.xbm
|
||||
samples/tab/*.xpm
|
||||
samples/tab/*.ico
|
||||
samples/tab/*.txt
|
||||
|
||||
samples/notebook/*.cpp
|
||||
samples/notebook/*.h
|
||||
samples/notebook/makefile*
|
||||
|
@@ -1,4 +1,5 @@
|
||||
Makefile.in
|
||||
src/regex/Makefile.in
|
||||
locale/Makefile
|
||||
samples/Makefile.in
|
||||
samples/calendar/Makefile.in
|
||||
@@ -157,4 +158,5 @@ src/motif/descrip.mms
|
||||
src/png/scripts/descrip.mms
|
||||
src/unix/descrip.mms
|
||||
src/zlib/descrip.mms
|
||||
src/regex/descrip.mms
|
||||
utils/dialoged/src/descrip.mms
|
||||
|
@@ -1,30 +0,0 @@
|
||||
#!################################################################################
|
||||
#! File: base.t
|
||||
#! Purpose: tmake template file from which src/rpmfiles.lst containing the
|
||||
#! list of files for wxBase.spec RPM generation script is generated
|
||||
#! Author: Vadim Zeitlin
|
||||
#! Created: 28.01.00
|
||||
#! Version: $Id$
|
||||
#!################################################################################
|
||||
#${
|
||||
IncludeTemplate("filelist.t");
|
||||
|
||||
foreach $file (sort keys %wxWXINCLUDE) {
|
||||
next unless $wxWXINCLUDE{$file} =~ /\bB\b/;
|
||||
|
||||
$project{"BASE_HEADERS"} .= "include/wx/" . $file . " "
|
||||
}
|
||||
|
||||
foreach $file (sort keys %wxUNIXINCLUDE) {
|
||||
next unless $wxUNIXINCLUDE{$file} =~ /\bB\b/;
|
||||
|
||||
$project{"BASE_HEADERS"} .= "include/wx/unix/" . $file . " "
|
||||
}
|
||||
|
||||
foreach $file (sort keys %wxPROTOCOLINCLUDE) {
|
||||
next unless $wxPROTOCOLINCLUDE{$file} =~ /\bB\b/;
|
||||
|
||||
$project{"BASE_HEADERS"} .= "include/wx/protocol/" . $file . " "
|
||||
}
|
||||
#$}
|
||||
#$ ExpandGlue("BASE_HEADERS", "/usr/", "\n/usr/", "");
|
@@ -115,7 +115,7 @@ wizard.cpp Generic
|
||||
appcmn.cpp Common Base
|
||||
choiccmn.cpp Common
|
||||
clipcmn.cpp Common
|
||||
clntdata.cpp Common
|
||||
clntdata.cpp Common Base
|
||||
cmdline.cpp Common Base
|
||||
cmdproc.cpp Common
|
||||
cmndata.cpp Common
|
||||
@@ -567,6 +567,7 @@ gauge.cpp Motif
|
||||
gdiobj.cpp Motif
|
||||
glcanvas.cpp Motif
|
||||
icon.cpp Motif
|
||||
joystick.cpp Motif
|
||||
listbox.cpp Motif
|
||||
main.cpp Motif
|
||||
mdi.cpp Motif
|
||||
@@ -711,7 +712,7 @@ chkconf.h WXH Base
|
||||
choicdlg.h WXH
|
||||
choice.h WXH
|
||||
clipbrd.h WXH
|
||||
clntdata.h WXH
|
||||
clntdata.h WXH Base
|
||||
cmdline.h WXH Base
|
||||
cmdproc.h WXH
|
||||
cmndata.h WXH
|
||||
@@ -836,7 +837,7 @@ palette.h WXH
|
||||
panel.h WXH
|
||||
paper.h WXH
|
||||
pen.h WXH
|
||||
platform.h WXH
|
||||
platform.h WXH Base
|
||||
popupwin.h WXH
|
||||
print.h WXH
|
||||
printdlg.h WXH
|
||||
@@ -1086,7 +1087,6 @@ control.h MotifH
|
||||
cursor.h MotifH
|
||||
dataform.h MotifH
|
||||
dataobj.h MotifH
|
||||
dataobj2.h MotifH
|
||||
dc.h MotifH
|
||||
dcclient.h MotifH
|
||||
dcmemory.h MotifH
|
||||
|
@@ -63,10 +63,6 @@ do
|
||||
echo "Generating $topdir/src/files.lst for Configure..."
|
||||
tmake -t base wxwin.pro -o $topdir/src/files.lst ;;
|
||||
|
||||
baserpm.t)
|
||||
echo "Generating $topdir/src/rpmfiles.lst for wxBase RPM..."
|
||||
tmake -t baserpm wxwin.pro -o $topdir/src/rpmfiles.lst ;;
|
||||
|
||||
gtk.t)
|
||||
echo "Generating $topdir/src/gtk/files.lst for GTK and Configure..."
|
||||
tmake -t gtk wxwin.pro -o $topdir/src/gtk/files.lst;;
|
||||
|
@@ -22,6 +22,9 @@ src/zlib/zlib.dsw
|
||||
src/png/png.dsp
|
||||
src/png/png.dsw
|
||||
|
||||
src/regex/regex.dsp
|
||||
src/regex/regex.dsw
|
||||
|
||||
samples/samples.dsw
|
||||
|
||||
samples/calendar/Calendar.dsp
|
||||
@@ -201,9 +204,6 @@ samples/splitter/Splitter.dsw
|
||||
samples/statbar/Statbar.dsp
|
||||
samples/statbar/Statbar.dsw
|
||||
|
||||
samples/tab/Tab.dsp
|
||||
samples/tab/Tab.dsw
|
||||
|
||||
samples/taskbar/Taskbar.dsp
|
||||
samples/taskbar/Taskbar.dsw
|
||||
|
||||
|
@@ -3,6 +3,7 @@ rem Zip up an external, generic + Windows distribution of wxWindows 2
|
||||
rem using Inno Setup + ScriptMaker
|
||||
set src=%wxwin
|
||||
set dest=%src\deliver
|
||||
set webfiles=c:\wx2dev\wxWebSite
|
||||
set inno=0
|
||||
|
||||
Rem Set this to the required version
|
||||
@@ -43,6 +44,13 @@ erase %dest\make*
|
||||
if direxist %dest\wx erase /sxyz %dest\wx\
|
||||
if not direxist %dest mkdir %dest
|
||||
|
||||
# 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
|
||||
copy %webfiles%\site\faq*.htm %src\docs\html
|
||||
copy %webfiles%\site\platform.htm %src\docs\html
|
||||
|
||||
cd %src
|
||||
echo Zipping...
|
||||
|
||||
|
@@ -1,3 +1,4 @@
|
||||
|
||||
<HTML>
|
||||
|
||||
<HEAD>
|
||||
|
@@ -1,3 +1,4 @@
|
||||
|
||||
<HTML>
|
||||
|
||||
<HEAD>
|
||||
@@ -22,22 +23,38 @@ wxWindows 2 FAQ: General
|
||||
|
||||
See also <a href="faq.htm">top-level FAQ page</a>.
|
||||
<hr>
|
||||
<h3>List of questions in this category</h3>
|
||||
<ul>
|
||||
<li><a href="#whatis">What is wxWindows?</a></li>
|
||||
<li><a href="#users">Who uses wxWindows?</a></li>
|
||||
<li><a href="#platforms">What platforms are supported by wxWindows 2?</a></li>
|
||||
<li><a href="#specific">How does wxWindows 2 support platform-specific features?</a></li>
|
||||
<li><a href="#stl">Does wxWindows use STL? or the standard string class?</a></li>
|
||||
<li><a href="#richedit">Is there a rich edit/markup widget for wxWindows 2?</a></ li>
|
||||
<li><a href="#dev">How is wxWindows 2 being developed?</a></li>
|
||||
<li><a href="#distrib">How is wxWindows 2 distributed?</a></li>
|
||||
<li><a href="#future">What are the plans for the future?</a></li>
|
||||
<li><a href="#univ">What is wxUniversal?</a></li>
|
||||
<li><a href="#jave">What about Java?</a></li>
|
||||
<li><a href="#help">How can I help the project?</a></li>
|
||||
</ul>
|
||||
<hr>
|
||||
|
||||
<H3><a name="whatis">What is wxWindows?</a></H3>
|
||||
|
||||
wxWindows is a class library that allows you to compile graphical C++ programs on a range of
|
||||
different platforms. wxWindows defines a common API across platforms, but uses the native graphical user interface (GUI) on each platform,
|
||||
so your program will take on the native 'look and feel' that users are familiar with.<P>
|
||||
so your program will take on the native 'look and feel' that users are familiar with.<P>
|
||||
|
||||
Although GUI applications are mostly built programmatically, there is a dialog editor to help
|
||||
build attractive dialogs and panels. Robert Roebling's <a href="http://www.roebling.com">wxDesigner</a>
|
||||
build attractive dialogs and panels. Robert Roebling's <a href="http://www.roebling.com">wxDesigner</a>
|
||||
makes light work of resizable, portable dialogs.<P>
|
||||
|
||||
You don't have to use C++ to use wxWindows: wxWindows 1 has been interfaced to several interpreted languages,
|
||||
such as CLIPS, Python, Scheme, XLisp and Perl, and there is a <a href="http://wxpython.org">Python interface</a> for wxWindows 2.
|
||||
You don't have to use C++ to use wxWindows: there is a <a href="http://wxpython.org">Python interface</a> for wxWindows 2,
|
||||
and also a <a href="http://wxperl.sourceforge.net" target=_top>Perl interface</a>.
|
||||
<P>
|
||||
|
||||
<h3>Can I use wxWindows 2 for both proprietary (commercial) projects, and GPL'ed projects?</h3>
|
||||
<h3>Can I use wxWindows 2 for both proprietary (commercial) projects, and GPL'ed projects?</h3>
|
||||
|
||||
Yes. Please see the <a href="newlicen.htm">licence</a> for details, but basically
|
||||
you can distribute proprietary binaries without distributing any source code, and neither will wxWindows
|
||||
@@ -57,7 +74,7 @@ keen to fix bugs as soon as possible, though obviously there are no guarantees.
|
||||
<H3><a name="users">Who uses wxWindows?</a></H3>
|
||||
|
||||
Many organisations - commercial, government, and academic - across the
|
||||
world. It's impossible to estimate the true number of users, since
|
||||
world. It's impossible to estimate the true number of users, since
|
||||
wxWindows is obtained by many different means, and we cannot monitor
|
||||
distribution. The mailing list contains around 300-400 entries which is
|
||||
quite large for a list of this type.<P>
|
||||
@@ -65,62 +82,28 @@ quite large for a list of this type.<P>
|
||||
See <a href="users.htm">Users</a> for a list of some users and their applications, and
|
||||
also <A href="feedback.htm">Feedback</a> for comments.<P>
|
||||
|
||||
<H3>How much has the API changed since 1.xx?</H3>
|
||||
|
||||
It's difficult to summarize, but some aspects haven't changed very much. For example, if you have some
|
||||
complex drawing code, you will mostly need to make sure it's parameterised with a device
|
||||
context (instead of obtaining one from a window or storing it). You won't have
|
||||
to completely rewrite the drawing code.<P>
|
||||
|
||||
The way that events are handled has changed, so for example, where you overrode
|
||||
OnSize before, you now have a non-virtual OnSize with a single event class argument.
|
||||
To make this function known to wxWindows, you add an entry in an 'event table' using macros. Addition of these macros
|
||||
will eventually be made easier by a tool which will allow selection from a list
|
||||
and copy-and-paste into your editor. This is extended to button presses, listbox selection
|
||||
etc. so callbacks have gone (they may be added back for limited backward compatibility).<P>
|
||||
|
||||
The class hierarchy has changed to allow greater flexibility but it probably won't affect your
|
||||
existing application. One exception to this is MDI applications which now use separate MDI classes instead of style
|
||||
flags. As a result, it won't be possible to switch between MDI and SDI operation at run-time
|
||||
without further coding, but a benefit is less interdependence between areas of code,
|
||||
and therefore smaller executable size.<P>
|
||||
|
||||
Panel items (now called controls) no longer have labels associated with most of them,
|
||||
and default panel layout has been removed. The idea is that you make greater use
|
||||
of dialog resources, for better-looking dialogs.<P>
|
||||
|
||||
<H3>What classes have disappeared?</H3>
|
||||
|
||||
wxForm, wxTextWindow (subsumed into wxTextCtrl).
|
||||
|
||||
<H3>Does wxWindows 2 mean that wxWindows 1.xx is dead?</H3>
|
||||
|
||||
While wxWindows 2 is being developed, there will be further patches to wxWindows 1.xx.
|
||||
Obviously we are investing most of our energy into the new code, but we're also trying
|
||||
to fix bugs in the current version.<P>
|
||||
|
||||
<H3>What platforms are supported by wxWindows 2?</H3>
|
||||
<H3><a name="platforms">What platforms are supported by wxWindows 2?</a></H3>
|
||||
|
||||
<ul>
|
||||
<li>Windows 3.1, Windows 95/98, Windows NT;
|
||||
<li>Linux and other Unix platforms with GTK+;
|
||||
<li>Unix with Motif or the free Motif clone Lesstif;
|
||||
<li>Mac;
|
||||
<li>A BeOS port is being investigated.
|
||||
<li>A Windows CE port is being investigated.
|
||||
<li>Windows 3.1, Windows 95/98, Windows NT, Windows 2000, Windows ME.
|
||||
<li>Linux and other Unix platforms with GTK+.
|
||||
<li>Unix with Motif or the free Motif clone Lesstif.
|
||||
<li>Mac OS.
|
||||
<li>Embedded platforms are being investigated. See the <a href="wxuniv.htm">wxUniversal</a> project.
|
||||
<li>An OS/2 port is in progress, and you can also compile wxWindows for GTK+ or Motif
|
||||
on OS/2.
|
||||
</ul>
|
||||
<P>
|
||||
|
||||
<H3>How does wxWindows 2 support platform-specific features?</H3>
|
||||
<H3><a name="specific">How does wxWindows 2 support platform-specific
|
||||
features?</a></H3>
|
||||
|
||||
This is a hotly-debated topic amongst the developers. My own philosophy
|
||||
is to make wxWindows as platform-independent as possible, but allow in a
|
||||
few classes (functions, window styles) that are platform-specific.
|
||||
For example, Windows metafiles and Windows 95 taskbar icons have
|
||||
their own classes on Windows, but nowhere else. Because these classes
|
||||
are provided and are wxWindows-compatible, it doesn't take much
|
||||
are provided and are wxWindows-compatible, it doesn't take much
|
||||
coding effort for an application programmer to add support for
|
||||
some functionality that the user on a particular platform might otherwise
|
||||
miss. Also, some classes that started off as platform-specific, such
|
||||
@@ -128,24 +111,24 @@ as the MDI classes, have been emulated on other platforms. I can imagine
|
||||
that even wxTaskBarIcon may be implemented for Unix desktops one day.
|
||||
<P>
|
||||
|
||||
In other words, wxWindows is not a 'lowest common denominator' approach,
|
||||
In other words, wxWindows is not a 'lowest common denominator' approach,
|
||||
but it will still be possible to write portable programs using the
|
||||
core API. Forbidding some platform-specific classes would be a stupid
|
||||
approach that would alienate many potential users, and encourage
|
||||
the perception that toolkits such as wxWindows are not up to the demands
|
||||
of today's sophisticated applications.<P>
|
||||
of today's sophisticated applications.<P>
|
||||
|
||||
Currently resources such as bitmaps and icons are handled in a platform-specific
|
||||
way, but it is hoped to reduce this dependence in due course.<P>
|
||||
|
||||
Another reason why wxWindows 2 is not a 'lowest common denominator' toolkit is that
|
||||
Another reason why wxWindows 2 is not a 'lowest common denominator' toolkit is that
|
||||
some functionality missing on some platform has been provided using generic,
|
||||
platform-independent code, such as the wxTreeCtrl and wxListCtrl classes.<P>
|
||||
|
||||
<H3>Does wxWindows use STL? or the standard string class?</H3>
|
||||
<H3><a name="stl">Does wxWindows use STL? or the standard string class?</a></H3>
|
||||
|
||||
No. This is a much-discussed topic that has (many times) ended with the conclusion that it is in
|
||||
wxWindows' best interests to avoid use of templates. Not all compilers can handle
|
||||
wxWindows' best interests to avoid use of templates. Not all compilers can handle
|
||||
templates adequately so it would dramatically reduce the number of compilers
|
||||
and platforms that could be supported. It would also be undersirable to make
|
||||
wxWindows dependent on another large library that may have to be downloaded and installed.
|
||||
@@ -158,9 +141,20 @@ by being able to modify our own string class. Some compatibility with the string
|
||||
has been built into wxString.<P>
|
||||
|
||||
There is nothing to stop an application using templates or the string class for its own
|
||||
purposes.<P>
|
||||
purposes. With wxWindows debugging options on, you may find you get errors when including
|
||||
STL headers. You can work around it either by switching off memory checking,
|
||||
or by adding this to a header before you include any STL files:<P>
|
||||
|
||||
<H3>Is there a rich edit/markup widget for wxWindows 2?</H3>
|
||||
<PRE>
|
||||
#ifdef new
|
||||
#undef new
|
||||
#endif
|
||||
</PRE>
|
||||
|
||||
<P>
|
||||
|
||||
|
||||
<H3><a name="richedit">Is there a rich edit/markup widget for wxWindows 2?</a></H3>
|
||||
|
||||
These are the possibilities so far:<P>
|
||||
|
||||
@@ -173,12 +167,12 @@ for this widget.
|
||||
then wxHTML will suit your needs. wxHTML is built into wxWindows - please see the reference
|
||||
manual for details, and samples/html.
|
||||
<li>There are rich edit widgets in both WIN32 and GTK+, but there is currently
|
||||
no wxWindows wrapper for these.
|
||||
no wxWindows wrapper for these (but text attribute functions are being added in the wxWindows 2.3.x series).
|
||||
</ul>
|
||||
|
||||
<P>
|
||||
|
||||
<H3>How is wxWindows 2 being developed?</H3>
|
||||
<H3><a name="dev">How is wxWindows 2 being developed?</a></H3>
|
||||
|
||||
We are using the <a href="cvs.htm">CVS</a> system to develop and maintain wxWindows. This allows
|
||||
us to make alterations and upload them instantly to the SourceForge server, from
|
||||
@@ -187,20 +181,24 @@ which others can update their source.<P>
|
||||
To build source from CVS, see the file BuildCVS.txt in the top-level wxWindows distribution
|
||||
directory.<P>
|
||||
|
||||
<H3>How is wxWindows 2 distributed?</H3>
|
||||
<H3><a name="distrib">How is wxWindows 2 distributed?</a></H3>
|
||||
|
||||
By ftp, and via the <a href="cdrom2.htm">wxWindows CD-ROM</a>.<P>
|
||||
By ftp, and via the <a href="cdrom2.htm">wxWindows CD-ROM</a>.
|
||||
<P>
|
||||
If you are feeling adventurous, you may also check out the sources directly
|
||||
from the <a href="cvs.htm">cvs</a>
|
||||
<p>
|
||||
|
||||
<H3>What are the plans for the future?</H3>
|
||||
<H3><a name="future">What are the plans for the future?</a></H3>
|
||||
|
||||
Currently we're working too hard on getting wxWindows 2 finished (are GUI toolkits ever
|
||||
Currently we're working too hard on getting wxWindows 2 finished (are GUI toolkits ever
|
||||
finished?) to think very far ahead. However, we know we want to make wxWindows as robust
|
||||
and well-publicised as possible. We also want to aim for better platform-independence of
|
||||
resources such as icons and bitmaps, standardising on the PNG for all platforms.<P>
|
||||
|
||||
Other possibilities include: DCOM/CORBA compatibility; a wxWindows book;
|
||||
<a href="http://wxstudio.linuxbox.com/">wxStudio</a>, an IDE;
|
||||
other platforms; other interface abilities such as speech output.<P>
|
||||
<a href="http://wxworkshop.sourceforge.net/">wxWorkshop</a>, an IDE;
|
||||
other platforms, especially embedded systems; other interface abilities such as speech output.<P>
|
||||
|
||||
We will investigate the possibility of compiler or operating system vendors bundling wxWindows with
|
||||
their product.<P>
|
||||
@@ -208,17 +206,28 @@ their product.<P>
|
||||
The high-level goal of wxWindows is to be thought of as the number one C++ framework,
|
||||
for virtually any platform. Move over, MFC!<P>
|
||||
|
||||
<H3>What about Java?</H3>
|
||||
<H3><a name="univ">What is wxUniversal?</a></H3>
|
||||
|
||||
wxUniversal is a new port of wxWindows being currently actively developed. The
|
||||
main difference is that wxUniversal implements all controls (or widgets) in
|
||||
wxWindows itself thus allowing to have much more flexibility (i.e. support for
|
||||
themes even under MS Windows!). It also means that it is now much easier to
|
||||
port wxWindows to a new platform as only the low-level classes must be ported
|
||||
which make for a small part of the library.
|
||||
<p>
|
||||
You may find more about wxUniversal <a href=wxuniv.htm>here</a>.
|
||||
|
||||
<H3><a name="jave">What about Java?</a></H3>
|
||||
|
||||
The Java honeymoon period is over :-) and people are realising that it cannot
|
||||
meet all their cross-platform development needs. We don't anticipate a major threat
|
||||
meet all their cross-platform development needs. We don't anticipate a major threat
|
||||
from Java, and the level of interest in wxWindows is as high as ever.<P>
|
||||
|
||||
<H3>How can I help the project?</H3>
|
||||
<H3><a name="help">How can I help the project?</a></H3>
|
||||
|
||||
Please check out the <a href="http://www.wxwindows.org/develop.htm" target=main>Backroom</a> pages,
|
||||
in particular the <a href="http://www.wxwindows.org/projects.htm">suggested projects</a>, and
|
||||
mail <a href="mailto:julian.smart@ukonline.co.uk">Julian Smart</a> or the developers' mailing list with your own suggestions.<P>
|
||||
Please check out the <a href="http://www.wxwindows.org/develop2.htm">Community</a> pages,
|
||||
in particular the <a href="projects.htm">suggested projects</a>, and
|
||||
mail <a href="mailto:julian.smart@btopenworld.com">Julian Smart</a> or the developers' mailing list with your own suggestions.<P>
|
||||
|
||||
</font>
|
||||
|
||||
|
@@ -22,23 +22,36 @@ wxWindows 2 for GTK FAQ
|
||||
|
||||
See also <a href="faq.htm">top-level FAQ page</a>.
|
||||
<hr>
|
||||
|
||||
<h3>What is wxWindows 2 for GTK?</h3>
|
||||
<h3>List of questions in this category</h3>
|
||||
<li><a href="#wxgtk">What is wxWindows 2 for GTK?</a></li>
|
||||
<li><a href="#gnome">Does wxGTK have GNOME support?</a></li>
|
||||
<li><a href="#redhat">Warning about GTK libraries supplied with RedHat</a></li>
|
||||
<li><a href="#wxgtk">What is wxWindows 2 for GTK?</a></li>
|
||||
<hr>
|
||||
|
||||
wxWindows 2 for GTK is a port of wxWindows to the <a href="http://www.gimp.org/gtk" target=_top>GTK+ toolkit</a>,
|
||||
which is freely available for most flavours of Unix with X. wxWindows 2 for GTK is
|
||||
often abbreviated to wxGTK. wxGTK has a separate home page <a href="http://www.freiburg.linux.de/~wxxt" target=_top>here</a>.
|
||||
<P>
|
||||
|
||||
<h3>Does wxGTK have GNOME support?</h3>
|
||||
<h3><a name="gnome">Does wxGTK have GNOME support?</a></h3>
|
||||
|
||||
Currently wxGTK does not have any features that would involve dependence on any desktop
|
||||
environment's libraries, so it can work on GNOME, KDE and with other window managers
|
||||
environment's libraries, so it can work on GNOME, KDE and with other window managers
|
||||
without installation hassles. Some GNOME and KDE integration features are file based, and
|
||||
so may be added without dependence on libraries. Other features may be supported in the
|
||||
future, probably as a separate library.
|
||||
<P>
|
||||
|
||||
<h3><a name="redhat">Warning about GTK libraries supplied with RedHat</a></h3>
|
||||
|
||||
It seems that some versions of RedHat include a badly patched version of GTK (not wxGTK)
|
||||
which causes some trouble with wxWindows' socket code. Common symptoms are that when
|
||||
a client tries to establish a connection to an existing server which refuses the request,
|
||||
the client will get notified twice, first getting a LOST event and then a CONNECT event.
|
||||
This problem can be solved by updating GTK with an official distribution of the library.
|
||||
<P>
|
||||
|
||||
|
||||
</font>
|
||||
|
||||
|
@@ -32,15 +32,15 @@ See also <a href="faq.htm">top-level FAQ page</a>.
|
||||
<li><a href="#filetypes">How does CVS handle file types/creators under Mac OS 8.x /9.x?</a></li>
|
||||
<li><a href="#filetypesx">How does CVS handle file types/creators under Mac OS X? </a></li>
|
||||
<li><a href="#cwpro53">What steps are required to build wxMac using CodeWarrior P ro 5.3?</a></li>
|
||||
<li><a href="#buildx">What steps are required to build wxMac under Mac OS X?</a>< /li>
|
||||
<li><a href="#buildx">What steps are required to build wxMac under Mac OS X?</a></li>
|
||||
<li><a href="#settings">What important settings are required in the CodeWarrior P roject Preferences?</a></li>
|
||||
<li><a href="#smarterrors">What are the smart preprocessing errors with the Apple Developer Tools?</a></li>
|
||||
<li><a href="#aboutmenu">How does wxMac support the standard Apple About menu ite m and Help menu?</a></li>
|
||||
<li><a href="#aboutmenu">How does wxMac support the standard Apple About menu item and Help menu?</a></li>
|
||||
</ul>
|
||||
<hr>
|
||||
<h3><a name="release">When is wxMac 2.x due to be released?</a></h3>
|
||||
|
||||
There is a <a href="http://www.wxwindows.org/dl_mac2.htm">preview</a> available.
|
||||
There is a <a href="dl_mac2.htm">preview</a> available.
|
||||
The author of this port is <a href="mailto:csomor@advancedconcepts.ch">Stefan Csomor</a>.
|
||||
<P>
|
||||
|
||||
@@ -50,9 +50,9 @@ The author of this port is <a href="mailto:csomor@advancedconcepts.ch">Stefan Cs
|
||||
<FONT FACE="Arial, Lucida Sans, Helvetica">
|
||||
<font size=2>
|
||||
Please note that the version of wxMac in CVS is more robust and nearly feature-complete compared with the packaged 2.0 release.
|
||||
Until a new release is made, it is recommended that you download the wxMac 2.3.1 <a href="http://www.wxwindows.org/dl_mac2.htm#dev">development snapshot</a> or the sources from the <a href="http://www.wxwindows.org/cvs.htm">CVS trunk</a>.
|
||||
Until a new release is made, it is recommended that you download the wxMac 2.3.1 <a href="dl_mac2.htm#dev">development snapshot</a> or the sources from the <a href="cvs.htm">CVS trunk</a>.
|
||||
</font>
|
||||
</td>
|
||||
</font></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
@@ -22,8 +22,26 @@ wxWindows 2 for Windows FAQ
|
||||
|
||||
See also <a href="faq.htm">top-level FAQ page</a>.
|
||||
<hr>
|
||||
<h3>List of questions in this category</h3>
|
||||
<ul>
|
||||
<li><a href="#platforms">Which Windows platforms are supported?</a></li>
|
||||
<li><a href="#wince">What about Windows CE?</a></li>
|
||||
<li><a href="#compilers">What compilers are supported?</a></li>
|
||||
<li><a href="#bestcompiler">Which is the best compiler to use with wxWindows 2?</a></li>
|
||||
<li><a href="#unicode">Is Unicode supported?</a></li>
|
||||
<li><a href="#dll">Can you compile wxWindows 2 as a DLL?</a></li>
|
||||
<li><a href="#exesize">How can I reduce executable size?</a></li>
|
||||
<li><a href="#mfc">Is wxWindows compatible with MFC?</a></li>
|
||||
<li><a href="#newerrors">Why my code fails to compile with strange errors about new operator?</a></li>
|
||||
<li><a href="#mfcport">How do I port MFC applications to wxWindows?</a></li>
|
||||
<li><a href="#crash">Why do I sometimes get bizarre crash problems using VC++ 5/6?</a></li>
|
||||
<li><a href="#makefiles">How are the wxWindows makefiles edited under Windows?</a></li>
|
||||
<li><a href="#vcdebug">How do you use VC++'s memory leak checking instead of that in wxWindows?</a></li>
|
||||
<li><a href="#shortcutproblem">Why are menu hotkeys or shortcuts not working in my application?</a></li>
|
||||
</ul>
|
||||
<hr>
|
||||
|
||||
<h3>Which Windows platforms are supported?</h3>
|
||||
<h3><a name="platforms">Which Windows platforms are supported?</a></h3>
|
||||
|
||||
wxWindows 2 can be used to develop and deliver applications on Windows 3.1, Win32s,
|
||||
Windows 95, Windows 98, and Windows NT. A Windows CE version is being looked into (see below).<P>
|
||||
@@ -31,8 +49,8 @@ Windows 95, Windows 98, and Windows NT. A Windows CE version is being looked int
|
||||
wxWindows 2 is designed to make use of WIN32 features and controls. However, unlike Microsoft,
|
||||
we have not forgotten users of 16-bit Windows. Most features
|
||||
work under Windows 3.1, including wxTreeCtrl and wxListCtrl using the generic implementation.
|
||||
However, don't expect very Windows-95-specific classes to work, such as wxTaskBarIcon. The wxRegConfig
|
||||
class doesn't work either because the Windows 3.1 registry is very simplistic. Check out the 16-bit
|
||||
However, don't expect very Windows-95-specific classes to work, such as wxTaskBarIcon. The wxRegConfig
|
||||
class doesn't work either because the Windows 3.1 registry is very simplistic. Check out the 16-bit
|
||||
makefiles to see what other files have been left out.
|
||||
<P>
|
||||
16-bit compilation is supported under Visual C++ 1.5, and Borland BC++ 4 to 5.
|
||||
@@ -48,17 +66,17 @@ using wxGTK or wxMotif, then check/debug your wxWindows for Windows
|
||||
programs with TWIN32, and finally produce an ix86 Windows executable using Cygwin/Mingw32,
|
||||
without ever needing a copy of Microsoft Windows. See the Technical Note on the Web site detailing cross-compilation.<P>
|
||||
|
||||
<h3>What about Windows CE?</h3>
|
||||
<h3><a name="wince">What about Windows CE?</a></h3>
|
||||
|
||||
This is under consideration, though we need to get wxWindows Unicode-aware first.
|
||||
There are other interesting issues, such as how to combine the menubar and toolbar APIs
|
||||
as Windows CE requires. But there's no doubt that it will be possible, albeit
|
||||
as Windows CE requires. But there's no doubt that it will be possible, albeit
|
||||
by mostly cutting down wxWindows 2 API functionality, and adding a few classes here
|
||||
and there. Since wxWindows for 2 produces small binaries (less than 300K for
|
||||
the statically-linked 'minimal' sample), shoehorning wxWindows 2 into a Windows CE device's limited
|
||||
the statically-linked 'minimal' sample), shoehorning wxWindows 2 into a Windows CE device's limited
|
||||
storage should not be a problem.<P>
|
||||
|
||||
<h3>What compilers are supported?</h3>
|
||||
<h3><a name="compilers">What compilers are supported?</a></h3>
|
||||
|
||||
Please see the wxWindows 2 for Windows install.txt file for up-to-date information, but
|
||||
currently the following are known to work:<P>
|
||||
@@ -77,43 +95,42 @@ currently the following are known to work:<P>
|
||||
There is a linking problem with Symantec C++ which I hope someone can help solve.
|
||||
<P>
|
||||
|
||||
<h3>Which is the best compiler to use with wxWindows 2?</h3>
|
||||
<h3><a name="bestcompiler">Which is the best compiler to use with wxWindows 2?</a></h3>
|
||||
|
||||
It's partly a matter of taste, but I (JACS) prefer Visual C++ since the debugger is very
|
||||
good, it's very stable, the documentation is extensive, and it generates small executables.
|
||||
Since project files are plain text, it's easy for me to generate appropriate project files
|
||||
It's partly a matter of taste, but I (JACS) prefer Visual C++ since the debugger is very
|
||||
good, it's very stable, the documentation is extensive, and it generates small executables.
|
||||
Since project files are plain text, it's easy for me to generate appropriate project files
|
||||
for wxWindows samples.<P>
|
||||
|
||||
Borland C++ is fine - and very fast - but it's hard (impossible?) to use the debugger without using project files, and
|
||||
the debugger is nowhere near up to VC++'s quality. The IDE isn't great.<P>
|
||||
Borland C++ is fine - and very fast - but it's hard (impossible?) to use the debugger without using project files, and
|
||||
the debugger is nowhere near up to VC++'s quality. The IDE isn't great.<P>
|
||||
|
||||
C++Builder's power isn't really used with wxWindows since it needs integration with its
|
||||
own class library (VCL). For wxWindows, I've only used it with makefiles, in which case
|
||||
it's almost identical to BC++ 5.0 (the same makefiles can be used).<P>
|
||||
C++Builder's power isn't really used with wxWindows since it needs integration with its
|
||||
own class library (VCL). For wxWindows, I've only used it with makefiles, in which case
|
||||
it's almost identical to BC++ 5.0 (the same makefiles can be used).<P>
|
||||
|
||||
You can't beat Cygwin's price (free), and you can debug adequately using gdb. However, it's
|
||||
You can't beat Cygwin's price (free), and you can debug adequately using gdb. However, it's
|
||||
quite slow to compile since it does not use precompiled headers.<P>
|
||||
|
||||
CodeWarrior is cross-platform - you can debug and generate Windows executables from a Mac, but not
|
||||
the other way around I think - but the IDE is, to my mind, a bit primitive.<P>
|
||||
|
||||
Watcom C++ is a little slow and the debugger is not really up to today's standards.<P>
|
||||
Watcom C++ is a little slow and the debugger is not really up to today's standards.<P>
|
||||
|
||||
<h3>Is Unicode supported?</h3>
|
||||
Among the free compilers the best choice seem to be Borland C++ command line
|
||||
tools and mingw32 (port of gcc to Win32). Both of them are supported by
|
||||
wxWindows.
|
||||
|
||||
Not yet, although there are other internationalisation features.<P>
|
||||
<h3><a name="unicode">Is Unicode supported?</a></h3>
|
||||
|
||||
However, the issues surrounding Unicode support have been looked into so we know
|
||||
what we need to do, and have some header files ready to use containing appropriate
|
||||
type definitions. Just about every file in wxWindows will need changes, due to the
|
||||
pervasive nature of characters and character arrays. Unicode support is needed
|
||||
for the port to Windows CE (see above), and will probably be added in time for version 2.1.<P>
|
||||
Yes, Unicode is fully supported under Windows NT/2000 (Windows 9x don't
|
||||
have Unicode support anyhow).
|
||||
|
||||
<h3>Can you compile wxWindows 2 as a DLL?</h3>
|
||||
<h3><a name="dll">Can you compile wxWindows 2 as a DLL?</a></h3>
|
||||
|
||||
Yes (using the Visual C++ or Borland C++ makefile), but be aware that distributing DLLs is a thorny issue
|
||||
and you may be better off compiling statically-linked applications, unless you're
|
||||
delivering a suite of separate programs, or you're compiling a lot of wxWindows applications
|
||||
and you may be better off compiling statically-linked applications, unless you're
|
||||
delivering a suite of separate programs, or you're compiling a lot of wxWindows applications
|
||||
and have limited hard disk space.<P>
|
||||
|
||||
With a DLL approach, and with different versions and configurations of wxWindows
|
||||
@@ -122,7 +139,7 @@ negating the point of using DLLs. Of course, this is not a problem just associat
|
||||
wxWindows!
|
||||
<P>
|
||||
|
||||
<H3>How can I reduce executable size?</H3>
|
||||
<h3><a name="exesize">How can I reduce executable size?</a></h3>
|
||||
|
||||
You can compile wxWindows as a DLL (see above, VC++/BC++ only at present). You should also
|
||||
compile your programs for release using non-debugging and space-optimisation options, but
|
||||
@@ -132,7 +149,7 @@ Statically-linked wxWindows 2 programs are smaller than wxWindows 1.xx programs,
|
||||
wxWindows 2 has been designed to reduce dependencies between classes, and other
|
||||
techniques. The linker will not include code from the library that is not (directly or
|
||||
indirectly) referenced
|
||||
by your application. So for example, the 'minimal' sample is less than 300KB using VC++ 6.<P>
|
||||
by your application. So for example, the 'minimal' sample is less than 300KB using VC++ 6.<P>
|
||||
|
||||
If you want to distribute really small executables, you can
|
||||
use <a href="http://www.icl.ndirect.co.uk/petite/" target=_top>Petite</a>
|
||||
@@ -140,60 +157,90 @@ by Ian Luck. This nifty utility compresses Windows executables by around 50%, so
|
||||
will shrink to a mere 250KB. With this sort of size, there is reduced incentive to
|
||||
use DLLs.<P>
|
||||
|
||||
<H3>Is wxWindows compatible with MFC?</H3>
|
||||
<H3><a name="mfc">Is wxWindows compatible with MFC?</a></H3>
|
||||
|
||||
There is a sample which demonstrates MFC and wxWindows code co-existing in the same
|
||||
application. However, don't expect to be able to enable wxWindows windows with OLE-2
|
||||
application. However, don't expect to be able to enable wxWindows windows with OLE-2
|
||||
functionality using MFC.<P>
|
||||
|
||||
<H3>Why do I sometimes get bizarre crash problems using VC++ 5/6?</H3>
|
||||
<H3><a name="newerrors">Why my code fails to compile with strange errors about new operator?</a></H3>
|
||||
|
||||
The most common cause of this problem is the memory debugging settings in
|
||||
<tt>wx/msw/setup.h</tt>. You have several choices:
|
||||
|
||||
<ul>
|
||||
<li> Either disable overloading the global operator new completely by
|
||||
setting <tt>wxUSE_GLOBAL_MEMORY_OPERATORS</tt> and
|
||||
<tt>wxUSE_DEBUG_NEW_ALWAYS</tt> to 0 in this file
|
||||
<li> Or leave them on but do <tt>#undef new</tt> after including any
|
||||
wxWindows headers, like this the memory debugging will be still on
|
||||
for wxWindows sources but off for your own code
|
||||
</ul>
|
||||
|
||||
Notice that IMHO the first solution is preferable for VC++ users who can use
|
||||
the <a href="#vcdebug">VC++ CRT memory debugging features</a> instead.
|
||||
|
||||
<H3><a name="mfcport">How do I port MFC applications to wxWindows?</a></H3>
|
||||
|
||||
Set up your interface from scratch using wxWindows (especially wxDesigner --
|
||||
it'll save you a <i>lot</i> of time) and when you have a shell prepared, you can start
|
||||
'pouring in' code from the MFC app, with appropriate
|
||||
modifications. This is the approach I have used, and I found
|
||||
it very satisfactory. A two-step process then - reproduce the bare
|
||||
interface first, then wire it up afterwards. That way you deal
|
||||
with each area of complexity separately. Don't try to think MFC
|
||||
and wxWindows simultaneously from the beginning - it is easier to
|
||||
reproduce the initial UI by looking at the behaviour of the MFC
|
||||
app, not its code.
|
||||
|
||||
<H3><a name="crash">Why do I sometimes get bizarre crash problems using VC++ 5/6?</a></H3>
|
||||
|
||||
Some crash problems can be due to inconsistent compiler
|
||||
options (and of course this isn't limited to wxWindows).
|
||||
options (and of course this isn't limited to wxWindows).
|
||||
If strange/weird/impossible things start to happen please
|
||||
check (dumping IDE project file as makefile and doing text comparison
|
||||
if necessary) that the project settings, especially the list of defined
|
||||
symbols, struct packing, etc. are exactly the same for all items in
|
||||
the project. After this, delete everything (including PCH) and recompile.<P>
|
||||
|
||||
VC++ 5's optimization code seems to be broken and can
|
||||
VC++ 5's optimization code seems to be broken and can
|
||||
cause problems: this can be seen when deleting an object Dialog
|
||||
Editor, in Release mode with optimizations on. If in doubt,
|
||||
switch off optimisations, although this will result in much
|
||||
larger executables. It seems possible that the library can be created with
|
||||
strong optimization, so long as the application is not strongly
|
||||
optimized. For example, in wxWindows project, set to 'Minimum
|
||||
Size'. In Dialog Editor project, set to 'Customize: Favor Small
|
||||
Code' (and no others). This will then work.<P>
|
||||
optimized. For example, in wxWindows project, set to 'Minimum
|
||||
Size'. In Dialog Editor project, set to 'Customize: Favor Small
|
||||
Code' (and no others). This will then work.<P>
|
||||
|
||||
<H3>How are the wxWindows makefiles edited under Windows?</H3>
|
||||
<H3><a name="makefiles">How are the wxWindows makefiles edited under Windows?</a></H3>
|
||||
|
||||
As of wxWindows 2.1, there is a new system written by Vadim Zeitlin, that
|
||||
generates the makefiles from templates using tmake.<P>
|
||||
|
||||
Here are Vadim's notes:<P>
|
||||
Here are Vadim's notes:<P>
|
||||
|
||||
<blockquote>
|
||||
To use these new makefiles, you don't need anything (but see below).
|
||||
To use these new makefiles, you don't need anything (but see below).
|
||||
However, you should NOT modify them because these files will be
|
||||
rewritten when I regenerate them using tmake the next time. So, if
|
||||
you find a problem with any of these makefiles (say, makefile.b32)
|
||||
you'll need to modify the corresponding template (b32.t in this
|
||||
you'll need to modify the corresponding template (b32.t in this
|
||||
example) and regenerate the makefile using tmake.<P>
|
||||
|
||||
tmake can be found at
|
||||
<a href="http://www.troll.no/freebies/tmake.html" target=_new>www.troll.no/freebies/tmake.html</a>.
|
||||
It's a Perl5 program and so it needs Perl (doh). There is a binary for
|
||||
Windows (available from the same page), but I haven't used it, so
|
||||
I don't know if it works as flawlessly as "perl tmake" does (note
|
||||
for people knowing Perl: don't try to run tmake with -w, it won't
|
||||
It's a Perl5 program and so it needs Perl (doh). There is a binary for
|
||||
Windows (available from the same page), but I haven't used it, so
|
||||
I don't know if it works as flawlessly as "perl tmake" does (note
|
||||
for people knowing Perl: don't try to run tmake with -w, it won't
|
||||
do you any good). Using it extremely simple: to regenerate makefile.b32
|
||||
just go to distrib/msw/tmake and type<P>
|
||||
|
||||
<pre>tmake -t b32 wxwin.pro -o ../../src/msw/makefile.b32</pre><P>
|
||||
|
||||
The makefiles are untested - I don't have any of Borland, Watcom or
|
||||
Symantec and I don't have enough diskspace to recompile even with
|
||||
The makefiles are untested - I don't have any of Borland, Watcom or
|
||||
Symantec and I don't have enough diskspace to recompile even with
|
||||
VC6 using makefiles. The new makefiles are as close as possible to the
|
||||
old ones, but not closer: in fact, there has been many strange things
|
||||
(should I say bugs?) in some of makefiles, some files were not compiled
|
||||
@@ -205,13 +252,13 @@ The templates are described in tmake ref manual (1-2 pages of text)
|
||||
and are quite simple. They do contain some Perl code, but my Perl is
|
||||
primitive (very C like) so it should be possible for anybody to make
|
||||
trivial modifications to it (I hope that only trivial modifications
|
||||
will be needed). I've tagged the ol makefiles as MAKEFILES_WITHOUT_TMAKE
|
||||
will be needed). I've tagged the ol makefiles as MAKEFILES_WITHOUT_TMAKE
|
||||
in the cvs, so you can always retrieve them and compare the new ones,
|
||||
this will make it easier to solve the problems you might have.<P>
|
||||
|
||||
Another important file is filelist.txt: it contains the list of all
|
||||
files to be compiled. Some of them are only compiled in 16/32 bit mode.
|
||||
Some other are only compiled with some compilers (others can't compile
|
||||
Some other are only compiled with some compilers (others can't compile
|
||||
them) - all this info is contained in this file.<P>
|
||||
|
||||
So now adding a new file to wxWindows is as easy as modifying filelist.txt
|
||||
@@ -219,10 +266,10 @@ So now adding a new file to wxWindows is as easy as modifying filelist.txt
|
||||
need to modify all files manually any more.<P>
|
||||
|
||||
Finally, there is also a file vc6.t which I use myself: this one
|
||||
generates a project file for VC++ 6.0 (I didn't create vc5.t because
|
||||
I don't need it and can't test it, but it should be trivial to create
|
||||
generates a project file for VC++ 6.0 (I didn't create vc5.t because
|
||||
I don't need it and can't test it, but it should be trivial to create
|
||||
one from vc6.t - probably the only things to change would be the
|
||||
version number in the very beginning and the /Z option - VC5 doesn't
|
||||
version number in the very beginning and the /Z option - VC5 doesn't
|
||||
support edit-and=continue). This is not an officially supported way
|
||||
of building wxWindows (that is, nobody guarantees that it will work),
|
||||
but it has been very useful to me and I hope it will be also for
|
||||
@@ -233,7 +280,7 @@ others. To generate wxWindows.dsp run<P>
|
||||
Then just include this project in any workspace or open it from VC IDE
|
||||
and it will create a new workspace for you.<P>
|
||||
|
||||
If all goes well, I'm planning to create a template file for Makefile.ams
|
||||
If all goes well, I'm planning to create a template file for Makefile.ams
|
||||
under src/gtk and src/motif and also replace all makefiles in the samples
|
||||
subdirectories with the project files from which all the others will be
|
||||
generated. At least it will divide the number of files in samples
|
||||
@@ -242,21 +289,21 @@ directory by 10 (and the number of files to be maintained too).
|
||||
|
||||
<P>
|
||||
|
||||
<H3>How do you use VC++'s memory leak checking instead of that in wxWindows?</H3>
|
||||
<H3><a name="vcdebug">How do you use VC++'s memory leak checking instead of that in wxWindows?</a></H3>
|
||||
|
||||
Vadim Zeitlin:
|
||||
|
||||
<pre>
|
||||
On the VC++ level, it's just the matter of calling _CrtSetDbgFlag() in the very
|
||||
On the VC++ level, it's just the matter of calling _CrtSetDbgFlag() in the very
|
||||
beginning of the program. In wxWindows, this is done automatically when
|
||||
compiling with VC++ in debug mode unless wxUSE_GLOBAL_MEMORY_OPERATORS or
|
||||
__NO_VC_CRTDBG__ are defined - this check is done in wx/msw/msvcrt.h which
|
||||
is included from app.cpp which then calls wxCrtSetDbgFlag() without any
|
||||
#ifdefs.
|
||||
ifdefs.
|
||||
|
||||
This works quite well: at the end of the program, all leaked blocks with their
|
||||
malloc count are shown. This number (malloc count) can be used to determine
|
||||
where exactly the object was allocated: for this it's enough to set the variable
|
||||
where exactly the object was allocated: for this it's enough to set the variable
|
||||
_crtBreakAlloc (look in VC98\crt\srs\dbgheap.c line 326) to this number and
|
||||
a breakpoint will be triggered when the block with this number is allocated.
|
||||
|
||||
@@ -267,6 +314,14 @@ Regards,
|
||||
VZ
|
||||
</pre>
|
||||
|
||||
<P>
|
||||
|
||||
<H3><a name="shortcutproblem">Why are menu hotkeys or shortcuts not working in my application?</a></H3>
|
||||
|
||||
This can happen if you have a child window intercepting EVT_CHAR events and swallowing
|
||||
all keyboard input. You should ensure that event.Skip() is called for all input that
|
||||
isn'used by the event handler.
|
||||
|
||||
|
||||
</font>
|
||||
|
||||
|
@@ -277,9 +277,6 @@ an embedded window.
|
||||
<li><a href="../../samples/sockets">sockets</a>: demonstrates the TCP/IP family of classes.
|
||||
<li><a href="../../samples/splitter">splitter</a>: demonstrates the wxSplitterWindow class.
|
||||
<li><a href="../../samples/statbar">statbar</a>: demonstrates the wxStatusBar class.
|
||||
<li><a href="../../samples/tab">tab</a>: demonstrates the generic tab window class. You should
|
||||
normally use wxNotebook instead, but the generic code is sometimes useful, for example for
|
||||
implementing wxNotebook on platforms with no native support.
|
||||
<li><a href="../../samples/taskbar">taskbar</a>: demonstrates the wxTaskBarIcon class, for
|
||||
adding icons to the system tray. Windows only, but may eventually be implemented for other desktop
|
||||
environments that use this metaphor.
|
||||
|
@@ -1,3 +1,4 @@
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Platforms supported by wxWindows 2.x</title>
|
||||
@@ -21,7 +22,7 @@ Supported Platforms
|
||||
</p>
|
||||
|
||||
You will find below the list of all supported platforms for different ports of wxWindows 2.x (wxMSW/wxGTK/wxMotif ports
|
||||
only). The cross icon in the third column doesn't mean that the platform is not supported, but just that wxWindows hasn't
|
||||
only). The cross icon in the third column doesn't mean that the platform is not supported, but just that wxWindows hasn't
|
||||
been tested on it recently (the table is being updated for wxWindows 2.1.14
|
||||
beta currently).
|
||||
<p>
|
||||
@@ -31,7 +32,7 @@ If you have tested wxWindows on a platform not mentioned here, please tell us ab
|
||||
We would especially like to have information about compiling wxGTK on other Unix variants, such as IRIX, DG-UX,
|
||||
other flavours of BSD, ... Please note that you will generally need GNU make
|
||||
(also known as <tt>gmake</tt>) to compile wxWindows, native make programs
|
||||
often don't work.
|
||||
often don't work.
|
||||
<p>
|
||||
|
||||
<table width=100% border=4 cellpadding=5 cellspacing=0>
|
||||
@@ -49,87 +50,100 @@ often don't work.
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td bgcolor="#FFFFFF" align=center valign=center rowspan=7>Win32 (Windows 9x/NT)</td>
|
||||
<td>Visual C++ 4.2/5.x/6.0</td><td align=center><IMG SRC="icons/yes.gif" ALT=Ok></td><td>VZ, JS</td><td>Project files are provided for all versions except 4.2</td>
|
||||
<tr> <td>Borland C++ 5.0</td><td align=center><IMG SRC="icons/yes.gif" ALT=Ok></td><td><br></td><td>Also works with free command line Borland C++ 5.5</td>
|
||||
<tr> <td>Mingw32</td><td align=center><IMG SRC="icons/yes.gif" ALT=Ok></td><td>GRG, VZ</td><td>Cross compilation from Linux works as well<br>
|
||||
<td bgcolor="#FFFFFF" align=center valign=center rowspan=7>Win32<br>(Win 9x/NT/2K)</td>
|
||||
<td>Visual C++ 4.2/5.x/6.0</td><td align=center><IMG SRC="images/yes.gif" ALT=Ok></td><td>VZ, JS</td><td>Project files are provided for all versions except 4.2</td>
|
||||
<tr> <td>Borland C++ 5.0</td><td align=center><IMG SRC="images/yes.gif" ALT=Ok></td><td><br></td><td>Also works with free command line Borland C++ 5.5</td>
|
||||
<tr> <td>Mingw32</td><td align=center><IMG SRC="images/yes.gif" ALT=Ok></td><td>GRG, VZ</td><td>Cross compilation from Linux works as well<br>
|
||||
Version 2.95.2 recommended, otherwise some (included) patches must be applied<br>
|
||||
Memory debugging code doesn't seem to work well</td>
|
||||
<tr> <td>Cygwin</td><td align=center><IMG SRC="icons/yes.gif" ALT=Ok></td><td>Stephane Junique<br>Andrea Venturoli</td><td>tested under NT 4, cross-compiling for mingw also works</td>
|
||||
<tr> <td>Watcom C++ 10</td><td align=center><IMG SRC="icons/somewhat.gif" ALT=Almost></td><td>JS</td><td>Tested with 10.6: works, but wxImage seems to be broken<br>no support for JPEG, TIFF or OpenGL</td>
|
||||
<tr> <td>Watcom C++ 11</td><td align=center><IMG SRC="icons/yes.gif" ALT=Ok></td><td>Markus Neifer</td><td>Tested with 11.0b under win95</td>
|
||||
<tr> <td>Symantec C++</td><td align=center><IMG SRC="icons/no.gif" ALT=Unknown></td><td><br></td><td><br></td>
|
||||
Memory debugging code doesn't seem to work well</td>
|
||||
<tr> <td>Cygwin</td><td align=center><IMG SRC="images/yes.gif" ALT=Ok></td><td>Stephane Junique<br>Andrea Venturoli</td><td>tested under NT 4, cross-compiling for mingw also works</td>
|
||||
<tr> <td>Watcom C++ 10</td><td align=center><IMG SRC="images/somewhat.gif" ALT=Almost></td><td>JS</td><td>Tested with 10.6: works, but wxImage seems to be broken<br>no support for JPEG, TIFF or OpenGL</td>
|
||||
<tr> <td>Watcom C++ 11</td><td align=center><IMG SRC="images/yes.gif" ALT=Ok></td><td>Markus Neifer</td><td>Tested with 11.0b under win95</td>
|
||||
<tr> <td>Symantec C++</td><td align=center><IMG SRC="images/no.gif" ALT=Unknown></td><td><br></td><td><br></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td bgcolor="#F0F0F0" align=center valign=center rowspan=2>Win16 (Windows 3.1)</td>
|
||||
<td>Visual C++ 1.52</td><td align=center><IMG SRC="icons/somewhat.gif" ALT=Ok></td><td><br></td>
|
||||
<td bgcolor="#F0F0F0" align=center valign=center rowspan=2>Win16<br>(Windows 3.1)</td>
|
||||
<td>Visual C++ 1.52</td><td align=center><IMG SRC="images/somewhat.gif" ALT=Ok></td><td><br></td>
|
||||
<td rowspan=2 valign=center>Some features are missing (OLE related classes, threads, ...)<br>
|
||||
Borland C++ can't cope with ODBC, resources and new wxGrid class</td>
|
||||
<tr> <td>Borland C++ 4.0/5.0</td><td align=center><IMG SRC="icons/somewhat.gif" ALT=Ok></td><td>JS</td>
|
||||
Borland C++ can't cope with ODBC, resources and new wxGrid class</td>
|
||||
<tr> <td>Borland C++ 4.0/5.0</td><td align=center><IMG SRC="images/somewhat.gif" ALT=Ok></td><td>JS</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td bgcolor="#FFFFFF" align=center valign=center rowspan=4>Linux</td>
|
||||
<td>wxGTK with gcc 2.7.2</td><td align=center><IMG SRC="icons/no.gif" ALT=Unknown></td><td><br></td><td>Should work, but nobody uses it any more</td>
|
||||
<tr> <td>wxGTK with egcs 1.1.1</td><td align=center><IMG SRC="icons/yes.gif" ALT=Ok></td><td>VZ, RR</td><td><br></td>
|
||||
<tr> <td>wxGTK with gcc 2.95</td><td align=center><IMG SRC="icons/yes.gif" ALT=Ok></td><td><br></td><td><br></td>
|
||||
<tr> <td>wxMotif with egcs 1.1.1</td><td align=center><IMG SRC="icons/yes.gif" ALT=Ok></td><td><br></td><td>with <a href=http://www.lesstif.org>LessTif</a> 0.87</td>
|
||||
<td bgcolor="#FFFFFF" align=center valign=center rowspan=5>Linux x86</td>
|
||||
<td>wxGTK with gcc 2.7.2</td><td align=center><IMG SRC="images/no.gif" ALT=Unknown></td><td><br></td><td>Should work, but nobody uses it any more</td>
|
||||
<tr> <td>wxGTK with egcs 1.1.1</td><td align=center><IMG SRC="images/yes.gif" ALT=Ok></td><td>VZ, RR</td><td><br></td>
|
||||
<tr> <td>wxGTK with gcc 2.95</td><td align=center><IMG SRC="images/yes.gif" ALT=Ok></td><td><br></td><td><br></td>
|
||||
<tr> <td>wxMotif with egcs 1.1.1</td><td align=center><IMG SRC="images/yes.gif" ALT=Ok></td><td><br></td><td>with <a href="http://www.lesstif.org">LessTif</a> 0.87</td>
|
||||
<tr> <td>wxMotif with gcc 2.95</td><td align=center><IMG SRC="images/yes.gif" ALT=Ok></td><td><br></td><td>with <a href="http://www.openmotif.org">OpenMotif</a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td bgcolor="#F0F0F0" align=center valign=center rowspan=1>FreeBSD</td>
|
||||
<td>wxGTK with gcc</td><td align=center><IMG SRC="icons/yes.gif" ALT=Ok></td><td>VZ</td><td>Limited thread support on older systems</td>
|
||||
<td>wxGTK with gcc</td><td align=center><IMG SRC="images/yes.gif" ALT=Ok></td><td>VZ</td><td>Limited thread support on older systems</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td bgcolor="#FFFFFF" align=center valign=center rowspan=4>Solaris</td>
|
||||
<td>wxMotif with Sun CC 4.2</td><td align=center><IMG SRC="icons/yes.gif" ALT=Ok></td><td>VZ</td><td>Thread support must be disabled on system with not MT-safe X11</td>
|
||||
<tr> <td>wxMotif with gcc</td><td align=center><IMG SRC="icons/yes.gif" ALT=Ok></td><td><br></td><td><br></td>
|
||||
<tr> <td>wxGTK with Sun CC 4.2</td><td align=center><IMG SRC="icons/yes.gif" ALT=Ok></td><td>Shiv Shankar Ramakrishnan</td><td><br></td>
|
||||
<tr> <td>wxGTK with gcc</td><td align=center><IMG SRC="icons/yes.gif" ALT=Ok></td><td><br></td><td><br></td>
|
||||
<td bgcolor="#FFFFFF" align=center valign=center rowspan=5>Solaris</td>
|
||||
<td>wxMotif with Sun CC 4.2</td><td align=center><IMG SRC="images/yes.gif" ALT=Ok></td><td>VZ</td><td>Thread support must be disabled on system with not MT-safe X11</td>
|
||||
<tr> <td>wxMotif with gcc</td><td align=center><IMG SRC="images/yes.gif" ALT=Ok></td><td><br></td><td><br></td>
|
||||
<tr> <td>wxGTK with Sun CC 4.2</td><td align=center><IMG SRC="images/yes.gif" ALT=Ok></td><td>Shiv Shankar Ramakrishnan</td><td><br></td>
|
||||
<tr> <td>wxGTK with gcc</td><td align=center><IMG SRC="images/yes.gif" ALT=Ok></td><td><br></td><td><br></td>
|
||||
<tr> <td>wxGTK with Sun CC 5.0 and 6.1 (Solaris 7 and 8)</td><td align=center><IMG SRC="images/yes.gif" ALT=Ok></td><td>Jiri Mracek</td><td>You have to edit line 2079 in glib.h to fix GTK+ error</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td bgcolor="#F0F0F0" align=center valign=center rowspan=2>AIX</td>
|
||||
<td>wxGTK with AIX CC</td><td align=center><IMG SRC="icons/no.gif" ALT=Unknown></td><td><br></td><td><br></td>
|
||||
<tr> <td>wxMotif with xlC (AIX 4.2)</td><td align=center><IMG SRC="icons/yes.gif" ALT=Ok></td>
|
||||
<td>wxGTK with AIX CC</td><td align=center><IMG SRC="images/no.gif" ALT=Unknown></td><td><br></td><td><br></td>
|
||||
<tr> <td>wxMotif with xlC 3.1.4.0 (AIX 4.2)</td><td align=center><IMG SRC="images/yes.gif" ALT=Ok></td>
|
||||
<td>Bernhard Eck</td>
|
||||
<td>Some problems with OpenGL and native X server</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td bgcolor="#FFFFFF" align=center valign=center rowspan=2>HP-UX</td>
|
||||
<td bgcolor="#FFFFFF" align=center valign=center rowspan=2>HP-UX 10.20</td>
|
||||
<td>wxGTK with HP CC A.10.22<br>or HP aCC B3910B A.01.18
|
||||
</td><td align=center><IMG SRC="icons/yes.gif" ALT=Ok></td><td>Staf Verhaegen</td>
|
||||
</td><td align=center><IMG SRC="images/yes.gif" ALT=Ok></td><td>Staf Verhaegen</td>
|
||||
<td>you need to add <tt>-Aa -D_HPUX_SOURCE</tt> to <tt>CFLAGS</tt></td>
|
||||
<tr> <td>wxGTK with gcc</td><td align=center><IMG SRC="icons/no.gif" ALT=Unknown></td><td><br></td><td><br></td>
|
||||
<tr> <td>wxGTK with gcc</td><td align=center><IMG SRC="images/yes.gif" ALT=Ok></td><td>Julian Albo Garcia</td><td><br></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td bgcolor="#F0F0F0" align=center valign=center rowspan=2>IRIX</td>
|
||||
<td>wxGTK</td><td align=center><IMG SRC="icons/yes.gif" ALT=Ok></td><td><br></td><td>You may need to use <tt>--disable-catch_segvs</tt> if you get compiler<br>error in utilsunx.cpp</td>
|
||||
<tr> <td>wxMotif with MIPSPro 7.30</td><td align=center><IMG SRC="icons/yes.gif" ALT=Ok></td><td>David Marshall</td><td>On IRIX 6.5.6 (Indigo2, 64bit), with SGI Motif 1.2</td>
|
||||
<td bgcolor="#F0F0F0" align=center valign=center rowspan=3>IRIX</td>
|
||||
<td>wxGTK</td><td align=center><IMG SRC="images/yes.gif" ALT=Ok></td><td><br></td><td>You may need to use <tt>--disable-catch_segvs</tt> if you get compiler error in utilsunx.cpp</td>
|
||||
<tr> <td>wxMotif with MIPSPro 7.30</td><td align=center><IMG SRC="images/yes.gif" ALT=Ok></td><td>David Marshall</td><td>On IRIX 6.5.6 (Indigo2, 64bit), with SGI Motif 1.2</td>
|
||||
<tr> <td>wxMotif with "CC -mips3 -n32"</td><td align=center><IMG SRC="images/yes.gif" ALT=Ok></td><td>Ian</td><td>You need to set LD_LIBRARYN32_PATH</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td bgcolor="#FFFFFF" align=center valign=center rowspan=1>SCO UnixWare</td>
|
||||
<td>wxGTK with gcc</td><td align=center><IMG SRC="icons/yes.gif" ALT=Ok></td><td>William Suetholz</td><td>UnixWare 2.1.3 with UnixWare 7 compatibility PTF</td>
|
||||
<td>wxGTK with gcc</td><td align=center><IMG SRC="images/yes.gif" ALT=Ok></td><td>William Suetholz</td><td>UnixWare 2.1.3 with UnixWare 7 compatibility PTF</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td bgcolor="#F0F0F0" align=center valign=center rowspan=1>DEC OSF/1</td>
|
||||
<td>wxGTK with gcc</td><td align=center><IMG SRC="icons/yes.gif" ALT=Ok></td><td>Fabrice Didierjean</td><td>OSF1 4.0 on Dec Alpha<br>
|
||||
<td>wxGTK with gcc</td><td align=center><IMG SRC="images/yes.gif" ALT=Ok></td><td>Fabrice Didierjean</td><td>OSF1 4.0 on Dec Alpha<br>
|
||||
you may need to run configure with <tt>--host=alpha-dec-osf switch</tt></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td bgcolor="#FFFFFF" align=center valign=center rowspan=4>OS/2</td>
|
||||
<td>VisualAge 3.0/4.0</td><td align=center><IMG SRC="icons/no.gif" ALT="Not yet"></td><td>DW</td>
|
||||
<td>VisualAge 3.0/4.0</td><td align=center><IMG SRC="images/no.gif" ALT="Not yet"></td><td>DW</td>
|
||||
<td rowspan=2 valign=center>OS/2 port is work in progress...</td>
|
||||
<tr> <td>EMX</td><td align=center><IMG SRC="icons/no.gif" ALT="Not yet"></td><td>SN</td>
|
||||
<tr> <td>wxGTK with EMX</td><td align=center><IMG SRC="icons/yes.gif" ALT=Ok></td><td>SN</td><td>configure scripts need to be regenerated with OS/2 port of autoconf</td>
|
||||
<tr> <td>wxMotif with EMX</td><td align=center><IMG SRC="icons/yes.gif" ALT=Ok></td><td>SN</td><td>with <a href=http://www.lesstif.org>LessTif</a> 0.89; configure scripts need to be regenerated with OS/2 port of autoconf</td>
|
||||
<tr> <td>EMX</td><td align=center><IMG SRC="images/no.gif" ALT="Not yet"></td><td>SN</td>
|
||||
<tr> <td>wxGTK with EMX</td><td align=center><IMG SRC="images/yes.gif" ALT=Ok></td><td>SN</td><td>configure scripts need to be regenerated with OS/2 port of autoconf</td>
|
||||
<tr> <td>wxMotif with EMX</td><td align=center><IMG SRC="images/yes.gif" ALT=Ok></td><td>SN</td><td>with <a href="http://www.lesstif.org">LessTif</a> 0.89; configure scripts need to be regenerated with OS/2 port of autoconf</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td bgcolor="#F0F0F0" align=center valign=center rowspan=1>OpenVMS</td>
|
||||
<td>wxGTK with Compaq-C++ V6.2 (OpenVMS Alpha 7.3)</td><td align=center><IMG SRC="images/yes.gif" ALT=Ok></td><td>Jouk Jansen</td><td><br></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td bgcolor="#FFFFFF" align=center valign=center rowspan=1>Linux S/390</td>
|
||||
<td>wxGTK with gcc 2.95.2</td><td align=center><IMG SRC="images/yes.gif" ALT=Ok></td><td>VZ</td><td>2.3.1+ only</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
@@ -11,14 +11,14 @@
|
||||
|
||||
\section{\class{wxToggleButton}}\label{wxtogglebutton}
|
||||
|
||||
wxToggleButton is a button which stays pressed when clicked by the user. In
|
||||
other words, it is more similar to \helpref{wxCheckBox}{wxcheckbox} in
|
||||
wxToggleButton is a button that stays pressed when clicked by the user. In
|
||||
other words, it is similar to \helpref{wxCheckBox}{wxcheckbox} in
|
||||
functionality but looks like a \helpref{wxButton}{wxbutton}.
|
||||
|
||||
You can see wxToggleButton in action in the sixth page of the
|
||||
\helpref{controls}{samplecontrols} sample.
|
||||
|
||||
{\bf NB: } This class is only available under wxMSW and wxGTK currently.
|
||||
{\bf NB:} This class is only available under wxMSW and wxGTK currently.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
@@ -115,8 +115,8 @@ Returns {\tt TRUE} if it is pressed, {\tt FALSE} otherwise.
|
||||
|
||||
\func{void}{SetValue}{\param{const bool}{ state}}
|
||||
|
||||
Sets the toggle button to the given state. This does not cause a
|
||||
{\tt EVT\_TOGGLEBUTTON} event to get emitted.
|
||||
Sets the toggle button to the given state. This does not cause a
|
||||
{\tt EVT\_TOGGLEBUTTON} event to be emitted.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
|
@@ -66,16 +66,16 @@ class WXDLLEXPORT wxDisplayModeInfo
|
||||
{
|
||||
public:
|
||||
wxDisplayModeInfo() : m_ok(FALSE) {}
|
||||
wxDisplayModeInfo(const wxSize& size, unsigned depth)
|
||||
: m_size(size), m_depth(depth), m_ok(TRUE) {}
|
||||
wxDisplayModeInfo(unsigned width, unsigned height, unsigned depth)
|
||||
: m_width(width), m_height(height), m_depth(depth), m_ok(TRUE) {}
|
||||
|
||||
const wxSize& GetScreenSize() const { return m_size; }
|
||||
unsigned GetWidth() const { return m_width; }
|
||||
unsigned GetHeight() const { return m_height; }
|
||||
unsigned GetDepth() const { return m_depth; }
|
||||
bool IsOk() const { return m_ok; }
|
||||
|
||||
private:
|
||||
wxSize m_size;
|
||||
unsigned m_depth;
|
||||
unsigned m_width, m_height, m_depth;
|
||||
bool m_ok;
|
||||
};
|
||||
#endif
|
||||
|
@@ -372,9 +372,6 @@ public:
|
||||
bool m_isCommandEvent;
|
||||
|
||||
private:
|
||||
// normally copying the events is a bad idea, so disable this
|
||||
wxEvent& operator=(const wxEvent&);
|
||||
|
||||
DECLARE_ABSTRACT_CLASS(wxEvent)
|
||||
};
|
||||
|
||||
|
@@ -19,6 +19,7 @@
|
||||
#include "wx/stubs/glcanvas.h"
|
||||
#endif
|
||||
|
||||
#include "wx/app.h"
|
||||
class WXDLLEXPORT wxGLApp : public wxApp
|
||||
{
|
||||
public:
|
||||
|
@@ -159,7 +159,7 @@ public:
|
||||
// the layouting functions have to be called later on
|
||||
// (i.e. in idle time, implemented in OnInternalIdle() ).
|
||||
void GtkUpdateSize() { m_sizeSet = FALSE; }
|
||||
|
||||
|
||||
// position and size of the window
|
||||
int m_x, m_y;
|
||||
int m_width, m_height;
|
||||
|
@@ -159,7 +159,7 @@ public:
|
||||
// the layouting functions have to be called later on
|
||||
// (i.e. in idle time, implemented in OnInternalIdle() ).
|
||||
void GtkUpdateSize() { m_sizeSet = FALSE; }
|
||||
|
||||
|
||||
// position and size of the window
|
||||
int m_x, m_y;
|
||||
int m_width, m_height;
|
||||
|
@@ -151,9 +151,14 @@ public:
|
||||
unsigned char GetGreen( int x, int y ) const;
|
||||
unsigned char GetBlue( int x, int y ) const;
|
||||
|
||||
// used to manipulate the icons while extracting from .ico files
|
||||
bool GetUnusedColour( unsigned char *r, unsigned char *g, unsigned char *b );
|
||||
bool ApplyMask( const wxImage & mask );
|
||||
// find first colour that is not used in the image and has higher
|
||||
// RGB values than <startR,startG,startB>
|
||||
bool FindFirstUnusedColour( unsigned char *r, unsigned char *g, unsigned char *b,
|
||||
unsigned char startR = 1, unsigned char startG = 0,
|
||||
unsigned char startB = 0 );
|
||||
// Set image's mask to the area of 'mask' that has <r,g,b> colour
|
||||
bool SetMaskFromImage(const wxImage & mask,
|
||||
unsigned char mr, unsigned char mg, unsigned char mb);
|
||||
|
||||
static bool CanRead( const wxString& name );
|
||||
virtual bool LoadFile( const wxString& name, long type = wxBITMAP_TYPE_ANY );
|
||||
|
@@ -359,21 +359,18 @@ private:
|
||||
class WXDLLEXPORT wxListEvent : public wxNotifyEvent
|
||||
{
|
||||
public:
|
||||
wxListEvent(wxEventType commandType = wxEVT_NULL, int id = 0);
|
||||
|
||||
int m_code;
|
||||
long m_oldItemIndex; // only for wxEVT_COMMAND_LIST_CACHE_HINT
|
||||
long m_itemIndex;
|
||||
int m_col;
|
||||
bool m_cancelled;
|
||||
wxPoint m_pointDrag;
|
||||
|
||||
wxListItem m_item;
|
||||
wxListEvent(wxEventType commandType = wxEVT_NULL, int id = 0)
|
||||
: wxNotifyEvent(commandType, id)
|
||||
{
|
||||
m_code = 0;
|
||||
m_itemIndex =
|
||||
m_oldItemIndex = 0;
|
||||
m_col = 0;
|
||||
}
|
||||
|
||||
int GetCode() const { return m_code; }
|
||||
long GetIndex() const { return m_itemIndex; }
|
||||
int GetColumn() const { return m_col; }
|
||||
bool Cancelled() const { return m_cancelled; }
|
||||
wxPoint GetPoint() const { return m_pointDrag; }
|
||||
const wxString& GetLabel() const { return m_item.m_text; }
|
||||
const wxString& GetText() const { return m_item.m_text; }
|
||||
@@ -392,7 +389,16 @@ public:
|
||||
long GetOldItem() const { return 0; }
|
||||
#endif // WXWIN_COMPATIBILITY_2_2
|
||||
|
||||
void CopyObject(wxObject& object_dest) const;
|
||||
virtual wxEvent *Clone() const { return new wxListEvent(*this); }
|
||||
|
||||
//protected: -- not for backwards compatibility
|
||||
int m_code;
|
||||
long m_oldItemIndex; // only for wxEVT_COMMAND_LIST_CACHE_HINT
|
||||
long m_itemIndex;
|
||||
int m_col;
|
||||
wxPoint m_pointDrag;
|
||||
|
||||
wxListItem m_item;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxListEvent)
|
||||
|
@@ -75,7 +75,7 @@ private:
|
||||
class WXDLLEXPORT wxBitmap: public wxBitmapBase
|
||||
{
|
||||
public:
|
||||
wxBitmap();
|
||||
wxBitmap() {}
|
||||
wxBitmap(int width, int height, int depth = -1);
|
||||
wxBitmap(const char bits[], int width, int height, int depth = 1);
|
||||
wxBitmap(const char **bits) { CreateFromXpm(bits); }
|
||||
@@ -83,7 +83,7 @@ public:
|
||||
wxBitmap(const wxBitmap& bmp);
|
||||
wxBitmap(const wxString &filename, wxBitmapType type = wxBITMAP_TYPE_RESOURCE);
|
||||
wxBitmap(const wxImage& image, int depth = -1);
|
||||
~wxBitmap();
|
||||
~wxBitmap() {}
|
||||
wxBitmap& operator = (const wxBitmap& bmp);
|
||||
bool operator == (const wxBitmap& bmp) const;
|
||||
bool operator != (const wxBitmap& bmp) const;
|
||||
|
@@ -35,11 +35,11 @@ class WXDLLEXPORT wxBrush;
|
||||
class WXDLLEXPORT wxBrush: public wxGDIObject
|
||||
{
|
||||
public:
|
||||
wxBrush();
|
||||
wxBrush() {}
|
||||
wxBrush(const wxColour &colour, int style);
|
||||
wxBrush(const wxBitmap &stippleBitmap);
|
||||
wxBrush(const wxBrush &brush);
|
||||
~wxBrush();
|
||||
~wxBrush() {}
|
||||
wxBrush& operator = (const wxBrush& brush);
|
||||
bool operator == (const wxBrush& brush) const;
|
||||
bool operator != (const wxBrush& brush) const;
|
||||
|
@@ -67,7 +67,7 @@ public:
|
||||
|
||||
bool Create(const wxNativeFontInfo& fontinfo);
|
||||
|
||||
~wxFont();
|
||||
~wxFont() {}
|
||||
|
||||
// assignment
|
||||
wxFont& operator=(const wxFont& font);
|
||||
@@ -98,7 +98,7 @@ public:
|
||||
|
||||
protected:
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
void Init() {}
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxFont)
|
||||
|
@@ -35,11 +35,11 @@ class WXDLLEXPORT wxPen;
|
||||
class WXDLLEXPORT wxPen: public wxGDIObject
|
||||
{
|
||||
public:
|
||||
wxPen();
|
||||
wxPen() {}
|
||||
wxPen(const wxColour &colour, int width, int style);
|
||||
wxPen(const wxBitmap& stipple, int width);
|
||||
wxPen(const wxPen& pen);
|
||||
~wxPen();
|
||||
~wxPen() {}
|
||||
wxPen& operator = (const wxPen& pen);
|
||||
bool operator == (const wxPen& pen) const;
|
||||
bool operator != (const wxPen& pen) const;
|
||||
|
@@ -323,10 +323,11 @@ public:
|
||||
|
||||
class WXDLLEXPORT wxSocketEvent : public wxEvent
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxSocketEvent)
|
||||
|
||||
public:
|
||||
wxSocketEvent(int id = 0);
|
||||
wxSocketEvent(int id = 0)
|
||||
: wxEvent(id, wxEVT_SOCKET)
|
||||
{
|
||||
}
|
||||
|
||||
wxSocketNotify GetSocketEvent() const { return m_event; }
|
||||
wxSocketBase *GetSocket() const { return (wxSocketBase *) GetEventObject(); }
|
||||
@@ -338,11 +339,13 @@ public:
|
||||
wxSocketBase *Socket() const { return (wxSocketBase *) GetEventObject(); }
|
||||
#endif // WXWIN_COMPATIBILITY_2
|
||||
|
||||
void CopyObject(wxObject& object_dest) const;
|
||||
virtual wxEvent *Clone() const { return new wxSocketEvent(*this); }
|
||||
|
||||
public:
|
||||
wxSocketNotify m_event;
|
||||
void *m_clientData;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxSocketEvent)
|
||||
};
|
||||
|
||||
|
||||
|
@@ -43,8 +43,6 @@ public:
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxChoiceNameStr);
|
||||
|
||||
void *GetClientData(int n) const { return wxItemContainer::GetClientData(n); }
|
||||
|
||||
private:
|
||||
void OnComboBox(wxCommandEvent &event);
|
||||
|
||||
|
@@ -273,6 +273,52 @@ public:
|
||||
|
||||
void SetStringSelection(const wxString& s) { }
|
||||
|
||||
// we have to redefine these functions here to avoid ambiguities in classes
|
||||
// deriving from us which would arise otherwise because both base classses
|
||||
// have the methods with the same names - hopefully, a smart compiler can
|
||||
// optimize away these simple inline wrappers so we don't suffer much from
|
||||
// this
|
||||
|
||||
void SetClientData(void *data)
|
||||
{
|
||||
wxControl::SetClientData(data);
|
||||
}
|
||||
|
||||
void *GetClientData() const
|
||||
{
|
||||
return wxControl::GetClientData();
|
||||
}
|
||||
|
||||
void SetClientObject(wxClientData *data)
|
||||
{
|
||||
wxControl::SetClientObject(data);
|
||||
}
|
||||
|
||||
wxClientData *GetClientObject() const
|
||||
{
|
||||
return wxControl::GetClientObject();
|
||||
}
|
||||
|
||||
void SetClientData(int n, void* clientData)
|
||||
{
|
||||
wxItemContainer::SetClientData(n, clientData);
|
||||
}
|
||||
|
||||
void* GetClientData(int n) const
|
||||
{
|
||||
return wxItemContainer::GetClientData(n);
|
||||
}
|
||||
|
||||
void SetClientObject(int n, wxClientData* clientData)
|
||||
{
|
||||
wxItemContainer::SetClientObject(n, clientData);
|
||||
}
|
||||
|
||||
wxClientData* GetClientObject(int n) const
|
||||
{
|
||||
return wxItemContainer::GetClientObject(n);
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual int DoAppend(const wxString& item);
|
||||
virtual void DoSetItemClientData(int n, void* clientData);
|
||||
|
@@ -63,10 +63,10 @@ public:
|
||||
// cases - override this method if you want to create the bitmap to be used
|
||||
// dynamically or to do something even more fancy. It's ok to return
|
||||
// wxNullBitmap from here - the default one will be used then.
|
||||
virtual wxBitmap GetBitmap() const { return m_PageBitmap; }
|
||||
virtual wxBitmap GetBitmap() const { return m_bitmap; }
|
||||
|
||||
protected:
|
||||
wxBitmap m_PageBitmap;
|
||||
wxBitmap m_bitmap;
|
||||
|
||||
private:
|
||||
DECLARE_ABSTRACT_CLASS(wxWizardPage)
|
||||
|
1902
locale/cs.po
1902
locale/cs.po
File diff suppressed because it is too large
Load Diff
1824
locale/da.po
1824
locale/da.po
File diff suppressed because it is too large
Load Diff
1889
locale/de.po
1889
locale/de.po
File diff suppressed because it is too large
Load Diff
3580
locale/es.po
Normal file
3580
locale/es.po
Normal file
File diff suppressed because it is too large
Load Diff
1872
locale/fi.po
1872
locale/fi.po
File diff suppressed because it is too large
Load Diff
2487
locale/fr.po
2487
locale/fr.po
File diff suppressed because it is too large
Load Diff
1879
locale/it.po
1879
locale/it.po
File diff suppressed because it is too large
Load Diff
1883
locale/nl.po
1883
locale/nl.po
File diff suppressed because it is too large
Load Diff
1940
locale/ru.po
1940
locale/ru.po
File diff suppressed because it is too large
Load Diff
4303
locale/sl.po
Normal file
4303
locale/sl.po
Normal file
File diff suppressed because it is too large
Load Diff
1881
locale/sv.po
1881
locale/sv.po
File diff suppressed because it is too large
Load Diff
1756
locale/wxstd.po
1756
locale/wxstd.po
File diff suppressed because it is too large
Load Diff
3462
locale/zh.po
Normal file
3462
locale/zh.po
Normal file
File diff suppressed because it is too large
Load Diff
@@ -291,8 +291,8 @@ private:
|
||||
// other
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
static void SetControlClientData(const wxChar *name,
|
||||
wxControlWithItems *control);
|
||||
static void SetListboxClientData(const wxChar *name, wxListBox *control);
|
||||
static void SetChoiceClientData(const wxChar *name, wxChoice *control);
|
||||
|
||||
IMPLEMENT_APP(MyApp)
|
||||
|
||||
@@ -566,8 +566,8 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h )
|
||||
wxPoint(10,90), wxSize(120,70),
|
||||
5, choices, wxLB_SORT );
|
||||
|
||||
SetControlClientData(wxT("listbox"), m_listbox);
|
||||
SetControlClientData(wxT("listbox"), m_listboxSorted);
|
||||
SetListboxClientData(wxT("listbox"), m_listbox);
|
||||
SetListboxClientData(wxT("listbox"), m_listboxSorted);
|
||||
|
||||
m_listbox->SetCursor(*wxCROSS_CURSOR);
|
||||
#if wxUSE_TOOLTIPS
|
||||
@@ -605,8 +605,8 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h )
|
||||
m_choiceSorted = new wxChoice( panel, ID_CHOICE_SORTED, wxPoint(10,70), wxSize(120,-1),
|
||||
5, choices, wxCB_SORT );
|
||||
|
||||
SetControlClientData(wxT("choice"), m_choice);
|
||||
SetControlClientData(wxT("choice"), m_choiceSorted);
|
||||
SetChoiceClientData(wxT("choice"), m_choice);
|
||||
SetChoiceClientData(wxT("choice"), m_choiceSorted);
|
||||
|
||||
m_choice->SetSelection(2);
|
||||
m_choice->SetBackgroundColour( "red" );
|
||||
@@ -1515,8 +1515,20 @@ void MyComboBox::OnKeyUp(wxKeyEvent& event)
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
static void SetControlClientData(const wxChar *name,
|
||||
wxControlWithItems *control)
|
||||
static void SetListboxClientData(const wxChar *name, wxListBox *control)
|
||||
{
|
||||
size_t count = control->GetCount();
|
||||
for ( size_t n = 0; n < count; n++ )
|
||||
{
|
||||
wxString s;
|
||||
s.Printf(wxT("%s client data for '%s'"),
|
||||
name, control->GetString(n).c_str());
|
||||
|
||||
control->SetClientObject(n, new wxStringClientData(s));
|
||||
}
|
||||
}
|
||||
|
||||
static void SetChoiceClientData(const wxChar *name, wxChoice *control)
|
||||
{
|
||||
size_t count = control->GetCount();
|
||||
for ( size_t n = 0; n < count; n++ )
|
||||
|
@@ -66,8 +66,35 @@ private:
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
|
||||
const int nChoices = 8 ;
|
||||
static const wxString bppchoices[nChoices] =
|
||||
{
|
||||
"1 bpp color",
|
||||
"1 bpp B&W",
|
||||
"4 bpp color",
|
||||
"8 bpp color",
|
||||
"8 bpp greyscale",
|
||||
"8 bpp red",
|
||||
"8 bpp own palette",
|
||||
"24 bpp"
|
||||
};
|
||||
|
||||
static const int bppvalues[nChoices] =
|
||||
{
|
||||
wxBMP_1BPP,
|
||||
wxBMP_1BPP_BW,
|
||||
wxBMP_4BPP,
|
||||
wxBMP_8BPP,
|
||||
wxBMP_8BPP_GREY,
|
||||
wxBMP_8BPP_RED,
|
||||
wxBMP_8BPP_PALETTE,
|
||||
wxBMP_24BPP
|
||||
};
|
||||
|
||||
// MyFrame
|
||||
|
||||
|
||||
class MyFrame: public wxFrame
|
||||
{
|
||||
public:
|
||||
@@ -106,33 +133,9 @@ public:
|
||||
{
|
||||
wxImage image(m_bitmap);
|
||||
|
||||
static const wxString bppchoices[8] =
|
||||
{
|
||||
"1 bpp color",
|
||||
"1 bpp B&W",
|
||||
"4 bpp color",
|
||||
"8 bpp color",
|
||||
"8 bpp greyscale",
|
||||
"8 bpp red",
|
||||
"8 bpp own palette",
|
||||
"24 bpp"
|
||||
};
|
||||
|
||||
static const int bppvalues[WXSIZEOF(bppchoices)] =
|
||||
{
|
||||
wxBMP_1BPP,
|
||||
wxBMP_1BPP_BW,
|
||||
wxBMP_4BPP,
|
||||
wxBMP_8BPP,
|
||||
wxBMP_8BPP_GREY,
|
||||
wxBMP_8BPP_RED,
|
||||
wxBMP_8BPP_PALETTE,
|
||||
wxBMP_24BPP
|
||||
};
|
||||
|
||||
int bppselection = wxGetSingleChoiceIndex("Set BMP BPP",
|
||||
"Set BMP BPP",
|
||||
WXSIZEOF(bppchoices),
|
||||
nChoices,
|
||||
bppchoices,
|
||||
this);
|
||||
if ( bppselection == -1 )
|
||||
|
@@ -760,7 +760,8 @@ void MyListCtrl::OnListKeyDown(wxListEvent& event)
|
||||
{
|
||||
switch ( event.GetCode() )
|
||||
{
|
||||
case 'c':
|
||||
case 'c': // colorize
|
||||
case 'C':
|
||||
{
|
||||
wxListItem info;
|
||||
info.m_itemId = event.GetIndex();
|
||||
@@ -772,10 +773,29 @@ void MyListCtrl::OnListKeyDown(wxListEvent& event)
|
||||
info.SetTextColour(*wxCYAN);
|
||||
|
||||
SetItem(info);
|
||||
|
||||
RefreshItem(info.m_itemId);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 'n': // next
|
||||
case 'N':
|
||||
{
|
||||
long item = GetNextItem(-1,
|
||||
wxLIST_NEXT_ALL, wxLIST_STATE_FOCUSED);
|
||||
if ( item++ == GetItemCount() - 1 )
|
||||
{
|
||||
item = 0;
|
||||
}
|
||||
|
||||
wxLogMessage(_T("Focusing item %ld"), item);
|
||||
|
||||
SetItemState(item, wxLIST_STATE_FOCUSED, wxLIST_STATE_FOCUSED);
|
||||
EnsureVisible(item);
|
||||
}
|
||||
break;
|
||||
|
||||
case WXK_DELETE:
|
||||
{
|
||||
long item = GetNextItem(-1,
|
||||
@@ -818,7 +838,18 @@ void MyListCtrl::OnChar(wxKeyEvent& event)
|
||||
{
|
||||
wxLogMessage(_T("Got char event."));
|
||||
|
||||
event.Skip();
|
||||
switch ( event.GetKeyCode() )
|
||||
{
|
||||
case 'n':
|
||||
case 'N':
|
||||
case 'c':
|
||||
case 'C':
|
||||
// these are the keys we process ourselves
|
||||
break;
|
||||
|
||||
default:
|
||||
event.Skip();
|
||||
}
|
||||
}
|
||||
|
||||
void MyListCtrl::LogEvent(const wxListEvent& event, const wxChar *eventName)
|
||||
|
@@ -25,7 +25,7 @@
|
||||
#include "wx/wx.h"
|
||||
#endif
|
||||
|
||||
#include "wx/date.h"
|
||||
#include "wx/datetime.h"
|
||||
|
||||
#if defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXMAC__)
|
||||
#include "mondrian.xpm"
|
||||
@@ -86,7 +86,10 @@ bool MyApp::OnInit(void)
|
||||
wxDebugContext::SetCheckpoint();
|
||||
|
||||
wxString *thing = new wxString;
|
||||
wxDate* date = new wxDate;
|
||||
|
||||
#if wxUSE_DATETIME
|
||||
wxDateTime* date = new wxDateTime;
|
||||
#endif // wxUSE_DATETIME
|
||||
|
||||
// non-object allocation
|
||||
char *ordinaryNonObject = new char[1000];
|
||||
|
@@ -25,12 +25,12 @@
|
||||
#endif
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include <wx/app.h>
|
||||
#include <wx/frame.h>
|
||||
#include <wx/menu.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/log.h>
|
||||
#include <wx/textctrl.h>
|
||||
#include "wx/app.h"
|
||||
#include "wx/frame.h"
|
||||
#include "wx/menu.h"
|
||||
#include "wx/msgdlg.h"
|
||||
#include "wx/log.h"
|
||||
#include "wx/textctrl.h"
|
||||
#endif
|
||||
|
||||
#if !wxUSE_MENUS
|
||||
|
@@ -35,7 +35,7 @@
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// the application icon (under Windows and OS/2 it is in resources)
|
||||
#if defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXMAC__)
|
||||
#if defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXMAC__) || defined(__WXMGL__)
|
||||
#include "mondrian.xpm"
|
||||
#endif
|
||||
|
||||
|
@@ -187,7 +187,7 @@ void MyApp::PropertyListTest(bool useDialog)
|
||||
|
||||
if (useDialog)
|
||||
{
|
||||
view->ShowView(sheet, propDialog);
|
||||
view->ShowView(sheet, (wxPanel *)propDialog);
|
||||
propDialog->Centre(wxBOTH);
|
||||
propDialog->Show(TRUE);
|
||||
}
|
||||
@@ -233,7 +233,7 @@ void MyApp::PropertyFormTest(bool useDialog)
|
||||
m_childWindow = propFrame;
|
||||
}
|
||||
|
||||
wxPanel *panel = propDialog ? propDialog : propFrame->GetPropertyPanel();
|
||||
wxWindow *panel = propDialog ? propDialog : propFrame->GetPropertyPanel();
|
||||
wxLayoutConstraints* c;
|
||||
|
||||
#if 0
|
||||
|
@@ -691,7 +691,7 @@ void MyTextCtrl::OnKeyDown(wxKeyEvent& event)
|
||||
long from, to;
|
||||
GetSelection(&from, &to);
|
||||
|
||||
wxString sel = GetSelection();
|
||||
wxString sel = GetStringSelection();
|
||||
|
||||
wxLogMessage(_T("Selection: from %ld to %ld."), from, to);
|
||||
wxLogMessage(_T("Selection = '%s' (len = %u)"),
|
||||
|
@@ -58,13 +58,15 @@ IMPLEMENT_APP (MyApp)
|
||||
IMPLEMENT_DYNAMIC_CLASS (MyApp, wxApp)
|
||||
|
||||
BEGIN_EVENT_TABLE(MyApp, wxApp)
|
||||
#if wxUSE_TIMEDATE
|
||||
EVT_MENU(TYPES_DATE, MyApp::DoDateDemo)
|
||||
EVT_MENU(TYPES_TIME, MyApp::DoTimeDemo)
|
||||
#endif // wxUSE_TIMEDATE
|
||||
EVT_MENU(TYPES_VARIANT, MyApp::DoVariantDemo)
|
||||
EVT_MENU(TYPES_BYTEORDER, MyApp::DoByteOrderDemo)
|
||||
#if wxUSE_UNICODE
|
||||
EVT_MENU(TYPES_UNICODE, MyApp::DoUnicodeDemo)
|
||||
#endif
|
||||
#endif // wxUSE_UNICODE
|
||||
EVT_MENU(TYPES_STREAM, MyApp::DoStreamDemo)
|
||||
EVT_MENU(TYPES_STREAM2, MyApp::DoStreamDemo2)
|
||||
EVT_MENU(TYPES_STREAM3, MyApp::DoStreamDemo3)
|
||||
@@ -90,13 +92,15 @@ bool MyApp::OnInit()
|
||||
file_menu->Append(TYPES_QUIT, "E&xit\tAlt-X");
|
||||
|
||||
wxMenu *test_menu = new wxMenu;
|
||||
#if wxUSE_TIMEDATE
|
||||
test_menu->Append(TYPES_DATE, "&Date test");
|
||||
#endif // wxUSE_TIMEDATE
|
||||
test_menu->Append(TYPES_TIME, "&Time test");
|
||||
test_menu->Append(TYPES_VARIANT, "&Variant test");
|
||||
test_menu->Append(TYPES_BYTEORDER, "&Byteorder test");
|
||||
#if wxUSE_UNICODE
|
||||
test_menu->Append(TYPES_UNICODE, "&Unicode test");
|
||||
#endif
|
||||
#endif // wxUSE_UNICODE
|
||||
test_menu->Append(TYPES_STREAM, "&Stream test");
|
||||
test_menu->Append(TYPES_STREAM2, "&Stream seek test");
|
||||
test_menu->Append(TYPES_STREAM3, "&Stream error test");
|
||||
@@ -230,7 +234,7 @@ void MyApp::DoStreamDemo(wxCommandEvent& WXUNUSED(event))
|
||||
file_output.SeekO( 0 );
|
||||
wxDataOutputStream data_output( buf_output );
|
||||
|
||||
wxInt16 i16 = (short)0xFFFF;
|
||||
wxInt16 i16 = (unsigned short)0xFFFF;
|
||||
tmp.Printf( _T("Signed int16: %d\n"), (int)i16 );
|
||||
textCtrl.WriteText( tmp );
|
||||
data_output.Write16( i16 );
|
||||
@@ -847,6 +851,8 @@ void MyApp::DoByteOrderDemo(wxCommandEvent& WXUNUSED(event))
|
||||
textCtrl.WriteText( text );
|
||||
}
|
||||
|
||||
#if wxUSE_TIMEDATE
|
||||
|
||||
void MyApp::DoTimeDemo(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
wxTextCtrl& textCtrl = * GetTextCtrl();
|
||||
@@ -998,6 +1004,8 @@ void MyApp::DoDateDemo(wxCommandEvent& WXUNUSED(event))
|
||||
textCtrl << "The last date of this year is " << v4.GetYearEnd() << "\n";
|
||||
}
|
||||
|
||||
#endif // wxUSE_TIMEDATE
|
||||
|
||||
void MyApp::DoVariantDemo(wxCommandEvent& WXUNUSED(event) )
|
||||
{
|
||||
wxTextCtrl& textCtrl = * GetTextCtrl();
|
||||
|
@@ -25,7 +25,9 @@ public:
|
||||
bool OnInit();
|
||||
int OnExit() { delete m_mimeDatabase; return wxApp::OnExit(); }
|
||||
|
||||
#if wxUSE_TIMEDATE
|
||||
void DoDateDemo(wxCommandEvent& event);
|
||||
#endif // wxUSE_TIMEDATE
|
||||
void DoTimeDemo(wxCommandEvent& event);
|
||||
void DoVariantDemo(wxCommandEvent& event);
|
||||
void DoByteOrderDemo(wxCommandEvent& event);
|
||||
@@ -36,7 +38,7 @@ public:
|
||||
void DoStreamDemo5(wxCommandEvent& event);
|
||||
#if wxUSE_UNICODE
|
||||
void DoUnicodeDemo(wxCommandEvent& event);
|
||||
#endif
|
||||
#endif // wxUSE_UNICODE
|
||||
void DoMIMEDemo(wxCommandEvent& event);
|
||||
|
||||
wxTextCtrl* GetTextCtrl() const { return m_textCtrl; }
|
||||
|
@@ -39,6 +39,7 @@
|
||||
|
||||
#ifndef __WXMSW__
|
||||
#include "wiztest.xpm"
|
||||
#include "wiztest2.xpm"
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -53,18 +54,6 @@ enum
|
||||
Wizard_About = 1000
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// ressources
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#ifdef __WXMSW__
|
||||
#define BMP_WIZARD_1 wxBitmap("wiztest.bmp", wxBITMAP_TYPE_BMP)
|
||||
#define BMP_WIZARD_2 wxBitmap("wiztest2.bmp", wxBITMAP_TYPE_BMP)
|
||||
#else
|
||||
#define BMP_WIZARD_1 wxBitmap(wizimage)
|
||||
#define BMP_WIZARD_2 wxBitmap(wizimage)
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// private classes
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -109,7 +98,7 @@ class wxValidationPage : public wxWizardPageSimple
|
||||
public:
|
||||
wxValidationPage(wxWizard *parent) : wxWizardPageSimple(parent)
|
||||
{
|
||||
m_bitmap = BMP_WIZARD_2;
|
||||
m_bitmap = wxBITMAP(wiztest2);
|
||||
|
||||
m_checkbox = new wxCheckBox(this, -1, "&Check me");
|
||||
}
|
||||
@@ -315,7 +304,7 @@ void MyFrame::OnRunWizard(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
wxWizard *wizard = new wxWizard(this, -1,
|
||||
"Absolutely Useless Wizard",
|
||||
BMP_WIZARD_1);
|
||||
wxBITMAP(wiztest));
|
||||
|
||||
// a wizard page may be either an object of predefined class
|
||||
wxWizardPageSimple *page1 = new wxWizardPageSimple(wizard);
|
||||
|
@@ -1,5 +1,4 @@
|
||||
#include "wx/msw/wx.rc"
|
||||
|
||||
#define MINIMAL_QUIT 1
|
||||
#define MINIMAL_ABOUT 102
|
||||
|
||||
wiztest BITMAP wiztest.bmp
|
||||
wiztest2 BITMAP wiztest2.bmp
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/* XPM */
|
||||
static char *wizimage[] = {
|
||||
static char *wiztest_xpm[] = {
|
||||
/* columns rows colors chars-per-pixel */
|
||||
"165 371 256 2",
|
||||
" c Gray0",
|
||||
|
282
samples/wizard/wiztest2.xpm
Normal file
282
samples/wizard/wiztest2.xpm
Normal file
@@ -0,0 +1,282 @@
|
||||
/* XPM */
|
||||
static char *wiztest2_xpm[] = {
|
||||
/* columns rows colors chars-per-pixel */
|
||||
"116 260 16 1",
|
||||
" c Gray100",
|
||||
". c Blue",
|
||||
"X c #000084848484",
|
||||
"o c #848484848484",
|
||||
"O c #c6c6c6c6c6c6",
|
||||
"+ c Gray100",
|
||||
"@ c Gray100",
|
||||
"# c Gray100",
|
||||
"$ c Gray100",
|
||||
"% c Gray100",
|
||||
"& c Gray100",
|
||||
"* c Gray100",
|
||||
"= c Gray100",
|
||||
"- c Gray100",
|
||||
"; c Gray100",
|
||||
": c Gray100",
|
||||
/* pixels */
|
||||
"O X..X..XX..X..XX.XX..XX.XX..XX.XX..X",
|
||||
"O XX..XX.XX..XX.XX..X..XX..X..XX..X..XX.",
|
||||
"O .XX.XX..XX.XX..XX.XX..X..XX..X..XX..X..XX.",
|
||||
"O .XX..X..XX..X..XX..X..XX.XX..XX.XX..XX.XX..X",
|
||||
"O ..X..XX..X..XX..X..XX..X..XX.XX..XX.XX..XX.XX..X",
|
||||
"O .XX.XX..XX.XX..XX.XX..XX.XX..X..XX..X..XX..X..XX.",
|
||||
"O...................................................................................................................",
|
||||
"O .XX.XX..X..XX..X..XX.. .XX..X..XX.XX..XX.XX..XX.XX.. ",
|
||||
"O...................................................................................................................",
|
||||
"O ..XX..X..XX.XX..XX .XX..XX.XX. .XX..X. X..X..XX.",
|
||||
"O...................................................................................................................",
|
||||
"O XX.XX..XX.XX..X..X ..X..XX..X. X..XX.X X.XX..X",
|
||||
"O...................................................................................................................",
|
||||
"O ..XX.XX..XX.XX..X..XX. X..X..XX.. X..XX.X .XX..X",
|
||||
"O...................................................................................................................",
|
||||
"O X..XX..X..XX..X..XX.XX..XX.XX..XX.XX.. .XX..X. .XX.",
|
||||
"O...................................................................................................................",
|
||||
"O .XX.XX..XX.XX. ..X..XX..X..XX..X..X X..XX.X .X",
|
||||
"O...................................................................................................................",
|
||||
"O .XX..X..XX.. X..XX.XX..XX.XX..XX.XX..X..XX..X..XX..X..XX.",
|
||||
"O .X..XX.XX..X XX..X..XX..X..XX..X..XX.XX..XX.XX..XX.XX..X",
|
||||
"O ..X..XoXOo. ..X..XX..X..XX..X..XX.XX..XX.XX..XX.XX..X",
|
||||
"O .XX.XX.XOXXX .XX.XX..XX.XX..XX.XX..X..XX..X..XX..X..XX.",
|
||||
"O ..XX.XX.XOXX .XX.XX..XX.XX..XX.XX..X..XX..X..XX..X..XX.",
|
||||
"O .XX..X..XOXOO XX..X..XX .X..XX..X..XX.XX..XX.XX..XX.XX..X",
|
||||
"O ..XX..X..XOXOO .XX..X..X ..X..XX.XX..XX.XX..XX.X ",
|
||||
"O XX..XX.XX.XOXX X..XX.XX. ..X..XX..X..X ",
|
||||
"O.................................................OXOO..............................................................",
|
||||
"O .X..XX..X. OXOO ..XX..X.. X..XX.X ",
|
||||
"O.................................................XOXX..............................................................",
|
||||
"O o .XX.XX..XX XOXX XOXX..XX.X .XX..X. ",
|
||||
"O................................OOX..............OXOO...............OXO............................................",
|
||||
"O XOOXX..X..XX OXOO XOOXO.XX.. X..XX.X ",
|
||||
"O................................XXOOX............XOXX.............OXXOX............................................",
|
||||
"O OXXO.X..X OXOO XXOOX..XX. X..XX.X ",
|
||||
"O..................................XXOOX..........OXOO..........XOXXO...............................................",
|
||||
"O XX.OXXOXX XOXX OXOOXX.XX..X .XX..X. ",
|
||||
"O....................................XXOXX........XOXX........XOOXO.................................................",
|
||||
"O .X..XX.OXOOX OXOO OXXOXX..X..X X..XX.X ",
|
||||
"O......................................XOOXX......OXOO......XOOXX...................................................",
|
||||
"O XX.XX..XX XXOOX XOXX OXXO X..XX.XX. .XX..X. ",
|
||||
"O ..X..XX.. OXXO OXOO XXOOX .XX..X..X X..XX.X ",
|
||||
"O X..X..XX. XXOOX OXOO XOXXO X.XX..X.. X..XX.X ",
|
||||
"O .XX.XX..X OXXOX oOXo OXOOX .X..XX.XX .XX..X. ",
|
||||
"O ..XX.XX.. XXo oXO .X..XX.X .XX..X. ",
|
||||
"O XX..X..X o oX X.XX..X. X..XX.X ",
|
||||
"O .XX..X..X XX.XX..X. X..XX.X ",
|
||||
"O X..XX.XX. ..X..XX. .XX..X. ",
|
||||
"O...................................................................................................................",
|
||||
"O XXOXXOOXXOXXOOXXOXXOOX oXOoo OOXXOOXOOXXOXXOOXXOXXO X..XX.X ",
|
||||
"O......................OOXOOXXOOXOOXXOOXOOXXO.....XOXXO....XXOOXXOXXOOXOOXXOOXOOX...................................",
|
||||
"O oOXOOXXOOXOOXXOOXOOXXO XOXXOOX oXOOXXOXXOOXOOXXOOXOOX .XX..X. ",
|
||||
"O.................................................OXOOXXO...........................................................",
|
||||
"O X..XX..X OXOOXXOOX .XX.XX. X..XX.X ",
|
||||
"O.................................................XOX.OOXXOX........................................................",
|
||||
"O .X..XX..X o OXO XOOXO ..XX.XX. X..XX.X ",
|
||||
"O..........................................XOOXo..OXO...OOXOOX......................................................",
|
||||
"O X.XX..XX OXXOX XOX XOXXOX..X..X .XX..X. ",
|
||||
"O........................................XOOXX....XOX.....OXXOOX....................................................",
|
||||
"O .X..XX. OXXO OXO OOXXOX.XX X..XX.X ",
|
||||
"O......................................XOOXX......OXO.......OXXOOX..................................................",
|
||||
"O XX.XX..X XOXXO XOX .OOXXOX .XX..X. ",
|
||||
"O ..X..XX. OXOOX OXO X.XOOXO X..XX.X ",
|
||||
"O X..X..XX XOOXO OXO X..OOXOOX X..XX.X ",
|
||||
"O .XX.XX.. OXXOX XOX .XX.XOXXO .XX..X. ",
|
||||
"O .XX.XX.. XOOXX XOX .XX..OXXOOX .XX..X. ",
|
||||
"O X..X..XX OXXO OXO X..XX.OOXXOX X..XX.X ",
|
||||
"O X..X..X XOOXX OXO X..XX.XOXXOXX X..XX.X ",
|
||||
"O .XX.XX. oXXO XOX ..XX..X. OOXOOX .XX..X. ",
|
||||
"O................................oOX..............OXO................XOXXO..........................................",
|
||||
"O X..X..X OXO XX..XX.X OXXOOX X..XX.X ",
|
||||
"O.................................................XOX..................OOXXO........................................",
|
||||
"O .XX.XX. XOX ..XX..X OXXOOX .XX..X. ",
|
||||
"O.................................................OXO....................OOXXOX.....................................",
|
||||
"O X..X..XX..X..XX..X..XX..X..XOXOX..XX.XX..XX.XX..X..XOXXOXXXX..X..XX..X..XX.XX..XX.XX..XX.XX..X",
|
||||
"O.................................................XOX......................OOXOOX...................................",
|
||||
"O X..X..XX..X..XX..X..XX..X..XOXOX..XX.XX..XX.XX..X..XX.XOXXOX..X..XX..X..XX.XX..XX.XX..XX.XX..X",
|
||||
"O.................................................OXO........................OXXOOX.................................",
|
||||
"O .XX.XX..XX.XX..XX.XX..XX.XX.XOX.XX..X..XX..X..XX.XX..XX.OOXXOX.XX..XX.XX..X..XX..X..XX..X..XX.",
|
||||
"O.................................................XOX..........................OXXOOX...............................",
|
||||
"O X..X..XX..X..XX..X..XX..X..XOXOX..XX.XX..XX.XX..X..XX..X..OOXXOX.XX..X..XX.XX..XX.XX..XX.XX..X",
|
||||
"O.................................................OXO............................OXXOXX.............................",
|
||||
"O .XX.XX. XOX ..XX..X. OOXOOX .XX..X. ",
|
||||
"O X..X..X OXO XX..XX.X XOXXO X..XX.X ",
|
||||
"O X..X..X OXO XX..XX.X OXXOOX X..XX.X ",
|
||||
"O .XX.XX. XOX .XX..X. OOXXO .XX..X. ",
|
||||
"O .XX.XX.. XOX .XX..X. OXXOOX .XX..X. ",
|
||||
"O X..X..XX OXO X..XX.X OOXXOX X..XX.X ",
|
||||
"O.................................................XOX...................................XOOXO.......................",
|
||||
"O XX.XX..X XOX .XX..X. oXXOOXOOXXOOXOOXXOOXOo .XX..X. ",
|
||||
"O.................................................OXO...................XOOXXOXXOOXXOXXOOXXOXX......................",
|
||||
"O ..X..XX. OXO X..XX.X XOOXXOXXOOXXOXXOOXXoX X..XX.X ",
|
||||
"O.................................................XOX..........XX........XXO........................................",
|
||||
"O X.XX..X XOX .XOXXOX. XXOo .XX..X. ",
|
||||
"O.................................................OXO........XXOOXO.......OXX.......................................",
|
||||
"O X.XX..XX XOX XOOXXOX. XOOX .XX..X. ",
|
||||
"O.................................................XOX......XXOOXXOXX......XOOX......................................",
|
||||
"O .X..XX..X OXO XOOXXOOXOO. OXXOX X..XX.X ",
|
||||
"O.................................................OXO....OXOOX..OXOOX......XXOX.....................................",
|
||||
"O .XX..XX.X XOX XXOXXOX..OXXO OXO .XX..X. ",
|
||||
"O.................................................XOX..OXXOX......XXO.......OXOO....................................",
|
||||
"O ..XX..X. OXO XXOOXO .XX.OOXX XOXXo X..XX.X ",
|
||||
"O XX..XX.X XOXXOOXXO X..X.XOO XOOX .XX..X. ",
|
||||
"O X..XX.XX XOXXOOX X..X.XOOX OOX .XX..X. ",
|
||||
"O .XX..X.. OXOOXXO .XX.XOXXOX XXOo X..XX.X ",
|
||||
"O .XX..X..X OXOOX XX.XXXXOX XOOX X..XX.X ",
|
||||
"O ..XX.XX. XOXXO ..X..XOXO OXXO .XX..X. ",
|
||||
"O ..XX.XX.. XOX .X..XOXOO XXO .XX..X. ",
|
||||
"O X..X..XX oXo X.XX.XOXXo OOXX X..XX.X ",
|
||||
"O.....................................................................XOOX.......XOO................................",
|
||||
"O .XX.XX..X .X..XX.OOX XOOX .XX..X. ",
|
||||
"O......................................................................XXOo......OXXOX..............................",
|
||||
"O .X..XX..X .XX..X.XOOX XXOX X..XX.X ",
|
||||
"O.......................................................................OXXO.......OXO..............................",
|
||||
"O .XX..XX.X ..XX.XXXXO OXOO .XX..X. ",
|
||||
"O........................................................................OOXX......XOXXo............................",
|
||||
"O XX..XX.XX .XX.XX.XOO XOOX .XX..X. ",
|
||||
"O.........................................................................XOOX.......OOX............................",
|
||||
"O .XX..X..X X..X..XOXXOX XXOo X..XX.X ",
|
||||
"O..........................................................................XXOX.......XOOX..........................",
|
||||
"O .XX.XX..X X.XX..XOXO OXXO .XX..X. ",
|
||||
"O...........................................................................OXOOX..oXOOXXO..........................",
|
||||
"O ..X..XX..X .X..XX.XOXXO XXOXXOOX X..XX.X ",
|
||||
"O XX.XX..XX. .XX..XXXOOXXOOXOOXX .XX..X. ",
|
||||
"O X.XX..XX.X XX..XX.OOXXOOXO .XX..X. ",
|
||||
"O X..XX..X.. ..XX..X.XOOXXo X..XX.X ",
|
||||
"O ..XX..X..X .XX..X..o X..XX.X ",
|
||||
"O X..XX.XX.. X..XX.XX. .XX..X. ",
|
||||
"O ..XX.XX..X. ..XX.XX.. .XX.XX..X..XX..X..XX..X. ",
|
||||
"O X..X..XX.XX X..X..XX. .XX..X..XX.XX..XX.XX..XX.XX. ",
|
||||
"O...................................................................................................................",
|
||||
"O XXXXXXXXXXXXXXXXXXXXXXXXXX X.XX..X..XX XX.XX..XX.XX..XX.XX..X..XX..X..XX..X..XX.",
|
||||
"O...................................................................................................................",
|
||||
"OXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ..XX.XX..XX.X X..X..XX..X..XX..X..XX.XX..XX.XX..XX.XX..X",
|
||||
"O...................................................................................................................",
|
||||
"OXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ..X..XX..X..X X.XX..XX.XX..XX.XX..XX. .XX..X. ..X..XX.",
|
||||
"O...................................................................................................................",
|
||||
"OX XXXXXXX XXXX XXXXXXX XXXXXXXXXXXXX X..XX..X..XX.. .XX.XX..XX.XX..XX.XX. .XX..X. XX.",
|
||||
"O...................................................................................................................",
|
||||
"O XXXXXXX XXXX XXXXXXX XXXXXXXXXXX ..XX.XX..XX.XX..X..XX..X..XX..X..XX. X..XX.X XX..X",
|
||||
"O...................................................................................................................",
|
||||
"OXXXXXXXX XXXX XXXXXXXXXXXXXXXXXXXXXXXX .X..XX..X..XX.XX..X XX.XX..XX.X .XX..X. .X..XX.",
|
||||
"O...................................................................................................................",
|
||||
"OXXXXXXXX XXXX XXXXXXXXXXXXX XXXXXXXX X..XX.XX..X..XX..X X..XX..X..X X..XX.X .XX.XX..X",
|
||||
"OXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXX X..X..XX.XX..XX.XX. XX..XX.XX. .XX..X. XX..X..XX.",
|
||||
"OXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXX .X..XX.XX..XX.XX..XX.XX..XX.XX..X..XX..X..XX..X..XX.",
|
||||
"OXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXX .XX..X..XX..X..XX..X..XX..X..XX.XX..XX.XX..XX.XX..X",
|
||||
"OXXX XXXXXXXXXXXXXXXXXXXXXX XXXXXX XXXXXXX ..X..XX..X..XX..X..XX..X..XX.XX..XX.XX..XX.XX..X",
|
||||
"OXX XXXXXXXXXXXXXXXX XXXXXX XXXXXXX .XX..XX.XX..XX.XX..XX.XX..X..XX..X..XX..X..XX.",
|
||||
"OXX XXXX XXXXXX XXXXXXX .XX.XX..XX.XX..XX.XX..X..XX..X..XX..X..XX.",
|
||||
"OXX XXXX XXXXXX XXXXXXX .X..XX..X..XX..X..XX.XX..XX.XX..XX.XX..X",
|
||||
"O...................................................................................................................",
|
||||
"O XXXX XXXXXX XXXXX X.XX..XX.XX..X..XX..X..XX..X..XX.",
|
||||
"O...................................................................................................................",
|
||||
"O XXXX XXXXX XXXXXX ",
|
||||
"O...................................................................................................................",
|
||||
"O XXXX XXXXX XXXXXX ",
|
||||
"O...................................................................................................................",
|
||||
"O XXXX XXXXXX XXXXXX ",
|
||||
"O...................................................................................................................",
|
||||
"O XXXX XXXXXX XXXXXX ",
|
||||
"O...................................................................................................................",
|
||||
"O XXXX XXXXX XXXXXX ",
|
||||
"O...................................................................................................................",
|
||||
"O XXXX XXXXX XXXXX ",
|
||||
"O XXXX XXXXXX XXXXX ",
|
||||
"O XXXX XXXXX XXXXX ",
|
||||
"O XXXX XXXXXX XXXXXX ",
|
||||
"O XXXX XXXXX XXXXX ",
|
||||
"O XXXX XXXXXX XXXXXX ",
|
||||
"O XXXX XXXXX XXXXXX ",
|
||||
"O XXXX XXXXX XXXXX ",
|
||||
"O...................................................................................................................",
|
||||
"O XXXX XXXXX XXXXX ",
|
||||
"O...................................................................................................................",
|
||||
"O XXXX XXXXX XXXXX ",
|
||||
"O...................................................................................................................",
|
||||
"O XXXX XXXXX XXXXX ",
|
||||
"O...................................................................................................................",
|
||||
"O XXXX XXXXX XXXXX ",
|
||||
"O...................................................................................................................",
|
||||
"OXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ",
|
||||
"O...................................................................................................................",
|
||||
"OXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ",
|
||||
"OXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ",
|
||||
"O XXXX XXXXX XXXXX ",
|
||||
"O XXXX XXXXX XXXXXX ",
|
||||
"O XXXX XXXX XXXXX ",
|
||||
"O XXXX XXXXX XXXXX ",
|
||||
"O XXXX XXXXX XXXXX ",
|
||||
"O XXXX XXXXX XXXXX ",
|
||||
"O...................................................................................................................",
|
||||
"O XXXX XXXXX XXXXXX ",
|
||||
"O...................................................................................................................",
|
||||
"O XXXX XXXXX XXXXX ",
|
||||
"O...................................................................................................................",
|
||||
"O XXXX XXXXXX XXXXX ",
|
||||
"O...................................................................................................................",
|
||||
"O XXXX XXXXX XXXX ",
|
||||
"O...................................................................................................................",
|
||||
"O XXXX XXXXX XXXXX ",
|
||||
"O...................................................................................................................",
|
||||
"O XXXX XXXXX XXXXXX ",
|
||||
"O...................................................................................................................",
|
||||
"O XXXX XXXXX XXXXX ",
|
||||
"O XXXX XXXXXX XXXXXX ",
|
||||
"O XXXX XXXXX XXXXXXX ",
|
||||
"O XXXX XXXXX XXXXXX ",
|
||||
"O XXXX XXXXX XXXXXX ",
|
||||
"O XXXX XXXXX XXXXXX ",
|
||||
"O XXXX XXXXXX XXXXXX X.XX..X..XX..X ",
|
||||
"O XXXX XXXXXX XXXXXX .XX..X..XX.XX..XX.XX. ",
|
||||
"O...................................................................................................................",
|
||||
"OX XXXX XXXXXX XXXXXXX ..XX.XX..XX.XX..X..XX..X..XX..X..X ",
|
||||
"O...................................................................................................................",
|
||||
"OXX XXXX XXXXXX XXXXXXX .X..XX..X. ..X.. X.XX .XX.X XX.XX..X",
|
||||
"O...................................................................................................................",
|
||||
"OXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXX X..XX.XX.. ..XX. .X.. .X..X .XX.",
|
||||
"O...................................................................................................................",
|
||||
"OXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXX .XX..XX.XX..X X..XX .X.. X..X ..XX.",
|
||||
"O...................................................................................................................",
|
||||
"OXXXXXXXXX XXXX XXXXXXXXXXXXXX XXXXXXXXX ..X..XX X..X..XX. X.XX .XX..XX.XX. ",
|
||||
"O...................................................................................................................",
|
||||
"OXXXXXXXXX XXXX XXXXXXXXXXXXXXXXXXXXXXX ..XX.X X.XX..XX.XX..X..XX..X..XX..X. ",
|
||||
"O...................................................................................................................",
|
||||
"O XXXXXX XXXX XXXXXXX XXXXXXXXXXX X.XX. X..X. ..XX.XX..X XX.X ",
|
||||
"OX XXXXXXX XXXX XXXXXXX XXXXXXXXXXX ..X..X .XX.X .X.. ..X.. ",
|
||||
"OXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX X..X.. .XX. .X.. .X..X ",
|
||||
"OXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX .XX.X XX..X X.XX X.XX. ",
|
||||
"OXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ..XX. .XX.. X.XX .XX.. ",
|
||||
"OXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX .XX.. X..X .X.. ..XX ",
|
||||
"O XXXXXXXXXXXXXXXXXXXXXXXXXX .XX. X..X .X.. .XX.",
|
||||
"O XXXXXXXXXXXXXXXXXXXXXX XX..X .XX. X.XX X..X",
|
||||
"O...................................................................................................................",
|
||||
"O X..X .XX.. .X.. .XX.",
|
||||
"O...................................................................................................................",
|
||||
"O X.XX. .X..X X.XX ..X",
|
||||
"O...................................................................................................................",
|
||||
"O ..X.. X.XX. .X.. X.",
|
||||
"O...................................................................................................................",
|
||||
"O ..X. X.XX .X.. X.",
|
||||
"O...................................................................................................................",
|
||||
"O .XX.X .X. X.XX .X",
|
||||
"O...................................................................................................................",
|
||||
"O X..X XX.X .X.. .",
|
||||
"O...................................................................................................................",
|
||||
"O .XX. ..X. X.XX X",
|
||||
"O X..X XX.X .X.. ",
|
||||
"O XX.. .XX.X .X.. ",
|
||||
"O ..XX X..X. X.XX ",
|
||||
"O ..XX X..X X.XX ",
|
||||
"O XX..X..XX..X..XX.XX..XX.XX..XX.XX..XX.XX..X..XX..X..XX..X..XX.",
|
||||
"O XX..X..XX..X..XX.XX..XX.XX..XX.XX..XX.XX..X..XX..X..XX..X..XX.",
|
||||
"O XX..X..XX..X..XX.XX..XX.XX..XX.XX..XX.XX..X..XX..X..XX..X..XX.",
|
||||
"O...................................................................................................................",
|
||||
"O ..XX X..X X.XX ",
|
||||
"O...................................................................................................................",
|
||||
"O XX.. .XX.X .X.. ",
|
||||
"O...................................................................................................................",
|
||||
"Oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo"
|
||||
};
|
@@ -284,7 +284,7 @@ bool wxAppBase::OnCmdLineParsed(wxCmdLineParser& parser)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if ( !SetDisplayMode(wxDisplayModeInfo(wxSize(w, h), bpp)) )
|
||||
if ( !SetDisplayMode(wxDisplayModeInfo(w, h, bpp)) )
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
|
@@ -293,8 +293,8 @@ wxConfigBase *wxFontMapper::GetConfig()
|
||||
m_configIsDummy = FALSE;
|
||||
// FIXME: ideally, we should add keys from dummy config to the real one now,
|
||||
// but it is a low-priority task because typical wxWin application
|
||||
// either doesn't use wxConfig at all or creates wxConfig object in
|
||||
// wxApp::OnInit(), before any real interaction with the user takes
|
||||
// either doesn't use wxConfig at all or creates wxConfig object in
|
||||
// wxApp::OnInit(), before any real interaction with the user takes
|
||||
// place...
|
||||
}
|
||||
|
||||
@@ -564,6 +564,25 @@ wxFontEncoding wxFontMapper::CharsetToEncoding(const wxString& charset,
|
||||
encoding = (wxFontEncoding)value;
|
||||
}
|
||||
}
|
||||
|
||||
switch ( value )
|
||||
{
|
||||
case 932:
|
||||
encoding = wxFONTENCODING_CP932;
|
||||
break;
|
||||
|
||||
case 936:
|
||||
encoding = wxFONTENCODING_CP936;
|
||||
break;
|
||||
|
||||
case 949:
|
||||
encoding = wxFONTENCODING_CP949;
|
||||
break;
|
||||
|
||||
case 950:
|
||||
encoding = wxFONTENCODING_CP950;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -418,7 +418,8 @@ wxString wxColourDatabase::FindName (const wxColour& colour) const
|
||||
return name;
|
||||
}
|
||||
|
||||
void wxInitializeStockLists () {
|
||||
void wxInitializeStockLists()
|
||||
{
|
||||
wxTheBrushList = new wxBrushList;
|
||||
wxThePenList = new wxPenList;
|
||||
wxTheFontList = new wxFontList;
|
||||
@@ -530,14 +531,19 @@ void wxDeleteStockObjects ()
|
||||
wxDELETE(wxCROSS_CURSOR);
|
||||
}
|
||||
|
||||
void wxDeleteStockLists() {
|
||||
void wxDeleteStockLists()
|
||||
{
|
||||
wxDELETE(wxTheBrushList);
|
||||
wxDELETE(wxThePenList);
|
||||
wxDELETE(wxTheFontList);
|
||||
wxDELETE(wxTheBitmapList);
|
||||
}
|
||||
|
||||
wxBitmapList::wxBitmapList ()
|
||||
// ============================================================================
|
||||
// wxTheXXXList stuff (semi-obsolete)
|
||||
// ============================================================================
|
||||
|
||||
wxBitmapList::wxBitmapList()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -602,10 +608,9 @@ wxPen *wxPenList::FindOrCreatePen (const wxColour& colour, int width, int style)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// Yes, we can return a pointer to this in a later FindOrCreatePen call,
|
||||
// because we created it within FindOrCreatePen. Safeguards against
|
||||
// returning a pointer to an automatic variable and hanging on to it
|
||||
// (dangling pointer).
|
||||
AddPen(pen);
|
||||
|
||||
// we'll delete it ourselves later
|
||||
pen->SetVisible(TRUE);
|
||||
|
||||
return pen;
|
||||
@@ -653,12 +658,11 @@ wxBrush *wxBrushList::FindOrCreateBrush (const wxColour& colour, int style)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
AddBrush(brush);
|
||||
|
||||
// we'll delete it ourselves later
|
||||
brush->SetVisible(TRUE);
|
||||
|
||||
// Yes, we can return a pointer to this in a later FindOrCreateBrush call,
|
||||
// because we created it within FindOrCreateBrush. Safeguards against
|
||||
// returning a pointer to an automatic variable and hanging on to it
|
||||
// (dangling pointer).
|
||||
return brush;
|
||||
}
|
||||
|
||||
@@ -759,6 +763,8 @@ wxFont *wxFontList::FindOrCreateFont(int pointSize,
|
||||
font = new wxFont(pointSize, family, style, weight,
|
||||
underline, facename, encoding);
|
||||
|
||||
AddFont(font);
|
||||
|
||||
// and mark it as being cacheable
|
||||
font->SetVisible(TRUE);
|
||||
}
|
||||
|
@@ -748,8 +748,6 @@ bool wxBMPHandler::DoLoadDib (wxImage * image, int width, int height, int bpp, i
|
||||
|
||||
bool wxBMPHandler::LoadDib( wxImage *image, wxInputStream& stream, bool verbose, bool IsBmp )
|
||||
{
|
||||
|
||||
wxUint8 aByte;
|
||||
wxUint16 aWord;
|
||||
wxInt32 dbuf[4];
|
||||
wxInt8 bbuf[4];
|
||||
@@ -844,7 +842,7 @@ bool wxBMPHandler::LoadDib( wxImage *image, wxInputStream& stream, bool verbose,
|
||||
{
|
||||
//read Icon mask which is monochrome
|
||||
//there is no palette, so we will create one
|
||||
wxImage mask ;
|
||||
wxImage mask;
|
||||
if (!DoLoadDib (&mask, width, height, 1, 2, BI_RGB, offset, stream,
|
||||
verbose, IsBmp, FALSE ) )
|
||||
{
|
||||
@@ -852,7 +850,7 @@ bool wxBMPHandler::LoadDib( wxImage *image, wxInputStream& stream, bool verbose,
|
||||
wxLogError( _("ICO: Error in reading mask DIB.") );
|
||||
return FALSE;
|
||||
}
|
||||
image -> ApplyMask ( &mask );
|
||||
image->SetMaskFromImage(mask, 255, 255, 255);
|
||||
|
||||
}
|
||||
return TRUE;
|
||||
|
@@ -721,33 +721,33 @@ int wxImage::GetHeight() const
|
||||
}
|
||||
|
||||
|
||||
bool wxImage::GetUnusedColour ( unsigned char * r, unsigned char * g, unsigned char * b )
|
||||
bool wxImage::FindFirstUnusedColour(
|
||||
unsigned char *r, unsigned char *g, unsigned char *b,
|
||||
unsigned char startR, unsigned char startG, unsigned char startB)
|
||||
{
|
||||
wxHashTable hTable;
|
||||
unsigned long key;
|
||||
|
||||
ComputeHistogram( hTable );
|
||||
|
||||
// start with blackest color and work to lightest
|
||||
// 0,0,0 is quite likely to be a used color
|
||||
unsigned char r2 = 1;
|
||||
unsigned char g2 = 0;
|
||||
unsigned char b2 = 0;
|
||||
unsigned char r2 = startR;
|
||||
unsigned char g2 = startG;
|
||||
unsigned char b2 = startB;
|
||||
|
||||
key = (r2 << 16) | (g2 << 8) | b2;
|
||||
|
||||
while ( (wxHNode *) hTable.Get(key) )
|
||||
{
|
||||
// color already used
|
||||
r2 ++ ;
|
||||
r2++;
|
||||
if ( r2 >= 255 )
|
||||
{
|
||||
r2 = 0;
|
||||
g2 ++ ;
|
||||
g2++;
|
||||
if ( g2 >= 255 )
|
||||
{
|
||||
g2 = 0 ;
|
||||
b2 ++ ;
|
||||
g2 = 0;
|
||||
b2++;
|
||||
if ( b2 >= 255 )
|
||||
{
|
||||
wxLogError( _("GetUnusedColour:: No Unused Color in image ") );
|
||||
@@ -759,19 +759,17 @@ bool wxImage::GetUnusedColour ( unsigned char * r, unsigned char * g, unsigne
|
||||
key = (r2 << 16) | (g2 << 8) | b2;
|
||||
}
|
||||
|
||||
if (r) *r = r2;
|
||||
if (g) *g = g2;
|
||||
if (b) *b = b2;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
bool wxImage::ApplyMask ( const wxImage & mask )
|
||||
bool wxImage::SetMaskFromImage(const wxImage& mask,
|
||||
unsigned char mr, unsigned char mg, unsigned char mb)
|
||||
{
|
||||
// what to do if we already have a mask ??
|
||||
if (M_IMGDATA->m_hasMask || mask.HasMask() )
|
||||
{
|
||||
wxLogError( _("Image already masked") );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// check that the images are the same size
|
||||
if ( (M_IMGDATA->m_height != mask.GetHeight() ) || (M_IMGDATA->m_width != mask.GetWidth () ) )
|
||||
{
|
||||
@@ -781,7 +779,7 @@ bool wxImage::ApplyMask ( const wxImage & mask )
|
||||
|
||||
// find unused colour
|
||||
unsigned char r,g,b ;
|
||||
if (!GetUnusedColour (&r, &g, &b))
|
||||
if (!FindFirstUnusedColour(&r, &g, &b))
|
||||
{
|
||||
wxLogError( _("No Unused Color in image being masked") );
|
||||
return FALSE ;
|
||||
@@ -794,9 +792,10 @@ bool wxImage::ApplyMask ( const wxImage & mask )
|
||||
const int h = GetHeight();
|
||||
|
||||
for (int j = 0; j < h; j++)
|
||||
{
|
||||
for (int i = 0; i < w; i++)
|
||||
{
|
||||
if ((maskdata[0] > 128) && (maskdata[1] > 128) && (maskdata[2] > 128 ))
|
||||
if ((maskdata[0] == mr) && (maskdata[1] == mg) && (maskdata[2] == mb))
|
||||
{
|
||||
imgdata[0] = r;
|
||||
imgdata[1] = g;
|
||||
@@ -805,11 +804,10 @@ bool wxImage::ApplyMask ( const wxImage & mask )
|
||||
imgdata += 3;
|
||||
maskdata += 3;
|
||||
}
|
||||
}
|
||||
|
||||
M_IMGDATA->m_maskRed = r;
|
||||
M_IMGDATA->m_maskGreen = g;
|
||||
M_IMGDATA->m_maskBlue = b;
|
||||
M_IMGDATA->m_hasMask = TRUE;
|
||||
SetMaskColour(r, g, b);
|
||||
SetMask(TRUE);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@@ -1295,11 +1295,31 @@ wxFontEncoding wxLocale::GetSystemEncoding()
|
||||
#ifdef __WIN32__
|
||||
UINT codepage = ::GetACP();
|
||||
|
||||
// wxWindows only knows about CP1250-1257
|
||||
// wxWindows only knows about CP1250-1257, 932, 936, 949, 950
|
||||
if ( codepage >= 1250 && codepage <= 1257 )
|
||||
{
|
||||
return (wxFontEncoding)(wxFONTENCODING_CP1250 + codepage - 1250);
|
||||
}
|
||||
|
||||
if ( codepage == 932 )
|
||||
{
|
||||
return wxFONTENCODING_CP932;
|
||||
}
|
||||
|
||||
if ( codepage == 936 )
|
||||
{
|
||||
return wxFONTENCODING_CP936;
|
||||
}
|
||||
|
||||
if ( codepage == 949 )
|
||||
{
|
||||
return wxFONTENCODING_CP949;
|
||||
}
|
||||
|
||||
if ( codepage == 950 )
|
||||
{
|
||||
return wxFONTENCODING_CP950;
|
||||
}
|
||||
#elif defined(__UNIX_LIKE__) && wxUSE_FONTMAP
|
||||
wxString encname = GetSystemEncodingName();
|
||||
if ( !encname.empty() )
|
||||
|
@@ -1235,25 +1235,6 @@ wxDatagramSocket& wxDatagramSocket::SendTo( wxSockAddress& addr,
|
||||
return (*this);
|
||||
}
|
||||
|
||||
// ==========================================================================
|
||||
// wxSocketEvent
|
||||
// ==========================================================================
|
||||
|
||||
wxSocketEvent::wxSocketEvent(int id) : wxEvent(id)
|
||||
{
|
||||
SetEventType( (wxEventType)wxEVT_SOCKET );
|
||||
}
|
||||
|
||||
void wxSocketEvent::CopyObject(wxObject& object_dest) const
|
||||
{
|
||||
wxSocketEvent *event = (wxSocketEvent *)&object_dest;
|
||||
|
||||
wxEvent::CopyObject(object_dest);
|
||||
|
||||
event->m_event = m_event;
|
||||
event->m_clientData = m_clientData;
|
||||
}
|
||||
|
||||
// ==========================================================================
|
||||
// wxSocketModule
|
||||
// ==========================================================================
|
||||
|
@@ -1,8 +1,9 @@
|
||||
# This file was automatically generated by tmake at 18:55, 2001/11/17
|
||||
# This file was automatically generated by tmake at 16:36, 2001/11/20
|
||||
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE BASE.T!
|
||||
ALL_SOURCES = \
|
||||
common/init.cpp \
|
||||
common/appcmn.cpp \
|
||||
common/clntdata.cpp \
|
||||
common/cmdline.cpp \
|
||||
common/config.cpp \
|
||||
common/datetime.cpp \
|
||||
@@ -89,6 +90,7 @@ ALL_HEADERS = \
|
||||
arrimpl.cpp \
|
||||
buffer.h \
|
||||
chkconf.h \
|
||||
clntdata.h \
|
||||
cmdline.h \
|
||||
confbase.h \
|
||||
config.h \
|
||||
@@ -134,6 +136,7 @@ ALL_HEADERS = \
|
||||
mstream.h \
|
||||
object.h \
|
||||
objstrm.h \
|
||||
platform.h \
|
||||
process.h \
|
||||
regex.h \
|
||||
sckaddr.h \
|
||||
@@ -176,6 +179,7 @@ ALL_HEADERS = \
|
||||
BASE_OBJS = \
|
||||
init.o \
|
||||
appcmn.o \
|
||||
clntdata.o \
|
||||
cmdline.o \
|
||||
config.o \
|
||||
datetime.o \
|
||||
|
@@ -187,7 +187,11 @@ void wxGenericColourDialog::OnMouseEvent(wxMouseEvent& event)
|
||||
int ptr = (int)(selX + selY*8);
|
||||
OnCustomColourClick(ptr);
|
||||
}
|
||||
else
|
||||
event.Skip();
|
||||
}
|
||||
else
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
void wxGenericColourDialog::OnPaint(wxPaintEvent& event)
|
||||
|
@@ -2020,7 +2020,7 @@ wxGridCellRenderer* wxGridCellAttr::GetRenderer(wxGrid* grid, int row, int col)
|
||||
{
|
||||
wxGridCellRenderer* renderer = NULL;
|
||||
|
||||
if ( m_defGridAttr != this || grid == NULL )
|
||||
if ( m_defGridAttr == this || grid == NULL )
|
||||
{
|
||||
renderer = m_renderer; // use local attribute
|
||||
if ( renderer )
|
||||
|
@@ -4443,53 +4443,6 @@ void wxListItem::ClearAttributes()
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------------------
|
||||
// wxListEvent
|
||||
// -------------------------------------------------------------------------------------
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxListEvent, wxNotifyEvent)
|
||||
|
||||
wxListEvent::wxListEvent( wxEventType commandType, int id )
|
||||
: wxNotifyEvent( commandType, id )
|
||||
{
|
||||
m_code = 0;
|
||||
m_itemIndex = 0;
|
||||
m_oldItemIndex = 0;
|
||||
m_col = 0;
|
||||
m_cancelled = FALSE;
|
||||
m_pointDrag.x = 0;
|
||||
m_pointDrag.y = 0;
|
||||
}
|
||||
|
||||
void wxListEvent::CopyObject(wxObject& object_dest) const
|
||||
{
|
||||
wxListEvent *obj = (wxListEvent *)&object_dest;
|
||||
|
||||
wxNotifyEvent::CopyObject(object_dest);
|
||||
|
||||
obj->m_code = m_code;
|
||||
obj->m_itemIndex = m_itemIndex;
|
||||
obj->m_oldItemIndex = m_oldItemIndex;
|
||||
obj->m_col = m_col;
|
||||
obj->m_cancelled = m_cancelled;
|
||||
obj->m_pointDrag = m_pointDrag;
|
||||
obj->m_item.m_mask = m_item.m_mask;
|
||||
obj->m_item.m_itemId = m_item.m_itemId;
|
||||
obj->m_item.m_col = m_item.m_col;
|
||||
obj->m_item.m_state = m_item.m_state;
|
||||
obj->m_item.m_stateMask = m_item.m_stateMask;
|
||||
obj->m_item.m_text = m_item.m_text;
|
||||
obj->m_item.m_image = m_item.m_image;
|
||||
obj->m_item.m_data = m_item.m_data;
|
||||
obj->m_item.m_format = m_item.m_format;
|
||||
obj->m_item.m_width = m_item.m_width;
|
||||
|
||||
if ( m_item.HasAttributes() )
|
||||
{
|
||||
obj->m_item.SetTextColour(m_item.GetTextColour());
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------------------
|
||||
// wxListCtrl
|
||||
// -------------------------------------------------------------------------------------
|
||||
@@ -4497,6 +4450,8 @@ void wxListEvent::CopyObject(wxObject& object_dest) const
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxListCtrl, wxControl)
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxListView, wxListCtrl)
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxListEvent, wxNotifyEvent)
|
||||
|
||||
BEGIN_EVENT_TABLE(wxListCtrl,wxControl)
|
||||
EVT_SIZE(wxListCtrl::OnSize)
|
||||
EVT_IDLE(wxListCtrl::OnIdle)
|
||||
|
@@ -94,7 +94,7 @@ wxWizardPage::wxWizardPage(wxWizard *parent,
|
||||
#endif // wxUSE_RESOURCES
|
||||
}
|
||||
|
||||
m_PageBitmap = bitmap;
|
||||
m_bitmap = bitmap;
|
||||
|
||||
// initially the page is hidden, it's shown only when it becomes current
|
||||
Hide();
|
||||
@@ -133,6 +133,7 @@ bool wxWizard::Create(wxWindow *parent,
|
||||
{
|
||||
m_posWizard = pos;
|
||||
m_bitmap = bitmap ;
|
||||
|
||||
// just create the dialog itself here, the controls will be created in
|
||||
// DoCreateControls() called later when we know our final size
|
||||
m_page = (wxWizardPage *)NULL;
|
||||
|
@@ -255,14 +255,11 @@ IMPLEMENT_DYNAMIC_CLASS(wxBitmap,wxGDIObject)
|
||||
|
||||
wxBitmap::wxBitmap()
|
||||
{
|
||||
if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this);
|
||||
}
|
||||
|
||||
wxBitmap::wxBitmap( int width, int height, int depth )
|
||||
{
|
||||
Create( width, height, depth );
|
||||
|
||||
if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this);
|
||||
}
|
||||
|
||||
bool wxBitmap::Create( int width, int height, int depth )
|
||||
@@ -322,8 +319,6 @@ bool wxBitmap::CreateFromXpm( const char **bits )
|
||||
|
||||
M_BMPDATA->m_bpp = visual->depth; // ?
|
||||
|
||||
if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -334,8 +329,6 @@ bool wxBitmap::CreateFromImage( const wxImage& image, int depth )
|
||||
|
||||
m_refData = new wxBitmapRefData();
|
||||
|
||||
if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this);
|
||||
|
||||
// ------
|
||||
// convertion to mono bitmap:
|
||||
// ------
|
||||
@@ -774,15 +767,11 @@ wxImage wxBitmap::ConvertToImage() const
|
||||
wxBitmap::wxBitmap( const wxBitmap& bmp )
|
||||
{
|
||||
Ref( bmp );
|
||||
|
||||
if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this);
|
||||
}
|
||||
|
||||
wxBitmap::wxBitmap( const wxString &filename, int type )
|
||||
{
|
||||
LoadFile( filename, type );
|
||||
|
||||
if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this);
|
||||
}
|
||||
|
||||
wxBitmap::wxBitmap( const char bits[], int width, int height, int WXUNUSED(depth))
|
||||
@@ -797,19 +786,17 @@ wxBitmap::wxBitmap( const char bits[], int width, int height, int WXUNUSED(depth
|
||||
M_BMPDATA->m_bpp = 1;
|
||||
|
||||
wxCHECK_RET( M_BMPDATA->m_bitmap, wxT("couldn't create bitmap") );
|
||||
|
||||
if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this);
|
||||
}
|
||||
|
||||
wxBitmap::~wxBitmap()
|
||||
{
|
||||
if (wxTheBitmapList) wxTheBitmapList->DeleteObject(this);
|
||||
}
|
||||
|
||||
wxBitmap& wxBitmap::operator = ( const wxBitmap& bmp )
|
||||
{
|
||||
if (*this == bmp) return (*this);
|
||||
Ref( bmp );
|
||||
if ( m_refData != bmp.m_refData )
|
||||
Ref( bmp );
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
@@ -1,10 +1,10 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: brush.cpp
|
||||
// Name: src/gtk/brush.cpp
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id$
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __GNUG__
|
||||
@@ -50,7 +50,6 @@ IMPLEMENT_DYNAMIC_CLASS(wxBrush,wxGDIObject)
|
||||
|
||||
wxBrush::wxBrush()
|
||||
{
|
||||
if (wxTheBrushList) wxTheBrushList->AddBrush( this );
|
||||
}
|
||||
|
||||
wxBrush::wxBrush( const wxColour &colour, int style )
|
||||
@@ -58,41 +57,35 @@ wxBrush::wxBrush( const wxColour &colour, int style )
|
||||
m_refData = new wxBrushRefData();
|
||||
M_BRUSHDATA->m_style = style;
|
||||
M_BRUSHDATA->m_colour = colour;
|
||||
|
||||
if (wxTheBrushList) wxTheBrushList->AddBrush( this );
|
||||
}
|
||||
|
||||
wxBrush::wxBrush( const wxBitmap &stippleBitmap )
|
||||
{
|
||||
m_refData = new wxBrushRefData();
|
||||
M_BRUSHDATA->m_colour = *wxBLACK;
|
||||
|
||||
|
||||
M_BRUSHDATA->m_stipple = stippleBitmap;
|
||||
|
||||
if (M_BRUSHDATA->m_stipple.GetMask())
|
||||
M_BRUSHDATA->m_style = wxSTIPPLE_MASK_OPAQUE;
|
||||
else
|
||||
M_BRUSHDATA->m_style = wxSTIPPLE;
|
||||
|
||||
if (wxTheBrushList) wxTheBrushList->AddBrush( this );
|
||||
M_BRUSHDATA->m_style = wxSTIPPLE_MASK_OPAQUE;
|
||||
else
|
||||
M_BRUSHDATA->m_style = wxSTIPPLE;
|
||||
}
|
||||
|
||||
wxBrush::wxBrush( const wxBrush &brush )
|
||||
{
|
||||
Ref( brush );
|
||||
|
||||
if (wxTheBrushList) wxTheBrushList->AddBrush( this );
|
||||
}
|
||||
|
||||
wxBrush::~wxBrush()
|
||||
{
|
||||
if (wxTheBrushList) wxTheBrushList->RemoveBrush( this );
|
||||
}
|
||||
|
||||
wxBrush& wxBrush::operator = ( const wxBrush& brush )
|
||||
{
|
||||
if (*this == brush) return (*this);
|
||||
Ref( brush );
|
||||
if ( m_refData != brush.m_refData )
|
||||
Ref( brush );
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -168,12 +161,12 @@ void wxBrush::SetStipple( const wxBitmap& stipple )
|
||||
M_BRUSHDATA->m_stipple = stipple;
|
||||
if (M_BRUSHDATA->m_stipple.GetMask())
|
||||
{
|
||||
M_BRUSHDATA->m_style = wxSTIPPLE_MASK_OPAQUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
M_BRUSHDATA->m_style = wxSTIPPLE;
|
||||
}
|
||||
M_BRUSHDATA->m_style = wxSTIPPLE_MASK_OPAQUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
M_BRUSHDATA->m_style = wxSTIPPLE;
|
||||
}
|
||||
}
|
||||
|
||||
void wxBrush::Unshare()
|
||||
|
@@ -1,4 +1,4 @@
|
||||
# This file was automatically generated by tmake at 18:55, 2001/11/17
|
||||
# This file was automatically generated by tmake at 16:36, 2001/11/20
|
||||
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE GTK.T!
|
||||
ALL_SOURCES = \
|
||||
generic/accel.cpp \
|
||||
|
@@ -162,18 +162,18 @@ bool wxNativeFontInfo::FromString(const wxString& s)
|
||||
xFontName = tokenizer.GetNextToken();
|
||||
if(!xFontName)
|
||||
return FALSE;
|
||||
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
wxString wxNativeFontInfo::ToString() const
|
||||
{
|
||||
wxString s;
|
||||
|
||||
|
||||
s.Printf(_T("%d;%s"),
|
||||
0, // version
|
||||
xFontName.c_str());
|
||||
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
@@ -185,8 +185,6 @@ IMPLEMENT_DYNAMIC_CLASS(wxFont, wxGDIObject)
|
||||
|
||||
void wxFont::Init()
|
||||
{
|
||||
if (wxTheFontList)
|
||||
wxTheFontList->Append( this );
|
||||
}
|
||||
|
||||
wxFont::wxFont(const wxNativeFontInfo& info)
|
||||
@@ -334,8 +332,6 @@ void wxFont::Unshare()
|
||||
|
||||
wxFont::~wxFont()
|
||||
{
|
||||
if (wxTheFontList)
|
||||
wxTheFontList->DeleteObject( this );
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@@ -56,7 +56,7 @@ wxPenRefData::wxPenRefData( const wxPenRefData& data )
|
||||
m_countDashes = data.m_countDashes;
|
||||
/*
|
||||
if (data.m_dash) TODO
|
||||
m_dash = new
|
||||
m_dash = new
|
||||
*/
|
||||
m_dash = data.m_dash;
|
||||
}
|
||||
@@ -69,7 +69,6 @@ IMPLEMENT_DYNAMIC_CLASS(wxPen,wxGDIObject)
|
||||
|
||||
wxPen::wxPen()
|
||||
{
|
||||
if (wxThePenList) wxThePenList->AddPen( this );
|
||||
}
|
||||
|
||||
wxPen::wxPen( const wxColour &colour, int width, int style )
|
||||
@@ -78,25 +77,22 @@ wxPen::wxPen( const wxColour &colour, int width, int style )
|
||||
M_PENDATA->m_width = width;
|
||||
M_PENDATA->m_style = style;
|
||||
M_PENDATA->m_colour = colour;
|
||||
|
||||
if (wxThePenList) wxThePenList->AddPen( this );
|
||||
}
|
||||
|
||||
wxPen::wxPen( const wxPen& pen )
|
||||
{
|
||||
Ref( pen );
|
||||
if (wxThePenList) wxThePenList->AddPen( this );
|
||||
}
|
||||
|
||||
wxPen::~wxPen()
|
||||
{
|
||||
if (wxThePenList) wxThePenList->RemovePen( this );
|
||||
}
|
||||
|
||||
wxPen& wxPen::operator = ( const wxPen& pen )
|
||||
{
|
||||
if (*this == pen) return (*this);
|
||||
Ref( pen );
|
||||
if ( m_refData != pen.m_refData )
|
||||
Ref( pen );
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -153,20 +149,20 @@ void wxPen::SetWidth( int width )
|
||||
M_PENDATA->m_width = width;
|
||||
}
|
||||
|
||||
int wxPen::GetDashes( wxDash **ptr ) const
|
||||
int wxPen::GetDashes( wxDash **ptr ) const
|
||||
{
|
||||
*ptr = (M_PENDATA ? (wxDash*)M_PENDATA->m_dash : (wxDash*) NULL);
|
||||
*ptr = (M_PENDATA ? (wxDash*)M_PENDATA->m_dash : (wxDash*) NULL);
|
||||
return (M_PENDATA ? M_PENDATA->m_countDashes : 0);
|
||||
}
|
||||
|
||||
int wxPen::GetDashCount() const
|
||||
{
|
||||
return (M_PENDATA->m_countDashes);
|
||||
int wxPen::GetDashCount() const
|
||||
{
|
||||
return (M_PENDATA->m_countDashes);
|
||||
}
|
||||
|
||||
wxDash* wxPen::GetDash() const
|
||||
{
|
||||
return (wxDash*)M_PENDATA->m_dash;
|
||||
wxDash* wxPen::GetDash() const
|
||||
{
|
||||
return (wxDash*)M_PENDATA->m_dash;
|
||||
}
|
||||
|
||||
int wxPen::GetCap() const
|
||||
|
@@ -1208,6 +1208,27 @@ static gint gtk_window_key_release_callback( GtkWidget *widget, GdkEventKey *gdk
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// the mouse events
|
||||
// ============================================================================
|
||||
|
||||
// init wxMouseEvent with the info from gdk_event
|
||||
#define InitMouseEvent(win, event, gdk_event) \
|
||||
{ \
|
||||
event.SetTimestamp( gdk_event->time ); \
|
||||
event.m_shiftDown = (gdk_event->state & GDK_SHIFT_MASK); \
|
||||
event.m_controlDown = (gdk_event->state & GDK_CONTROL_MASK); \
|
||||
event.m_altDown = (gdk_event->state & GDK_MOD1_MASK); \
|
||||
event.m_metaDown = (gdk_event->state & GDK_MOD2_MASK); \
|
||||
event.m_leftDown = (gdk_event->state & GDK_BUTTON1_MASK); \
|
||||
event.m_middleDown = (gdk_event->state & GDK_BUTTON2_MASK); \
|
||||
event.m_rightDown = (gdk_event->state & GDK_BUTTON3_MASK); \
|
||||
\
|
||||
wxPoint pt = win->GetClientAreaOrigin(); \
|
||||
event.m_x = (wxCoord)gdk_event->x - pt.x; \
|
||||
event.m_y = (wxCoord)gdk_event->y - pt.y; \
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// mouse event processing helper
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -1320,17 +1341,7 @@ static gint gtk_window_button_press_callback( GtkWidget *widget, GdkEventButton
|
||||
}
|
||||
|
||||
wxMouseEvent event( event_type );
|
||||
event.SetTimestamp( gdk_event->time );
|
||||
event.m_shiftDown = (gdk_event->state & GDK_SHIFT_MASK);
|
||||
event.m_controlDown = (gdk_event->state & GDK_CONTROL_MASK);
|
||||
event.m_altDown = (gdk_event->state & GDK_MOD1_MASK);
|
||||
event.m_metaDown = (gdk_event->state & GDK_MOD2_MASK);
|
||||
event.m_leftDown = (gdk_event->state & GDK_BUTTON1_MASK);
|
||||
event.m_middleDown = (gdk_event->state & GDK_BUTTON2_MASK);
|
||||
event.m_rightDown = (gdk_event->state & GDK_BUTTON3_MASK);
|
||||
|
||||
event.m_x = (wxCoord)gdk_event->x;
|
||||
event.m_y = (wxCoord)gdk_event->y;
|
||||
InitMouseEvent( win, event, gdk_event );
|
||||
|
||||
AdjustEventButtonState(event);
|
||||
|
||||
@@ -1461,16 +1472,7 @@ static gint gtk_window_button_release_callback( GtkWidget *widget, GdkEventButto
|
||||
}
|
||||
|
||||
wxMouseEvent event( event_type );
|
||||
event.SetTimestamp( gdk_event->time );
|
||||
event.m_shiftDown = (gdk_event->state & GDK_SHIFT_MASK);
|
||||
event.m_controlDown = (gdk_event->state & GDK_CONTROL_MASK);
|
||||
event.m_altDown = (gdk_event->state & GDK_MOD1_MASK);
|
||||
event.m_metaDown = (gdk_event->state & GDK_MOD2_MASK);
|
||||
event.m_leftDown = (gdk_event->state & GDK_BUTTON1_MASK);
|
||||
event.m_middleDown = (gdk_event->state & GDK_BUTTON2_MASK);
|
||||
event.m_rightDown = (gdk_event->state & GDK_BUTTON3_MASK);
|
||||
event.m_x = (wxCoord)gdk_event->x;
|
||||
event.m_y = (wxCoord)gdk_event->y;
|
||||
InitMouseEvent( win, event, gdk_event );
|
||||
|
||||
AdjustEventButtonState(event);
|
||||
|
||||
@@ -1557,24 +1559,6 @@ static gint gtk_window_button_release_callback( GtkWidget *widget, GdkEventButto
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// the mouse events
|
||||
// ============================================================================
|
||||
|
||||
// init wxMouseEvent with the info from gdk_event
|
||||
#define InitMouseEvent(event, gdk_event) \
|
||||
event.SetTimestamp( gdk_event->time ); \
|
||||
event.m_shiftDown = (gdk_event->state & GDK_SHIFT_MASK); \
|
||||
event.m_controlDown = (gdk_event->state & GDK_CONTROL_MASK); \
|
||||
event.m_altDown = (gdk_event->state & GDK_MOD1_MASK); \
|
||||
event.m_metaDown = (gdk_event->state & GDK_MOD2_MASK); \
|
||||
event.m_leftDown = (gdk_event->state & GDK_BUTTON1_MASK); \
|
||||
event.m_middleDown = (gdk_event->state & GDK_BUTTON2_MASK); \
|
||||
event.m_rightDown = (gdk_event->state & GDK_BUTTON3_MASK); \
|
||||
\
|
||||
event.m_x = (wxCoord)gdk_event->x; \
|
||||
event.m_y = (wxCoord)gdk_event->y \
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// "motion_notify_event"
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -1612,7 +1596,7 @@ static gint gtk_window_motion_notify_callback( GtkWidget *widget,
|
||||
*/
|
||||
|
||||
wxMouseEvent event( wxEVT_MOTION );
|
||||
InitMouseEvent(event, gdk_event);
|
||||
InitMouseEvent(win, event, gdk_event);
|
||||
|
||||
if ( g_captureWindow )
|
||||
{
|
||||
@@ -1626,7 +1610,7 @@ static gint gtk_window_motion_notify_callback( GtkWidget *widget,
|
||||
|
||||
wxMouseEvent event(g_captureWindowHasMouse ? wxEVT_ENTER_WINDOW
|
||||
: wxEVT_LEAVE_WINDOW);
|
||||
InitMouseEvent(event, gdk_event);
|
||||
InitMouseEvent(win, event, gdk_event);
|
||||
event.SetEventObject(win);
|
||||
win->GetEventHandler()->ProcessEvent(event);
|
||||
}
|
||||
@@ -1909,10 +1893,10 @@ static gint gtk_window_enter_callback( GtkWidget *widget, GdkEventCrossing *gdk_
|
||||
|
||||
gdk_window_get_pointer( widget->window, &x, &y, &state );
|
||||
|
||||
InitMouseEvent(event, gdk_event);
|
||||
|
||||
event.m_x = x;
|
||||
event.m_y = y;
|
||||
InitMouseEvent(win, event, gdk_event);
|
||||
wxPoint pt = win->GetClientAreaOrigin();
|
||||
event.m_x = x + pt.x;
|
||||
event.m_y = y + pt.y;
|
||||
|
||||
if (win->GetEventHandler()->ProcessEvent( event ))
|
||||
{
|
||||
@@ -1957,8 +1941,9 @@ static gint gtk_window_leave_callback( GtkWidget *widget, GdkEventCrossing *gdk_
|
||||
event.m_middleDown = (state & GDK_BUTTON2_MASK);
|
||||
event.m_rightDown = (state & GDK_BUTTON3_MASK);
|
||||
|
||||
event.m_x = x;
|
||||
event.m_y = y;
|
||||
wxPoint pt = win->GetClientAreaOrigin();
|
||||
event.m_x = x + pt.x;
|
||||
event.m_y = y + pt.y;
|
||||
|
||||
if (win->GetEventHandler()->ProcessEvent( event ))
|
||||
{
|
||||
|
@@ -255,14 +255,11 @@ IMPLEMENT_DYNAMIC_CLASS(wxBitmap,wxGDIObject)
|
||||
|
||||
wxBitmap::wxBitmap()
|
||||
{
|
||||
if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this);
|
||||
}
|
||||
|
||||
wxBitmap::wxBitmap( int width, int height, int depth )
|
||||
{
|
||||
Create( width, height, depth );
|
||||
|
||||
if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this);
|
||||
}
|
||||
|
||||
bool wxBitmap::Create( int width, int height, int depth )
|
||||
@@ -322,8 +319,6 @@ bool wxBitmap::CreateFromXpm( const char **bits )
|
||||
|
||||
M_BMPDATA->m_bpp = visual->depth; // ?
|
||||
|
||||
if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -334,8 +329,6 @@ bool wxBitmap::CreateFromImage( const wxImage& image, int depth )
|
||||
|
||||
m_refData = new wxBitmapRefData();
|
||||
|
||||
if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this);
|
||||
|
||||
// ------
|
||||
// convertion to mono bitmap:
|
||||
// ------
|
||||
@@ -774,15 +767,11 @@ wxImage wxBitmap::ConvertToImage() const
|
||||
wxBitmap::wxBitmap( const wxBitmap& bmp )
|
||||
{
|
||||
Ref( bmp );
|
||||
|
||||
if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this);
|
||||
}
|
||||
|
||||
wxBitmap::wxBitmap( const wxString &filename, int type )
|
||||
{
|
||||
LoadFile( filename, type );
|
||||
|
||||
if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this);
|
||||
}
|
||||
|
||||
wxBitmap::wxBitmap( const char bits[], int width, int height, int WXUNUSED(depth))
|
||||
@@ -797,19 +786,17 @@ wxBitmap::wxBitmap( const char bits[], int width, int height, int WXUNUSED(depth
|
||||
M_BMPDATA->m_bpp = 1;
|
||||
|
||||
wxCHECK_RET( M_BMPDATA->m_bitmap, wxT("couldn't create bitmap") );
|
||||
|
||||
if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this);
|
||||
}
|
||||
|
||||
wxBitmap::~wxBitmap()
|
||||
{
|
||||
if (wxTheBitmapList) wxTheBitmapList->DeleteObject(this);
|
||||
}
|
||||
|
||||
wxBitmap& wxBitmap::operator = ( const wxBitmap& bmp )
|
||||
{
|
||||
if (*this == bmp) return (*this);
|
||||
Ref( bmp );
|
||||
if ( m_refData != bmp.m_refData )
|
||||
Ref( bmp );
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
@@ -1,10 +1,10 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: brush.cpp
|
||||
// Name: src/gtk/brush.cpp
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id$
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __GNUG__
|
||||
@@ -50,7 +50,6 @@ IMPLEMENT_DYNAMIC_CLASS(wxBrush,wxGDIObject)
|
||||
|
||||
wxBrush::wxBrush()
|
||||
{
|
||||
if (wxTheBrushList) wxTheBrushList->AddBrush( this );
|
||||
}
|
||||
|
||||
wxBrush::wxBrush( const wxColour &colour, int style )
|
||||
@@ -58,41 +57,35 @@ wxBrush::wxBrush( const wxColour &colour, int style )
|
||||
m_refData = new wxBrushRefData();
|
||||
M_BRUSHDATA->m_style = style;
|
||||
M_BRUSHDATA->m_colour = colour;
|
||||
|
||||
if (wxTheBrushList) wxTheBrushList->AddBrush( this );
|
||||
}
|
||||
|
||||
wxBrush::wxBrush( const wxBitmap &stippleBitmap )
|
||||
{
|
||||
m_refData = new wxBrushRefData();
|
||||
M_BRUSHDATA->m_colour = *wxBLACK;
|
||||
|
||||
|
||||
M_BRUSHDATA->m_stipple = stippleBitmap;
|
||||
|
||||
if (M_BRUSHDATA->m_stipple.GetMask())
|
||||
M_BRUSHDATA->m_style = wxSTIPPLE_MASK_OPAQUE;
|
||||
else
|
||||
M_BRUSHDATA->m_style = wxSTIPPLE;
|
||||
|
||||
if (wxTheBrushList) wxTheBrushList->AddBrush( this );
|
||||
M_BRUSHDATA->m_style = wxSTIPPLE_MASK_OPAQUE;
|
||||
else
|
||||
M_BRUSHDATA->m_style = wxSTIPPLE;
|
||||
}
|
||||
|
||||
wxBrush::wxBrush( const wxBrush &brush )
|
||||
{
|
||||
Ref( brush );
|
||||
|
||||
if (wxTheBrushList) wxTheBrushList->AddBrush( this );
|
||||
}
|
||||
|
||||
wxBrush::~wxBrush()
|
||||
{
|
||||
if (wxTheBrushList) wxTheBrushList->RemoveBrush( this );
|
||||
}
|
||||
|
||||
wxBrush& wxBrush::operator = ( const wxBrush& brush )
|
||||
{
|
||||
if (*this == brush) return (*this);
|
||||
Ref( brush );
|
||||
if ( m_refData != brush.m_refData )
|
||||
Ref( brush );
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -168,12 +161,12 @@ void wxBrush::SetStipple( const wxBitmap& stipple )
|
||||
M_BRUSHDATA->m_stipple = stipple;
|
||||
if (M_BRUSHDATA->m_stipple.GetMask())
|
||||
{
|
||||
M_BRUSHDATA->m_style = wxSTIPPLE_MASK_OPAQUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
M_BRUSHDATA->m_style = wxSTIPPLE;
|
||||
}
|
||||
M_BRUSHDATA->m_style = wxSTIPPLE_MASK_OPAQUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
M_BRUSHDATA->m_style = wxSTIPPLE;
|
||||
}
|
||||
}
|
||||
|
||||
void wxBrush::Unshare()
|
||||
|
@@ -1,4 +1,4 @@
|
||||
# This file was automatically generated by tmake at 18:55, 2001/11/17
|
||||
# This file was automatically generated by tmake at 16:36, 2001/11/20
|
||||
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE GTK.T!
|
||||
ALL_SOURCES = \
|
||||
generic/accel.cpp \
|
||||
|
@@ -162,18 +162,18 @@ bool wxNativeFontInfo::FromString(const wxString& s)
|
||||
xFontName = tokenizer.GetNextToken();
|
||||
if(!xFontName)
|
||||
return FALSE;
|
||||
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
wxString wxNativeFontInfo::ToString() const
|
||||
{
|
||||
wxString s;
|
||||
|
||||
|
||||
s.Printf(_T("%d;%s"),
|
||||
0, // version
|
||||
xFontName.c_str());
|
||||
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
@@ -185,8 +185,6 @@ IMPLEMENT_DYNAMIC_CLASS(wxFont, wxGDIObject)
|
||||
|
||||
void wxFont::Init()
|
||||
{
|
||||
if (wxTheFontList)
|
||||
wxTheFontList->Append( this );
|
||||
}
|
||||
|
||||
wxFont::wxFont(const wxNativeFontInfo& info)
|
||||
@@ -334,8 +332,6 @@ void wxFont::Unshare()
|
||||
|
||||
wxFont::~wxFont()
|
||||
{
|
||||
if (wxTheFontList)
|
||||
wxTheFontList->DeleteObject( this );
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@@ -56,7 +56,7 @@ wxPenRefData::wxPenRefData( const wxPenRefData& data )
|
||||
m_countDashes = data.m_countDashes;
|
||||
/*
|
||||
if (data.m_dash) TODO
|
||||
m_dash = new
|
||||
m_dash = new
|
||||
*/
|
||||
m_dash = data.m_dash;
|
||||
}
|
||||
@@ -69,7 +69,6 @@ IMPLEMENT_DYNAMIC_CLASS(wxPen,wxGDIObject)
|
||||
|
||||
wxPen::wxPen()
|
||||
{
|
||||
if (wxThePenList) wxThePenList->AddPen( this );
|
||||
}
|
||||
|
||||
wxPen::wxPen( const wxColour &colour, int width, int style )
|
||||
@@ -78,25 +77,22 @@ wxPen::wxPen( const wxColour &colour, int width, int style )
|
||||
M_PENDATA->m_width = width;
|
||||
M_PENDATA->m_style = style;
|
||||
M_PENDATA->m_colour = colour;
|
||||
|
||||
if (wxThePenList) wxThePenList->AddPen( this );
|
||||
}
|
||||
|
||||
wxPen::wxPen( const wxPen& pen )
|
||||
{
|
||||
Ref( pen );
|
||||
if (wxThePenList) wxThePenList->AddPen( this );
|
||||
}
|
||||
|
||||
wxPen::~wxPen()
|
||||
{
|
||||
if (wxThePenList) wxThePenList->RemovePen( this );
|
||||
}
|
||||
|
||||
wxPen& wxPen::operator = ( const wxPen& pen )
|
||||
{
|
||||
if (*this == pen) return (*this);
|
||||
Ref( pen );
|
||||
if ( m_refData != pen.m_refData )
|
||||
Ref( pen );
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -153,20 +149,20 @@ void wxPen::SetWidth( int width )
|
||||
M_PENDATA->m_width = width;
|
||||
}
|
||||
|
||||
int wxPen::GetDashes( wxDash **ptr ) const
|
||||
int wxPen::GetDashes( wxDash **ptr ) const
|
||||
{
|
||||
*ptr = (M_PENDATA ? (wxDash*)M_PENDATA->m_dash : (wxDash*) NULL);
|
||||
*ptr = (M_PENDATA ? (wxDash*)M_PENDATA->m_dash : (wxDash*) NULL);
|
||||
return (M_PENDATA ? M_PENDATA->m_countDashes : 0);
|
||||
}
|
||||
|
||||
int wxPen::GetDashCount() const
|
||||
{
|
||||
return (M_PENDATA->m_countDashes);
|
||||
int wxPen::GetDashCount() const
|
||||
{
|
||||
return (M_PENDATA->m_countDashes);
|
||||
}
|
||||
|
||||
wxDash* wxPen::GetDash() const
|
||||
{
|
||||
return (wxDash*)M_PENDATA->m_dash;
|
||||
wxDash* wxPen::GetDash() const
|
||||
{
|
||||
return (wxDash*)M_PENDATA->m_dash;
|
||||
}
|
||||
|
||||
int wxPen::GetCap() const
|
||||
|
@@ -1208,6 +1208,27 @@ static gint gtk_window_key_release_callback( GtkWidget *widget, GdkEventKey *gdk
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// the mouse events
|
||||
// ============================================================================
|
||||
|
||||
// init wxMouseEvent with the info from gdk_event
|
||||
#define InitMouseEvent(win, event, gdk_event) \
|
||||
{ \
|
||||
event.SetTimestamp( gdk_event->time ); \
|
||||
event.m_shiftDown = (gdk_event->state & GDK_SHIFT_MASK); \
|
||||
event.m_controlDown = (gdk_event->state & GDK_CONTROL_MASK); \
|
||||
event.m_altDown = (gdk_event->state & GDK_MOD1_MASK); \
|
||||
event.m_metaDown = (gdk_event->state & GDK_MOD2_MASK); \
|
||||
event.m_leftDown = (gdk_event->state & GDK_BUTTON1_MASK); \
|
||||
event.m_middleDown = (gdk_event->state & GDK_BUTTON2_MASK); \
|
||||
event.m_rightDown = (gdk_event->state & GDK_BUTTON3_MASK); \
|
||||
\
|
||||
wxPoint pt = win->GetClientAreaOrigin(); \
|
||||
event.m_x = (wxCoord)gdk_event->x - pt.x; \
|
||||
event.m_y = (wxCoord)gdk_event->y - pt.y; \
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// mouse event processing helper
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -1320,17 +1341,7 @@ static gint gtk_window_button_press_callback( GtkWidget *widget, GdkEventButton
|
||||
}
|
||||
|
||||
wxMouseEvent event( event_type );
|
||||
event.SetTimestamp( gdk_event->time );
|
||||
event.m_shiftDown = (gdk_event->state & GDK_SHIFT_MASK);
|
||||
event.m_controlDown = (gdk_event->state & GDK_CONTROL_MASK);
|
||||
event.m_altDown = (gdk_event->state & GDK_MOD1_MASK);
|
||||
event.m_metaDown = (gdk_event->state & GDK_MOD2_MASK);
|
||||
event.m_leftDown = (gdk_event->state & GDK_BUTTON1_MASK);
|
||||
event.m_middleDown = (gdk_event->state & GDK_BUTTON2_MASK);
|
||||
event.m_rightDown = (gdk_event->state & GDK_BUTTON3_MASK);
|
||||
|
||||
event.m_x = (wxCoord)gdk_event->x;
|
||||
event.m_y = (wxCoord)gdk_event->y;
|
||||
InitMouseEvent( win, event, gdk_event );
|
||||
|
||||
AdjustEventButtonState(event);
|
||||
|
||||
@@ -1461,16 +1472,7 @@ static gint gtk_window_button_release_callback( GtkWidget *widget, GdkEventButto
|
||||
}
|
||||
|
||||
wxMouseEvent event( event_type );
|
||||
event.SetTimestamp( gdk_event->time );
|
||||
event.m_shiftDown = (gdk_event->state & GDK_SHIFT_MASK);
|
||||
event.m_controlDown = (gdk_event->state & GDK_CONTROL_MASK);
|
||||
event.m_altDown = (gdk_event->state & GDK_MOD1_MASK);
|
||||
event.m_metaDown = (gdk_event->state & GDK_MOD2_MASK);
|
||||
event.m_leftDown = (gdk_event->state & GDK_BUTTON1_MASK);
|
||||
event.m_middleDown = (gdk_event->state & GDK_BUTTON2_MASK);
|
||||
event.m_rightDown = (gdk_event->state & GDK_BUTTON3_MASK);
|
||||
event.m_x = (wxCoord)gdk_event->x;
|
||||
event.m_y = (wxCoord)gdk_event->y;
|
||||
InitMouseEvent( win, event, gdk_event );
|
||||
|
||||
AdjustEventButtonState(event);
|
||||
|
||||
@@ -1557,24 +1559,6 @@ static gint gtk_window_button_release_callback( GtkWidget *widget, GdkEventButto
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// the mouse events
|
||||
// ============================================================================
|
||||
|
||||
// init wxMouseEvent with the info from gdk_event
|
||||
#define InitMouseEvent(event, gdk_event) \
|
||||
event.SetTimestamp( gdk_event->time ); \
|
||||
event.m_shiftDown = (gdk_event->state & GDK_SHIFT_MASK); \
|
||||
event.m_controlDown = (gdk_event->state & GDK_CONTROL_MASK); \
|
||||
event.m_altDown = (gdk_event->state & GDK_MOD1_MASK); \
|
||||
event.m_metaDown = (gdk_event->state & GDK_MOD2_MASK); \
|
||||
event.m_leftDown = (gdk_event->state & GDK_BUTTON1_MASK); \
|
||||
event.m_middleDown = (gdk_event->state & GDK_BUTTON2_MASK); \
|
||||
event.m_rightDown = (gdk_event->state & GDK_BUTTON3_MASK); \
|
||||
\
|
||||
event.m_x = (wxCoord)gdk_event->x; \
|
||||
event.m_y = (wxCoord)gdk_event->y \
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// "motion_notify_event"
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -1612,7 +1596,7 @@ static gint gtk_window_motion_notify_callback( GtkWidget *widget,
|
||||
*/
|
||||
|
||||
wxMouseEvent event( wxEVT_MOTION );
|
||||
InitMouseEvent(event, gdk_event);
|
||||
InitMouseEvent(win, event, gdk_event);
|
||||
|
||||
if ( g_captureWindow )
|
||||
{
|
||||
@@ -1626,7 +1610,7 @@ static gint gtk_window_motion_notify_callback( GtkWidget *widget,
|
||||
|
||||
wxMouseEvent event(g_captureWindowHasMouse ? wxEVT_ENTER_WINDOW
|
||||
: wxEVT_LEAVE_WINDOW);
|
||||
InitMouseEvent(event, gdk_event);
|
||||
InitMouseEvent(win, event, gdk_event);
|
||||
event.SetEventObject(win);
|
||||
win->GetEventHandler()->ProcessEvent(event);
|
||||
}
|
||||
@@ -1909,10 +1893,10 @@ static gint gtk_window_enter_callback( GtkWidget *widget, GdkEventCrossing *gdk_
|
||||
|
||||
gdk_window_get_pointer( widget->window, &x, &y, &state );
|
||||
|
||||
InitMouseEvent(event, gdk_event);
|
||||
|
||||
event.m_x = x;
|
||||
event.m_y = y;
|
||||
InitMouseEvent(win, event, gdk_event);
|
||||
wxPoint pt = win->GetClientAreaOrigin();
|
||||
event.m_x = x + pt.x;
|
||||
event.m_y = y + pt.y;
|
||||
|
||||
if (win->GetEventHandler()->ProcessEvent( event ))
|
||||
{
|
||||
@@ -1957,8 +1941,9 @@ static gint gtk_window_leave_callback( GtkWidget *widget, GdkEventCrossing *gdk_
|
||||
event.m_middleDown = (state & GDK_BUTTON2_MASK);
|
||||
event.m_rightDown = (state & GDK_BUTTON3_MASK);
|
||||
|
||||
event.m_x = x;
|
||||
event.m_y = y;
|
||||
wxPoint pt = win->GetClientAreaOrigin();
|
||||
event.m_x = x + pt.x;
|
||||
event.m_y = y + pt.y;
|
||||
|
||||
if (win->GetEventHandler()->ProcessEvent( event ))
|
||||
{
|
||||
|
@@ -1,172 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: filter.cpp
|
||||
// Purpose: wxHtmlFilter - input filter for translating into HTML format
|
||||
// Author: Vaclav Slavik
|
||||
// Copyright: (c) 1999 Vaclav Slavik
|
||||
// Licence: wxWindows Licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma implementation "htmlfilter.h"
|
||||
#endif
|
||||
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#if wxUSE_HTML
|
||||
|
||||
#ifdef __BORDLANDC__
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#ifndef WXPRECOMP
|
||||
#endif
|
||||
|
||||
#include "wx/html/htmlfilter.h"
|
||||
#include "wx/html/htmlwin.h"
|
||||
|
||||
|
||||
/*
|
||||
|
||||
There is code for several default filters:
|
||||
|
||||
*/
|
||||
|
||||
IMPLEMENT_ABSTRACT_CLASS(wxHtmlFilter, wxObject)
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// wxHtmlFilterPlainText
|
||||
// filter for text/plain or uknown
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxHtmlFilterPlainText, wxHtmlFilter)
|
||||
|
||||
bool wxHtmlFilterPlainText::CanRead(const wxFSFile& WXUNUSED(file)) const
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
wxString wxHtmlFilterPlainText::ReadFile(const wxFSFile& file) const
|
||||
{
|
||||
wxInputStream *s = file.GetStream();
|
||||
char *src;
|
||||
wxString doc, doc2;
|
||||
|
||||
if (s == NULL) return wxEmptyString;
|
||||
src = new char[s -> GetSize()+1];
|
||||
src[s -> GetSize()] = 0;
|
||||
s -> Read(src, s -> GetSize());
|
||||
doc = src;
|
||||
delete [] src;
|
||||
|
||||
doc.Replace(_T("<"), _T("<"), TRUE);
|
||||
doc.Replace(_T(">"), _T(">"), TRUE);
|
||||
doc2 = _T("<HTML><BODY><PRE>\n") + doc + _T("\n</PRE></BODY></HTML>");
|
||||
return doc2;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// wxHtmlFilterImage
|
||||
// filter for image/*
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
class wxHtmlFilterImage : public wxHtmlFilter
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxHtmlFilterImage)
|
||||
|
||||
public:
|
||||
virtual bool CanRead(const wxFSFile& file) const;
|
||||
virtual wxString ReadFile(const wxFSFile& file) const;
|
||||
};
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxHtmlFilterImage, wxHtmlFilter)
|
||||
|
||||
|
||||
|
||||
bool wxHtmlFilterImage::CanRead(const wxFSFile& file) const
|
||||
{
|
||||
return (file.GetMimeType().Left(6) == "image/");
|
||||
}
|
||||
|
||||
|
||||
|
||||
wxString wxHtmlFilterImage::ReadFile(const wxFSFile& file) const
|
||||
{
|
||||
return ("<HTML><BODY><IMG SRC=\"" + file.GetLocation() + "\"></BODY></HTML>");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// wxHtmlFilterPlainText
|
||||
// filter for text/plain or uknown
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
class wxHtmlFilterHTML : public wxHtmlFilter
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxHtmlFilterHTML)
|
||||
|
||||
public:
|
||||
virtual bool CanRead(const wxFSFile& file) const;
|
||||
virtual wxString ReadFile(const wxFSFile& file) const;
|
||||
};
|
||||
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxHtmlFilterHTML, wxHtmlFilter)
|
||||
|
||||
bool wxHtmlFilterHTML::CanRead(const wxFSFile& file) const
|
||||
{
|
||||
// return (file.GetMimeType() == "text/html");
|
||||
// This is true in most case but some page can return:
|
||||
// "text/html; char-encoding=...."
|
||||
// So we use Find instead
|
||||
return (file.GetMimeType().Find(_T("text/html")) == 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
wxString wxHtmlFilterHTML::ReadFile(const wxFSFile& file) const
|
||||
{
|
||||
wxInputStream *s = file.GetStream();
|
||||
char *src;
|
||||
wxString doc;
|
||||
|
||||
if (s == NULL) return wxEmptyString;
|
||||
src = new char[s -> GetSize() + 1];
|
||||
src[s -> GetSize()] = 0;
|
||||
s -> Read(src, s -> GetSize());
|
||||
doc = src;
|
||||
delete[] src;
|
||||
|
||||
return doc;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
///// Module:
|
||||
|
||||
class wxHtmlFilterModule : public wxModule
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxHtmlFilterModule)
|
||||
|
||||
public:
|
||||
virtual bool OnInit()
|
||||
{
|
||||
wxHtmlWindow::AddFilter(new wxHtmlFilterHTML);
|
||||
wxHtmlWindow::AddFilter(new wxHtmlFilterImage);
|
||||
return TRUE;
|
||||
}
|
||||
virtual void OnExit() {}
|
||||
};
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxHtmlFilterModule, wxModule)
|
||||
|
||||
#endif
|
@@ -1,833 +0,0 @@
|
||||
// Name: htmlhelp.cpp
|
||||
// Purpose: Help controller
|
||||
// Author: Vaclav Slavik
|
||||
// Copyright: (c) 1999 Vaclav Slavik
|
||||
// Licence: wxWindows Licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#error This file should not be compiled! Update your build system! \
|
||||
(configure users, rerun configure to get a new Makefile) \
|
||||
Instead of htmlhelp[_io], use helpdata, helpfrm and helpctrl. This \
|
||||
file is only left to point out the problem and will be removed r.s.n.
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma implementation "htmlhelp.h"
|
||||
#endif
|
||||
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#if wxUSE_HTML
|
||||
|
||||
#ifdef __BORDLANDC__
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#ifndef WXPRECOMP
|
||||
#endif
|
||||
|
||||
#include <wx/notebook.h>
|
||||
#include <wx/imaglist.h>
|
||||
#include <wx/treectrl.h>
|
||||
#include <wx/tokenzr.h>
|
||||
#include <wx/wfstream.h>
|
||||
#include <wx/html/htmlwin.h>
|
||||
#include <wx/html/htmlhelp.h>
|
||||
#include <wx/busyinfo.h>
|
||||
|
||||
#if !((wxVERSION_NUMBER < 2100) || ((wxVERSION_NUMBER == 2100) && (wxBETA_NUMBER < 7)))
|
||||
#include <wx/progdlg.h>
|
||||
#endif
|
||||
|
||||
|
||||
// Bitmaps:
|
||||
|
||||
#ifndef __WXMSW__
|
||||
#include "bitmaps/panel.xpm"
|
||||
#include "bitmaps/back.xpm"
|
||||
#include "bitmaps/forward.xpm"
|
||||
#include "bitmaps/book.xpm"
|
||||
#include "bitmaps/folder.xpm"
|
||||
#include "bitmaps/page.xpm"
|
||||
#endif
|
||||
|
||||
#include "search.h"
|
||||
|
||||
|
||||
|
||||
|
||||
#include <wx/arrimpl.cpp>
|
||||
WX_DEFINE_OBJARRAY(HtmlBookRecArray)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxHtmlHelpController
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxHtmlHelpController, wxEvtHandler)
|
||||
|
||||
|
||||
wxHtmlHelpController::wxHtmlHelpController() : wxEvtHandler()
|
||||
{
|
||||
m_Frame = NULL;
|
||||
m_Config = NULL;
|
||||
m_ConfigRoot = wxEmptyString;
|
||||
m_TitleFormat = _("Help : %s");
|
||||
m_TempPath = wxEmptyString;
|
||||
|
||||
m_Cfg.x = m_Cfg.y = 0;
|
||||
m_Cfg.w = 700; m_Cfg.h = 480;
|
||||
m_Cfg.sashpos = 240;
|
||||
m_Cfg.navig_on = TRUE;
|
||||
|
||||
m_ContentsImageList = new wxImageList(12, 12);
|
||||
m_ContentsImageList -> Add(wxICON(book));
|
||||
m_ContentsImageList -> Add(wxICON(folder));
|
||||
m_ContentsImageList -> Add(wxICON(page));
|
||||
|
||||
m_Contents = NULL;
|
||||
m_ContentsCnt = 0;
|
||||
m_Index = NULL;
|
||||
m_IndexCnt = 0;
|
||||
|
||||
m_IndexBox = NULL;
|
||||
m_ContentsBox = NULL;
|
||||
m_SearchList = NULL;
|
||||
m_SearchText = NULL;
|
||||
m_SearchButton = NULL;
|
||||
m_HtmlWin = NULL;
|
||||
m_Splitter = NULL;
|
||||
m_NavigPan = NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
wxHtmlHelpController::~wxHtmlHelpController()
|
||||
{
|
||||
int i;
|
||||
|
||||
m_BookRecords.Empty();
|
||||
delete m_ContentsImageList;
|
||||
if (m_Contents) {
|
||||
for (i = 0; i < m_ContentsCnt; i++) {
|
||||
delete[] m_Contents[i].m_Page;
|
||||
delete[] m_Contents[i].m_Name;
|
||||
}
|
||||
free(m_Contents);
|
||||
}
|
||||
if (m_Index) {
|
||||
for (i = 0; i < m_IndexCnt; i++) {
|
||||
delete[] m_Index[i].m_Page;
|
||||
delete[] m_Index[i].m_Name;
|
||||
}
|
||||
free(m_Index);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void wxHtmlHelpController::SetTempDir(const wxString& path)
|
||||
{
|
||||
if (path == wxEmptyString) m_TempPath = path;
|
||||
else {
|
||||
if (wxIsAbsolutePath(path)) m_TempPath = path;
|
||||
else m_TempPath = wxGetCwd() + "/" + path;
|
||||
|
||||
if (m_TempPath[m_TempPath.Length() - 1] != '/')
|
||||
m_TempPath << "/";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Reads one line, stores it into buf and returns pointer to new line or NULL.
|
||||
static char* ReadLine(char *line, char *buf)
|
||||
{
|
||||
char *writeptr = buf, *readptr = line;
|
||||
|
||||
while (*readptr != 0 && *readptr != '\r' && *readptr != '\n') *(writeptr++) = *(readptr++);
|
||||
*writeptr = 0;
|
||||
while (*readptr == '\r' || *readptr == '\n') readptr++;
|
||||
if (*readptr == 0) return NULL;
|
||||
else return readptr;
|
||||
}
|
||||
|
||||
|
||||
static wxString SafeFileName(const wxString& s)
|
||||
{
|
||||
wxString res = s;
|
||||
res.Replace(_T(":"), _T("_"), TRUE);
|
||||
res.Replace(_T(" "), _T("_"), TRUE);
|
||||
res.Replace(_T("/"), _T("_"), TRUE);
|
||||
res.Replace(_T("\\"), _T("_"), TRUE);
|
||||
res.Replace(_T("#"), _T("_"), TRUE);
|
||||
res.Replace(_T("."), _T("_"), TRUE);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
static int IndexCompareFunc(const void *a, const void *b)
|
||||
{
|
||||
return strcmp(((HtmlContentsItem*)a) -> m_Name, ((HtmlContentsItem*)b) -> m_Name);
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool wxHtmlHelpController::AddBook(const wxString& book, bool show_wait_msg)
|
||||
{
|
||||
wxFSFile *fi;
|
||||
wxFileSystem fsys;
|
||||
wxInputStream *s;
|
||||
HtmlBookRecord *bookr;
|
||||
wxString bookFull;
|
||||
|
||||
int sz;
|
||||
char *buff, *lineptr;
|
||||
char linebuf[300];
|
||||
|
||||
wxString title = _("noname"),
|
||||
safetitle,
|
||||
start = wxEmptyString,
|
||||
contents = wxEmptyString, index = wxEmptyString;
|
||||
|
||||
if (wxIsAbsolutePath(book)) bookFull = book;
|
||||
else bookFull = wxGetCwd() + "/" + book;
|
||||
|
||||
fi = fsys.OpenFile(bookFull);
|
||||
if (fi == NULL) return FALSE;
|
||||
fsys.ChangePathTo(bookFull);
|
||||
s = fi -> GetStream();
|
||||
sz = s -> GetSize();
|
||||
buff = new char[sz+1];
|
||||
buff[sz] = 0;
|
||||
s -> Read(buff, sz);
|
||||
lineptr = buff;
|
||||
delete fi;
|
||||
|
||||
while ((lineptr = ReadLine(lineptr, linebuf)) != NULL) {
|
||||
if (strstr(linebuf, "Title=") == linebuf)
|
||||
title = linebuf + strlen("Title=");
|
||||
if (strstr(linebuf, "Default topic=") == linebuf)
|
||||
start = linebuf + strlen("Default topic=");
|
||||
if (strstr(linebuf, "Index file=") == linebuf)
|
||||
index = linebuf + strlen("Index file=");
|
||||
if (strstr(linebuf, "Contents file=") == linebuf)
|
||||
contents = linebuf + strlen("Contents file=");
|
||||
}
|
||||
delete[] buff;
|
||||
|
||||
bookr = new HtmlBookRecord(fsys.GetPath(), title, start);
|
||||
|
||||
if (m_ContentsCnt % HTML_REALLOC_STEP == 0)
|
||||
m_Contents = (HtmlContentsItem*) realloc(m_Contents, (m_ContentsCnt + HTML_REALLOC_STEP) * sizeof(HtmlContentsItem));
|
||||
m_Contents[m_ContentsCnt].m_Level = 0;
|
||||
m_Contents[m_ContentsCnt].m_ID = 0;
|
||||
m_Contents[m_ContentsCnt].m_Page = new char[start.Length() + 1];
|
||||
strcpy(m_Contents[m_ContentsCnt].m_Page, start.c_str());
|
||||
m_Contents[m_ContentsCnt].m_Name = new char [title.Length() + 1];
|
||||
strcpy(m_Contents[m_ContentsCnt].m_Name, title.c_str());
|
||||
m_Contents[m_ContentsCnt].m_Book = bookr;
|
||||
m_ContentsCnt++;
|
||||
|
||||
// Try to find cached binary versions:
|
||||
safetitle = SafeFileName(title);
|
||||
fi = fsys.OpenFile(safetitle + ".cached");
|
||||
if (fi == NULL) fi = fsys.OpenFile(m_TempPath + safetitle + ".cached");
|
||||
if ((fi == NULL) || (m_TempPath == wxEmptyString)) {
|
||||
LoadMSProject(bookr, fsys, index, contents, show_wait_msg);
|
||||
if (m_TempPath != wxEmptyString) {
|
||||
wxFileOutputStream *outs = new wxFileOutputStream(m_TempPath + safetitle + ".cached");
|
||||
SaveCachedBook(bookr, outs);
|
||||
delete outs;
|
||||
}
|
||||
}
|
||||
else {
|
||||
LoadCachedBook(bookr, fi -> GetStream());
|
||||
delete fi;
|
||||
}
|
||||
|
||||
m_BookRecords.Add(bookr);
|
||||
if (m_IndexCnt > 0)
|
||||
qsort(m_Index, m_IndexCnt, sizeof(HtmlContentsItem), IndexCompareFunc);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void wxHtmlHelpController::Display(const wxString& x)
|
||||
{
|
||||
int cnt;
|
||||
int i;
|
||||
wxFileSystem fsys;
|
||||
wxFSFile *f;
|
||||
|
||||
CreateHelpWindow();
|
||||
|
||||
/* 1. try to open given file: */
|
||||
|
||||
cnt = m_BookRecords.GetCount();
|
||||
for (i = 0; i < cnt; i++) {
|
||||
f = fsys.OpenFile(m_BookRecords[i].GetBasePath() + x);
|
||||
if (f) {
|
||||
m_HtmlWin -> LoadPage(m_BookRecords[i].GetBasePath() + x);
|
||||
delete f;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* 2. try to find a book: */
|
||||
|
||||
for (i = 0; i < cnt; i++) {
|
||||
if (m_BookRecords[i].GetTitle() == x) {
|
||||
m_HtmlWin -> LoadPage(m_BookRecords[i].GetBasePath() + m_BookRecords[i].GetStart());
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/* 3. try to find in contents: */
|
||||
|
||||
cnt = m_ContentsCnt;
|
||||
for (i = 0; i < cnt; i++) {
|
||||
if (strcmp(m_Contents[i].m_Name, x) == 0) {
|
||||
m_HtmlWin -> LoadPage(m_Contents[i].m_Book -> GetBasePath() + m_Contents[i].m_Page);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* 4. try to find in index: */
|
||||
|
||||
cnt = m_IndexCnt;
|
||||
for (i = 0; i < cnt; i++) {
|
||||
if (strcmp(m_Index[i].m_Name, x) == 0) {
|
||||
m_HtmlWin -> LoadPage(m_Index[i].m_Book -> GetBasePath() + m_Index[i].m_Page);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* 5. if everything failed, search the documents: */
|
||||
|
||||
KeywordSearch(x);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void wxHtmlHelpController::Display(const int id)
|
||||
{
|
||||
CreateHelpWindow();
|
||||
|
||||
for (int i = 0; i < m_ContentsCnt; i++) {
|
||||
if (m_Contents[i].m_ID == id) {
|
||||
m_HtmlWin -> LoadPage(m_Contents[i].m_Book -> GetBasePath() + m_Contents[i].m_Page);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void wxHtmlHelpController::DisplayContents()
|
||||
{
|
||||
CreateHelpWindow();
|
||||
m_Frame -> Raise();
|
||||
if (!m_Splitter -> IsSplit()) {
|
||||
m_NavigPan -> Show(TRUE);
|
||||
m_HtmlWin -> Show(TRUE);
|
||||
m_Splitter -> SplitVertically(m_NavigPan, m_HtmlWin, m_Cfg.sashpos);
|
||||
}
|
||||
m_NavigPan -> SetSelection(0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void wxHtmlHelpController::DisplayIndex()
|
||||
{
|
||||
CreateHelpWindow();
|
||||
m_Frame -> Raise();
|
||||
if (!m_Splitter -> IsSplit()) {
|
||||
m_NavigPan -> Show(TRUE);
|
||||
m_HtmlWin -> Show(TRUE);
|
||||
m_Splitter -> SplitVertically(m_NavigPan, m_HtmlWin, m_Cfg.sashpos);
|
||||
}
|
||||
m_NavigPan -> SetSelection(1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#if (wxVERSION_NUMBER < 2100) || ((wxVERSION_NUMBER == 2100) && (wxBETA_NUMBER < 7))
|
||||
|
||||
class MyProgressDlg : public wxDialog
|
||||
{
|
||||
public:
|
||||
bool m_Canceled;
|
||||
|
||||
MyProgressDlg(wxWindow *parent) : wxDialog(parent, -1,
|
||||
_("Searching..."),
|
||||
wxPoint(0, 0),
|
||||
#ifdef __WXGTK__
|
||||
wxSize(300, 110))
|
||||
#else
|
||||
wxSize(300, 130))
|
||||
#endif
|
||||
{m_Canceled = FALSE;}
|
||||
void OnCancel(wxCommandEvent& event) {m_Canceled = TRUE;}
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
BEGIN_EVENT_TABLE(MyProgressDlg, wxDialog)
|
||||
EVT_BUTTON(wxID_CANCEL, MyProgressDlg::OnCancel)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
bool wxHtmlHelpController::KeywordSearch(const wxString& keyword)
|
||||
{
|
||||
int foundcnt = 0;
|
||||
CreateHelpWindow();
|
||||
// if these are not set, we can't continue
|
||||
if (! (m_SearchList && m_HtmlWin))
|
||||
return FALSE;
|
||||
m_Frame -> Raise();
|
||||
if (m_Splitter && m_NavigPan && m_SearchButton) {
|
||||
if (!m_Splitter -> IsSplit()) {
|
||||
m_NavigPan -> Show(TRUE);
|
||||
m_HtmlWin -> Show(TRUE);
|
||||
m_Splitter -> SplitVertically(m_NavigPan, m_HtmlWin, m_Cfg.sashpos);
|
||||
}
|
||||
m_NavigPan -> SetSelection(2);
|
||||
m_SearchList -> Clear();
|
||||
m_SearchText -> SetValue(keyword);
|
||||
m_SearchButton -> Enable(FALSE);
|
||||
}
|
||||
{
|
||||
int cnt = m_ContentsCnt;
|
||||
wxSearchEngine engine;
|
||||
wxFileSystem fsys;
|
||||
wxFSFile *file;
|
||||
wxString lastpage = wxEmptyString;
|
||||
wxString foundstr;
|
||||
|
||||
#if (wxVERSION_NUMBER < 2100) || ((wxVERSION_NUMBER == 2100) && (wxBETA_NUMBER < 7))
|
||||
MyProgressDlg progress(m_Frame);
|
||||
|
||||
wxStaticText *prompt = new wxStaticText(&progress, -1, "", wxPoint(20, 50), wxSize(260, 25), wxALIGN_CENTER);
|
||||
wxGauge *gauge = new wxGauge(&progress, -1, cnt, wxPoint(20, 20), wxSize(260, 25));
|
||||
wxButton *btn = new wxButton(&progress, wxID_CANCEL, _("Cancel"), wxPoint(110, 70), wxSize(80, 25));
|
||||
btn = btn; /* fool compiler :-) */
|
||||
prompt -> SetLabel(_("No matching page found yet"));
|
||||
|
||||
progress.Centre(wxBOTH);
|
||||
progress.Show(TRUE);
|
||||
#else
|
||||
wxProgressDialog progress(_("Searching..."), _("No matching page found yet"), cnt, m_Frame, wxPD_APP_MODAL | wxPD_CAN_ABORT | wxPD_AUTO_HIDE);
|
||||
#endif
|
||||
|
||||
engine.LookFor(keyword);
|
||||
|
||||
for (int i = 0; i < cnt; i++) {
|
||||
#if (wxVERSION_NUMBER < 2100) || ((wxVERSION_NUMBER == 2100) && (wxBETA_NUMBER < 7))
|
||||
gauge -> SetValue(i);
|
||||
if (progress.m_Canceled) break;
|
||||
#else
|
||||
if (progress.Update(i) == FALSE) break;
|
||||
#endif
|
||||
wxYield();
|
||||
|
||||
file = fsys.OpenFile(m_Contents[i].m_Book -> GetBasePath() + m_Contents[i].m_Page);
|
||||
if (file) {
|
||||
if (lastpage != file -> GetLocation()) {
|
||||
lastpage = file -> GetLocation();
|
||||
if (engine.Scan(file -> GetStream())) {
|
||||
foundstr.Printf(_("Found %i matches"), ++foundcnt);
|
||||
#if (wxVERSION_NUMBER < 2100) || ((wxVERSION_NUMBER == 2100) && (wxBETA_NUMBER < 7))
|
||||
prompt -> SetLabel(foundstr);
|
||||
#else
|
||||
progress.Update(i, foundstr);
|
||||
#endif
|
||||
wxYield();
|
||||
m_SearchList -> Append(m_Contents[i].m_Name, (char*)(m_Contents + i));
|
||||
}
|
||||
}
|
||||
delete file;
|
||||
}
|
||||
}
|
||||
|
||||
#if (wxVERSION_NUMBER < 2100) || ((wxVERSION_NUMBER == 2100) && (wxBETA_NUMBER < 7))
|
||||
progress.Close(TRUE);
|
||||
#endif
|
||||
}
|
||||
if (m_SearchButton)
|
||||
m_SearchButton -> Enable(TRUE);
|
||||
if (m_SearchText) {
|
||||
m_SearchText -> SetSelection(0, keyword.Length());
|
||||
m_SearchText -> SetFocus();
|
||||
}
|
||||
if (foundcnt) {
|
||||
HtmlContentsItem *it = (HtmlContentsItem*) m_SearchList -> GetClientData(0);
|
||||
if (it) m_HtmlWin -> LoadPage(it -> m_Book -> GetBasePath() + it -> m_Page);
|
||||
}
|
||||
return (foundcnt > 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void wxHtmlHelpController::CreateHelpWindow()
|
||||
{
|
||||
wxBusyCursor cur;
|
||||
wxString oldpath;
|
||||
wxStatusBar *sbar;
|
||||
|
||||
if (m_Frame) {
|
||||
m_Frame -> Raise();
|
||||
m_Frame -> Show(TRUE);
|
||||
return;
|
||||
}
|
||||
|
||||
#if wxUSE_BUSYINFO
|
||||
wxBusyInfo busyinfo(_("Preparing help window..."));
|
||||
#endif
|
||||
|
||||
if (m_Config) ReadCustomization(m_Config, m_ConfigRoot);
|
||||
|
||||
m_Frame = new wxFrame(NULL, -1, "", wxPoint(m_Cfg.x, m_Cfg.y), wxSize(m_Cfg.w, m_Cfg.h));
|
||||
m_Frame -> PushEventHandler(this);
|
||||
sbar = m_Frame -> CreateStatusBar();
|
||||
|
||||
{
|
||||
wxToolBar *toolBar;
|
||||
toolBar = m_Frame -> CreateToolBar(wxNO_BORDER | wxTB_HORIZONTAL | wxTB_FLAT | wxTB_DOCKABLE);
|
||||
toolBar -> SetMargins(2, 2);
|
||||
wxBitmap* toolBarBitmaps[3];
|
||||
|
||||
#ifdef __WXMSW__
|
||||
toolBarBitmaps[0] = new wxBitmap("panel");
|
||||
toolBarBitmaps[1] = new wxBitmap("back");
|
||||
toolBarBitmaps[2] = new wxBitmap("forward");
|
||||
int width = 24;
|
||||
#else
|
||||
toolBarBitmaps[0] = new wxBitmap(panel_xpm);
|
||||
toolBarBitmaps[1] = new wxBitmap(back_xpm);
|
||||
toolBarBitmaps[2] = new wxBitmap(forward_xpm);
|
||||
int width = 16;
|
||||
#endif
|
||||
|
||||
int currentX = 5;
|
||||
|
||||
toolBar -> AddTool(wxID_HTML_PANEL, *(toolBarBitmaps[0]), wxNullBitmap, FALSE, currentX, -1, (wxObject *) NULL, _("Show/hide navigation panel"));
|
||||
currentX += width + 5;
|
||||
toolBar -> AddSeparator();
|
||||
toolBar -> AddTool(wxID_HTML_BACK, *(toolBarBitmaps[1]), wxNullBitmap, FALSE, currentX, -1, (wxObject *) NULL, _("Go back to the previous HTML page"));
|
||||
currentX += width + 5;
|
||||
toolBar -> AddTool(wxID_HTML_FORWARD, *(toolBarBitmaps[2]), wxNullBitmap, FALSE, currentX, -1, (wxObject *) NULL, _("Go forward to the next HTML page"));
|
||||
currentX += width + 5;
|
||||
|
||||
toolBar -> Realize();
|
||||
|
||||
// Can delete the bitmaps since they're reference counted
|
||||
for (int i = 0; i < 3; i++) delete toolBarBitmaps[i];
|
||||
}
|
||||
|
||||
|
||||
{
|
||||
m_Splitter = new wxSplitterWindow(m_Frame);
|
||||
|
||||
m_HtmlWin = new wxHtmlWindow(m_Splitter);
|
||||
m_HtmlWin -> SetRelatedFrame(m_Frame, m_TitleFormat);
|
||||
m_HtmlWin -> SetRelatedStatusBar(0);
|
||||
if (m_Config) m_HtmlWin -> ReadCustomization(m_Config, m_ConfigRoot);
|
||||
|
||||
m_NavigPan = new wxNotebook(m_Splitter, wxID_HTML_NOTEBOOK, wxDefaultPosition, wxDefaultSize);
|
||||
{
|
||||
m_ContentsBox = new wxTreeCtrl(m_NavigPan, wxID_HTML_TREECTRL, wxDefaultPosition, wxDefaultSize, wxTR_HAS_BUTTONS | wxSUNKEN_BORDER);
|
||||
m_ContentsBox -> SetImageList(m_ContentsImageList);
|
||||
m_NavigPan -> AddPage(m_ContentsBox, _("Contents"));
|
||||
}
|
||||
|
||||
{
|
||||
wxWindow *dummy = new wxPanel(m_NavigPan, wxID_HTML_INDEXPAGE);
|
||||
wxLayoutConstraints *b1 = new wxLayoutConstraints;
|
||||
b1 -> top.SameAs (dummy, wxTop, 0);
|
||||
b1 -> left.SameAs (dummy, wxLeft, 0);
|
||||
b1 -> width.PercentOf (dummy, wxWidth, 100);
|
||||
b1 -> bottom.SameAs (dummy, wxBottom, 0);
|
||||
m_IndexBox = new wxListBox(dummy, wxID_HTML_INDEXLIST, wxDefaultPosition, wxDefaultSize, 0);
|
||||
m_IndexBox -> SetConstraints(b1);
|
||||
dummy -> SetAutoLayout(TRUE);
|
||||
m_NavigPan -> AddPage(dummy, _("Index"));
|
||||
}
|
||||
|
||||
{
|
||||
wxWindow *dummy = new wxPanel(m_NavigPan, wxID_HTML_SEARCHPAGE);
|
||||
|
||||
wxLayoutConstraints *b1 = new wxLayoutConstraints;
|
||||
m_SearchText = new wxTextCtrl(dummy, wxID_HTML_SEARCHTEXT);
|
||||
b1 -> top.SameAs (dummy, wxTop, 0);
|
||||
b1 -> left.SameAs (dummy, wxLeft, 0);
|
||||
b1 -> right.SameAs (dummy, wxRight, 0);
|
||||
b1 -> height.AsIs();
|
||||
m_SearchText -> SetConstraints(b1);
|
||||
|
||||
wxLayoutConstraints *b2 = new wxLayoutConstraints;
|
||||
m_SearchButton = new wxButton(dummy, wxID_HTML_SEARCHBUTTON, _("Search!"));
|
||||
b2 -> top.Below (m_SearchText, 10);
|
||||
b2 -> right.SameAs (dummy, wxRight, 10);
|
||||
b2 -> width.AsIs();
|
||||
b2 -> height.AsIs();
|
||||
m_SearchButton -> SetConstraints(b2);
|
||||
|
||||
wxLayoutConstraints *b3 = new wxLayoutConstraints;
|
||||
m_SearchList = new wxListBox(dummy, wxID_HTML_SEARCHLIST, wxDefaultPosition, wxDefaultSize, 0);
|
||||
b3 -> top.Below (m_SearchButton, 10);
|
||||
b3 -> left.SameAs (dummy, wxLeft, 0);
|
||||
b3 -> right.SameAs (dummy, wxRight, 0);
|
||||
b3 -> bottom.SameAs (dummy, wxBottom, 0);
|
||||
m_SearchList -> SetConstraints(b3);
|
||||
|
||||
dummy -> SetAutoLayout(TRUE);
|
||||
dummy -> Layout();
|
||||
m_NavigPan -> AddPage(dummy, _("Search"));
|
||||
}
|
||||
|
||||
RefreshLists();
|
||||
m_NavigPan -> Show(TRUE);
|
||||
m_HtmlWin -> Show(TRUE);
|
||||
m_Splitter -> SetMinimumPaneSize(20);
|
||||
m_Splitter -> SplitVertically(m_NavigPan, m_HtmlWin, m_Cfg.sashpos);
|
||||
if (!m_Cfg.navig_on) m_Splitter -> Unsplit(m_NavigPan);
|
||||
wxYield();
|
||||
}
|
||||
|
||||
m_Frame -> Show(TRUE);
|
||||
wxYield();
|
||||
}
|
||||
|
||||
|
||||
|
||||
#define MAX_ROOTS 64
|
||||
|
||||
void wxHtmlHelpController::CreateContents()
|
||||
{
|
||||
HtmlContentsItem *it;
|
||||
wxTreeItemId roots[MAX_ROOTS];
|
||||
bool imaged[MAX_ROOTS];
|
||||
int count = m_ContentsCnt;
|
||||
|
||||
m_ContentsBox -> DeleteAllItems();
|
||||
roots[0] = m_ContentsBox -> AddRoot(_("(Help)"));
|
||||
imaged[0] = TRUE;
|
||||
|
||||
for (int i = 0; i < count; i++) {
|
||||
it = m_Contents + i;
|
||||
roots[it -> m_Level + 1] = m_ContentsBox -> AppendItem(roots[it -> m_Level], it -> m_Name, IMG_Page, -1, new wxHtmlHelpTreeItemData(it));
|
||||
if (it -> m_Level == 0) {
|
||||
m_ContentsBox -> SetItemBold(roots[1], TRUE);
|
||||
m_ContentsBox -> SetItemImage(roots[1], IMG_Book);
|
||||
m_ContentsBox -> SetItemSelectedImage(roots[1], IMG_Book);
|
||||
imaged[1] = TRUE;
|
||||
}
|
||||
else imaged[it -> m_Level + 1] = FALSE;
|
||||
|
||||
if (!imaged[it -> m_Level]) {
|
||||
m_ContentsBox -> SetItemImage(roots[it -> m_Level], IMG_Folder);
|
||||
m_ContentsBox -> SetItemSelectedImage(roots[it -> m_Level], IMG_Folder);
|
||||
imaged[it -> m_Level] = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
m_ContentsBox -> Expand(roots[0]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void wxHtmlHelpController::CreateIndex()
|
||||
{
|
||||
m_IndexBox -> Clear();
|
||||
|
||||
for (int i = 0; i < m_IndexCnt; i++)
|
||||
m_IndexBox -> Append(m_Index[i].m_Name, (char*)(m_Index + i));
|
||||
}
|
||||
|
||||
|
||||
|
||||
void wxHtmlHelpController::RefreshLists()
|
||||
{
|
||||
if (m_Frame) {
|
||||
CreateContents();
|
||||
CreateIndex();
|
||||
m_SearchList -> Clear();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void wxHtmlHelpController::ReadCustomization(wxConfigBase *cfg, wxString path)
|
||||
{
|
||||
wxString oldpath;
|
||||
wxString tmp;
|
||||
|
||||
if (path != wxEmptyString) {
|
||||
oldpath = cfg -> GetPath();
|
||||
cfg -> SetPath(path);
|
||||
}
|
||||
|
||||
m_Cfg.navig_on = cfg -> Read("hcNavigPanel", m_Cfg.navig_on) != 0;
|
||||
m_Cfg.sashpos = cfg -> Read("hcSashPos", m_Cfg.sashpos);
|
||||
m_Cfg.x = cfg -> Read("hcX", m_Cfg.x);
|
||||
m_Cfg.y = cfg -> Read("hcY", m_Cfg.y);
|
||||
m_Cfg.w = cfg -> Read("hcW", m_Cfg.w);
|
||||
m_Cfg.h = cfg -> Read("hcH", m_Cfg.h);
|
||||
|
||||
if (path != wxEmptyString)
|
||||
cfg -> SetPath(oldpath);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void wxHtmlHelpController::WriteCustomization(wxConfigBase *cfg, wxString path)
|
||||
{
|
||||
wxString oldpath;
|
||||
wxString tmp;
|
||||
|
||||
if (path != wxEmptyString) {
|
||||
oldpath = cfg -> GetPath();
|
||||
cfg -> SetPath(path);
|
||||
}
|
||||
|
||||
cfg -> Write("hcNavigPanel", m_Cfg.navig_on);
|
||||
cfg -> Write("hcSashPos", (long)m_Cfg.sashpos);
|
||||
cfg -> Write("hcX", (long)m_Cfg.x);
|
||||
cfg -> Write("hcY", (long)m_Cfg.y);
|
||||
cfg -> Write("hcW", (long)m_Cfg.w);
|
||||
cfg -> Write("hcH", (long)m_Cfg.h);
|
||||
|
||||
if (path != wxEmptyString)
|
||||
cfg -> SetPath(oldpath);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
EVENT HANDLING :
|
||||
*/
|
||||
|
||||
|
||||
void wxHtmlHelpController::OnToolbar(wxCommandEvent& event)
|
||||
{
|
||||
switch (event.GetId()) {
|
||||
case wxID_HTML_BACK :
|
||||
m_HtmlWin -> HistoryBack();
|
||||
break;
|
||||
case wxID_HTML_FORWARD :
|
||||
m_HtmlWin -> HistoryForward();
|
||||
break;
|
||||
case wxID_HTML_PANEL :
|
||||
if (m_Splitter -> IsSplit()) {
|
||||
m_Cfg.sashpos = m_Splitter -> GetSashPosition();
|
||||
m_Splitter -> Unsplit(m_NavigPan);
|
||||
}
|
||||
else {
|
||||
m_NavigPan -> Show(TRUE);
|
||||
m_HtmlWin -> Show(TRUE);
|
||||
m_Splitter -> SplitVertically(m_NavigPan, m_HtmlWin, m_Cfg.sashpos);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void wxHtmlHelpController::OnContentsSel(wxTreeEvent& event)
|
||||
{
|
||||
wxHtmlHelpTreeItemData *pg;
|
||||
|
||||
pg = (wxHtmlHelpTreeItemData*) m_ContentsBox -> GetItemData(event.GetItem());
|
||||
if (pg) m_HtmlWin -> LoadPage(pg -> GetPage());
|
||||
}
|
||||
|
||||
|
||||
|
||||
void wxHtmlHelpController::OnIndexSel(wxCommandEvent& event)
|
||||
{
|
||||
HtmlContentsItem *it = (HtmlContentsItem*) m_IndexBox -> GetClientData(m_IndexBox -> GetSelection());
|
||||
if (it) m_HtmlWin -> LoadPage(it -> m_Book -> GetBasePath() + it -> m_Page);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void wxHtmlHelpController::OnSearchSel(wxCommandEvent& event)
|
||||
{
|
||||
HtmlContentsItem *it = (HtmlContentsItem*) m_SearchList -> GetClientData(m_SearchList -> GetSelection());
|
||||
if (it) m_HtmlWin -> LoadPage(it -> m_Book -> GetBasePath() + it -> m_Page);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void wxHtmlHelpController::OnCloseWindow(wxCloseEvent& event)
|
||||
{
|
||||
int a, b;
|
||||
|
||||
m_Cfg.navig_on = m_Splitter -> IsSplit();
|
||||
if (m_Cfg.navig_on)
|
||||
m_Cfg.sashpos = m_Splitter -> GetSashPosition();
|
||||
m_Frame -> GetPosition(&a, &b);
|
||||
m_Cfg.x = a, m_Cfg.y = b;
|
||||
m_Frame -> GetSize(&a, &b);
|
||||
m_Cfg.w = a, m_Cfg.h = b;
|
||||
|
||||
if (m_Config) {
|
||||
WriteCustomization(m_Config, m_ConfigRoot);
|
||||
m_HtmlWin -> WriteCustomization(m_Config, m_ConfigRoot);
|
||||
}
|
||||
m_Frame = NULL;
|
||||
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
|
||||
|
||||
void wxHtmlHelpController::OnSearch(wxCommandEvent& event)
|
||||
{
|
||||
wxString sr = m_SearchText -> GetLineText(0);
|
||||
|
||||
if (sr != wxEmptyString) KeywordSearch(sr);
|
||||
}
|
||||
|
||||
|
||||
|
||||
BEGIN_EVENT_TABLE(wxHtmlHelpController, wxEvtHandler)
|
||||
EVT_TOOL_RANGE(wxID_HTML_PANEL, wxID_HTML_FORWARD, wxHtmlHelpController::OnToolbar)
|
||||
EVT_TREE_SEL_CHANGED(wxID_HTML_TREECTRL, wxHtmlHelpController::OnContentsSel)
|
||||
EVT_LISTBOX(wxID_HTML_INDEXLIST, wxHtmlHelpController::OnIndexSel)
|
||||
EVT_LISTBOX(wxID_HTML_SEARCHLIST, wxHtmlHelpController::OnSearchSel)
|
||||
EVT_CLOSE(wxHtmlHelpController::OnCloseWindow)
|
||||
EVT_BUTTON(wxID_HTML_SEARCHBUTTON, wxHtmlHelpController::OnSearch)
|
||||
EVT_TEXT_ENTER(wxID_HTML_SEARCHTEXT, wxHtmlHelpController::OnSearch)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
@@ -41,17 +41,21 @@ FORCE_LINK_ME(m_hline)
|
||||
class wxHtmlLineCell : public wxHtmlCell
|
||||
{
|
||||
public:
|
||||
wxHtmlLineCell(int size) : wxHtmlCell() {m_Height = size;}
|
||||
wxHtmlLineCell(int size, bool shading) : wxHtmlCell() {m_Height = size; m_HasShading = shading;}
|
||||
void Draw(wxDC& dc, int x, int y, int view_y1, int view_y2);
|
||||
void Layout(int w)
|
||||
{ m_Width = w; wxHtmlCell::Layout(w); }
|
||||
|
||||
private:
|
||||
// Should we draw 3-D shading or not
|
||||
bool m_HasShading;
|
||||
};
|
||||
|
||||
|
||||
void wxHtmlLineCell::Draw(wxDC& dc, int x, int y, int WXUNUSED(view_y1), int WXUNUSED(view_y2))
|
||||
{
|
||||
wxBrush mybrush(wxT("BLACK"), wxSOLID);
|
||||
wxPen mypen(wxT("BLACK"), 1, wxSOLID);
|
||||
wxBrush mybrush(wxT("GREY"), (m_HasShading) ? wxTRANSPARENT : wxSOLID);
|
||||
wxPen mypen(wxT("GREY"), 1, wxSOLID);
|
||||
dc.SetBrush(mybrush);
|
||||
dc.SetPen(mypen);
|
||||
dc.DrawRectangle(x + m_PosX, y + m_PosY, m_Width, m_Height);
|
||||
@@ -71,6 +75,7 @@ TAG_HANDLER_BEGIN(HR, "HR")
|
||||
{
|
||||
wxHtmlContainerCell *c;
|
||||
int sz;
|
||||
bool HasShading;
|
||||
|
||||
m_WParser->CloseContainer();
|
||||
c = m_WParser->OpenContainer();
|
||||
@@ -81,7 +86,8 @@ TAG_HANDLER_BEGIN(HR, "HR")
|
||||
c->SetWidthFloat(tag);
|
||||
sz = 1;
|
||||
tag.GetParamAsInt(wxT("SIZE"), &sz);
|
||||
c->InsertCell(new wxHtmlLineCell((int)((double)sz * m_WParser->GetPixelScale())));
|
||||
HasShading = !(tag.HasParam(wxT("NOSHADE")));
|
||||
c->InsertCell(new wxHtmlLineCell((int)((double)sz * m_WParser->GetPixelScale()), HasShading));
|
||||
|
||||
m_WParser->CloseContainer();
|
||||
m_WParser->OpenContainer();
|
||||
|
@@ -1,72 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: search.cpp
|
||||
// Purpose: search engine
|
||||
// Author: Vaclav Slavik
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 1999 Vaclav Slavik
|
||||
// Licence: wxWindows Licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma implementation
|
||||
#endif
|
||||
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#include "wx/defs.h"
|
||||
#if wxUSE_HTML
|
||||
|
||||
#ifdef __BORDLANDC__
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#ifndef WXPRECOMP
|
||||
#endif
|
||||
|
||||
#include "wx/html/helpdata.h"
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// wxSearchEngine
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
void wxSearchEngine::LookFor(const wxString& keyword)
|
||||
{
|
||||
if (m_Keyword) delete[] m_Keyword;
|
||||
m_Keyword = new wxChar[keyword.Length() + 1];
|
||||
wxStrcpy(m_Keyword, keyword.c_str());
|
||||
for (int i = wxStrlen(m_Keyword) - 1; i >= 0; i--)
|
||||
if ((m_Keyword[i] >= wxT('A')) && (m_Keyword[i] <= wxT('Z')))
|
||||
m_Keyword[i] += wxT('a') - wxT('A');
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool wxSearchEngine::Scan(wxInputStream *stream)
|
||||
{
|
||||
wxASSERT_MSG(m_Keyword != NULL, _("wxSearchEngine::LookFor must be called before scanning!"));
|
||||
|
||||
int i, j;
|
||||
int lng = stream ->GetSize();
|
||||
int wrd = wxStrlen(m_Keyword);
|
||||
bool found = FALSE;
|
||||
char *buf = new char[lng + 1];
|
||||
stream -> Read(buf, lng);
|
||||
buf[lng] = 0;
|
||||
|
||||
for (i = 0; i < lng; i++)
|
||||
if ((buf[i] >= 'A') && (buf[i] <= 'Z')) buf[i] += 'a' - 'A';
|
||||
|
||||
for (i = 0; i < lng - wrd; i++) {
|
||||
j = 0;
|
||||
while ((j < wrd) && (buf[i + j] == m_Keyword[j])) j++;
|
||||
if (j == wrd) {found = TRUE; break;}
|
||||
}
|
||||
|
||||
delete[] buf;
|
||||
return found;
|
||||
}
|
||||
|
||||
#endif
|
@@ -1,4 +1,4 @@
|
||||
# This file was automatically generated by tmake at 08:59, 2001/11/18
|
||||
# This file was automatically generated by tmake at 16:36, 2001/11/20
|
||||
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE MAC.T!
|
||||
ALL_SOURCES = \
|
||||
generic/busyinfo.cpp \
|
||||
|
@@ -1,4 +1,4 @@
|
||||
# This file was automatically generated by tmake at 08:59, 2001/11/18
|
||||
# This file was automatically generated by tmake at 16:36, 2001/11/20
|
||||
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE MAC.T!
|
||||
ALL_SOURCES = \
|
||||
generic/busyinfo.cpp \
|
||||
|
@@ -37,12 +37,6 @@
|
||||
#include "wx/univ/colschem.h"
|
||||
#include "wx/mgl/private.h"
|
||||
|
||||
#define MGL_DEBUG
|
||||
|
||||
#if defined(MGL_DEBUG) && !defined(__WXDEBUG__)
|
||||
#undef MGL_DEBUG
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Global data
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -166,14 +160,14 @@ static bool wxCreateMGL_WM(const wxDisplayModeInfo& displayMode)
|
||||
refresh = wxSystemOptions::GetOptionInt(wxT("mgl.screen-refresh"));
|
||||
#endif
|
||||
|
||||
mode = MGL_findMode(displayMode.GetScreenSize().x,
|
||||
displayMode.GetScreenSize().y,
|
||||
mode = MGL_findMode(displayMode.GetWidth(),
|
||||
displayMode.GetHeight(),
|
||||
displayMode.GetDepth());
|
||||
if ( mode == -1 )
|
||||
{
|
||||
wxLogError(_("Mode %ix%i-%i not available."),
|
||||
displayMode.GetScreenSize().x,
|
||||
displayMode.GetScreenSize().y,
|
||||
displayMode.GetWidth(),
|
||||
displayMode.GetHeight(),
|
||||
displayMode.GetDepth());
|
||||
return FALSE;
|
||||
}
|
||||
@@ -253,12 +247,16 @@ bool wxApp::OnInitGui()
|
||||
if ( !wxAppBase::OnInitGui() )
|
||||
return FALSE;
|
||||
|
||||
#ifdef MGL_DEBUG
|
||||
// That damn MGL redirects stdin and stdout to physical console
|
||||
FILE *file = fopen("stderr", "wt");
|
||||
wxLog::SetActiveTarget(new wxLogStderr(file));
|
||||
#ifdef __WXDEBUG__
|
||||
// MGL redirects stdout and stderr to physical console, so lets redirect
|
||||
// it to file. Do it only when WXDEBUG environment variable is set
|
||||
if ( wxGetEnv(wxT("WXDEBUG"), NULL) )
|
||||
freopen("output.err", "wt", stderr);
|
||||
#endif
|
||||
|
||||
wxLog *oldLog = wxLog::SetActiveTarget(new wxLogGui);
|
||||
if ( oldLog ) delete oldLog;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -288,6 +286,11 @@ void wxApp::OnIdle(wxIdleEvent &event)
|
||||
// 'Garbage' collection of windows deleted with Close().
|
||||
DeletePendingObjects();
|
||||
|
||||
#if wxUSE_LOG
|
||||
// flush the logged messages if any
|
||||
wxLog::FlushActive();
|
||||
#endif // wxUSE_LOG
|
||||
|
||||
// Send OnIdle events to all windows
|
||||
if ( SendIdleEvents() )
|
||||
event.RequestMore(TRUE);
|
||||
@@ -432,14 +435,7 @@ wxIcon wxApp::GetStdIcon(int which) const
|
||||
|
||||
void wxApp::CleanUp()
|
||||
{
|
||||
delete gs_rootWindow;
|
||||
|
||||
#if wxUSE_LOG
|
||||
// flush the logged messages if any
|
||||
wxLog *log = wxLog::GetActiveTarget();
|
||||
if (log != NULL && log->HasPendingMessages())
|
||||
log->Flush();
|
||||
|
||||
// continuing to use user defined log target is unsafe from now on because
|
||||
// some resources may be already unavailable, so replace it by something
|
||||
// more safe
|
||||
@@ -448,6 +444,8 @@ void wxApp::CleanUp()
|
||||
delete oldlog;
|
||||
#endif // wxUSE_LOG
|
||||
|
||||
delete gs_rootWindow;
|
||||
|
||||
wxModule::CleanUpModules();
|
||||
|
||||
#if wxUSE_WX_RESOURCES
|
||||
@@ -611,6 +609,12 @@ int wxEntry(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
#if wxUSE_LOG
|
||||
// flush the logged messages if any
|
||||
wxLog *log = wxLog::GetActiveTarget();
|
||||
if (log != NULL && log->HasPendingMessages())
|
||||
log->Flush();
|
||||
#endif // wxUSE_LOG
|
||||
retValue = wxTheApp->OnExit();
|
||||
}
|
||||
}
|
||||
|
@@ -191,16 +191,9 @@ wxBitmapRefData::~wxBitmapRefData()
|
||||
IMPLEMENT_ABSTRACT_CLASS(wxBitmapHandler,wxObject)
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxBitmap,wxBitmapBase)
|
||||
|
||||
wxBitmap::wxBitmap()
|
||||
{
|
||||
if ( wxTheBitmapList ) wxTheBitmapList->AddBitmap(this);
|
||||
}
|
||||
|
||||
wxBitmap::wxBitmap(int width, int height, int depth)
|
||||
{
|
||||
Create(width, height, depth);
|
||||
|
||||
if ( wxTheBitmapList ) wxTheBitmapList->AddBitmap(this);
|
||||
}
|
||||
|
||||
|
||||
@@ -285,8 +278,6 @@ bool wxBitmap::CreateFromXpm(const char **bits)
|
||||
|
||||
*this = wxBitmap(img);
|
||||
|
||||
if ( wxTheBitmapList ) wxTheBitmapList->AddBitmap(this);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -370,15 +361,11 @@ wxImage wxBitmap::ConvertToImage() const
|
||||
wxBitmap::wxBitmap(const wxBitmap& bmp)
|
||||
{
|
||||
Ref(bmp);
|
||||
|
||||
if ( wxTheBitmapList ) wxTheBitmapList->AddBitmap(this);
|
||||
}
|
||||
|
||||
wxBitmap::wxBitmap(const wxString &filename, wxBitmapType type)
|
||||
{
|
||||
LoadFile(filename, type);
|
||||
|
||||
if ( wxTheBitmapList ) wxTheBitmapList->AddBitmap(this);
|
||||
}
|
||||
|
||||
wxBitmap::wxBitmap(const char bits[], int width, int height, int depth)
|
||||
@@ -393,13 +380,6 @@ wxBitmap::wxBitmap(const char bits[], int width, int height, int depth)
|
||||
bdc->clearDevice();
|
||||
bdc->putMonoImage(0, 0, width, (width + 7) / 8, height, (void*)bits);
|
||||
delete bdc;
|
||||
|
||||
if ( wxTheBitmapList ) wxTheBitmapList->AddBitmap(this);
|
||||
}
|
||||
|
||||
wxBitmap::~wxBitmap()
|
||||
{
|
||||
if ( wxTheBitmapList ) wxTheBitmapList->DeleteObject(this);
|
||||
}
|
||||
|
||||
wxBitmap& wxBitmap::operator = (const wxBitmap& bmp)
|
||||
|
@@ -121,18 +121,11 @@ wxBrushRefData::wxBrushRefData(const wxBrushRefData& data)
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxBrush,wxGDIObject)
|
||||
|
||||
wxBrush::wxBrush()
|
||||
{
|
||||
if (wxTheBrushList) wxTheBrushList->AddBrush(this);
|
||||
}
|
||||
|
||||
wxBrush::wxBrush(const wxColour &colour, int style)
|
||||
{
|
||||
m_refData = new wxBrushRefData();
|
||||
M_BRUSHDATA->m_style = style;
|
||||
M_BRUSHDATA->m_colour = colour;
|
||||
|
||||
if (wxTheBrushList) wxTheBrushList->AddBrush(this);
|
||||
}
|
||||
|
||||
wxBrush::wxBrush(const wxBitmap &stippleBitmap)
|
||||
@@ -152,20 +145,11 @@ wxBrush::wxBrush(const wxBitmap &stippleBitmap)
|
||||
M_BRUSHDATA->m_style = wxSTIPPLE_MASK_OPAQUE;
|
||||
else
|
||||
M_BRUSHDATA->m_style = wxSTIPPLE;
|
||||
|
||||
if (wxTheBrushList) wxTheBrushList->AddBrush(this);
|
||||
}
|
||||
|
||||
wxBrush::wxBrush(const wxBrush &brush)
|
||||
{
|
||||
Ref(brush);
|
||||
|
||||
if (wxTheBrushList) wxTheBrushList->AddBrush(this);
|
||||
}
|
||||
|
||||
wxBrush::~wxBrush()
|
||||
{
|
||||
if (wxTheBrushList) wxTheBrushList->RemoveBrush(this);
|
||||
}
|
||||
|
||||
wxBrush& wxBrush::operator = (const wxBrush& brush)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user