Compare commits
250 Commits
b4_mousewh
...
wxPy_2_3_0
Author | SHA1 | Date | |
---|---|---|---|
|
9d288a9972 | ||
|
25832b3f2b | ||
|
6d5b2a57cf | ||
|
c48269b9f7 | ||
|
7561aacd5e | ||
|
5260937e74 | ||
|
29d83fc1e5 | ||
|
5600884ab7 | ||
|
2910855229 | ||
|
c3302e7e29 | ||
|
48c31b2853 | ||
|
cb71578cae | ||
|
4cdc2c137e | ||
|
889f0b7c67 | ||
|
e6c3f404b8 | ||
|
bdfeadcac5 | ||
|
bcbb0f8309 | ||
|
37d92a964a | ||
|
0ad771924b | ||
|
e4ad24c9d3 | ||
|
3958ae62ba | ||
|
5d5b1c0ce0 | ||
|
c20facdb25 | ||
|
25d73e0f28 | ||
|
2b510feb17 | ||
|
ac346f5046 | ||
|
72c71d3972 | ||
|
c989314692 | ||
|
e987a489c8 | ||
|
af9083592b | ||
|
4dfaa61e60 | ||
|
442d08ce74 | ||
|
18c5099700 | ||
|
31827af3ea | ||
|
353327844e | ||
|
10e07c70d8 | ||
|
30aaddfe89 | ||
|
8bc25b29f1 | ||
|
90b2b1303a | ||
|
493f1553fd | ||
|
c20a12bd55 | ||
|
2d4511658d | ||
|
ffe107c8c0 | ||
|
0d832cf788 | ||
|
8e49dc6301 | ||
|
5d59e67a7b | ||
|
06b32ebe4f | ||
|
da7ed9b77e | ||
|
856e03b753 | ||
|
9df61a29d2 | ||
|
419c299ae5 | ||
|
3bdc265d9d | ||
|
9416aa89ca | ||
|
6618870d16 | ||
|
6603907dea | ||
|
5abf8c9d66 | ||
|
fdca68a670 | ||
|
36bd690299 | ||
|
1912918cce | ||
|
f98de4487f | ||
|
4dc3fdec0c | ||
|
c59b4b010e | ||
|
52f96deca1 | ||
|
2461b2e716 | ||
|
f9d3748bc0 | ||
|
a224234132 | ||
|
3dec57adfd | ||
|
513903c4f9 | ||
|
19d7140ec2 | ||
|
27419164ad | ||
|
ca715d8835 | ||
|
a88acabdd2 | ||
|
19b726bbca | ||
|
69231000be | ||
|
f80eabe5a2 | ||
|
b07664068b | ||
|
833615dd4d | ||
|
965784669a | ||
|
8084a109b6 | ||
|
2b75f58067 | ||
|
aa06a8fdfb | ||
|
e661fcd770 | ||
|
23ca6e208f | ||
|
d7dcb93990 | ||
|
3f030b4804 | ||
|
5a226de062 | ||
|
ea24eeb2db | ||
|
b7d8f285c3 | ||
|
f5cd97870d | ||
|
788722ac5c | ||
|
f3d5d2b5b9 | ||
|
1094fecfdd | ||
|
5d2b67f7d1 | ||
|
059f05650b | ||
|
940718f06e | ||
|
17766da91f | ||
|
cb0b3950ff | ||
|
82ca6dbcf4 | ||
|
9d57991759 | ||
|
2beca66298 | ||
|
1b12ab1641 | ||
|
ef397583df | ||
|
4e0e692f03 | ||
|
fc5d5458a6 | ||
|
4def3b3595 | ||
|
be52217ed3 | ||
|
c2fa61e833 | ||
|
a90c95aa8e | ||
|
804a46d3f7 | ||
|
13bf613ebd | ||
|
aa6c945b0a | ||
|
c503ab8437 | ||
|
be57fda609 | ||
|
a8cd4a3a03 | ||
|
65608e3bb0 | ||
|
2dd88c8023 | ||
|
3f4902f50b | ||
|
69db49223e | ||
|
4114d0af4f | ||
|
3ce946d47e | ||
|
9fbbbd40d1 | ||
|
4284e7cdb7 | ||
|
5ce0e4ac06 | ||
|
aa50e893ee | ||
|
e9c4c02c19 | ||
|
b326e313a0 | ||
|
4b1f6faaa2 | ||
|
fb1bd1bdd3 | ||
|
f204026b42 | ||
|
66242f2079 | ||
|
c60f5c6517 | ||
|
1e1ca6f0b2 | ||
|
d38d271fa6 | ||
|
22394d24f6 | ||
|
57e26a09f1 | ||
|
2b15fdfcf3 | ||
|
27a97d02eb | ||
|
e7b596fbff | ||
|
d493b66a90 | ||
|
b668a73527 | ||
|
1c6466854c | ||
|
268d5364cf | ||
|
9d8c2f419f | ||
|
d2520c85b0 | ||
|
3b36695de4 | ||
|
5fb9d2be3f | ||
|
2be39ac9d8 | ||
|
ed8fad817a | ||
|
5d483828d7 | ||
|
ca289436cd | ||
|
66e23ad208 | ||
|
638a0b2c72 | ||
|
abd799473c | ||
|
2e9760c0ee | ||
|
ea39b21033 | ||
|
50c679c81a | ||
|
b577ba22cb | ||
|
cad599a1f1 | ||
|
2e6d38adea | ||
|
989befded3 | ||
|
73348d0997 | ||
|
badb78928f | ||
|
3e729cbe15 | ||
|
3caec1bb33 | ||
|
00a693ed2f | ||
|
0133d06b1a | ||
|
c9d4f881e7 | ||
|
47b37e4be4 | ||
|
cf1a9b45c7 | ||
|
615dca338b | ||
|
f87a708b14 | ||
|
65a9e6162b | ||
|
f50fd91940 | ||
|
0eaa1d68c2 | ||
|
71e483d39a | ||
|
aaa63f666a | ||
|
973b0afb1e | ||
|
b7d667c57b | ||
|
60bc40875d | ||
|
9a179dccb9 | ||
|
10d3680f1a | ||
|
b916de3e4f | ||
|
790ba06b28 | ||
|
9ff647cf66 | ||
|
ab85e6cd00 | ||
|
0a67a93b17 | ||
|
233d02951f | ||
|
bf505d2855 | ||
|
794c5cb151 | ||
|
7a446686f0 | ||
|
daaa6710be | ||
|
13806c7d4a | ||
|
c8b5f745c4 | ||
|
1c8183e213 | ||
|
2d4cc5b600 | ||
|
779cedff87 | ||
|
e96360efd9 | ||
|
1c84ee88f6 | ||
|
e7d5dd022c | ||
|
239229258a | ||
|
00b2a5df95 | ||
|
7c4878b682 | ||
|
ccb220600d | ||
|
1ce70313be | ||
|
0c55409f3a | ||
|
e6b506bf47 | ||
|
b97e22c0ca | ||
|
d2c6d54928 | ||
|
db157a6cf8 | ||
|
1661948432 | ||
|
d1679124ae | ||
|
37d6243357 | ||
|
d13d99aa85 | ||
|
0f7a546d9c | ||
|
a2cf862156 | ||
|
daa084c239 | ||
|
576507e276 | ||
|
bdb6e206f1 | ||
|
f55d21ebb5 | ||
|
8173fefe0a | ||
|
96742edfff | ||
|
960ba969f9 | ||
|
8513c19cba | ||
|
219a5f10c0 | ||
|
d2bf4e837a | ||
|
52da3c7175 | ||
|
ddfc587a2e | ||
|
e42c7b8567 | ||
|
f2854a2438 | ||
|
1c98149d12 | ||
|
b51c3f276c | ||
|
d2c52078dc | ||
|
bfb9ee966d | ||
|
26ffe1fdba | ||
|
50c76ce1f7 | ||
|
d20cf96f70 | ||
|
67fc151d73 | ||
|
025292e998 | ||
|
d9b91de7d3 | ||
|
4726948f8e | ||
|
3ba55e664d | ||
|
ab708d5def | ||
|
892aeafc2a | ||
|
75e0142942 | ||
|
eb8671f277 | ||
|
7edb85b724 | ||
|
c5dd44b5da | ||
|
60869eaf7e | ||
|
54921697ae | ||
|
c3952f6524 |
@@ -2,6 +2,9 @@
|
|||||||
How to build the sources from CVS
|
How to build the sources from CVS
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Please use the install.txt files in docs/gtk, docs/msw, docs/motif, docs/mac
|
||||||
|
etc. alongside these instructions.
|
||||||
|
|
||||||
I) Windows using plain makefiles
|
I) Windows using plain makefiles
|
||||||
----------------------------------------
|
----------------------------------------
|
||||||
|
|
||||||
|
29
Makefile.in
29
Makefile.in
@@ -153,7 +153,7 @@ INTLDIR = $(WXDIR)/locale
|
|||||||
########################## Archive name ###############################
|
########################## Archive name ###############################
|
||||||
|
|
||||||
# append a version suffix x.y.z to all file names
|
# append a version suffix x.y.z to all file names
|
||||||
VER_SUFFIX=$(WX_MAJOR_VERSION_NUMBER).$(WX_MINOR_VERSION_NUMBER).$(WX_RELEASE_NUMBER)
|
VER_SUFFIX=$(WX_MAJOR_VERSION_NUMBER).$(WX_MINOR_VERSION_NUMBER).$(WX_RELEASE_NUMBER)$(EXTRA_VER)
|
||||||
WXARCHIVE = @DISTDIR@-$(VER_SUFFIX).tar.gz
|
WXARCHIVE = @DISTDIR@-$(VER_SUFFIX).tar.gz
|
||||||
WXGLARCHIVE = @DISTDIR@-gl-$(VER_SUFFIX).tar.gz
|
WXGLARCHIVE = @DISTDIR@-gl-$(VER_SUFFIX).tar.gz
|
||||||
WXSAMPLES = wx$(TOOLKIT)-samples-$(VER_SUFFIX).tar.gz
|
WXSAMPLES = wx$(TOOLKIT)-samples-$(VER_SUFFIX).tar.gz
|
||||||
@@ -371,11 +371,11 @@ all: @WX_ALL@
|
|||||||
@$(INSTALL) -d ./lib
|
@$(INSTALL) -d ./lib
|
||||||
$(SHARED_LD) ./lib/$@ $(BURNT_LIBRARY_NAME_GL) glcanvas.o $(EXTRALIBS)
|
$(SHARED_LD) ./lib/$@ $(BURNT_LIBRARY_NAME_GL) glcanvas.o $(EXTRALIBS)
|
||||||
|
|
||||||
lib@WX_LIBRARY@-${VER_SUFFIX}.r: ./lib/lib@WX_LIBRARY@-${VER_SUFFIX}.rsrc
|
./lib/lib@WX_LIBRARY@-${VER_SUFFIX}.r: ./lib/lib@WX_LIBRARY@-${VER_SUFFIX}.rsrc
|
||||||
$(DEREZ) $^ $(DEREZFLAGS) > ./lib/$@
|
$(DEREZ) $^ $(DEREZFLAGS) > $@
|
||||||
|
|
||||||
lib@WX_LIBRARY@-${VER_SUFFIX}.rsrc: $(MACRESOURCES)
|
./lib/lib@WX_LIBRARY@-${VER_SUFFIX}.rsrc: $(MACRESOURCES)
|
||||||
$(REZ) $(REZFLAGS) $^ -o ./lib/$@
|
$(REZ) $(REZFLAGS) $^ -o $@
|
||||||
|
|
||||||
CREATE_LINKS: @WX_LIBRARY_NAME_SHARED@
|
CREATE_LINKS: @WX_LIBRARY_NAME_SHARED@
|
||||||
@$(RM) ./lib/@WX_LIBRARY_LINK1@
|
@$(RM) ./lib/@WX_LIBRARY_LINK1@
|
||||||
@@ -958,10 +958,10 @@ SAMPLES_DIST: ALL_GUI_DIST
|
|||||||
cp $(SAMPDIR)/internat/*.po $(DISTDIR)/samples/internat
|
cp $(SAMPDIR)/internat/*.po $(DISTDIR)/samples/internat
|
||||||
cp $(SAMPDIR)/internat/fr/*.mo $(DISTDIR)/samples/internat/fr
|
cp $(SAMPDIR)/internat/fr/*.mo $(DISTDIR)/samples/internat/fr
|
||||||
cp $(SAMPDIR)/internat/de/*.mo $(DISTDIR)/samples/internat/de
|
cp $(SAMPDIR)/internat/de/*.mo $(DISTDIR)/samples/internat/de
|
||||||
cp $(SAMPDIR)/internat/ru/*.mo $(DISTDIR)/samples/internat/de
|
#cp $(SAMPDIR)/internat/ru/*.mo $(DISTDIR)/samples/internat/de
|
||||||
cp $(SAMPDIR)/internat/fr/*.po $(DISTDIR)/samples/internat/fr
|
cp $(SAMPDIR)/internat/fr/*.po $(DISTDIR)/samples/internat/fr
|
||||||
cp $(SAMPDIR)/internat/de/*.po $(DISTDIR)/samples/internat/de
|
cp $(SAMPDIR)/internat/de/*.po $(DISTDIR)/samples/internat/de
|
||||||
cp $(SAMPDIR)/internat/ru/*.po $(DISTDIR)/samples/internat/de
|
#cp $(SAMPDIR)/internat/ru/*.po $(DISTDIR)/samples/internat/de
|
||||||
|
|
||||||
mkdir $(DISTDIR)/samples/ipc
|
mkdir $(DISTDIR)/samples/ipc
|
||||||
cp $(SAMPDIR)/ipc/Makefile.in $(DISTDIR)/samples/ipc
|
cp $(SAMPDIR)/ipc/Makefile.in $(DISTDIR)/samples/ipc
|
||||||
@@ -1346,3 +1346,18 @@ clean:
|
|||||||
$(RM) ./lib/lib*
|
$(RM) ./lib/lib*
|
||||||
|
|
||||||
cleanall: clean
|
cleanall: clean
|
||||||
|
|
||||||
|
|
||||||
|
RPMTOP=_dist_dir/_rpm_top
|
||||||
|
|
||||||
|
rpm: dist
|
||||||
|
@echo "*** Building RPMs ***"
|
||||||
|
-mkdir $(RPMTOP)
|
||||||
|
-mkdir $(RPMTOP)/SOURCES
|
||||||
|
-mkdir $(RPMTOP)/SPECS
|
||||||
|
-mkdir $(RPMTOP)/BUILD
|
||||||
|
-mkdir $(RPMTOP)/RPMS
|
||||||
|
-mkdir $(RPMTOP)/SRPMS
|
||||||
|
cp -f $(WXARCHIVE) $(RPMTOP)/SOURCES
|
||||||
|
rpm -ba --define "_topdir `pwd`/$(RPMTOP)" $(WXDIR)/wx$(TOOLKIT).spec
|
||||||
|
mv -f `find $(RPMTOP) -name "wx$(TARGET)*.rpm"` .
|
||||||
|
6
configure
vendored
6
configure
vendored
@@ -1160,7 +1160,7 @@ EOF
|
|||||||
DEFAULT_DEFAULT_wxUSE_MOTIF=1
|
DEFAULT_DEFAULT_wxUSE_MOTIF=1
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*-*-cygwin32* | *-*-mingw32* )
|
*-*-cygwin* | *-*-mingw32* )
|
||||||
USE_UNIX=0
|
USE_UNIX=0
|
||||||
USE_WIN32=1
|
USE_WIN32=1
|
||||||
cat >> confdefs.h <<\EOF
|
cat >> confdefs.h <<\EOF
|
||||||
@@ -9323,7 +9323,7 @@ if test "$wxUSE_SHARED" = "yes"; then
|
|||||||
WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS"
|
WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS"
|
||||||
WX_ALL="CREATE_LINKS"
|
WX_ALL="CREATE_LINKS"
|
||||||
fi
|
fi
|
||||||
WX_ALL="${WX_ALL} lib${WX_LIBRARY}-${WX_RELEASE}.${WX_CURRENT}.r"
|
WX_ALL="${WX_ALL} ./lib/lib${WX_LIBRARY}-${WX_RELEASE}.${WX_CURRENT}.r"
|
||||||
WX_LIBRARY_NAME_SHARED="lib${WX_LIBRARY}-${WX_RELEASE}.${WX_CURRENT}.${WX_REVISION}.${WX_AGE}.dylib"
|
WX_LIBRARY_NAME_SHARED="lib${WX_LIBRARY}-${WX_RELEASE}.${WX_CURRENT}.${WX_REVISION}.${WX_AGE}.dylib"
|
||||||
WX_LIBRARY_NAME_SHARED_GL="lib${WX_LIBRARY}_gl-${WX_RELEASE}.${WX_CURRENT}.${WX_REVISION}.${WX_AGE}.dylib"
|
WX_LIBRARY_NAME_SHARED_GL="lib${WX_LIBRARY}_gl-${WX_RELEASE}.${WX_CURRENT}.${WX_REVISION}.${WX_AGE}.dylib"
|
||||||
WX_LIBRARY_LINK1="lib${WX_LIBRARY}-${WX_RELEASE}.${WX_CURRENT}.dylib"
|
WX_LIBRARY_LINK1="lib${WX_LIBRARY}-${WX_RELEASE}.${WX_CURRENT}.dylib"
|
||||||
@@ -9355,7 +9355,7 @@ if test "$wxUSE_SHARED" = "yes"; then
|
|||||||
SHARED_LD="/usr/lpp/xlC/bin/makeC++SharedLib -p 0 -o"
|
SHARED_LD="/usr/lpp/xlC/bin/makeC++SharedLib -p 0 -o"
|
||||||
WX_ALL=${WX_LIBRARY_NAME_SHARED}
|
WX_ALL=${WX_LIBRARY_NAME_SHARED}
|
||||||
;;
|
;;
|
||||||
*-*-cygwin32* )
|
*-*-cygwin* )
|
||||||
WX_TARGET_LIBRARY="${WX_LIBRARY_NAME_STATIC}"
|
WX_TARGET_LIBRARY="${WX_LIBRARY_NAME_STATIC}"
|
||||||
WX_TARGET_LIBRARY_GL="${WX_LIBRARY_NAME_STATIC_GL}"
|
WX_TARGET_LIBRARY_GL="${WX_LIBRARY_NAME_STATIC_GL}"
|
||||||
if test "$wxUSE_OPENGL" = "yes"; then
|
if test "$wxUSE_OPENGL" = "yes"; then
|
||||||
|
@@ -642,7 +642,7 @@ case "${host}" in
|
|||||||
DEFAULT_DEFAULT_wxUSE_MOTIF=1
|
DEFAULT_DEFAULT_wxUSE_MOTIF=1
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*-*-cygwin32* | *-*-mingw32* )
|
*-*-cygwin* | *-*-mingw32* )
|
||||||
USE_UNIX=0
|
USE_UNIX=0
|
||||||
USE_WIN32=1
|
USE_WIN32=1
|
||||||
AC_DEFINE(__WIN32__)
|
AC_DEFINE(__WIN32__)
|
||||||
@@ -2127,7 +2127,7 @@ if test "$wxUSE_SHARED" = "yes"; then
|
|||||||
WX_ALL="CREATE_LINKS"
|
WX_ALL="CREATE_LINKS"
|
||||||
fi
|
fi
|
||||||
dnl add the resources target
|
dnl add the resources target
|
||||||
WX_ALL="${WX_ALL} lib${WX_LIBRARY}-${WX_RELEASE}.${WX_CURRENT}.r"
|
WX_ALL="${WX_ALL} ./lib/lib${WX_LIBRARY}-${WX_RELEASE}.${WX_CURRENT}.r"
|
||||||
dnl the name of the shared library
|
dnl the name of the shared library
|
||||||
WX_LIBRARY_NAME_SHARED="lib${WX_LIBRARY}-${WX_RELEASE}.${WX_CURRENT}.${WX_REVISION}.${WX_AGE}.dylib"
|
WX_LIBRARY_NAME_SHARED="lib${WX_LIBRARY}-${WX_RELEASE}.${WX_CURRENT}.${WX_REVISION}.${WX_AGE}.dylib"
|
||||||
WX_LIBRARY_NAME_SHARED_GL="lib${WX_LIBRARY}_gl-${WX_RELEASE}.${WX_CURRENT}.${WX_REVISION}.${WX_AGE}.dylib"
|
WX_LIBRARY_NAME_SHARED_GL="lib${WX_LIBRARY}_gl-${WX_RELEASE}.${WX_CURRENT}.${WX_REVISION}.${WX_AGE}.dylib"
|
||||||
@@ -2161,7 +2161,7 @@ if test "$wxUSE_SHARED" = "yes"; then
|
|||||||
SHARED_LD="/usr/lpp/xlC/bin/makeC++SharedLib -p 0 -o"
|
SHARED_LD="/usr/lpp/xlC/bin/makeC++SharedLib -p 0 -o"
|
||||||
WX_ALL=${WX_LIBRARY_NAME_SHARED}
|
WX_ALL=${WX_LIBRARY_NAME_SHARED}
|
||||||
;;
|
;;
|
||||||
*-*-cygwin32* )
|
*-*-cygwin* )
|
||||||
dnl only static for now
|
dnl only static for now
|
||||||
WX_TARGET_LIBRARY="${WX_LIBRARY_NAME_STATIC}"
|
WX_TARGET_LIBRARY="${WX_LIBRARY_NAME_STATIC}"
|
||||||
WX_TARGET_LIBRARY_GL="${WX_LIBRARY_NAME_STATIC_GL}"
|
WX_TARGET_LIBRARY_GL="${WX_LIBRARY_NAME_STATIC_GL}"
|
||||||
|
4
contrib/configure
vendored
4
contrib/configure
vendored
@@ -821,6 +821,7 @@ trap 'rm -fr `echo "
|
|||||||
src/canvas/Makefile
|
src/canvas/Makefile
|
||||||
src/gizmos/Makefile
|
src/gizmos/Makefile
|
||||||
src/plot/Makefile
|
src/plot/Makefile
|
||||||
|
src/applet/Makefile
|
||||||
samples/Makefile
|
samples/Makefile
|
||||||
samples/mmedia/Makefile
|
samples/mmedia/Makefile
|
||||||
samples/ogl/Makefile
|
samples/ogl/Makefile
|
||||||
@@ -835,6 +836,7 @@ trap 'rm -fr `echo "
|
|||||||
samples/gizmos/splittree/Makefile
|
samples/gizmos/splittree/Makefile
|
||||||
samples/xml/Makefile
|
samples/xml/Makefile
|
||||||
samples/plot/Makefile
|
samples/plot/Makefile
|
||||||
|
samples/applet/Makefile
|
||||||
utils/Makefile
|
utils/Makefile
|
||||||
utils/wxrc/Makefile
|
utils/wxrc/Makefile
|
||||||
utils/wxrcedit/Makefile
|
utils/wxrcedit/Makefile
|
||||||
@@ -926,6 +928,7 @@ CONFIG_FILES=\${CONFIG_FILES-"Makefile
|
|||||||
src/canvas/Makefile
|
src/canvas/Makefile
|
||||||
src/gizmos/Makefile
|
src/gizmos/Makefile
|
||||||
src/plot/Makefile
|
src/plot/Makefile
|
||||||
|
src/applet/Makefile
|
||||||
samples/Makefile
|
samples/Makefile
|
||||||
samples/mmedia/Makefile
|
samples/mmedia/Makefile
|
||||||
samples/ogl/Makefile
|
samples/ogl/Makefile
|
||||||
@@ -940,6 +943,7 @@ CONFIG_FILES=\${CONFIG_FILES-"Makefile
|
|||||||
samples/gizmos/splittree/Makefile
|
samples/gizmos/splittree/Makefile
|
||||||
samples/xml/Makefile
|
samples/xml/Makefile
|
||||||
samples/plot/Makefile
|
samples/plot/Makefile
|
||||||
|
samples/applet/Makefile
|
||||||
utils/Makefile
|
utils/Makefile
|
||||||
utils/wxrc/Makefile
|
utils/wxrc/Makefile
|
||||||
utils/wxrcedit/Makefile
|
utils/wxrcedit/Makefile
|
||||||
|
@@ -46,6 +46,7 @@ AC_OUTPUT([
|
|||||||
src/canvas/Makefile
|
src/canvas/Makefile
|
||||||
src/gizmos/Makefile
|
src/gizmos/Makefile
|
||||||
src/plot/Makefile
|
src/plot/Makefile
|
||||||
|
src/applet/Makefile
|
||||||
samples/Makefile
|
samples/Makefile
|
||||||
samples/mmedia/Makefile
|
samples/mmedia/Makefile
|
||||||
samples/ogl/Makefile
|
samples/ogl/Makefile
|
||||||
@@ -60,6 +61,7 @@ AC_OUTPUT([
|
|||||||
samples/gizmos/splittree/Makefile
|
samples/gizmos/splittree/Makefile
|
||||||
samples/xml/Makefile
|
samples/xml/Makefile
|
||||||
samples/plot/Makefile
|
samples/plot/Makefile
|
||||||
|
samples/applet/Makefile
|
||||||
utils/Makefile
|
utils/Makefile
|
||||||
utils/wxrc/Makefile
|
utils/wxrc/Makefile
|
||||||
utils/wxrcedit/Makefile
|
utils/wxrcedit/Makefile
|
||||||
|
83
contrib/include/wx/applet/applet.h
Normal file
83
contrib/include/wx/applet/applet.h
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
*
|
||||||
|
* wxWindows HTML Applet Package
|
||||||
|
*
|
||||||
|
* Copyright (C) 1991-2001 SciTech Software, Inc.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* ======================================================================
|
||||||
|
* |REMOVAL OR MODIFICATION OF THIS HEADER IS STRICTLY PROHIBITED BY LAW|
|
||||||
|
* | |
|
||||||
|
* |This copyrighted computer code is a proprietary trade secret of |
|
||||||
|
* |SciTech Software, Inc., located at 505 Wall Street, Chico, CA 95928 |
|
||||||
|
* |USA (www.scitechsoft.com). ANY UNAUTHORIZED POSSESSION, USE, |
|
||||||
|
* |VIEWING, COPYING, MODIFICATION OR DISSEMINATION OF THIS CODE IS |
|
||||||
|
* |STRICTLY PROHIBITED BY LAW. Unless you have current, express |
|
||||||
|
* |written authorization from SciTech to possess or use this code, you |
|
||||||
|
* |may be subject to civil and/or criminal penalties. |
|
||||||
|
* | |
|
||||||
|
* |If you received this code in error or you would like to report |
|
||||||
|
* |improper use, please immediately contact SciTech Software, Inc. at |
|
||||||
|
* |530-894-8400. |
|
||||||
|
* | |
|
||||||
|
* |REMOVAL OR MODIFICATION OF THIS HEADER IS STRICTLY PROHIBITED BY LAW|
|
||||||
|
* ======================================================================
|
||||||
|
*
|
||||||
|
* Language: ANSI C++
|
||||||
|
* Environment: Any
|
||||||
|
*
|
||||||
|
* Description: Header file for the wxApplet class
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#ifndef __WX_APPLET_H
|
||||||
|
#define __WX_APPLET_H
|
||||||
|
|
||||||
|
#include "wx/panel.h"
|
||||||
|
#include "wx/applet/window.h"
|
||||||
|
|
||||||
|
/*--------------------------- Class Definitions ---------------------------*/
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
REMARKS:
|
||||||
|
Defines the abstract base class for wxApplet objects.
|
||||||
|
****************************************************************************/
|
||||||
|
class wxApplet : public wxPanel {
|
||||||
|
private:
|
||||||
|
DECLARE_ABSTRACT_CLASS(wxApplet);
|
||||||
|
DECLARE_EVENT_TABLE();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
wxHtmlAppletWindow *m_Parent;
|
||||||
|
|
||||||
|
// Special handler for background erase messages
|
||||||
|
void OnEraseBackground(wxEraseEvent&);
|
||||||
|
|
||||||
|
public:
|
||||||
|
// Constructor (called during dynamic creation)
|
||||||
|
wxApplet() { m_Parent = NULL; }
|
||||||
|
|
||||||
|
// Psuedo virtual constructor
|
||||||
|
virtual bool Create(
|
||||||
|
wxHtmlAppletWindow *parent,
|
||||||
|
const wxSize& size,
|
||||||
|
long style = wxTAB_TRAVERSAL | wxNO_BORDER);
|
||||||
|
|
||||||
|
// Virtual destructor
|
||||||
|
virtual ~wxApplet();
|
||||||
|
|
||||||
|
// Handle HTML navigation to a new URL
|
||||||
|
virtual void OnLinkClicked(const wxHtmlLinkInfo& link) = 0;
|
||||||
|
|
||||||
|
// Handle HTML navigation forward command in applet
|
||||||
|
virtual void OnHistoryForward() = 0;
|
||||||
|
|
||||||
|
// Handle HTML navigation back command in applet
|
||||||
|
virtual void OnHistoryBack() = 0;
|
||||||
|
|
||||||
|
// Handle messages from the wxAppletManager and other applets
|
||||||
|
virtual void OnMessage(wxEvent& msg) = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // __WX_APPLET_H
|
||||||
|
|
114
contrib/include/wx/applet/window.h
Normal file
114
contrib/include/wx/applet/window.h
Normal file
@@ -0,0 +1,114 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
*
|
||||||
|
* wxWindows HTML Applet Package
|
||||||
|
*
|
||||||
|
* Copyright (C) 1991-2001 SciTech Software, Inc.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* ======================================================================
|
||||||
|
* |REMOVAL OR MODIFICATION OF THIS HEADER IS STRICTLY PROHIBITED BY LAW|
|
||||||
|
* | |
|
||||||
|
* |This copyrighted computer code is a proprietary trade secret of |
|
||||||
|
* |SciTech Software, Inc., located at 505 Wall Street, Chico, CA 95928 |
|
||||||
|
* |USA (www.scitechsoft.com). ANY UNAUTHORIZED POSSESSION, USE, |
|
||||||
|
* |VIEWING, COPYING, MODIFICATION OR DISSEMINATION OF THIS CODE IS |
|
||||||
|
* |STRICTLY PROHIBITED BY LAW. Unless you have current, express |
|
||||||
|
* |written authorization from SciTech to possess or use this code, you |
|
||||||
|
* |may be subject to civil and/or criminal penalties. |
|
||||||
|
* | |
|
||||||
|
* |If you received this code in error or you would like to report |
|
||||||
|
* |improper use, please immediately contact SciTech Software, Inc. at |
|
||||||
|
* |530-894-8400. |
|
||||||
|
* | |
|
||||||
|
* |REMOVAL OR MODIFICATION OF THIS HEADER IS STRICTLY PROHIBITED BY LAW|
|
||||||
|
* ======================================================================
|
||||||
|
*
|
||||||
|
* Language: ANSI C++
|
||||||
|
* Environment: Any
|
||||||
|
*
|
||||||
|
* Description: Header file for the wxHtmlAppletWindow class
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#ifndef __WX_APPLET_WINDOW_H
|
||||||
|
#define __WX_APPLET_WINDOW_H
|
||||||
|
|
||||||
|
#include "wx/html/htmlwin.h"
|
||||||
|
|
||||||
|
/*--------------------------- Class Definitions ---------------------------*/
|
||||||
|
|
||||||
|
// Declare a linked list of wxApplet pointers
|
||||||
|
class wxApplet;
|
||||||
|
WX_DECLARE_LIST(wxApplet, wxAppletList);
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
MEMBERS:
|
||||||
|
appletModules - List of register applet modules
|
||||||
|
appletList - List of all active applets instances
|
||||||
|
cookies - Hash table for managing cookies
|
||||||
|
|
||||||
|
REMARKS:
|
||||||
|
Defines the class for wxAppletWindow. This class is derived from the
|
||||||
|
wxHtmlWindow class and extends it with functionality to handle embedded
|
||||||
|
wxApplet's on the HTML pages.
|
||||||
|
****************************************************************************/
|
||||||
|
class wxHtmlAppletWindow : public wxHtmlWindow {
|
||||||
|
private:
|
||||||
|
DECLARE_CLASS(wxHtmlAppletWindow);
|
||||||
|
DECLARE_EVENT_TABLE();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
wxAppletList m_AppletList;
|
||||||
|
wxHashTable m_Cookies;
|
||||||
|
|
||||||
|
public:
|
||||||
|
// Constructor
|
||||||
|
wxHtmlAppletWindow(
|
||||||
|
wxWindow *parent,
|
||||||
|
wxWindowID id = -1,
|
||||||
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
|
const wxSize& size = wxDefaultSize,
|
||||||
|
long style = wxHW_SCROLLBAR_AUTO,
|
||||||
|
const wxString& name = "htmlAppletWindow");
|
||||||
|
|
||||||
|
// Destructor
|
||||||
|
~wxHtmlAppletWindow();
|
||||||
|
|
||||||
|
// Create an instance of an applet based on it's class name
|
||||||
|
wxApplet *CreateApplet(
|
||||||
|
const wxString& className,
|
||||||
|
const wxSize& size);
|
||||||
|
|
||||||
|
// Find an instance of an applet based on it's class name
|
||||||
|
wxApplet *FindApplet(const wxString& className);
|
||||||
|
|
||||||
|
// Remove an applet from the window. Called during applet destruction
|
||||||
|
bool RemoveApplet(const wxApplet *applet);
|
||||||
|
|
||||||
|
// Load a new URL page
|
||||||
|
bool LoadPage(const wxString& hRef);
|
||||||
|
|
||||||
|
// Called when users clicked on hypertext link.
|
||||||
|
void OnLinkClicked(const wxHtmlLinkInfo& link);
|
||||||
|
|
||||||
|
// Handles forward navigation within the HTML stack
|
||||||
|
bool HistoryForward();
|
||||||
|
|
||||||
|
// Handles backwards navigation within the HTML stack
|
||||||
|
bool HistoryBack();
|
||||||
|
|
||||||
|
// Broadcast a message to all applets on the page
|
||||||
|
void SendMessage(wxEvent& msg);
|
||||||
|
|
||||||
|
// Register a cookie of data in the applet manager
|
||||||
|
bool RegisterCookie(const wxString& name,wxObject *cookie);
|
||||||
|
|
||||||
|
// UnRegister a cookie of data in the applet manager
|
||||||
|
bool UnRegisterCookie(const wxString& name);
|
||||||
|
|
||||||
|
// Find a cookie of data given it's public name
|
||||||
|
wxObject *FindCookie(const wxString& name);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // __WX_APPLET_WINDOW_H
|
||||||
|
|
59
contrib/include/wx/gizmos/editlbox.h
Normal file
59
contrib/include/wx/gizmos/editlbox.h
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Name: editlbox.h
|
||||||
|
// Purpose: ListBox with editable items
|
||||||
|
// Author: Vaclav Slavik
|
||||||
|
// RCS-ID: $Id$
|
||||||
|
// Copyright: (c) Vaclav Slavik
|
||||||
|
// Licence: wxWindows licence
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef __WX_EDITLBOX_H__
|
||||||
|
#define __WX_EDITLBOX_H__
|
||||||
|
|
||||||
|
#ifdef __GNUG__
|
||||||
|
#pragma interface "editlbox.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "wx/panel.h"
|
||||||
|
|
||||||
|
|
||||||
|
class WXDLLEXPORT wxBitmapButton;
|
||||||
|
class WXDLLEXPORT wxListCtrl;
|
||||||
|
class WXDLLEXPORT wxListEvent;
|
||||||
|
|
||||||
|
// This class provides a composite control that lets the
|
||||||
|
// user easily enter list of strings
|
||||||
|
|
||||||
|
class WXDLLEXPORT wxEditableListBox : public wxPanel
|
||||||
|
{
|
||||||
|
DECLARE_CLASS(wxEditableListBox);
|
||||||
|
|
||||||
|
public:
|
||||||
|
wxEditableListBox(wxWindow *parent, wxWindowID id,
|
||||||
|
const wxString& label,
|
||||||
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
|
const wxSize& size = wxDefaultSize,
|
||||||
|
const wxString& name = wxT("editableListBox"));
|
||||||
|
|
||||||
|
void SetStrings(const wxArrayString& strings);
|
||||||
|
void GetStrings(wxArrayString& strings);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
wxBitmapButton *m_bDel, *m_bNew, *m_bUp, *m_bDown, *m_bEdit;
|
||||||
|
wxListCtrl *m_listCtrl;
|
||||||
|
int m_selection;
|
||||||
|
bool m_edittingNew;
|
||||||
|
|
||||||
|
void OnItemSelected(wxListEvent& event);
|
||||||
|
void OnEndLabelEdit(wxListEvent& event);
|
||||||
|
void OnNewItem(wxCommandEvent& event);
|
||||||
|
void OnDelItem(wxCommandEvent& event);
|
||||||
|
void OnEditItem(wxCommandEvent& event);
|
||||||
|
void OnUpItem(wxCommandEvent& event);
|
||||||
|
void OnDownItem(wxCommandEvent& event);
|
||||||
|
|
||||||
|
DECLARE_EVENT_TABLE()
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
@@ -1256,6 +1256,7 @@ private:
|
|||||||
void OnMouseMove(wxMouseEvent& evt);
|
void OnMouseMove(wxMouseEvent& evt);
|
||||||
void OnMouseLeftUp(wxMouseEvent& evt);
|
void OnMouseLeftUp(wxMouseEvent& evt);
|
||||||
void OnMouseRightUp(wxMouseEvent& evt);
|
void OnMouseRightUp(wxMouseEvent& evt);
|
||||||
|
void OnMouseWheel(wxMouseEvent& evt);
|
||||||
void OnChar(wxKeyEvent& evt);
|
void OnChar(wxKeyEvent& evt);
|
||||||
void OnKeyDown(wxKeyEvent& evt);
|
void OnKeyDown(wxKeyEvent& evt);
|
||||||
void OnLoseFocus(wxFocusEvent& evt);
|
void OnLoseFocus(wxFocusEvent& evt);
|
||||||
|
@@ -24,7 +24,7 @@ class WXDLLEXPORT wxCheckListXmlHandler : public wxXmlResourceHandler
|
|||||||
virtual wxObject *DoCreateResource();
|
virtual wxObject *DoCreateResource();
|
||||||
virtual bool CanHandle(wxXmlNode *node);
|
virtual bool CanHandle(wxXmlNode *node);
|
||||||
private:
|
private:
|
||||||
bool m_InsideBox;
|
bool m_insideBox;
|
||||||
wxArrayString strList;
|
wxArrayString strList;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -24,7 +24,7 @@ class WXDLLEXPORT wxChoiceXmlHandler : public wxXmlResourceHandler
|
|||||||
virtual wxObject *DoCreateResource();
|
virtual wxObject *DoCreateResource();
|
||||||
virtual bool CanHandle(wxXmlNode *node);
|
virtual bool CanHandle(wxXmlNode *node);
|
||||||
private:
|
private:
|
||||||
bool m_InsideBox;
|
bool m_insideBox;
|
||||||
wxArrayString strList;
|
wxArrayString strList;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -26,7 +26,7 @@ class WXDLLEXPORT wxComboBoxXmlHandler : public wxXmlResourceHandler
|
|||||||
virtual wxObject *DoCreateResource();
|
virtual wxObject *DoCreateResource();
|
||||||
virtual bool CanHandle(wxXmlNode *node);
|
virtual bool CanHandle(wxXmlNode *node);
|
||||||
private:
|
private:
|
||||||
bool m_InsideBox;
|
bool m_insideBox;
|
||||||
wxArrayString strList;
|
wxArrayString strList;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -26,7 +26,7 @@ class WXDLLEXPORT wxListBoxXmlHandler : public wxXmlResourceHandler
|
|||||||
virtual wxObject *DoCreateResource();
|
virtual wxObject *DoCreateResource();
|
||||||
virtual bool CanHandle(wxXmlNode *node);
|
virtual bool CanHandle(wxXmlNode *node);
|
||||||
private:
|
private:
|
||||||
bool m_InsideBox;
|
bool m_insideBox;
|
||||||
wxArrayString strList;
|
wxArrayString strList;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -25,7 +25,7 @@ class WXDLLEXPORT wxMenuXmlHandler : public wxXmlResourceHandler
|
|||||||
virtual bool CanHandle(wxXmlNode *node);
|
virtual bool CanHandle(wxXmlNode *node);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool m_InsideMenu;
|
bool m_insideMenu;
|
||||||
};
|
};
|
||||||
|
|
||||||
class WXDLLEXPORT wxMenuBarXmlHandler : public wxXmlResourceHandler
|
class WXDLLEXPORT wxMenuBarXmlHandler : public wxXmlResourceHandler
|
||||||
|
@@ -28,8 +28,8 @@ class WXDLLEXPORT wxNotebookXmlHandler : public wxXmlResourceHandler
|
|||||||
virtual bool CanHandle(wxXmlNode *node);
|
virtual bool CanHandle(wxXmlNode *node);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool m_IsInside;
|
bool m_isInside;
|
||||||
wxNotebook *m_Notebook;
|
wxNotebook *m_notebook;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -26,7 +26,7 @@ class WXDLLEXPORT wxRadioBoxXmlHandler : public wxXmlResourceHandler
|
|||||||
virtual wxObject *DoCreateResource();
|
virtual wxObject *DoCreateResource();
|
||||||
virtual bool CanHandle(wxXmlNode *node);
|
virtual bool CanHandle(wxXmlNode *node);
|
||||||
private:
|
private:
|
||||||
bool m_InsideBox;
|
bool m_insideBox;
|
||||||
wxArrayString strList;
|
wxArrayString strList;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -28,8 +28,8 @@ class WXDLLEXPORT wxSizerXmlHandler : public wxXmlResourceHandler
|
|||||||
virtual bool CanHandle(wxXmlNode *node);
|
virtual bool CanHandle(wxXmlNode *node);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool m_IsInside;
|
bool m_isInside;
|
||||||
wxSizer *m_ParentSizer;
|
wxSizer *m_parentSizer;
|
||||||
|
|
||||||
bool IsSizerNode(wxXmlNode *node);
|
bool IsSizerNode(wxXmlNode *node);
|
||||||
};
|
};
|
||||||
|
@@ -29,8 +29,8 @@ class WXDLLEXPORT wxToolBarXmlHandler : public wxXmlResourceHandler
|
|||||||
virtual bool CanHandle(wxXmlNode *node);
|
virtual bool CanHandle(wxXmlNode *node);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool m_IsInside;
|
bool m_isInside;
|
||||||
wxToolBar *m_Toolbar;
|
wxToolBar *m_toolbar;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -54,7 +54,8 @@ enum wxXmlNodeType
|
|||||||
enum wxXmlIOType
|
enum wxXmlIOType
|
||||||
{
|
{
|
||||||
wxXML_IO_AUTO = 0, // detect it automatically
|
wxXML_IO_AUTO = 0, // detect it automatically
|
||||||
wxXML_IO_LIBXML, // use libxml2 to parse/save XML document
|
wxXML_IO_EXPAT, // use Expat to load from text/xml document
|
||||||
|
wxXML_IO_TEXT_OUTPUT, // generic saver into text/xml
|
||||||
wxXML_IO_BIN, // save in binary uncompressed proprietary format
|
wxXML_IO_BIN, // save in binary uncompressed proprietary format
|
||||||
wxXML_IO_BINZ // svae in binary zlib-compressed proprietary format
|
wxXML_IO_BINZ // svae in binary zlib-compressed proprietary format
|
||||||
};
|
};
|
||||||
@@ -67,23 +68,24 @@ enum wxXmlIOType
|
|||||||
class WXDLLEXPORT wxXmlProperty
|
class WXDLLEXPORT wxXmlProperty
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxXmlProperty() : m_Next(NULL) {}
|
wxXmlProperty() : m_next(NULL) {}
|
||||||
wxXmlProperty(const wxString& name, const wxString& value, wxXmlProperty *next)
|
wxXmlProperty(const wxString& name, const wxString& value,
|
||||||
: m_Name(name), m_Value(value), m_Next(next) {}
|
wxXmlProperty *next)
|
||||||
~wxXmlProperty() { delete m_Next; }
|
: m_name(name), m_value(value), m_next(next) {}
|
||||||
|
~wxXmlProperty() { delete m_next; }
|
||||||
|
|
||||||
wxString GetName() const { return m_Name; }
|
wxString GetName() const { return m_name; }
|
||||||
wxString GetValue() const { return m_Value; }
|
wxString GetValue() const { return m_value; }
|
||||||
wxXmlProperty *GetNext() const { return m_Next; }
|
wxXmlProperty *GetNext() const { return m_next; }
|
||||||
|
|
||||||
void SetName(const wxString& name) { m_Name = name; }
|
void SetName(const wxString& name) { m_name = name; }
|
||||||
void SetValue(const wxString& value) { m_Value = value; }
|
void SetValue(const wxString& value) { m_value = value; }
|
||||||
void SetNext(wxXmlProperty *next) { m_Next = next; }
|
void SetNext(wxXmlProperty *next) { m_next = next; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
wxString m_Name;
|
wxString m_name;
|
||||||
wxString m_Value;
|
wxString m_value;
|
||||||
wxXmlProperty *m_Next;
|
wxXmlProperty *m_next;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -93,19 +95,26 @@ class WXDLLEXPORT wxXmlProperty
|
|||||||
// are irrelevant) and wxXML_ELEMENT_NODE (e.g. in <title>hi</title> there is
|
// are irrelevant) and wxXML_ELEMENT_NODE (e.g. in <title>hi</title> there is
|
||||||
// element with name="title", irrelevant content and one child (wxXML_TEXT_NODE
|
// element with name="title", irrelevant content and one child (wxXML_TEXT_NODE
|
||||||
// with content="hi").
|
// with content="hi").
|
||||||
|
//
|
||||||
|
// If wxUSE_UNICODE is 0, all strings are encoded in UTF-8 encoding (same as
|
||||||
|
// ASCII for characters 0-127). You can use wxMBConvUTF8 to convert then to
|
||||||
|
// desired encoding:
|
||||||
|
//
|
||||||
|
// wxCSConv myConv("iso8859-2");
|
||||||
|
// wxString s(cMB2WC(node->GetContent().c_str()), myConv);
|
||||||
|
|
||||||
class WXDLLEXPORT wxXmlNode
|
class WXDLLEXPORT wxXmlNode
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxXmlNode() : m_Properties(NULL), m_Parent(NULL),
|
wxXmlNode() : m_properties(NULL), m_parent(NULL),
|
||||||
m_Children(NULL), m_Next(NULL) {}
|
m_children(NULL), m_next(NULL) {}
|
||||||
wxXmlNode(wxXmlNode *parent,wxXmlNodeType type,
|
wxXmlNode(wxXmlNode *parent,wxXmlNodeType type,
|
||||||
const wxString& name, const wxString& content,
|
const wxString& name, const wxString& content,
|
||||||
wxXmlProperty *props, wxXmlNode *next);
|
wxXmlProperty *props, wxXmlNode *next);
|
||||||
~wxXmlNode() { delete m_Properties; delete m_Next; delete m_Children; }
|
~wxXmlNode() { delete m_properties; delete m_next; delete m_children; }
|
||||||
|
|
||||||
// copy ctor & operator=. Note that this does NOT copy syblings
|
// copy ctor & operator=. Note that this does NOT copy syblings
|
||||||
// and parent pointer, i.e. m_Parent and m_Next will be NULL
|
// and parent pointer, i.e. m_parent and m_next will be NULL
|
||||||
// after using copy ctor and are never unmodified by operator=.
|
// after using copy ctor and are never unmodified by operator=.
|
||||||
// On the other hand, it DOES copy children and properties.
|
// On the other hand, it DOES copy children and properties.
|
||||||
wxXmlNode(const wxXmlNode& node);
|
wxXmlNode(const wxXmlNode& node);
|
||||||
@@ -121,36 +130,37 @@ class WXDLLEXPORT wxXmlNode
|
|||||||
bool DeleteProperty(const wxString& name);
|
bool DeleteProperty(const wxString& name);
|
||||||
|
|
||||||
// access methods:
|
// access methods:
|
||||||
wxXmlNodeType GetType() const { return m_Type; }
|
wxXmlNodeType GetType() const { return m_type; }
|
||||||
wxString GetName() const { return m_Name; }
|
wxString GetName() const { return m_name; }
|
||||||
wxString GetContent() const { return m_Content; }
|
wxString GetContent() const { return m_content; }
|
||||||
|
|
||||||
wxXmlNode *GetParent() const { return m_Parent; }
|
wxXmlNode *GetParent() const { return m_parent; }
|
||||||
wxXmlNode *GetNext() const { return m_Next; }
|
wxXmlNode *GetNext() const { return m_next; }
|
||||||
wxXmlNode *GetChildren() const { return m_Children; }
|
wxXmlNode *GetChildren() const { return m_children; }
|
||||||
|
|
||||||
wxXmlProperty *GetProperties() const { return m_Properties; }
|
wxXmlProperty *GetProperties() const { return m_properties; }
|
||||||
bool GetPropVal(const wxString& propName, wxString *value) const;
|
bool GetPropVal(const wxString& propName, wxString *value) const;
|
||||||
wxString GetPropVal(const wxString& propName, const wxString& defaultVal) const;
|
wxString GetPropVal(const wxString& propName,
|
||||||
|
const wxString& defaultVal) const;
|
||||||
bool HasProp(const wxString& propName) const;
|
bool HasProp(const wxString& propName) const;
|
||||||
|
|
||||||
void SetType(wxXmlNodeType type) { m_Type = type; }
|
void SetType(wxXmlNodeType type) { m_type = type; }
|
||||||
void SetName(const wxString& name) { m_Name = name; }
|
void SetName(const wxString& name) { m_name = name; }
|
||||||
void SetContent(const wxString& con) { m_Content = con; }
|
void SetContent(const wxString& con) { m_content = con; }
|
||||||
|
|
||||||
void SetParent(wxXmlNode *parent) { m_Parent = parent; }
|
void SetParent(wxXmlNode *parent) { m_parent = parent; }
|
||||||
void SetNext(wxXmlNode *next) { m_Next = next; }
|
void SetNext(wxXmlNode *next) { m_next = next; }
|
||||||
void SetChildren(wxXmlNode *child) { m_Children = child; }
|
void SetChildren(wxXmlNode *child) { m_children = child; }
|
||||||
|
|
||||||
void SetProperties(wxXmlProperty *prop) { m_Properties = prop; }
|
void SetProperties(wxXmlProperty *prop) { m_properties = prop; }
|
||||||
void AddProperty(wxXmlProperty *prop);
|
void AddProperty(wxXmlProperty *prop);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
wxXmlNodeType m_Type;
|
wxXmlNodeType m_type;
|
||||||
wxString m_Name;
|
wxString m_name;
|
||||||
wxString m_Content;
|
wxString m_content;
|
||||||
wxXmlProperty *m_Properties;
|
wxXmlProperty *m_properties;
|
||||||
wxXmlNode *m_Parent, *m_Children, *m_Next;
|
wxXmlNode *m_parent, *m_children, *m_next;
|
||||||
|
|
||||||
void DoCopy(const wxXmlNode& node);
|
void DoCopy(const wxXmlNode& node);
|
||||||
};
|
};
|
||||||
@@ -168,10 +178,12 @@ class WXDLLEXPORT wxXmlNode
|
|||||||
class WXDLLEXPORT wxXmlDocument : public wxObject
|
class WXDLLEXPORT wxXmlDocument : public wxObject
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxXmlDocument() : wxObject(), m_Version(wxT("1.0")), m_Root(NULL) {}
|
wxXmlDocument() : wxObject(), m_version(wxT("1.0")), m_root(NULL) {}
|
||||||
wxXmlDocument(const wxString& filename, wxXmlIOType io_type = wxXML_IO_AUTO);
|
wxXmlDocument(const wxString& filename,
|
||||||
wxXmlDocument(wxInputStream& stream, wxXmlIOType io_type = wxXML_IO_AUTO);
|
wxXmlIOType io_type = wxXML_IO_AUTO);
|
||||||
~wxXmlDocument() { delete m_Root; }
|
wxXmlDocument(wxInputStream& stream,
|
||||||
|
wxXmlIOType io_type = wxXML_IO_AUTO);
|
||||||
|
~wxXmlDocument() { delete m_root; }
|
||||||
|
|
||||||
wxXmlDocument(const wxXmlDocument& doc);
|
wxXmlDocument(const wxXmlDocument& doc);
|
||||||
wxXmlDocument& operator=(const wxXmlDocument& doc);
|
wxXmlDocument& operator=(const wxXmlDocument& doc);
|
||||||
@@ -184,32 +196,40 @@ class WXDLLEXPORT wxXmlDocument : public wxObject
|
|||||||
bool Load(wxInputStream& stream, wxXmlIOType io_type = wxXML_IO_AUTO);
|
bool Load(wxInputStream& stream, wxXmlIOType io_type = wxXML_IO_AUTO);
|
||||||
|
|
||||||
// Saves document as .xml file.
|
// Saves document as .xml file.
|
||||||
bool Save(const wxString& filename, wxXmlIOType io_type) const;
|
bool Save(const wxString& filename,
|
||||||
bool Save(wxOutputStream& stream, wxXmlIOType io_type) const;
|
wxXmlIOType io_type = wxXML_IO_TEXT_OUTPUT) const;
|
||||||
|
bool Save(wxOutputStream& stream,
|
||||||
|
wxXmlIOType io_type = wxXML_IO_TEXT_OUTPUT) const;
|
||||||
|
|
||||||
|
bool IsOk() const { return m_root != NULL; }
|
||||||
|
|
||||||
// Returns root node of the document.
|
// Returns root node of the document.
|
||||||
wxXmlNode *GetRoot() const { return m_Root; }
|
wxXmlNode *GetRoot() const { return m_root; }
|
||||||
|
|
||||||
// Returns version of document (may be empty).
|
// Returns version of document (may be empty).
|
||||||
wxString GetVersion() const { return m_Version; }
|
wxString GetVersion() const { return m_version; }
|
||||||
// Returns encoding of document (may be empty).
|
// Returns encoding of document (may be empty).
|
||||||
wxString GetEncoding() const { return m_Encoding; }
|
// Note: this is the encoding original fail was saved in, *not* the
|
||||||
|
// encoding of in-memory representation! Data in wxXmlNode are always
|
||||||
|
// stored in wchar_t (in Unicode build) or UTF-8 encoded
|
||||||
|
// (if wxUSE_UNICODE is 0).
|
||||||
|
wxString GetEncoding() const { return m_encoding; }
|
||||||
|
|
||||||
// Write-access methods:
|
// Write-access methods:
|
||||||
void SetRoot(wxXmlNode *node) { delete m_Root ; m_Root = node; }
|
void SetRoot(wxXmlNode *node) { delete m_root ; m_root = node; }
|
||||||
void SetVersion(const wxString& version) { m_Version = version; }
|
void SetVersion(const wxString& version) { m_version = version; }
|
||||||
void SetEncoding(const wxString& encoding) { m_Encoding = encoding; }
|
void SetEncoding(const wxString& encoding) { m_encoding = encoding; }
|
||||||
|
|
||||||
static void AddHandler(wxXmlIOHandler *handler);
|
static void AddHandler(wxXmlIOHandler *handler);
|
||||||
static void CleanUpHandlers();
|
static void CleanUpHandlers();
|
||||||
static void InitStandardHandlers();
|
static void InitStandardHandlers();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
static wxList *sm_Handlers;
|
static wxList *sm_handlers;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
wxString m_Version, m_Encoding;
|
wxString m_version, m_encoding;
|
||||||
wxXmlNode *m_Root;
|
wxXmlNode *m_root;
|
||||||
|
|
||||||
void DoCopy(const wxXmlDocument& doc);
|
void DoCopy(const wxXmlDocument& doc);
|
||||||
};
|
};
|
||||||
|
@@ -20,6 +20,30 @@
|
|||||||
#include "wx/xml/xml.h"
|
#include "wx/xml/xml.h"
|
||||||
|
|
||||||
|
|
||||||
|
class WXDLLEXPORT wxXmlIOHandlerExpat : public wxXmlIOHandler
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual wxXmlIOType GetType() { return wxXML_IO_EXPAT; }
|
||||||
|
virtual bool CanLoad(wxInputStream& stream);
|
||||||
|
virtual bool CanSave() { return FALSE; }
|
||||||
|
|
||||||
|
virtual bool Load(wxInputStream& stream, wxXmlDocument& doc);
|
||||||
|
virtual bool Save(wxOutputStream& stream, const wxXmlDocument& doc) { return FALSE; }
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class WXDLLEXPORT wxXmlIOHandlerWriter : public wxXmlIOHandler
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual wxXmlIOType GetType() { return wxXML_IO_TEXT_OUTPUT; }
|
||||||
|
virtual bool CanLoad(wxInputStream& stream) { return FALSE; }
|
||||||
|
virtual bool CanSave() { return TRUE; }
|
||||||
|
|
||||||
|
virtual bool Load(wxInputStream& stream, wxXmlDocument& doc) { return FALSE; }
|
||||||
|
virtual bool Save(wxOutputStream& stream, const wxXmlDocument& doc);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
class WXDLLEXPORT wxXmlIOHandlerBin : public wxXmlIOHandler
|
class WXDLLEXPORT wxXmlIOHandlerBin : public wxXmlIOHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -56,17 +80,4 @@ class WXDLLEXPORT wxXmlIOHandlerBinZ : public wxXmlIOHandlerBin
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class WXDLLEXPORT wxXmlIOHandlerLibxml : public wxXmlIOHandler
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
virtual wxXmlIOType GetType() { return wxXML_IO_LIBXML; }
|
|
||||||
virtual bool CanLoad(wxInputStream& stream);
|
|
||||||
virtual bool CanSave();
|
|
||||||
|
|
||||||
virtual bool Load(wxInputStream& stream, wxXmlDocument& doc);
|
|
||||||
virtual bool Save(wxOutputStream& stream, const wxXmlDocument& doc);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
#endif // _WX_XMLIO_H_
|
#endif // _WX_XMLIO_H_
|
||||||
|
@@ -37,6 +37,29 @@ class WXDLLEXPORT wxXmlResourceHandler;
|
|||||||
|
|
||||||
#include "wx/xml/xml.h"
|
#include "wx/xml/xml.h"
|
||||||
|
|
||||||
|
// These macros indicate current version of XML resources (this information is
|
||||||
|
// encoded in root node of XRC file as "version" property).
|
||||||
|
//
|
||||||
|
// Rules for increasing version number:
|
||||||
|
// - change it only if you made incompatible change to the format. Addition of new
|
||||||
|
// attribute to control handler is _not_ incompatible change, because older
|
||||||
|
// versions of the library may ignore it.
|
||||||
|
// - if you change version number, follow these steps:
|
||||||
|
// - set major, minor and release numbers to respective version numbers of
|
||||||
|
// the wxWindows library (see wx/version.h)
|
||||||
|
// - reset revision to 0 unless the first three are same as before, in which
|
||||||
|
// case you should increase revision by one
|
||||||
|
#define WX_XMLRES_CURRENT_VERSION_MAJOR 2
|
||||||
|
#define WX_XMLRES_CURRENT_VERSION_MINOR 3
|
||||||
|
#define WX_XMLRES_CURRENT_VERSION_RELEASE 0
|
||||||
|
#define WX_XMLRES_CURRENT_VERSION_REVISION 1
|
||||||
|
#define WX_XMLRES_CURRENT_VERSION_STRING "2.3.0.1"
|
||||||
|
|
||||||
|
#define WX_XMLRES_CURRENT_VERSION \
|
||||||
|
(WX_XMLRES_CURRENT_VERSION_MAJOR * 256*256*256 + \
|
||||||
|
WX_XMLRES_CURRENT_VERSION_MINOR * 256*256 + \
|
||||||
|
WX_XMLRES_CURRENT_VERSION_RELEASE * 256 + \
|
||||||
|
WX_XMLRES_CURRENT_VERSION_REVISION)
|
||||||
|
|
||||||
class WXDLLEXPORT wxXmlResourceDataRecord
|
class WXDLLEXPORT wxXmlResourceDataRecord
|
||||||
{
|
{
|
||||||
@@ -116,11 +139,25 @@ class WXDLLEXPORT wxXmlResource : public wxObject
|
|||||||
wxBitmap LoadBitmap(const wxString& name);
|
wxBitmap LoadBitmap(const wxString& name);
|
||||||
wxIcon LoadIcon(const wxString& name);
|
wxIcon LoadIcon(const wxString& name);
|
||||||
|
|
||||||
|
// Attaches unknown control into given panel/window/dialog:
|
||||||
|
// (unknown controls are used in conjunction with <object class="unknown">)
|
||||||
|
bool AttachUnknownControl(const wxString& name, wxWindow *control,
|
||||||
|
wxWindow *parent = NULL);
|
||||||
|
|
||||||
// Returns numeric ID that is equivalent to string id used in XML
|
// Returns numeric ID that is equivalent to string id used in XML
|
||||||
// resource. To be used in event tables
|
// resource. To be used in event tables
|
||||||
// Macro XMLID is provided for convenience
|
// Macro XMLID is provided for convenience
|
||||||
static int GetXMLID(const char *str_id);
|
static int GetXMLID(const char *str_id);
|
||||||
|
|
||||||
|
// Returns version info (a.b.c.d = d+ 256*c + 256^2*b + 256^3*a)
|
||||||
|
long GetVersion() const { return m_version; }
|
||||||
|
|
||||||
|
// Compares resources version to argument. Returns -1 if resources version
|
||||||
|
// is less than the argument, +1 if greater and 0 if they equal.
|
||||||
|
int CompareVersion(int major, int minor, int release, int revision) const
|
||||||
|
{ return GetVersion() -
|
||||||
|
(major*256*256*256 + minor*256*256 + release*256 + revision); }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Scans resources list for unloaded files and loads them. Also reloads
|
// Scans resources list for unloaded files and loads them. Also reloads
|
||||||
// files that have been modified since last loading.
|
// files that have been modified since last loading.
|
||||||
@@ -136,15 +173,17 @@ class WXDLLEXPORT wxXmlResource : public wxObject
|
|||||||
// match current platform
|
// match current platform
|
||||||
void ProcessPlatformProperty(wxXmlNode *node);
|
void ProcessPlatformProperty(wxXmlNode *node);
|
||||||
|
|
||||||
bool GetUseLocale() { return m_UseLocale; }
|
bool GetUseLocale() { return m_useLocale; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool m_UseLocale;
|
long m_version;
|
||||||
wxList m_Handlers;
|
|
||||||
wxXmlResourceDataRecords m_Data;
|
bool m_useLocale;
|
||||||
|
wxList m_handlers;
|
||||||
|
wxXmlResourceDataRecords m_data;
|
||||||
#if wxUSE_FILESYSTEM
|
#if wxUSE_FILESYSTEM
|
||||||
wxFileSystem m_CurFileSystem;
|
wxFileSystem m_curFileSystem;
|
||||||
wxFileSystem& GetCurFileSystem() { return m_CurFileSystem; }
|
wxFileSystem& GetCurFileSystem() { return m_curFileSystem; }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
friend class wxXmlResourceHandler;
|
friend class wxXmlResourceHandler;
|
||||||
@@ -194,7 +233,8 @@ class WXDLLEXPORT wxXmlResourceHandler : public wxObject
|
|||||||
// that is often neccessary to create resource
|
// that is often neccessary to create resource
|
||||||
// if instance != NULL it should not create new instance via 'new' but
|
// if instance != NULL it should not create new instance via 'new' but
|
||||||
// rather use this one and call its Create method
|
// rather use this one and call its Create method
|
||||||
wxObject *CreateResource(wxXmlNode *node, wxObject *parent, wxObject *instance);
|
wxObject *CreateResource(wxXmlNode *node, wxObject *parent,
|
||||||
|
wxObject *instance);
|
||||||
|
|
||||||
// This one is called from CreateResource after variables
|
// This one is called from CreateResource after variables
|
||||||
// were filled
|
// were filled
|
||||||
@@ -204,20 +244,20 @@ class WXDLLEXPORT wxXmlResourceHandler : public wxObject
|
|||||||
// resource from it, FALSE otherwise.
|
// resource from it, FALSE otherwise.
|
||||||
virtual bool CanHandle(wxXmlNode *node) = 0;
|
virtual bool CanHandle(wxXmlNode *node) = 0;
|
||||||
|
|
||||||
void SetParentResource(wxXmlResource *res) { m_Resource = res; }
|
void SetParentResource(wxXmlResource *res) { m_resource = res; }
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
wxXmlResource *m_Resource;
|
wxXmlResource *m_resource;
|
||||||
wxArrayString m_StyleNames;
|
wxArrayString m_styleNames;
|
||||||
wxArrayInt m_StyleValues;
|
wxArrayInt m_styleValues;
|
||||||
|
|
||||||
// Variables (filled by CreateResource)
|
// Variables (filled by CreateResource)
|
||||||
wxXmlNode *m_Node;
|
wxXmlNode *m_node;
|
||||||
wxString m_Class;
|
wxString m_class;
|
||||||
wxObject *m_Parent, *m_Instance;
|
wxObject *m_parent, *m_instance;
|
||||||
wxWindow *m_ParentAsWindow, *m_InstanceAsWindow;
|
wxWindow *m_parentAsWindow, *m_instanceAsWindow;
|
||||||
|
|
||||||
// --- Handy methods:
|
// --- Handy methods:
|
||||||
|
|
||||||
@@ -278,8 +318,10 @@ class WXDLLEXPORT wxXmlResourceHandler : public wxObject
|
|||||||
wxCoord GetDimension(const wxString& param, wxCoord defaultv = 0);
|
wxCoord GetDimension(const wxString& param, wxCoord defaultv = 0);
|
||||||
|
|
||||||
// Get bitmap:
|
// Get bitmap:
|
||||||
wxBitmap GetBitmap(const wxString& param = wxT("bitmap"), wxSize size = wxDefaultSize);
|
wxBitmap GetBitmap(const wxString& param = wxT("bitmap"),
|
||||||
wxIcon GetIcon(const wxString& param = wxT("icon"), wxSize size = wxDefaultSize);
|
wxSize size = wxDefaultSize);
|
||||||
|
wxIcon GetIcon(const wxString& param = wxT("icon"),
|
||||||
|
wxSize size = wxDefaultSize);
|
||||||
|
|
||||||
// Get font:
|
// Get font:
|
||||||
wxFont GetFont(const wxString& param = wxT("font"));
|
wxFont GetFont(const wxString& param = wxT("font"));
|
||||||
@@ -289,11 +331,12 @@ class WXDLLEXPORT wxXmlResourceHandler : public wxObject
|
|||||||
|
|
||||||
void CreateChildren(wxObject *parent, bool this_hnd_only = FALSE);
|
void CreateChildren(wxObject *parent, bool this_hnd_only = FALSE);
|
||||||
void CreateChildrenPrivately(wxObject *parent, wxXmlNode *rootnode = NULL);
|
void CreateChildrenPrivately(wxObject *parent, wxXmlNode *rootnode = NULL);
|
||||||
wxObject *CreateResFromNode(wxXmlNode *node, wxObject *parent, wxObject *instance = NULL)
|
wxObject *CreateResFromNode(wxXmlNode *node,
|
||||||
{ return m_Resource->CreateResFromNode(node, parent, instance); }
|
wxObject *parent, wxObject *instance = NULL)
|
||||||
|
{ return m_resource->CreateResFromNode(node, parent, instance); }
|
||||||
|
|
||||||
// helper
|
// helper
|
||||||
wxFileSystem& GetCurFileSystem() { return m_Resource->GetCurFileSystem(); }
|
wxFileSystem& GetCurFileSystem() { return m_resource->GetCurFileSystem(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
#define ADD_STYLE(style) AddStyle(wxT(#style), style)
|
#define ADD_STYLE(style) AddStyle(wxT(#style), style)
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
# $Id$
|
# $Id$
|
||||||
|
|
||||||
CONTRIB_SAMPLES=mmedia ogl stc gizmos canvas xml plot
|
CONTRIB_SAMPLES=mmedia ogl stc gizmos canvas xml plot applet
|
||||||
|
|
||||||
all:
|
all:
|
||||||
@for d in $(CONTRIB_SAMPLES); do (cd $$d && $(MAKE)); done
|
@for d in $(CONTRIB_SAMPLES); do (cd $$d && $(MAKE)); done
|
||||||
|
25
contrib/samples/applet/Makefile.in
Normal file
25
contrib/samples/applet/Makefile.in
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
#
|
||||||
|
# File: Makefile.in
|
||||||
|
# Author: Julian Smart
|
||||||
|
# Created: 2000
|
||||||
|
# Updated:
|
||||||
|
# Copyright: (c) 2000 Julian Smart
|
||||||
|
#
|
||||||
|
# "%W% %G%"
|
||||||
|
#
|
||||||
|
# Makefile for the multicell example (UNIX).
|
||||||
|
|
||||||
|
top_srcdir = @top_srcdir@/..
|
||||||
|
top_builddir = ../../..
|
||||||
|
program_dir = contrib/samples/applet
|
||||||
|
|
||||||
|
PROGRAM=monitor
|
||||||
|
|
||||||
|
DATAFILES=about.html index.html
|
||||||
|
|
||||||
|
OBJECTS=applet.o dialogs_wdr.o monitorapplet.o combobox.o
|
||||||
|
|
||||||
|
APPEXTRALIBS=$(top_builddir)/lib/libapplet.@WX_TARGET_LIBRARY_TYPE@
|
||||||
|
APPEXTRADEFS=-I$(top_srcdir)/contrib/include
|
||||||
|
|
||||||
|
include $(top_builddir)/src/makeprog.env
|
10
contrib/samples/applet/about.html
Normal file
10
contrib/samples/applet/about.html
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<html>
|
||||||
|
<head><title>Scitech Display Doctor</title></head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<BODY BGCOLOR="#FFFFFF" >
|
||||||
|
<center><IMG SRC="biglogo.bmp"></center>
|
||||||
|
<hr>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
157
contrib/samples/applet/applet.cpp
Normal file
157
contrib/samples/applet/applet.cpp
Normal file
@@ -0,0 +1,157 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
*
|
||||||
|
* wxWindows HTML Applet Package
|
||||||
|
*
|
||||||
|
* ========================================================================
|
||||||
|
*
|
||||||
|
* The contents of this file are subject to the wxWindows licence; you
|
||||||
|
* may not use this file except in compliance with the License. You may
|
||||||
|
* obtain a copy of the License at http://www.wxwindows.org/licence.htm
|
||||||
|
*
|
||||||
|
* Software distributed under the License is distributed on an
|
||||||
|
* "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||||
|
* implied. See the License for the specific language governing
|
||||||
|
* rights and limitations under the License.
|
||||||
|
*
|
||||||
|
* The Original Code is Copyright (C) 2001 SciTech Software, Inc.
|
||||||
|
*
|
||||||
|
* The Initial Developer of the Original Code is SciTech Software, Inc.
|
||||||
|
* All Rights Reserved.
|
||||||
|
*
|
||||||
|
* ========================================================================
|
||||||
|
*
|
||||||
|
* Language: ANSI C++
|
||||||
|
* Environment: Any
|
||||||
|
*
|
||||||
|
* Description: Main wxApplet sample program
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
// For compilers that support precompilation, includes "wx/wx.h".
|
||||||
|
#include <wx/wxprec.h>
|
||||||
|
#ifdef __BORLANDC__
|
||||||
|
#pragma hdrstop
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "wx/wx.h"
|
||||||
|
#include "wx/applet/window.h"
|
||||||
|
#include "applet.h"
|
||||||
|
|
||||||
|
/*---------------------------- Global variables ---------------------------*/
|
||||||
|
|
||||||
|
// Define the event tables for handling application frame events
|
||||||
|
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||||
|
EVT_MENU(Minimal_Quit, MyFrame::OnQuit)
|
||||||
|
EVT_MENU(Minimal_About, MyFrame::OnAbout)
|
||||||
|
EVT_MENU(Minimal_Back, MyFrame::OnBack)
|
||||||
|
EVT_MENU(Minimal_Forward, MyFrame::OnForward)
|
||||||
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
|
// Create a new application object: this macro will allow wxWindows to create
|
||||||
|
// the application object during program execution (it's better than using a
|
||||||
|
// static object for many reasons) and also declares the accessor function
|
||||||
|
// wxGetApp() which will return the reference of the right type (i.e. MyApp and
|
||||||
|
// not wxApp)
|
||||||
|
IMPLEMENT_APP(MyApp)
|
||||||
|
|
||||||
|
/*------------------------- Implementation --------------------------------*/
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
PARAMETERS:
|
||||||
|
title - Title for the frame window
|
||||||
|
pos - Position to place to frame window
|
||||||
|
size - Size of the frame window
|
||||||
|
|
||||||
|
REMARKS:
|
||||||
|
Application frame window constructor
|
||||||
|
****************************************************************************/
|
||||||
|
MyFrame::MyFrame(
|
||||||
|
const wxString& title,
|
||||||
|
const wxPoint& pos,
|
||||||
|
const wxSize& size)
|
||||||
|
: wxFrame(NULL, -1, title, pos, size)
|
||||||
|
{
|
||||||
|
// Create a menu bar
|
||||||
|
wxMenu *menuFile = new wxMenu;
|
||||||
|
wxMenu *menuNav = new wxMenu;
|
||||||
|
menuFile->Append(Minimal_Quit, "E&xit");
|
||||||
|
menuNav->Append(Minimal_Back, "Go &back");
|
||||||
|
menuNav->Append(Minimal_Forward, "Go &forward");
|
||||||
|
|
||||||
|
// Now append the freshly created menu to the menu bar...
|
||||||
|
wxMenuBar *menuBar = new wxMenuBar;
|
||||||
|
menuBar->Append(menuFile, "&File");
|
||||||
|
menuBar->Append(menuNav, "&Navigate");
|
||||||
|
|
||||||
|
// ... and attach this menu bar to the frame
|
||||||
|
SetMenuBar(menuBar);
|
||||||
|
CreateStatusBar(2);
|
||||||
|
|
||||||
|
// Create the HTML window
|
||||||
|
html = new wxHtmlAppletWindow(this);
|
||||||
|
html->SetRelatedFrame(this, "wxApplet Demo: '%s'");
|
||||||
|
html->SetRelatedStatusBar(1);
|
||||||
|
html->LoadPage("index.html");
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
REMARKS:
|
||||||
|
Event handler for the 'Exit' menu item
|
||||||
|
****************************************************************************/
|
||||||
|
void MyFrame::OnQuit(
|
||||||
|
wxCommandEvent&)
|
||||||
|
{
|
||||||
|
// TRUE is to force the frame to close
|
||||||
|
Close(TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
REMARKS:
|
||||||
|
Event handler for the 'About' menu item
|
||||||
|
****************************************************************************/
|
||||||
|
void MyFrame::OnAbout(
|
||||||
|
wxCommandEvent&)
|
||||||
|
{
|
||||||
|
// TODO: Bring up and about html page!
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
REMARKS:
|
||||||
|
Event handler for the 'Go back' menu item
|
||||||
|
****************************************************************************/
|
||||||
|
void MyFrame::OnBack(
|
||||||
|
wxCommandEvent&)
|
||||||
|
{
|
||||||
|
if (!html -> HistoryBack())
|
||||||
|
wxMessageBox("You reached prehistory era!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
REMARKS:
|
||||||
|
Event handler for the 'Go forward' menu item
|
||||||
|
****************************************************************************/
|
||||||
|
void MyFrame::OnForward(
|
||||||
|
wxCommandEvent&)
|
||||||
|
{
|
||||||
|
if (!html -> HistoryForward())
|
||||||
|
wxMessageBox("No more items in history!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
REMARKS:
|
||||||
|
`Main program' equivalent: the program execution "starts" here
|
||||||
|
****************************************************************************/
|
||||||
|
bool MyApp::OnInit()
|
||||||
|
{
|
||||||
|
// Create the main application window
|
||||||
|
MyFrame *frame = new MyFrame("wxApplet testing application",
|
||||||
|
wxPoint(50, 50), wxSize(640, 480));
|
||||||
|
|
||||||
|
// Show it and tell the application that it's our main window
|
||||||
|
frame->Show(TRUE);
|
||||||
|
SetTopWindow(frame);
|
||||||
|
|
||||||
|
// Success: wxApp::OnRun() will be called to run the application
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
78
contrib/samples/applet/applet.h
Normal file
78
contrib/samples/applet/applet.h
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
*
|
||||||
|
* wxWindows HTML Applet Package
|
||||||
|
*
|
||||||
|
* ========================================================================
|
||||||
|
*
|
||||||
|
* The contents of this file are subject to the wxWindows licence; you
|
||||||
|
* may not use this file except in compliance with the License. You may
|
||||||
|
* obtain a copy of the License at http://www.wxwindows.org/licence.htm
|
||||||
|
*
|
||||||
|
* Software distributed under the License is distributed on an
|
||||||
|
* "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||||
|
* implied. See the License for the specific language governing
|
||||||
|
* rights and limitations under the License.
|
||||||
|
*
|
||||||
|
* The Original Code is Copyright (C) 2001 SciTech Software, Inc.
|
||||||
|
*
|
||||||
|
* The Initial Developer of the Original Code is SciTech Software, Inc.
|
||||||
|
* All Rights Reserved.
|
||||||
|
*
|
||||||
|
* ========================================================================
|
||||||
|
*
|
||||||
|
* Language: ANSI C++
|
||||||
|
* Environment: Any
|
||||||
|
*
|
||||||
|
* Description: Main wxApplet sample program header file
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#ifndef __SAMPLE_H
|
||||||
|
|
||||||
|
/*------------------------------ Constants --------------------------------*/
|
||||||
|
|
||||||
|
enum {
|
||||||
|
// Menu items
|
||||||
|
Minimal_Quit = 1,
|
||||||
|
Minimal_About,
|
||||||
|
Minimal_Back,
|
||||||
|
Minimal_Forward,
|
||||||
|
|
||||||
|
// Controls start here (the numbers are, of course, arbitrary)
|
||||||
|
Minimal_Text = 1000,
|
||||||
|
};
|
||||||
|
|
||||||
|
/*--------------------------- Class Definitions ---------------------------*/
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
REMARKS:
|
||||||
|
Define a new application type, each program should derive a class from wxApp
|
||||||
|
****************************************************************************/
|
||||||
|
class MyApp : public wxApp {
|
||||||
|
public:
|
||||||
|
// Initialise the application on startup
|
||||||
|
virtual bool OnInit();
|
||||||
|
};
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
REMARKS:
|
||||||
|
Define a new frame type: this is going to be our main frame
|
||||||
|
****************************************************************************/
|
||||||
|
class MyFrame : public wxFrame {
|
||||||
|
private:
|
||||||
|
DECLARE_EVENT_TABLE() // Declare event table
|
||||||
|
wxHtmlAppletWindow *html; // Pointer to the html applet window
|
||||||
|
|
||||||
|
public:
|
||||||
|
// Constructor
|
||||||
|
MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size);
|
||||||
|
|
||||||
|
// Event handlers
|
||||||
|
void OnQuit(wxCommandEvent& event);
|
||||||
|
void OnAbout(wxCommandEvent& event);
|
||||||
|
void OnBack(wxCommandEvent& event);
|
||||||
|
void OnForward(wxCommandEvent& event);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // __SAMPLE_H
|
||||||
|
|
2
contrib/samples/applet/applet.rc
Normal file
2
contrib/samples/applet/applet.rc
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
#include "wx/msw/wx.rc"
|
||||||
|
|
174
contrib/samples/applet/combobox.cpp
Normal file
174
contrib/samples/applet/combobox.cpp
Normal file
@@ -0,0 +1,174 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
*
|
||||||
|
* wxWindows HTML Applet Package
|
||||||
|
*
|
||||||
|
* ========================================================================
|
||||||
|
*
|
||||||
|
* The contents of this file are subject to the wxWindows licence; you
|
||||||
|
* may not use this file except in compliance with the License. You may
|
||||||
|
* obtain a copy of the License at http://www.wxwindows.org/licence.htm
|
||||||
|
*
|
||||||
|
* Software distributed under the License is distributed on an
|
||||||
|
* "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||||
|
* implied. See the License for the specific language governing
|
||||||
|
* rights and limitations under the License.
|
||||||
|
*
|
||||||
|
* The Original Code is Copyright (C) 2001 SciTech Software, Inc.
|
||||||
|
*
|
||||||
|
* The Initial Developer of the Original Code is SciTech Software, Inc.
|
||||||
|
* All Rights Reserved.
|
||||||
|
*
|
||||||
|
* ========================================================================
|
||||||
|
*
|
||||||
|
* Language: ANSI C++
|
||||||
|
* Environment: Any
|
||||||
|
*
|
||||||
|
* Description: Combobox wrapper. This file implements the custom
|
||||||
|
* combo boxes used for this sample program.
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
// For compilers that support precompilation, includes "wx/wx.h".
|
||||||
|
#include <wx/wxprec.h>
|
||||||
|
#ifdef __BORLANDC__
|
||||||
|
#pragma hdrstop
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "wx/wx.h"
|
||||||
|
#include "combobox.h"
|
||||||
|
|
||||||
|
/*------------------------- Implementation --------------------------------*/
|
||||||
|
|
||||||
|
ComboBox::ComboBox(
|
||||||
|
wxWindow *parent,
|
||||||
|
int listid,
|
||||||
|
int textid)
|
||||||
|
: m_Parent(parent), m_ListBoxId(listid), m_TextCtrlId(textid)
|
||||||
|
{
|
||||||
|
m_ListBox = wxDynamicCast(m_Parent->FindWindow(listid),wxListBox);
|
||||||
|
m_TextCtrl = wxDynamicCast(m_Parent->FindWindow(textid),wxTextCtrl);
|
||||||
|
}
|
||||||
|
|
||||||
|
int ComboBox::GetListBoxId()
|
||||||
|
{
|
||||||
|
return m_ListBoxId;
|
||||||
|
}
|
||||||
|
|
||||||
|
int ComboBox::GetSelection()
|
||||||
|
{
|
||||||
|
return m_ListBox->GetSelection();
|
||||||
|
}
|
||||||
|
|
||||||
|
wxString ComboBox::GetStringSelection()
|
||||||
|
{
|
||||||
|
return m_ListBox->GetStringSelection();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ComboBox::SetStringSelection(const wxString& s, bool select)
|
||||||
|
{
|
||||||
|
select = TRUE;
|
||||||
|
select = m_ListBox->SetStringSelection(s, select);
|
||||||
|
m_TextCtrl->SetValue(GetStringSelection());
|
||||||
|
return select;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComboBox::Select(int n)
|
||||||
|
{
|
||||||
|
m_ListBox->Select(n);
|
||||||
|
m_TextCtrl->SetValue(GetStringSelection());
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComboBox::Deselect(int n)
|
||||||
|
{
|
||||||
|
m_ListBox->Deselect(n);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComboBox::Insert(const wxString& item, int pos)
|
||||||
|
{
|
||||||
|
m_ListBox->Insert(item,pos);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComboBox::Insert(const wxString& item, int pos, void *clientData)
|
||||||
|
{
|
||||||
|
m_ListBox->Insert(item, pos, clientData);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComboBox::Insert(const wxString& item, int pos, wxClientData *clientData)
|
||||||
|
{
|
||||||
|
m_ListBox->Insert(item, pos, clientData);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComboBox::InsertItems(int nItems, const wxString *items, int pos)
|
||||||
|
{
|
||||||
|
m_ListBox->InsertItems(nItems, items, pos);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComboBox::InsertItems(const wxArrayString& items, int pos)
|
||||||
|
{
|
||||||
|
m_ListBox->InsertItems(items, pos);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComboBox::Set(int n, const wxString* items, void **clientData)
|
||||||
|
{
|
||||||
|
m_ListBox->Set(n, items, clientData);
|
||||||
|
m_TextCtrl->SetValue(GetStringSelection());
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComboBox::Set(const wxArrayString& items, void **clientData)
|
||||||
|
{
|
||||||
|
m_ListBox->Set(items, clientData);
|
||||||
|
m_TextCtrl->SetValue(GetStringSelection());
|
||||||
|
}
|
||||||
|
|
||||||
|
int ComboBox::FindString(const wxString &s)
|
||||||
|
{
|
||||||
|
return (m_ListBox->FindString(s));
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComboBox::SetFirstItem(int n)
|
||||||
|
{
|
||||||
|
m_ListBox->SetFirstItem(n);
|
||||||
|
m_TextCtrl->SetValue(GetStringSelection());
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComboBox::SetFirstItem(const wxString &s)
|
||||||
|
{
|
||||||
|
m_ListBox->SetFirstItem(s);
|
||||||
|
m_TextCtrl->SetValue(GetStringSelection());
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComboBox::Append(const wxString &item)
|
||||||
|
{
|
||||||
|
m_ListBox->Append(item);
|
||||||
|
m_TextCtrl->SetValue(GetStringSelection());
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComboBox::Append(const wxString& item, void *clientData)
|
||||||
|
{
|
||||||
|
m_ListBox->Append(item, clientData);
|
||||||
|
m_TextCtrl->SetValue(GetStringSelection());
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComboBox::Append(const wxString& item, wxClientData *clientData)
|
||||||
|
{
|
||||||
|
m_ListBox->Append(item, clientData);
|
||||||
|
m_TextCtrl->SetValue(GetStringSelection());
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComboBox::Clear()
|
||||||
|
{
|
||||||
|
m_ListBox->Clear();
|
||||||
|
m_TextCtrl->SetValue(GetStringSelection());
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComboBox::Delete(int n)
|
||||||
|
{
|
||||||
|
m_ListBox->Delete(n);
|
||||||
|
m_TextCtrl->SetValue(GetStringSelection());
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComboBox::OnChange(wxCommandEvent &)
|
||||||
|
{
|
||||||
|
m_TextCtrl->SetValue(GetStringSelection());
|
||||||
|
}
|
||||||
|
|
98
contrib/samples/applet/combobox.h
Normal file
98
contrib/samples/applet/combobox.h
Normal file
@@ -0,0 +1,98 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
*
|
||||||
|
* wxWindows HTML Applet Package
|
||||||
|
*
|
||||||
|
* ========================================================================
|
||||||
|
*
|
||||||
|
* The contents of this file are subject to the wxWindows licence; you
|
||||||
|
* may not use this file except in compliance with the License. You may
|
||||||
|
* obtain a copy of the License at http://www.wxwindows.org/licence.htm
|
||||||
|
*
|
||||||
|
* Software distributed under the License is distributed on an
|
||||||
|
* "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||||
|
* implied. See the License for the specific language governing
|
||||||
|
* rights and limitations under the License.
|
||||||
|
*
|
||||||
|
* The Original Code is Copyright (C) 2001 SciTech Software, Inc.
|
||||||
|
*
|
||||||
|
* The Initial Developer of the Original Code is SciTech Software, Inc.
|
||||||
|
* All Rights Reserved.
|
||||||
|
*
|
||||||
|
* ========================================================================
|
||||||
|
*
|
||||||
|
* Language: ANSI C++
|
||||||
|
* Environment: Any
|
||||||
|
*
|
||||||
|
* Description: Combobox wrapper. This header file defines the custom
|
||||||
|
* combo boxes used for this sample program.
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#ifndef __COMBOBOX_H
|
||||||
|
#define __COMBOBOX_H
|
||||||
|
|
||||||
|
/*--------------------------- Class Definitions ---------------------------*/
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
REMARKS:
|
||||||
|
Defines a Custom ComboBox. This combobox is a portable implementation of
|
||||||
|
the msw combobox control. It is made of the wxWindows textctrl primitive and
|
||||||
|
the listbox primitive. This object does not create or display the controls,
|
||||||
|
it provides the relationship and underlying behavior layer for the primitives
|
||||||
|
allready created via wxDesigner.
|
||||||
|
****************************************************************************/
|
||||||
|
class ComboBox {
|
||||||
|
private:
|
||||||
|
int m_ListBoxId;
|
||||||
|
int m_TextCtrlId;
|
||||||
|
wxWindow *m_Parent;
|
||||||
|
wxListBox *m_ListBox;
|
||||||
|
wxTextCtrl *m_TextCtrl;
|
||||||
|
|
||||||
|
public:
|
||||||
|
// Constructor
|
||||||
|
ComboBox(wxWindow *parent, int,int);
|
||||||
|
|
||||||
|
// Returns the id of the listbox: listBoxId.
|
||||||
|
int GetListBoxId();
|
||||||
|
|
||||||
|
// Inserts: Used to insert items into the listbox
|
||||||
|
void Insert(const wxString& item, int pos);
|
||||||
|
void Insert(const wxString& item, int pos, void *clientData);
|
||||||
|
void Insert(const wxString& item, int pos, wxClientData *clientData);
|
||||||
|
void InsertItems(int nItems, const wxString *items, int pos);
|
||||||
|
void InsertItems(const wxArrayString& items, int pos);
|
||||||
|
|
||||||
|
// Sets: Used to set items in the combo box
|
||||||
|
void Set(int n, const wxString* items, void **clientData );
|
||||||
|
void Set(const wxArrayString& items, void **clientData);
|
||||||
|
int FindString(const wxString &s);
|
||||||
|
|
||||||
|
// Selections: Used to get/de/select items in the listbox
|
||||||
|
void Select(int n);
|
||||||
|
void Deselect(int n);
|
||||||
|
int GetSelection();
|
||||||
|
wxString GetStringSelection();
|
||||||
|
bool SetStringSelection(const wxString& s, bool select);
|
||||||
|
|
||||||
|
// Set the specified item at the first visible item or scroll to max
|
||||||
|
// range.
|
||||||
|
void SetFirstItem(int n);
|
||||||
|
void SetFirstItem(const wxString& s);
|
||||||
|
|
||||||
|
// Append items to the listbox
|
||||||
|
void Append(const wxString& item);
|
||||||
|
void Append(const wxString& item, void *clientData);
|
||||||
|
void Append(const wxString& item, wxClientData *clientData);
|
||||||
|
|
||||||
|
// Deleting items from the list box
|
||||||
|
void Clear();
|
||||||
|
void Delete(int n);
|
||||||
|
|
||||||
|
// OnChange event function (called from SDD dialog box code, see: dialog.h) Mimic
|
||||||
|
// msw combobox behavior: Click on listbox item it shows in textbox.
|
||||||
|
void OnChange(wxCommandEvent &event);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // __COMBOBOX_H
|
||||||
|
|
BIN
contrib/samples/applet/dialogs.wdr
Normal file
BIN
contrib/samples/applet/dialogs.wdr
Normal file
Binary file not shown.
106
contrib/samples/applet/dialogs_wdr.cpp
Normal file
106
contrib/samples/applet/dialogs_wdr.cpp
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// Source code generated by wxDesigner from file: dialogs.wdr
|
||||||
|
// Do not modify this file, all changes will be lost!
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifdef __GNUG__
|
||||||
|
#pragma implementation "dialogs_wdr.cpp"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// For compilers that support precompilation
|
||||||
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
|
#ifdef __BORLANDC__
|
||||||
|
#pragma hdrstop
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Include private header
|
||||||
|
#include "dialogs_wdr.h"
|
||||||
|
|
||||||
|
|
||||||
|
// Implement window functions
|
||||||
|
|
||||||
|
wxSizer *MonitorDialogFunc( wxPanel *parent, bool call_fit, bool set_sizer )
|
||||||
|
{
|
||||||
|
wxSizer *item0 = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
|
wxSizer *item1 = new wxFlexGridSizer( 2, 0, 0 );
|
||||||
|
|
||||||
|
wxSizer *item2 = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
|
wxStaticText *item3 = new wxStaticText( parent, ID_TEXT_MANUFACTURER, "Manufacturer:", wxDefaultPosition, wxSize(180,-1), 0 );
|
||||||
|
item3->SetForegroundColour( *wxBLACK );
|
||||||
|
item3->SetBackgroundColour( *wxWHITE );
|
||||||
|
item2->Add( item3, 0, wxALIGN_CENTRE, 5 );
|
||||||
|
|
||||||
|
item2->Add( 10, 20, 0, wxALIGN_CENTRE, 5 );
|
||||||
|
|
||||||
|
item1->Add( item2, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||||
|
|
||||||
|
wxSizer *item4 = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
|
wxStaticText *item5 = new wxStaticText( parent, ID_TEXT_MODEL, "Model:", wxDefaultPosition, wxSize(250,-1), 0 );
|
||||||
|
item5->SetForegroundColour( *wxBLACK );
|
||||||
|
item5->SetBackgroundColour( *wxWHITE );
|
||||||
|
item4->Add( item5, 0, wxALIGN_CENTRE, 5 );
|
||||||
|
|
||||||
|
item1->Add( item4, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||||
|
|
||||||
|
wxSizer *item6 = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
|
wxTextCtrl *item7 = new wxTextCtrl( parent, ID_TEXTCTRL_MFTR, "", wxDefaultPosition, wxSize(190,-1), wxTE_READONLY );
|
||||||
|
item7->SetForegroundColour( *wxBLACK );
|
||||||
|
item7->SetBackgroundColour( *wxWHITE );
|
||||||
|
item6->Add( item7, 0, wxALIGN_CENTRE, 5 );
|
||||||
|
|
||||||
|
item6->Add( 15, 20, 0, wxALIGN_CENTRE, 5 );
|
||||||
|
|
||||||
|
item1->Add( item6, 0, wxALIGN_CENTRE, 5 );
|
||||||
|
|
||||||
|
wxSizer *item8 = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
|
wxTextCtrl *item9 = new wxTextCtrl( parent, ID_TEXTCTRL_MDL, "", wxDefaultPosition, wxSize(260,-1), wxTE_READONLY );
|
||||||
|
item8->Add( item9, 0, wxALIGN_CENTRE, 5 );
|
||||||
|
|
||||||
|
item1->Add( item8, 0, wxALIGN_CENTRE, 5 );
|
||||||
|
|
||||||
|
wxSizer *item10 = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
|
wxString *strs11 = (wxString*) NULL;
|
||||||
|
wxListBox *item11 = new wxListBox( parent, ID_LISTBOX_MFTR, wxDefaultPosition, wxSize(190,150), 0, strs11, wxLB_SORT|wxLB_ALWAYS_SB );
|
||||||
|
item10->Add( item11, 0, wxALIGN_CENTRE, 5 );
|
||||||
|
|
||||||
|
item10->Add( 15, 20, 0, wxALIGN_CENTRE, 5 );
|
||||||
|
|
||||||
|
item1->Add( item10, 0, wxALIGN_CENTRE, 5 );
|
||||||
|
|
||||||
|
wxSizer *item12 = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
|
wxString *strs13 = (wxString*) NULL;
|
||||||
|
wxListBox *item13 = new wxListBox( parent, ID_LISTBOX_MDL, wxDefaultPosition, wxSize(260,150), 0, strs13, wxLB_SORT|wxLB_NEEDED_SB );
|
||||||
|
item13->SetForegroundColour( *wxBLACK );
|
||||||
|
item13->SetBackgroundColour( *wxWHITE );
|
||||||
|
item12->Add( item13, 0, wxALIGN_CENTRE, 5 );
|
||||||
|
|
||||||
|
item1->Add( item12, 0, wxALIGN_CENTRE, 5 );
|
||||||
|
|
||||||
|
item0->Add( item1, 0, wxALIGN_CENTRE, 15 );
|
||||||
|
|
||||||
|
if (set_sizer)
|
||||||
|
{
|
||||||
|
parent->SetAutoLayout( TRUE );
|
||||||
|
parent->SetSizer( item0 );
|
||||||
|
if (call_fit)
|
||||||
|
{
|
||||||
|
item0->Fit( parent );
|
||||||
|
item0->SetSizeHints( parent );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return item0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Implement bitmap functions
|
||||||
|
|
||||||
|
|
||||||
|
// End of generated file
|
42
contrib/samples/applet/dialogs_wdr.h
Normal file
42
contrib/samples/applet/dialogs_wdr.h
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// Header generated by wxDesigner from file: dialogs.wdr
|
||||||
|
// Do not modify this file, all changes will be lost!
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifndef __WDR_dialogs_H__
|
||||||
|
#define __WDR_dialogs_H__
|
||||||
|
|
||||||
|
#ifdef __GNUG__
|
||||||
|
#pragma interface "dialogs_wdr.cpp"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Include wxWindows' headers
|
||||||
|
|
||||||
|
#ifndef WX_PRECOMP
|
||||||
|
#include <wx/wx.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <wx/image.h>
|
||||||
|
#include <wx/statline.h>
|
||||||
|
#include <wx/spinbutt.h>
|
||||||
|
#include <wx/spinctrl.h>
|
||||||
|
#include <wx/splitter.h>
|
||||||
|
#include <wx/listctrl.h>
|
||||||
|
#include <wx/treectrl.h>
|
||||||
|
#include <wx/notebook.h>
|
||||||
|
|
||||||
|
// Declare window functions
|
||||||
|
|
||||||
|
#define ID_TEXT_MANUFACTURER 10000
|
||||||
|
#define ID_TEXT_MODEL 10001
|
||||||
|
#define ID_TEXTCTRL_MFTR 10
|
||||||
|
#define ID_TEXTCTRL_MDL 20
|
||||||
|
#define ID_LISTBOX_MFTR 11
|
||||||
|
#define ID_LISTBOX_MDL 21
|
||||||
|
wxSizer *MonitorDialogFunc( wxPanel *parent, bool call_fit = TRUE, bool set_sizer = TRUE );
|
||||||
|
|
||||||
|
// Declare bitmap functions
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// End of generated file
|
21
contrib/samples/applet/index.html
Normal file
21
contrib/samples/applet/index.html
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<html>
|
||||||
|
<head><title>Widgets demo</title></head>
|
||||||
|
<body text="#000000" bgcolor="#D0D0D0">
|
||||||
|
|
||||||
|
<h3>wxHtmlWidgetCell demonstration</h3>
|
||||||
|
|
||||||
|
There is an embedded window somewhere around. Enjoy it.
|
||||||
|
|
||||||
|
<A HREF="about.html">About...</A>
|
||||||
|
|
||||||
|
<insert "wxChipsetName">
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
<center>
|
||||||
|
<embed applet="MonitorApplet" width=100 height=100>
|
||||||
|
</center>
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
222
contrib/samples/applet/monitorapplet.cpp
Normal file
222
contrib/samples/applet/monitorapplet.cpp
Normal file
@@ -0,0 +1,222 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
*
|
||||||
|
* wxWindows HTML Applet Package
|
||||||
|
*
|
||||||
|
* Copyright (C) 1991-2001 SciTech Software, Inc.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* ======================================================================
|
||||||
|
* |REMOVAL OR MODIFICATION OF THIS HEADER IS STRICTLY PROHIBITED BY LAW|
|
||||||
|
* | |
|
||||||
|
* |This copyrighted computer code is a proprietary trade secret of |
|
||||||
|
* |SciTech Software, Inc., located at 505 Wall Street, Chico, CA 95928 |
|
||||||
|
* |USA (www.scitechsoft.com). ANY UNAUTHORIZED POSSESSION, USE, |
|
||||||
|
* |VIEWING, COPYING, MODIFICATION OR DISSEMINATION OF THIS CODE IS |
|
||||||
|
* |STRICTLY PROHIBITED BY LAW. Unless you have current, express |
|
||||||
|
* |written authorization from SciTech to possess or use this code, you |
|
||||||
|
* |may be subject to civil and/or criminal penalties. |
|
||||||
|
* | |
|
||||||
|
* |If you received this code in error or you would like to report |
|
||||||
|
* |improper use, please immediately contact SciTech Software, Inc. at |
|
||||||
|
* |530-894-8400. |
|
||||||
|
* | |
|
||||||
|
* |REMOVAL OR MODIFICATION OF THIS HEADER IS STRICTLY PROHIBITED BY LAW|
|
||||||
|
* ======================================================================
|
||||||
|
*
|
||||||
|
* Language: ANSI C++
|
||||||
|
* Environment: Any
|
||||||
|
*
|
||||||
|
* Description: Main wxApplet class implementation
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
// For compilers that support precompilation
|
||||||
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
|
// Include private headers
|
||||||
|
#include "wx/wx.h"
|
||||||
|
#include "monitorapplet.h"
|
||||||
|
|
||||||
|
/*---------------------------- Global variables ---------------------------*/
|
||||||
|
|
||||||
|
// Implement the dynamic class so it can be constructed dynamically
|
||||||
|
IMPLEMENT_DYNAMIC_CLASS(MonitorApplet, wxApplet);
|
||||||
|
|
||||||
|
// Event handler table.
|
||||||
|
BEGIN_EVENT_TABLE(MonitorApplet, wxApplet)
|
||||||
|
EVT_LISTBOX(ID_LISTBOX_MFTR, MonitorApplet::OnChange)
|
||||||
|
EVT_LISTBOX(ID_LISTBOX_MDL, MonitorApplet::OnChange)
|
||||||
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
|
// Include database of known monitors. Normally this would come from a
|
||||||
|
// real database on disk, but for this simple example we hard code all
|
||||||
|
// the values into a table.
|
||||||
|
#include "monitors.c"
|
||||||
|
|
||||||
|
/*------------------------- Implementation --------------------------------*/
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
REMARKS:
|
||||||
|
Constructor called during dynamic creation. Simple initialise all
|
||||||
|
internal values for the class so that it can be properly created later
|
||||||
|
via the virtual Create member function.
|
||||||
|
****************************************************************************/
|
||||||
|
MonitorApplet::MonitorApplet()
|
||||||
|
{
|
||||||
|
m_Mfr = NULL;
|
||||||
|
m_Model = NULL;
|
||||||
|
m_Data = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
REMARKS:
|
||||||
|
Psuedo virtual constructor for the MonitorApplet class.
|
||||||
|
****************************************************************************/
|
||||||
|
bool MonitorApplet::Create(
|
||||||
|
wxHtmlAppletWindow *parent,
|
||||||
|
const wxSize& size,
|
||||||
|
long style)
|
||||||
|
{
|
||||||
|
bool ret = wxApplet::Create(parent, size, style);
|
||||||
|
if (ret) {
|
||||||
|
// Read our cookie or create it if it does not exist
|
||||||
|
if ((m_Data = (MonitorData*)parent->FindCookie(MONITOR_COOKIE_NAME)) == NULL) {
|
||||||
|
m_Data = new MonitorData;
|
||||||
|
memset(&m_Data->m_Monitor,0,sizeof(m_Data->m_Monitor));
|
||||||
|
parent->RegisterCookie(MONITOR_COOKIE_NAME,m_Data);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create all the controls and initialise them
|
||||||
|
MonitorDialogFunc(this,true,true);
|
||||||
|
if ((m_Mfr = new ComboBox(this , ID_LISTBOX_MFTR, ID_TEXTCTRL_MFTR)) == NULL)
|
||||||
|
return false;
|
||||||
|
if ((m_Model = new ComboBox(this , ID_LISTBOX_MDL, ID_TEXTCTRL_MDL)) == NULL)
|
||||||
|
return false;
|
||||||
|
ReadMfrList();
|
||||||
|
ReadModelList(true);
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
REMARKS:
|
||||||
|
Destructor for the MonitorApplet class.
|
||||||
|
****************************************************************************/
|
||||||
|
MonitorApplet::~MonitorApplet()
|
||||||
|
{
|
||||||
|
delete m_Mfr;
|
||||||
|
delete m_Model;
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
REMARKS:
|
||||||
|
Save the current state for the applet to our cookie
|
||||||
|
****************************************************************************/
|
||||||
|
void MonitorApplet::SaveCurrentState()
|
||||||
|
{
|
||||||
|
// Read currently selected strings into cookie
|
||||||
|
strcpy(m_Data->m_Monitor.m_Mfr,m_Mfr->GetStringSelection());
|
||||||
|
strcpy(m_Data->m_Monitor.m_Model,m_Model->GetStringSelection());
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
REMARKS:
|
||||||
|
Handles user navigation away from the applet via an HTML link
|
||||||
|
****************************************************************************/
|
||||||
|
void MonitorApplet::OnLinkClicked(
|
||||||
|
const wxHtmlLinkInfo&)
|
||||||
|
{
|
||||||
|
SaveCurrentState();
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
REMARKS:
|
||||||
|
Handles user navigation away from the applet via the history forward command
|
||||||
|
****************************************************************************/
|
||||||
|
void MonitorApplet::OnHistoryForward()
|
||||||
|
{
|
||||||
|
SaveCurrentState();
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
REMARKS:
|
||||||
|
Handles user navigation away from the applet via the history back command
|
||||||
|
****************************************************************************/
|
||||||
|
void MonitorApplet::OnHistoryBack()
|
||||||
|
{
|
||||||
|
SaveCurrentState();
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
REMARKS:
|
||||||
|
Handles inter applet communication messages
|
||||||
|
****************************************************************************/
|
||||||
|
void MonitorApplet::OnMessage(
|
||||||
|
wxEvent& msg)
|
||||||
|
{
|
||||||
|
msg.Skip(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
REMARKS:
|
||||||
|
****************************************************************************/
|
||||||
|
void MonitorApplet::OnChange(
|
||||||
|
wxCommandEvent &evt)
|
||||||
|
{
|
||||||
|
if (evt.GetId() == m_Mfr->GetListBoxId()) {
|
||||||
|
m_Mfr->OnChange(evt);
|
||||||
|
ReadModelList(true);
|
||||||
|
}
|
||||||
|
else if (evt.GetId() == m_Model->GetListBoxId()) {
|
||||||
|
m_Model->OnChange(evt);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
REMARKS:
|
||||||
|
Updates the manufacturer list for the dialog box from the database.
|
||||||
|
****************************************************************************/
|
||||||
|
void MonitorApplet::ReadMfrList()
|
||||||
|
{
|
||||||
|
char buf[80] = "";
|
||||||
|
int i,selected = 0;
|
||||||
|
MonitorEntry *m;
|
||||||
|
|
||||||
|
m_Mfr->Clear();
|
||||||
|
for (m = m_Monitors,i = 0; m->m_Mfr[0] != 0; m++) {
|
||||||
|
if (wxStricmp(buf,m->m_Mfr) != 0) {
|
||||||
|
m_Mfr->Append(m->m_Mfr);
|
||||||
|
if (wxStricmp(m_Data->m_Monitor.m_Mfr,m->m_Mfr) == 0)
|
||||||
|
selected = i;
|
||||||
|
strcpy(buf,m->m_Mfr);
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
m_Mfr->Select(selected);
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
REMARKS:
|
||||||
|
Updates the model list for the dialog box for the currently selected
|
||||||
|
manufacturer type.
|
||||||
|
****************************************************************************/
|
||||||
|
void MonitorApplet::ReadModelList(
|
||||||
|
bool selectCurrent)
|
||||||
|
{
|
||||||
|
int i,selected = 0;
|
||||||
|
MonitorEntry *m;
|
||||||
|
wxString mfrStr;
|
||||||
|
|
||||||
|
mfrStr = m_Mfr->GetStringSelection();
|
||||||
|
m_Model->Clear();
|
||||||
|
for (m = m_Monitors,i = 0; m->m_Mfr[0] != 0; m++) {
|
||||||
|
if (wxStricmp(mfrStr,m->m_Mfr) == 0) {
|
||||||
|
m_Model->Append(m->m_Model);
|
||||||
|
if (selectCurrent && wxStricmp(m_Data->m_Monitor.m_Model,m->m_Model) == 0)
|
||||||
|
selected = i;
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
m_Model->Select(selected);
|
||||||
|
}
|
||||||
|
|
114
contrib/samples/applet/monitorapplet.h
Normal file
114
contrib/samples/applet/monitorapplet.h
Normal file
@@ -0,0 +1,114 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
*
|
||||||
|
* Copyright (C) 1991-2001 SciTech Software, Inc.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* ======================================================================
|
||||||
|
* |REMOVAL OR MODIFICATION OF THIS HEADER IS STRICTLY PROHIBITED BY LAW|
|
||||||
|
* | |
|
||||||
|
* |This copyrighted computer code is a proprietary trade secret of |
|
||||||
|
* |SciTech Software, Inc., located at 505 Wall Street, Chico, CA 95928 |
|
||||||
|
* |USA (www.scitechsoft.com). ANY UNAUTHORIZED POSSESSION, USE, |
|
||||||
|
* |VIEWING, COPYING, MODIFICATION OR DISSEMINATION OF THIS CODE IS |
|
||||||
|
* |STRICTLY PROHIBITED BY LAW. Unless you have current, express |
|
||||||
|
* |written authorization from SciTech to possess or use this code, you |
|
||||||
|
* |may be subject to civil and/or criminal penalties. |
|
||||||
|
* | |
|
||||||
|
* |If you received this code in error or you would like to report |
|
||||||
|
* |improper use, please immediately contact SciTech Software, Inc. at |
|
||||||
|
* |530-894-8400. |
|
||||||
|
* | |
|
||||||
|
* |REMOVAL OR MODIFICATION OF THIS HEADER IS STRICTLY PROHIBITED BY LAW|
|
||||||
|
* ======================================================================
|
||||||
|
*
|
||||||
|
* Language: ANSI C++
|
||||||
|
* Environment: Any
|
||||||
|
*
|
||||||
|
* Description: Header file for the MonitorApplet class
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#ifndef __WX_MONITORAPPLET_H
|
||||||
|
#define __WX_MONITORAPPLET_H
|
||||||
|
|
||||||
|
#include "wx/applet/applet.h"
|
||||||
|
#include "combobox.h"
|
||||||
|
#include "dialogs_wdr.h"
|
||||||
|
|
||||||
|
/*--------------------------- Class Definitions ---------------------------*/
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
REMARKS:
|
||||||
|
Structure defining the simple monitor database records.
|
||||||
|
****************************************************************************/
|
||||||
|
struct MonitorEntry {
|
||||||
|
char m_Mfr[60];
|
||||||
|
char m_Model[60];
|
||||||
|
};
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
REMARKS:
|
||||||
|
Defines our wxMonitorData cookie object that is stored to maintain state
|
||||||
|
information for this MonitorApplet.
|
||||||
|
****************************************************************************/
|
||||||
|
class MonitorData : public wxObject {
|
||||||
|
public:
|
||||||
|
MonitorEntry m_Monitor;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Name used to track the monitor data cookie
|
||||||
|
#define MONITOR_COOKIE_NAME "MonitorData"
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
REMARKS:
|
||||||
|
Defines our wxMonitor applet class
|
||||||
|
****************************************************************************/
|
||||||
|
class MonitorApplet : public wxApplet {
|
||||||
|
private:
|
||||||
|
DECLARE_DYNAMIC_CLASS(MonitorApplet);
|
||||||
|
DECLARE_EVENT_TABLE();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
ComboBox *m_Mfr;
|
||||||
|
ComboBox *m_Model;
|
||||||
|
MonitorData *m_Data;
|
||||||
|
static MonitorEntry m_Monitors[];
|
||||||
|
|
||||||
|
// Flush the current state to a cookie
|
||||||
|
void SaveCurrentState();
|
||||||
|
|
||||||
|
public:
|
||||||
|
// Constructor (called during dynamic creation)
|
||||||
|
MonitorApplet();
|
||||||
|
|
||||||
|
// Psuedo virtual constructor
|
||||||
|
virtual bool Create(
|
||||||
|
wxHtmlAppletWindow *parent,
|
||||||
|
const wxSize& size,
|
||||||
|
long style);
|
||||||
|
|
||||||
|
// Virtual destructor
|
||||||
|
virtual ~MonitorApplet();
|
||||||
|
|
||||||
|
// Handle HTML navigation to a new URL
|
||||||
|
virtual void OnLinkClicked(const wxHtmlLinkInfo& link);
|
||||||
|
|
||||||
|
// Handle HTML navigation forward command in applet
|
||||||
|
virtual void OnHistoryForward();
|
||||||
|
|
||||||
|
// Handle HTML navigation back command in applet
|
||||||
|
virtual void OnHistoryBack();
|
||||||
|
|
||||||
|
// Handle messages from the wxAppletManager and other applets
|
||||||
|
virtual void OnMessage(wxEvent& msg);
|
||||||
|
|
||||||
|
// Update the model and menufacturer lists
|
||||||
|
void ReadMfrList();
|
||||||
|
void ReadModelList(bool selectCurrent);
|
||||||
|
|
||||||
|
// Event handlers
|
||||||
|
void OnChange(wxCommandEvent &event);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // __WX_MONITORAPPLET_H
|
||||||
|
|
3572
contrib/samples/applet/monitors.c
Normal file
3572
contrib/samples/applet/monitors.c
Normal file
File diff suppressed because it is too large
Load Diff
23
contrib/samples/gizmos/editlbox/Makefile.in
Normal file
23
contrib/samples/gizmos/editlbox/Makefile.in
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
#
|
||||||
|
# File: Makefile.in
|
||||||
|
# Author: Julian Smart
|
||||||
|
# Created: 2000
|
||||||
|
# Updated:
|
||||||
|
# Copyright: (c) 2000 Julian Smart
|
||||||
|
#
|
||||||
|
# "%W% %G%"
|
||||||
|
#
|
||||||
|
# Makefile for the editlbox example (UNIX).
|
||||||
|
|
||||||
|
top_srcdir = @top_srcdir@/..
|
||||||
|
top_builddir = ../../../..
|
||||||
|
program_dir = contrib/samples/gizmos/editlbox
|
||||||
|
|
||||||
|
PROGRAM=test
|
||||||
|
OBJECTS=test.o
|
||||||
|
|
||||||
|
APPEXTRALIBS=$(top_builddir)/lib/libgizmos.@WX_TARGET_LIBRARY_TYPE@
|
||||||
|
APPEXTRADEFS=-I$(top_srcdir)/contrib/include
|
||||||
|
|
||||||
|
include $(top_builddir)/src/makeprog.env
|
||||||
|
|
19
contrib/samples/gizmos/editlbox/makefile.vc
Normal file
19
contrib/samples/gizmos/editlbox/makefile.vc
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
# Makefile : Builds sample (VC++, WIN32)
|
||||||
|
# Use FINAL=1 argument to nmake to build final version with no debug info.
|
||||||
|
# Created 2000-07-28
|
||||||
|
|
||||||
|
# Set WXDIR for your system
|
||||||
|
WXDIR = $(WXWIN)
|
||||||
|
FINAL=0
|
||||||
|
PROGRAM=test
|
||||||
|
OBJECTS = $(PROGRAM).obj
|
||||||
|
|
||||||
|
!if "$(FINAL)" == "0"
|
||||||
|
EXTRALIBS=$(WXDIR)\lib\gizmosd.lib
|
||||||
|
!else
|
||||||
|
EXTRALIBS=$(WXDIR)\lib\gizmos.lib
|
||||||
|
!endif
|
||||||
|
|
||||||
|
!include $(WXDIR)\src\makeprog.vc
|
||||||
|
|
||||||
|
|
65
contrib/samples/gizmos/editlbox/test.cpp
Normal file
65
contrib/samples/gizmos/editlbox/test.cpp
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
// For compilers that support precompilation, includes "wx/wx.h".
|
||||||
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
|
#ifdef __BORLANDC__
|
||||||
|
#pragma hdrstop
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// for all others, include the necessary headers (this file is usually all you
|
||||||
|
// need because it includes almost all "standard" wxWindows headers)
|
||||||
|
#ifndef WX_PRECOMP
|
||||||
|
#include "wx/wx.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "wx/gizmos/editlbox.h"
|
||||||
|
#include "wx/sizer.h"
|
||||||
|
|
||||||
|
class MyApp : public wxApp
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual bool OnInit();
|
||||||
|
};
|
||||||
|
|
||||||
|
IMPLEMENT_APP(MyApp)
|
||||||
|
|
||||||
|
|
||||||
|
bool MyApp::OnInit()
|
||||||
|
{
|
||||||
|
wxDialog dlg(NULL, -1, _("Test dialog"), wxDefaultPosition, wxDefaultSize,
|
||||||
|
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER);
|
||||||
|
|
||||||
|
wxSizer *sizer = new wxBoxSizer(wxVERTICAL);
|
||||||
|
sizer->Add(new wxEditableListBox(&dlg, -1, _("Match these wildcards:"),
|
||||||
|
wxDefaultPosition,wxSize(300,200)),
|
||||||
|
1, wxEXPAND|wxALL, 10);
|
||||||
|
|
||||||
|
sizer->Add(5,5);
|
||||||
|
|
||||||
|
wxEditableListBox *lb = new wxEditableListBox(&dlg, -1, _("Except:"),
|
||||||
|
wxDefaultPosition,wxSize(300,200));
|
||||||
|
wxArrayString ar;
|
||||||
|
ar.Add(_T("*.cpp"));
|
||||||
|
ar.Add(_T("*.h"));
|
||||||
|
ar.Add(_T("*.c"));
|
||||||
|
lb->SetStrings(ar);
|
||||||
|
|
||||||
|
sizer->Add(lb, 1, wxEXPAND|wxALL, 10);
|
||||||
|
|
||||||
|
sizer->Add(5,5);
|
||||||
|
|
||||||
|
sizer->Add(new wxButton(&dlg, wxID_OK, _("OK")), 0, wxALIGN_RIGHT | wxALL, 10);
|
||||||
|
dlg.SetAutoLayout(TRUE);
|
||||||
|
dlg.SetSizer(sizer);
|
||||||
|
sizer->Fit(&dlg);
|
||||||
|
dlg.Centre();
|
||||||
|
|
||||||
|
dlg.ShowModal();
|
||||||
|
|
||||||
|
wxString res = _("'Except' contains these strings:\n\n");
|
||||||
|
lb->GetStrings(ar);
|
||||||
|
for (size_t i = 0; i < ar.GetCount(); i++)
|
||||||
|
res << ar[i] << _T("\n");
|
||||||
|
wxMessageBox(res);
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
3
contrib/samples/gizmos/editlbox/test.rc
Normal file
3
contrib/samples/gizmos/editlbox/test.rc
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
#include "wx/msw/wx.rc"
|
||||||
|
|
||||||
|
|
@@ -56,7 +56,7 @@ BSC32=bscmake.exe
|
|||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
LINK32=link.exe
|
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 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 wx.lib xpm.lib png.lib zlib.lib jpeg.lib tiff.lib gizmos.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/tree.exe" /libpath:"d:\wx2\wxWindows\lib"
|
# ADD LINK32 wx.lib png.lib zlib.lib jpeg.lib tiff.lib gizmos.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/tree.exe" /libpath:"d:\wx2\wxWindows\lib"
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "TreeVC - Win32 Debug"
|
!ELSEIF "$(CFG)" == "TreeVC - Win32 Debug"
|
||||||
|
|
||||||
@@ -82,7 +82,7 @@ BSC32=bscmake.exe
|
|||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
LINK32=link.exe
|
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 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 wxd.lib xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib gizmosd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/tree.exe" /pdbtype:sept /libpath:"d:\wx2\wxWindows\lib"
|
# ADD LINK32 wxd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib gizmosd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/tree.exe" /pdbtype:sept /libpath:"d:\wx2\wxWindows\lib"
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "TreeVC - Win32 Debug DLL"
|
!ELSEIF "$(CFG)" == "TreeVC - Win32 Debug DLL"
|
||||||
|
|
||||||
|
@@ -56,7 +56,7 @@ BSC32=bscmake.exe
|
|||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
LINK32=link.exe
|
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 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 xpm.lib png.lib zlib.lib jpeg.lib tiff.lib mmedia.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib,libci.lib,msvcrtd.lib" /out:"Release/mmboard.exe" /libpath:"../../../lib" /libpath:"../../../contrib/lib"
|
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib png.lib zlib.lib jpeg.lib tiff.lib mmedia.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib,libci.lib,msvcrtd.lib" /out:"Release/mmboard.exe" /libpath:"../../../lib" /libpath:"../../../contrib/lib"
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "MMboardVC - Win32 Debug"
|
!ELSEIF "$(CFG)" == "MMboardVC - Win32 Debug"
|
||||||
|
|
||||||
@@ -82,7 +82,7 @@ BSC32=bscmake.exe
|
|||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
LINK32=link.exe
|
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 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 xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib mmediad.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib,libcid.lib,msvcrt.lib" /out:"Debug/mmboard.exe" /pdbtype:sept /libpath:"../../../lib" /libpath:"../../../contrib/lib"
|
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib mmediad.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib,libcid.lib,msvcrt.lib" /out:"Debug/mmboard.exe" /pdbtype:sept /libpath:"../../../lib" /libpath:"../../../contrib/lib"
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "MMboardVC - Win32 Debug DLL"
|
!ELSEIF "$(CFG)" == "MMboardVC - Win32 Debug DLL"
|
||||||
|
|
||||||
|
@@ -56,7 +56,7 @@ BSC32=bscmake.exe
|
|||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
LINK32=link.exe
|
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 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 xpm.lib png.lib zlib.lib jpeg.lib tiff.lib ogl.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib,libci.lib,msvcrtd.lib" /out:"Release/ogledit.exe" /libpath:"../../../../lib" /libpath:"../../../../contrib/lib"
|
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib png.lib zlib.lib jpeg.lib tiff.lib ogl.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib,libci.lib,msvcrtd.lib" /out:"Release/ogledit.exe" /libpath:"../../../../lib" /libpath:"../../../../contrib/lib"
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "OGLEditVC - Win32 Debug"
|
!ELSEIF "$(CFG)" == "OGLEditVC - Win32 Debug"
|
||||||
|
|
||||||
@@ -82,7 +82,7 @@ BSC32=bscmake.exe
|
|||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
LINK32=link.exe
|
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 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 xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib ogld.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib,libcid.lib,msvcrt.lib" /out:"Debug/ogledit.exe" /pdbtype:sept /libpath:"../../../../lib" /libpath:"../../../../contrib/lib"
|
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib ogld.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib,libcid.lib,msvcrt.lib" /out:"Debug/ogledit.exe" /pdbtype:sept /libpath:"../../../../lib" /libpath:"../../../../contrib/lib"
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "OGLEditVC - Win32 Debug DLL"
|
!ELSEIF "$(CFG)" == "OGLEditVC - Win32 Debug DLL"
|
||||||
|
|
||||||
|
@@ -10,8 +10,7 @@
|
|||||||
WXDIR = $(WXWIN)
|
WXDIR = $(WXWIN)
|
||||||
|
|
||||||
TARGET=ogledit
|
TARGET=ogledit
|
||||||
EXTRALIBS=$(WXDIR)\contrib\lib\ogl.lib
|
EXTRALIBS=$(WXDIR)\lib\ogl.lib
|
||||||
# EXTRACPPFLAGS=-I$(WXDIR)\utils\ogl\src
|
|
||||||
OBJECTS = $(TARGET).obj doc.obj view.obj palette.obj
|
OBJECTS = $(TARGET).obj doc.obj view.obj palette.obj
|
||||||
|
|
||||||
!include $(WXDIR)\src\makeprog.b32
|
!include $(WXDIR)\src\makeprog.b32
|
||||||
|
@@ -13,8 +13,7 @@
|
|||||||
WXDIR = $(WXWIN)
|
WXDIR = $(WXWIN)
|
||||||
|
|
||||||
TARGET=ogledit
|
TARGET=ogledit
|
||||||
EXTRALIBS=$(WXDIR)\contrib\lib\ogl.lib
|
EXTRALIBS=$(WXDIR)\lib\ogl.lib
|
||||||
# EXTRACPPFLAGS=-I$(WXDIR)\utils\ogl\src
|
|
||||||
OBJECTS = $(TARGET).obj doc.obj view.obj palette.obj
|
OBJECTS = $(TARGET).obj doc.obj view.obj palette.obj
|
||||||
|
|
||||||
!include $(WXDIR)\src\makeprog.b32
|
!include $(WXDIR)\src\makeprog.b32
|
||||||
|
@@ -16,8 +16,8 @@ WXDIR = $(WXWIN)
|
|||||||
!include $(WXDIR)\src\makemsc.env
|
!include $(WXDIR)\src\makemsc.env
|
||||||
|
|
||||||
THISDIR = $(WXDIR)\contrib\samples\ogl\ogledit
|
THISDIR = $(WXDIR)\contrib\samples\ogl\ogledit
|
||||||
WXLIB = $(WXDIR)\contrib\lib\wx.lib
|
WXLIB = $(WXDIR)\lib\wx.lib
|
||||||
OGLLIB = $(WXDIR)\contrib\lib\ogl.lib
|
OGLLIB = $(WXDIR)\lib\ogl.lib
|
||||||
|
|
||||||
LIBS=$(WXLIB) $(OGLLIB) oldnames libw llibcew commdlg shell ddeml
|
LIBS=$(WXLIB) $(OGLLIB) oldnames libw llibcew commdlg shell ddeml
|
||||||
|
|
||||||
|
@@ -18,9 +18,9 @@ PROGRAM=ogledit
|
|||||||
FINAL=0
|
FINAL=0
|
||||||
|
|
||||||
!if "$(FINAL)" == "0"
|
!if "$(FINAL)" == "0"
|
||||||
EXTRALIBS=$(WXDIR)\contrib\lib\ogld.lib
|
EXTRALIBS=$(WXDIR)\lib\ogld.lib
|
||||||
!else
|
!else
|
||||||
EXTRALIBS=$(WXDIR)\contrib\lib\ogl.lib
|
EXTRALIBS=$(WXDIR)\lib\ogl.lib
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
OBJECTS = $(PROGRAM).obj doc.obj view.obj palette.obj
|
OBJECTS = $(PROGRAM).obj doc.obj view.obj palette.obj
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
WXDIR = $(%WXWIN)
|
WXDIR = $(%WXWIN)
|
||||||
|
|
||||||
PROGRAM = ogledit
|
PROGRAM = ogledit
|
||||||
EXTRALIBS = $(WXDIR)\contrib\lib\ogl.lib
|
EXTRALIBS = $(WXDIR)\lib\ogl.lib
|
||||||
OBJECTS = $(PROGRAM).obj doc.obj view.obj palette.obj
|
OBJECTS = $(PROGRAM).obj doc.obj view.obj palette.obj
|
||||||
|
|
||||||
!include $(WXDIR)\src\makeprog.wat
|
!include $(WXDIR)\src\makeprog.wat
|
||||||
|
@@ -56,7 +56,7 @@ BSC32=bscmake.exe
|
|||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
LINK32=link.exe
|
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 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 xpm.lib png.lib zlib.lib jpeg.lib tiff.lib ogl.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/studio.exe" /libpath:"../../../../lib" /libpath:"../../../../contrib/lib"
|
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib png.lib zlib.lib jpeg.lib tiff.lib ogl.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/studio.exe" /libpath:"../../../../lib" /libpath:"../../../../contrib/lib"
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "StudioVC - Win32 Debug"
|
!ELSEIF "$(CFG)" == "StudioVC - Win32 Debug"
|
||||||
|
|
||||||
@@ -82,7 +82,7 @@ BSC32=bscmake.exe
|
|||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
LINK32=link.exe
|
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 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 xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib ogld.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/studio.exe" /pdbtype:sept /libpath:"../../../../lib" /libpath:"../../../../contrib/lib"
|
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib ogld.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/studio.exe" /pdbtype:sept /libpath:"../../../../lib" /libpath:"../../../../contrib/lib"
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "StudioVC - Win32 Debug DLL"
|
!ELSEIF "$(CFG)" == "StudioVC - Win32 Debug DLL"
|
||||||
|
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
WXDIR = $(WXWIN)
|
WXDIR = $(WXWIN)
|
||||||
|
|
||||||
TARGET=studio
|
TARGET=studio
|
||||||
EXTRALIBS=$(WXDIR)\contrib\lib\ogl.lib
|
EXTRALIBS=$(WXDIR)\lib\ogl.lib
|
||||||
OBJECTS = $(TARGET).obj doc.obj shapes.obj symbols.obj view.obj cspalette.obj\
|
OBJECTS = $(TARGET).obj doc.obj shapes.obj symbols.obj view.obj cspalette.obj\
|
||||||
mainfrm.obj project.obj dialogs.obj csprint.obj
|
mainfrm.obj project.obj dialogs.obj csprint.obj
|
||||||
|
|
||||||
|
@@ -13,7 +13,7 @@
|
|||||||
WXDIR = $(WXWIN)
|
WXDIR = $(WXWIN)
|
||||||
|
|
||||||
TARGET=studio
|
TARGET=studio
|
||||||
EXTRALIBS=$(WXDIR)\contrib\lib\ogl.lib
|
EXTRALIBS=$(WXDIR)\lib\ogl.lib
|
||||||
OBJECTS = $(TARGET).obj doc.obj shapes.obj symbols.obj view.obj cspalette.obj\
|
OBJECTS = $(TARGET).obj doc.obj shapes.obj symbols.obj view.obj cspalette.obj\
|
||||||
mainfrm.obj project.obj dialogs.obj csprint.obj
|
mainfrm.obj project.obj dialogs.obj csprint.obj
|
||||||
|
|
||||||
|
@@ -18,9 +18,9 @@ PROGRAM=studio
|
|||||||
FINAL=0
|
FINAL=0
|
||||||
|
|
||||||
!if "$(FINAL)" == "0"
|
!if "$(FINAL)" == "0"
|
||||||
EXTRALIBS=$(WXDIR)\contrib\lib\ogld.lib
|
EXTRALIBS=$(WXDIR)\lib\ogld.lib
|
||||||
!else
|
!else
|
||||||
EXTRALIBS=$(WXDIR)\contrib\lib\ogl.lib
|
EXTRALIBS=$(WXDIR)\lib\ogl.lib
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
OBJECTS = $(PROGRAM).obj doc.obj shapes.obj symbols.obj view.obj cspalette.obj\
|
OBJECTS = $(PROGRAM).obj doc.obj shapes.obj symbols.obj view.obj cspalette.obj\
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
WXDIR = $(%WXWIN)
|
WXDIR = $(%WXWIN)
|
||||||
|
|
||||||
PROGRAM = studio
|
PROGRAM = studio
|
||||||
EXTRALIBS = $(WXDIR)\contrib\lib\ogl.lib
|
EXTRALIBS = $(WXDIR)\lib\ogl.lib
|
||||||
OBJECTS = $(PROGRAM).obj doc.obj shapes.obj symbols.obj view.obj cspalette.obj &
|
OBJECTS = $(PROGRAM).obj doc.obj shapes.obj symbols.obj view.obj cspalette.obj &
|
||||||
mainfrm.obj project.obj dialogs.obj csprint.obj
|
mainfrm.obj project.obj dialogs.obj csprint.obj
|
||||||
|
|
||||||
|
@@ -56,7 +56,7 @@ BSC32=bscmake.exe
|
|||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
LINK32=link.exe
|
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 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 xpm.lib png.lib zlib.lib jpeg.lib tiff.lib stc.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib,libci.lib,msvcrtd.lib" /out:"Release/stctest.exe" /libpath:"../../../lib" /libpath:"../../../contrib/lib"
|
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib png.lib zlib.lib jpeg.lib tiff.lib stc.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib,libci.lib,msvcrtd.lib" /out:"Release/stctest.exe" /libpath:"../../../lib" /libpath:"../../../contrib/lib"
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "StcTestVC - Win32 Debug"
|
!ELSEIF "$(CFG)" == "StcTestVC - Win32 Debug"
|
||||||
|
|
||||||
@@ -82,7 +82,7 @@ BSC32=bscmake.exe
|
|||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
LINK32=link.exe
|
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 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 xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib stcd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib,libcid.lib,msvcrt.lib" /out:"Debug/stctest.exe" /pdbtype:sept /libpath:"../../../lib" /libpath:"../../../contrib/lib"
|
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib stcd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib,libcid.lib,msvcrt.lib" /out:"Debug/stctest.exe" /pdbtype:sept /libpath:"../../../lib" /libpath:"../../../contrib/lib"
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "StcTestVC - Win32 Debug DLL"
|
!ELSEIF "$(CFG)" == "StcTestVC - Win32 Debug DLL"
|
||||||
|
|
||||||
|
@@ -56,7 +56,7 @@ BSC32=bscmake.exe
|
|||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
LINK32=link.exe
|
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 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 xpm.lib png.lib zlib.lib jpeg.lib tiff.lib wxxml.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/xmldemo.exe" /libpath:"../../../lib" /libpath:"../../../contrib/lib"
|
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib png.lib zlib.lib jpeg.lib tiff.lib wxxml.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/xmldemo.exe" /libpath:"../../../lib" /libpath:"../../../contrib/lib"
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "XmlDemoVC - Win32 Debug"
|
!ELSEIF "$(CFG)" == "XmlDemoVC - Win32 Debug"
|
||||||
|
|
||||||
@@ -82,7 +82,7 @@ BSC32=bscmake.exe
|
|||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
LINK32=link.exe
|
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 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 xpmd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib wxxmld.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/xmldemo.exe" /pdbtype:sept /libpath:"../../../lib" /libpath:"../../../contrib/lib"
|
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib wxxmld.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/xmldemo.exe" /pdbtype:sept /libpath:"../../../lib" /libpath:"../../../contrib/lib"
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "XmlDemoVC - Win32 Debug DLL"
|
!ELSEIF "$(CFG)" == "XmlDemoVC - Win32 Debug DLL"
|
||||||
|
|
||||||
|
@@ -11,7 +11,7 @@ WXDIR = $(WXWIN)
|
|||||||
|
|
||||||
TARGET=xmldemo
|
TARGET=xmldemo
|
||||||
|
|
||||||
EXTRALIBS=$(WXDIR)\contrib\lib\wxxml.lib
|
EXTRALIBS=$(WXDIR)\lib\wxxml.lib
|
||||||
OBJECTS = $(TARGET).obj
|
OBJECTS = $(TARGET).obj
|
||||||
|
|
||||||
!include $(WXDIR)\src\makeprog.b32
|
!include $(WXDIR)\src\makeprog.b32
|
||||||
|
@@ -7,7 +7,7 @@ WXDIR = $(WXWIN)
|
|||||||
PROGRAM = xmldemo
|
PROGRAM = xmldemo
|
||||||
|
|
||||||
OBJECTS = $(PROGRAM).obj
|
OBJECTS = $(PROGRAM).obj
|
||||||
EXTRALIBS = $(WXDIR)\contrib\lib\wxxml$(LIBEXT).lib
|
EXTRALIBS = $(WXDIR)\lib\wxxml$(LIBEXT).lib
|
||||||
EXTRAINC = -I$(WXDIR)\contrib\include
|
EXTRAINC = -I$(WXDIR)\contrib\include
|
||||||
|
|
||||||
!include $(WXDIR)\src\makeprog.vc
|
!include $(WXDIR)\src\makeprog.vc
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
# $Id$
|
# $Id$
|
||||||
|
|
||||||
CONTRIB_SUBDIRS=ogl mmedia stc xml
|
CONTRIB_SUBDIRS=ogl mmedia stc xml applet
|
||||||
|
|
||||||
all:
|
all:
|
||||||
@for d in $(CONTRIB_SUBDIRS); do (cd $$d && $(MAKE)); done
|
@for d in $(CONTRIB_SUBDIRS); do (cd $$d && $(MAKE)); done
|
||||||
|
23
contrib/src/applet/Makefile.in
Normal file
23
contrib/src/applet/Makefile.in
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
# $Id$
|
||||||
|
|
||||||
|
top_srcdir = @top_srcdir@/..
|
||||||
|
top_builddir = ../../..
|
||||||
|
libsrc_dir = contrib/src/applet
|
||||||
|
|
||||||
|
TARGET_LIBNAME=libapplet
|
||||||
|
|
||||||
|
LIBVERSION_CURRENT=1
|
||||||
|
LIBVERSION_REVISION=0
|
||||||
|
LIBVERSION_AGE=0
|
||||||
|
|
||||||
|
HEADER_PATH=$(top_srcdir)/contrib/include/wx
|
||||||
|
HEADER_SUBDIR=applet
|
||||||
|
|
||||||
|
HEADERS=applet.h appletwindow.h
|
||||||
|
|
||||||
|
OBJECTS=applet.o appletwindow.o
|
||||||
|
|
||||||
|
APPEXTRADEFS=-I$(top_srcdir)/contrib/include
|
||||||
|
|
||||||
|
include $(top_builddir)/src/makelib.env
|
||||||
|
|
86
contrib/src/applet/applet.cpp
Normal file
86
contrib/src/applet/applet.cpp
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
*
|
||||||
|
* wxWindows HTML Applet Package
|
||||||
|
*
|
||||||
|
* Copyright (C) 1991-2001 SciTech Software, Inc.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* ======================================================================
|
||||||
|
* |REMOVAL OR MODIFICATION OF THIS HEADER IS STRICTLY PROHIBITED BY LAW|
|
||||||
|
* | |
|
||||||
|
* |This copyrighted computer code is a proprietary trade secret of |
|
||||||
|
* |SciTech Software, Inc., located at 505 Wall Street, Chico, CA 95928 |
|
||||||
|
* |USA (www.scitechsoft.com). ANY UNAUTHORIZED POSSESSION, USE, |
|
||||||
|
* |VIEWING, COPYING, MODIFICATION OR DISSEMINATION OF THIS CODE IS |
|
||||||
|
* |STRICTLY PROHIBITED BY LAW. Unless you have current, express |
|
||||||
|
* |written authorization from SciTech to possess or use this code, you |
|
||||||
|
* |may be subject to civil and/or criminal penalties. |
|
||||||
|
* | |
|
||||||
|
* |If you received this code in error or you would like to report |
|
||||||
|
* |improper use, please immediately contact SciTech Software, Inc. at |
|
||||||
|
* |530-894-8400. |
|
||||||
|
* | |
|
||||||
|
* |REMOVAL OR MODIFICATION OF THIS HEADER IS STRICTLY PROHIBITED BY LAW|
|
||||||
|
* ======================================================================
|
||||||
|
*
|
||||||
|
* Language: ANSI C++
|
||||||
|
* Environment: Any
|
||||||
|
*
|
||||||
|
* Description: Main wxApplet class implementation
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
// For compilers that support precompilation
|
||||||
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
|
// Include private headers
|
||||||
|
#include "wx/applet/applet.h"
|
||||||
|
|
||||||
|
/*------------------------- Implementation --------------------------------*/
|
||||||
|
|
||||||
|
// Empty event handler. We include this event handler simply so that
|
||||||
|
// sub-classes of wxApplet can reference wxApplet in the event tables
|
||||||
|
// that they create as necessary.
|
||||||
|
BEGIN_EVENT_TABLE(wxApplet, wxPanel)
|
||||||
|
EVT_ERASE_BACKGROUND(wxApplet::OnEraseBackground)
|
||||||
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
|
// Implement the abstract class functions
|
||||||
|
IMPLEMENT_ABSTRACT_CLASS(wxApplet, wxPanel);
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
REMARKS:
|
||||||
|
Psuedo virtual constructor for the wxApplet class.
|
||||||
|
****************************************************************************/
|
||||||
|
bool wxApplet::Create(
|
||||||
|
wxHtmlAppletWindow *parent,
|
||||||
|
const wxSize& size,
|
||||||
|
long style)
|
||||||
|
{
|
||||||
|
bool ret = wxPanel::Create(parent, -1, wxDefaultPosition, size, style);
|
||||||
|
if (ret) {
|
||||||
|
m_Parent = parent;
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
REMARKS:
|
||||||
|
Destructor for the wxApplet class.
|
||||||
|
****************************************************************************/
|
||||||
|
wxApplet::~wxApplet()
|
||||||
|
{
|
||||||
|
m_Parent->RemoveApplet(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
REMARKS:
|
||||||
|
Special handler for background erase messages. We do nothing in here which
|
||||||
|
causes the background to not be erased which is exactly what we want. All
|
||||||
|
the wxApplet classes display over an HTML window, so we want the HTML
|
||||||
|
background to show through.
|
||||||
|
****************************************************************************/
|
||||||
|
void wxApplet::OnEraseBackground(wxEraseEvent&)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
371
contrib/src/applet/appletwindow.cpp
Normal file
371
contrib/src/applet/appletwindow.cpp
Normal file
@@ -0,0 +1,371 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
*
|
||||||
|
* wxWindows HTML Applet Package
|
||||||
|
*
|
||||||
|
* Copyright (C) 1991-2001 SciTech Software, Inc.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* ======================================================================
|
||||||
|
* |REMOVAL OR MODIFICATION OF THIS HEADER IS STRICTLY PROHIBITED BY LAW|
|
||||||
|
* | |
|
||||||
|
* |This copyrighted computer code is a proprietary trade secret of |
|
||||||
|
* |SciTech Software, Inc., located at 505 Wall Street, Chico, CA 95928 |
|
||||||
|
* |USA (www.scitechsoft.com). ANY UNAUTHORIZED POSSESSION, USE, |
|
||||||
|
* |VIEWING, COPYING, MODIFICATION OR DISSEMINATION OF THIS CODE IS |
|
||||||
|
* |STRICTLY PROHIBITED BY LAW. Unless you have current, express |
|
||||||
|
* |written authorization from SciTech to possess or use this code, you |
|
||||||
|
* |may be subject to civil and/or criminal penalties. |
|
||||||
|
* | |
|
||||||
|
* |If you received this code in error or you would like to report |
|
||||||
|
* |improper use, please immediately contact SciTech Software, Inc. at |
|
||||||
|
* |530-894-8400. |
|
||||||
|
* | |
|
||||||
|
* |REMOVAL OR MODIFICATION OF THIS HEADER IS STRICTLY PROHIBITED BY LAW|
|
||||||
|
* ======================================================================
|
||||||
|
*
|
||||||
|
* Language: ANSI C++
|
||||||
|
* Environment: Any
|
||||||
|
*
|
||||||
|
* Description: Main wxHtmlAppletWindow class implementation
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
// For compilers that support precompilation
|
||||||
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
|
// Include private headers
|
||||||
|
#include "wx/applet/applet.h"
|
||||||
|
|
||||||
|
/*------------------------- Implementation --------------------------------*/
|
||||||
|
|
||||||
|
// Empty event handler. We include this event handler simply so that
|
||||||
|
// sub-classes of wxApplet can reference wxApplet in the event tables
|
||||||
|
// that they create as necessary.
|
||||||
|
BEGIN_EVENT_TABLE(wxHtmlAppletWindow, wxHtmlWindow)
|
||||||
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
|
// Implement the class functions for wxHtmlAppletWindow
|
||||||
|
IMPLEMENT_CLASS(wxHtmlAppletWindow, wxHtmlWindow);
|
||||||
|
|
||||||
|
// Define the wxAppletList implementation
|
||||||
|
#include "wx/listimpl.cpp"
|
||||||
|
WX_DEFINE_LIST(wxAppletList);
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
REMARKS:
|
||||||
|
Constructor for the applet window class.
|
||||||
|
****************************************************************************/
|
||||||
|
wxHtmlAppletWindow::wxHtmlAppletWindow(
|
||||||
|
wxWindow *parent,
|
||||||
|
wxWindowID id,
|
||||||
|
const wxPoint& pos,
|
||||||
|
const wxSize& size,
|
||||||
|
long style,
|
||||||
|
const wxString& name)
|
||||||
|
: wxHtmlWindow(parent,id,pos,size,style,name)
|
||||||
|
{
|
||||||
|
// Ensure all cookie data is destroyed when window is killed
|
||||||
|
m_Cookies.DeleteContents(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
REMARKS:
|
||||||
|
Destructor for the applet window class.
|
||||||
|
****************************************************************************/
|
||||||
|
wxHtmlAppletWindow::~wxHtmlAppletWindow()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
PARAMETERS:
|
||||||
|
className - Name of the applet class to create an object for
|
||||||
|
size - Initial size of the applet to be created
|
||||||
|
|
||||||
|
RETURNS:
|
||||||
|
Pointer to the wxApplet created, or NULL if unable to create the applet.
|
||||||
|
|
||||||
|
REMARKS:
|
||||||
|
This function is used to create new wxApplet objects dynamically based on the
|
||||||
|
class name as a string. This allows instances of wxApplet classes to be
|
||||||
|
created dynamically based on string values embedded in the custom tags of an
|
||||||
|
HTML page.
|
||||||
|
****************************************************************************/
|
||||||
|
wxApplet *wxHtmlAppletWindow::CreateApplet(
|
||||||
|
const wxString& className,
|
||||||
|
const wxSize& size)
|
||||||
|
{
|
||||||
|
// We presently only allow one applet per page of the same class!
|
||||||
|
if (m_AppletList.Find(className))
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
// Dynamically create the class instance at runtime
|
||||||
|
wxClassInfo *info = wxClassInfo::FindClass(className.c_str());
|
||||||
|
if (!info)
|
||||||
|
return NULL;
|
||||||
|
wxObject *obj = info->CreateObject();
|
||||||
|
if (!obj)
|
||||||
|
return NULL;
|
||||||
|
wxApplet *applet = wxDynamicCast(obj,wxApplet);
|
||||||
|
if (!applet)
|
||||||
|
return NULL;
|
||||||
|
if (!applet->Create(this,size)) {
|
||||||
|
delete applet;
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
m_AppletList.Append(className,applet);
|
||||||
|
return applet;
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
PARAMETERS:
|
||||||
|
appletName - Name of the applet class to find
|
||||||
|
|
||||||
|
RETURNS:
|
||||||
|
Pointer to the wxApplet found, or NULL if not found.
|
||||||
|
|
||||||
|
REMARKS:
|
||||||
|
Find an instance of an applet based on it's name
|
||||||
|
****************************************************************************/
|
||||||
|
wxApplet *wxHtmlAppletWindow::FindApplet(
|
||||||
|
const wxString& appletName)
|
||||||
|
{
|
||||||
|
wxAppletList::Node *node = m_AppletList.Find(appletName);
|
||||||
|
if (!node)
|
||||||
|
return NULL;
|
||||||
|
return node->GetData();
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
PARAMETERS:
|
||||||
|
applet - Pointer to the applet object to remove from the list
|
||||||
|
|
||||||
|
RETURNS:
|
||||||
|
True if the applet was found and removed, false if not. The applet itself
|
||||||
|
is *not* destroyed!
|
||||||
|
|
||||||
|
REMARKS:
|
||||||
|
Remove an applet from the manager. Called during applet destruction
|
||||||
|
****************************************************************************/
|
||||||
|
bool wxHtmlAppletWindow::RemoveApplet(
|
||||||
|
const wxApplet *applet)
|
||||||
|
{
|
||||||
|
for (wxAppletList::Node *node = m_AppletList.GetFirst(); node; node = node->GetNext()) {
|
||||||
|
if (node->GetData() == applet) {
|
||||||
|
m_AppletList.DeleteNode(node);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
PARAMETERS:
|
||||||
|
URL - New URL for the page to load
|
||||||
|
|
||||||
|
RETURNS:
|
||||||
|
True if page loaded successfully, false if not
|
||||||
|
|
||||||
|
REMARKS:
|
||||||
|
Remove an applet from the manager. Called during applet destruction
|
||||||
|
****************************************************************************/
|
||||||
|
bool wxHtmlAppletWindow::LoadPage(
|
||||||
|
const wxString& hRef)
|
||||||
|
{
|
||||||
|
for (wxAppletList::Node *node = m_AppletList.GetFirst(); node; node = node->GetNext())
|
||||||
|
(node->GetData())->OnLinkClicked(hRef);
|
||||||
|
return wxHtmlWindow::LoadPage(hRef);
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
PARAMETERS:
|
||||||
|
URL - String URL that we are navigating to
|
||||||
|
|
||||||
|
REMARKS:
|
||||||
|
Called when the user navigates to a new URL from the current page. We simply
|
||||||
|
call the LoadPage function above to load the new page and display it.
|
||||||
|
****************************************************************************/
|
||||||
|
void wxHtmlAppletWindow::OnLinkClicked(
|
||||||
|
const wxHtmlLinkInfo& link)
|
||||||
|
{
|
||||||
|
for (wxAppletList::Node *node = m_AppletList.GetFirst(); node; node = node->GetNext())
|
||||||
|
(node->GetData())->OnLinkClicked(link);
|
||||||
|
wxHtmlWindow::LoadPage(link.GetHref());
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
REMARKS:
|
||||||
|
Called when the user navigates forward within the HTML history stack.
|
||||||
|
We call all the applets in turn allowing them to handle the navigation
|
||||||
|
command prior to being destructed when the current page is destroyed.
|
||||||
|
****************************************************************************/
|
||||||
|
bool wxHtmlAppletWindow::HistoryForward()
|
||||||
|
{
|
||||||
|
if (!HistoryCanForward())
|
||||||
|
return false;
|
||||||
|
for (wxAppletList::Node *node = m_AppletList.GetFirst(); node; node = node->GetNext())
|
||||||
|
(node->GetData())->OnHistoryForward();
|
||||||
|
return wxHtmlWindow::HistoryForward();
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
REMARKS:
|
||||||
|
Called when the user navigates backwards within the HTML history stack.
|
||||||
|
We call all the applets in turn allowing them to handle the navigation
|
||||||
|
command prior to being destructed when the current page is destroyed.
|
||||||
|
****************************************************************************/
|
||||||
|
bool wxHtmlAppletWindow::HistoryBack()
|
||||||
|
{
|
||||||
|
if (!HistoryCanBack())
|
||||||
|
return false;
|
||||||
|
for (wxAppletList::Node *node = m_AppletList.GetFirst(); node; node = node->GetNext())
|
||||||
|
(node->GetData())->OnHistoryBack();
|
||||||
|
return wxHtmlWindow::HistoryBack();
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
PARAMETERS:
|
||||||
|
msg - wxEvent message to be sent to all wxApplets
|
||||||
|
|
||||||
|
REMARKS:
|
||||||
|
This function is called by the wxApplet's when they need to send a message
|
||||||
|
to all other applets on the current page. This is the primary form of
|
||||||
|
communication between applets on the page if they need to inform each
|
||||||
|
other of internal information.
|
||||||
|
|
||||||
|
Note that the event handling terminates as soon as the first wxApplet
|
||||||
|
handles the event. If the event should be handled by all wxApplet's,
|
||||||
|
the event handlers for the applets should not reset the wxEvent::Skip()
|
||||||
|
value (ie: by default it is true).
|
||||||
|
****************************************************************************/
|
||||||
|
void wxHtmlAppletWindow::SendMessage(
|
||||||
|
wxEvent& msg)
|
||||||
|
{
|
||||||
|
// Preset the skip flag
|
||||||
|
msg.Skip();
|
||||||
|
|
||||||
|
// Process all applets in turn and send them the message
|
||||||
|
for (wxAppletList::Node *node = m_AppletList.GetFirst(); node; node = node->GetNext()) {
|
||||||
|
(node->GetData())->OnMessage(msg);
|
||||||
|
if (!msg.GetSkipped())
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
PARAMETERS:
|
||||||
|
msg - wxEvent message to be sent to all wxApplets
|
||||||
|
|
||||||
|
RETURNS:
|
||||||
|
True if new cookie was added, false if cookie with same name already exists.
|
||||||
|
|
||||||
|
REMARKS:
|
||||||
|
This function is called by the wxApplet's when they need register a cookie
|
||||||
|
of data in the applet window's cookie table. Cookies are arbitrary data
|
||||||
|
objects that are references by unique name's by the wxApplet. These
|
||||||
|
values can be used to store and retrieve data that needs to remain
|
||||||
|
persisent across invocations of the wxApplet. Ie: The first time an
|
||||||
|
applet is created it would use the cookie to store data to maintain
|
||||||
|
it's present state so that if you navigated back to the same page
|
||||||
|
is would be able to re-load the prior state as though the applet
|
||||||
|
was never actually destructed.
|
||||||
|
|
||||||
|
Note: If a cookie with the same name already exists, this function returns
|
||||||
|
false. Hence if you wish to replace a cookie you should first call
|
||||||
|
UnRegisterCookie to ensure the cookie is deleted and then call this
|
||||||
|
function.
|
||||||
|
****************************************************************************/
|
||||||
|
bool wxHtmlAppletWindow::RegisterCookie(
|
||||||
|
const wxString& name,
|
||||||
|
wxObject *cookie)
|
||||||
|
{
|
||||||
|
// Fail if the named cookie already exists!
|
||||||
|
if (m_Cookies.Get(name))
|
||||||
|
return false;
|
||||||
|
m_Cookies.Put(name,cookie);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
PARAMETERS:
|
||||||
|
msg - wxEvent message to be sent to all wxApplets
|
||||||
|
|
||||||
|
RETURNS:
|
||||||
|
True if found and deleted, false if not found in table.
|
||||||
|
|
||||||
|
REMARKS:
|
||||||
|
This function is called by the wxApplet's when they need de-register a
|
||||||
|
cookie of data in the applet window's cookie table. The data in the
|
||||||
|
cookie itself is also deleted before it is removed from the table.
|
||||||
|
****************************************************************************/
|
||||||
|
bool wxHtmlAppletWindow::UnRegisterCookie(
|
||||||
|
const wxString& name)
|
||||||
|
{
|
||||||
|
wxObject *data = m_Cookies.Delete(name);
|
||||||
|
if (data) {
|
||||||
|
delete data;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
PARAMETERS:
|
||||||
|
msg - wxEvent message to be sent to all wxApplets
|
||||||
|
|
||||||
|
RETURNS:
|
||||||
|
Pointer to the cookie data if found, NULL if not found.
|
||||||
|
|
||||||
|
REMARKS:
|
||||||
|
This function is called by the wxApplet's when they need to find a cookie
|
||||||
|
of data given it's public name. If the cookie is not found, NULL is
|
||||||
|
returned.
|
||||||
|
****************************************************************************/
|
||||||
|
wxObject *wxHtmlAppletWindow::FindCookie(
|
||||||
|
const wxString& name)
|
||||||
|
{
|
||||||
|
return m_Cookies.Get(name);
|
||||||
|
}
|
||||||
|
|
||||||
|
#include "wx/html/m_templ.h"
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
REMARKS:
|
||||||
|
Implementation for the <embed> HTML tag handler. This handler takes care
|
||||||
|
of automatically constructing the wxApplet objects of the appropriate
|
||||||
|
class based on the <embed> tag information.
|
||||||
|
****************************************************************************/
|
||||||
|
TAG_HANDLER_BEGIN(Embed, "EMBED")
|
||||||
|
|
||||||
|
TAG_HANDLER_PROC(tag)
|
||||||
|
{
|
||||||
|
wxWindow *wnd;
|
||||||
|
wxHtmlAppletWindow *appletWindow;
|
||||||
|
wxApplet *applet;
|
||||||
|
int width, height;
|
||||||
|
int floatPercent = 0;
|
||||||
|
|
||||||
|
wnd = m_WParser->GetWindow();
|
||||||
|
if ((appletWindow = wxDynamicCast(wnd,wxHtmlAppletWindow)) != NULL) {
|
||||||
|
tag.ScanParam("WIDTH", "%i", &width);
|
||||||
|
tag.ScanParam("HEIGHT", "%i", &height);
|
||||||
|
if (tag.HasParam("FLOAT"))
|
||||||
|
tag.ScanParam("FLOAT", "%i", &floatPercent);
|
||||||
|
if (tag.HasParam("APPLET")) {
|
||||||
|
if ((applet = appletWindow->CreateApplet(tag.GetParam("APPLET"), wxSize(width, height))) != NULL) {
|
||||||
|
applet->Show(true);
|
||||||
|
m_WParser->OpenContainer()->InsertCell(new wxHtmlWidgetCell(applet,floatPercent));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (tag.HasParam("TEXT")) {
|
||||||
|
// TODO: Somehow get the text returned from this class displayed on the page!
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
TAG_HANDLER_END(Embed)
|
||||||
|
|
||||||
|
TAGS_MODULE_BEGIN(Embed)
|
||||||
|
TAGS_MODULE_ADD(Embed)
|
||||||
|
TAGS_MODULE_END(Embed)
|
||||||
|
|
32
contrib/src/applet/makefile
Normal file
32
contrib/src/applet/makefile
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
#############################################################################
|
||||||
|
#
|
||||||
|
# Copyright (C) 1999 SciTech Software
|
||||||
|
# All rights reserved.
|
||||||
|
#
|
||||||
|
# Descripton: Generic makefile for the SciTech wxApplet library
|
||||||
|
#
|
||||||
|
#############################################################################
|
||||||
|
|
||||||
|
# We are building with the Win32 version
|
||||||
|
|
||||||
|
USE_RTTI := 1
|
||||||
|
USE_CPPEXCEPT := 1
|
||||||
|
PRECOMP_HDR := wx/wxprec.h
|
||||||
|
CFLAGS += -D__WIN95__ -D__WXMSW__ -D__WINDOWS__
|
||||||
|
|
||||||
|
# Link with wxWindows static link libraries or with the DLL. DLL is default.
|
||||||
|
|
||||||
|
.IF $(STATIC_LINK)
|
||||||
|
.ELSE
|
||||||
|
CFLAGS += -DWXUSINGDLL
|
||||||
|
.ENDIF
|
||||||
|
|
||||||
|
# Define the library name and objects
|
||||||
|
|
||||||
|
LIBFILE = wxapplet$L
|
||||||
|
LIBCLEAN = *.il? *.dll *.lib
|
||||||
|
OBJECTS := applet$O appletwindow$O
|
||||||
|
|
||||||
|
DEPEND_OBJ = $(OBJECTS)
|
||||||
|
.INCLUDE: "$(SCITECH)\makedefs\common.mk"
|
||||||
|
|
@@ -91,6 +91,10 @@ SOURCE=..\..\include\wx\gizmos\multicell.h
|
|||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\..\include\wx\gizmos\editlbox.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=..\..\include\wx\gizmos\splittree.h
|
SOURCE=..\..\include\wx\gizmos\splittree.h
|
||||||
# End Source File
|
# End Source File
|
||||||
# End Group
|
# End Group
|
||||||
@@ -100,6 +104,10 @@ SOURCE=.\multicell.cpp
|
|||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\editlbox.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\splittree.cpp
|
SOURCE=.\splittree.cpp
|
||||||
# End Source File
|
# End Source File
|
||||||
# End Target
|
# End Target
|
||||||
|
@@ -13,9 +13,9 @@ LIBVERSION_AGE=0
|
|||||||
HEADER_PATH=$(top_srcdir)/contrib/include/wx
|
HEADER_PATH=$(top_srcdir)/contrib/include/wx
|
||||||
HEADER_SUBDIR=gizmos
|
HEADER_SUBDIR=gizmos
|
||||||
|
|
||||||
HEADERS=multicell.h splittree.h
|
HEADERS=multicell.h splittree.h editlbox.h
|
||||||
|
|
||||||
OBJECTS=multicell.o splittree.o
|
OBJECTS=multicell.o splittree.o editlbox.o
|
||||||
|
|
||||||
APPEXTRADEFS=-I$(top_srcdir)/contrib/include
|
APPEXTRADEFS=-I$(top_srcdir)/contrib/include
|
||||||
|
|
||||||
|
230
contrib/src/gizmos/editlbox.cpp
Normal file
230
contrib/src/gizmos/editlbox.cpp
Normal file
@@ -0,0 +1,230 @@
|
|||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Name: editlbox.cpp
|
||||||
|
// Purpose: ListBox with editable items
|
||||||
|
// Author: Vaclav Slavik
|
||||||
|
// RCS-ID: $Id$
|
||||||
|
// Copyright: (c) Vaclav Slavik
|
||||||
|
// Licence: wxWindows licence
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#ifdef __GNUG__
|
||||||
|
#pragma implementation "editlbox.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// For compilers that support precompilation, includes "wx/wx.h".
|
||||||
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
|
#ifdef __BORLANDC__
|
||||||
|
#pragma hdrstop
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// for all others, include the necessary headers (this file is usually all you
|
||||||
|
// need because it includes almost all "standard" wxWindows headers)
|
||||||
|
#ifndef WX_PRECOMP
|
||||||
|
#include "wx/wx.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "wx/gizmos/editlbox.h"
|
||||||
|
#include "wx/sizer.h"
|
||||||
|
#include "wx/listctrl.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// list control with auto-resizable column:
|
||||||
|
class CleverListCtrl : public wxListCtrl
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CleverListCtrl(wxWindow *parent,
|
||||||
|
wxWindowID id = -1,
|
||||||
|
const wxPoint &pos = wxDefaultPosition,
|
||||||
|
const wxSize &size = wxDefaultSize,
|
||||||
|
long style = wxLC_ICON,
|
||||||
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
|
const wxString &name = "listctrl")
|
||||||
|
: wxListCtrl(parent, id, pos, size, style, validator, name)
|
||||||
|
{
|
||||||
|
CreateColumns();
|
||||||
|
}
|
||||||
|
|
||||||
|
void CreateColumns()
|
||||||
|
{
|
||||||
|
InsertColumn(0, _T("item"));
|
||||||
|
SizeColumns();
|
||||||
|
}
|
||||||
|
|
||||||
|
void SizeColumns()
|
||||||
|
{
|
||||||
|
int w = GetSize().x;
|
||||||
|
w -= wxSystemSettings::GetSystemMetric(wxSYS_VSCROLL_X) + 6;
|
||||||
|
SetColumnWidth(0, w);
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
DECLARE_EVENT_TABLE()
|
||||||
|
void OnSize(wxSizeEvent& event)
|
||||||
|
{
|
||||||
|
SizeColumns();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
BEGIN_EVENT_TABLE(CleverListCtrl, wxListCtrl)
|
||||||
|
EVT_SIZE(CleverListCtrl::OnSize)
|
||||||
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
|
|
||||||
|
#include "eldel.xpm"
|
||||||
|
#include "eldown.xpm"
|
||||||
|
#include "eledit.xpm"
|
||||||
|
#include "elnew.xpm"
|
||||||
|
#include "elup.xpm"
|
||||||
|
|
||||||
|
IMPLEMENT_CLASS(wxEditableListBox, wxPanel)
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
// ID value doesn't matter, it won't propagate out of wxEditableListBox
|
||||||
|
// instance
|
||||||
|
wxID_ELB_DELETE = wxID_HIGHEST + 1,
|
||||||
|
wxID_ELB_NEW,
|
||||||
|
wxID_ELB_UP,
|
||||||
|
wxID_ELB_DOWN,
|
||||||
|
wxID_ELB_EDIT,
|
||||||
|
wxID_ELD_LISTCTRL
|
||||||
|
};
|
||||||
|
|
||||||
|
BEGIN_EVENT_TABLE(wxEditableListBox, wxPanel)
|
||||||
|
EVT_LIST_ITEM_SELECTED(wxID_ELD_LISTCTRL, wxEditableListBox::OnItemSelected)
|
||||||
|
EVT_LIST_END_LABEL_EDIT(wxID_ELD_LISTCTRL, wxEditableListBox::OnEndLabelEdit)
|
||||||
|
EVT_BUTTON(wxID_ELB_NEW, wxEditableListBox::OnNewItem)
|
||||||
|
EVT_BUTTON(wxID_ELB_UP, wxEditableListBox::OnUpItem)
|
||||||
|
EVT_BUTTON(wxID_ELB_DOWN, wxEditableListBox::OnDownItem)
|
||||||
|
EVT_BUTTON(wxID_ELB_EDIT, wxEditableListBox::OnEditItem)
|
||||||
|
EVT_BUTTON(wxID_ELB_DELETE, wxEditableListBox::OnDelItem)
|
||||||
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
|
wxEditableListBox::wxEditableListBox(wxWindow *parent, wxWindowID id,
|
||||||
|
const wxString& label,
|
||||||
|
const wxPoint& pos, const wxSize& size,
|
||||||
|
const wxString& name)
|
||||||
|
: wxPanel(parent, id, pos, size, wxTAB_TRAVERSAL, name), m_edittingNew(FALSE)
|
||||||
|
{
|
||||||
|
wxSizer *sizer = new wxBoxSizer(wxVERTICAL);
|
||||||
|
|
||||||
|
wxPanel *subp = new wxPanel(this, -1, wxDefaultPosition, wxDefaultSize,
|
||||||
|
wxSUNKEN_BORDER | wxTAB_TRAVERSAL);
|
||||||
|
wxSizer *subsizer = new wxBoxSizer(wxHORIZONTAL);
|
||||||
|
subsizer->Add(new wxStaticText(subp, -1, label), 1, wxALIGN_CENTRE_VERTICAL | wxLEFT, 4);
|
||||||
|
m_bEdit = new wxBitmapButton(subp, wxID_ELB_EDIT, wxBitmap(eledit_xpm));
|
||||||
|
m_bNew = new wxBitmapButton(subp, wxID_ELB_NEW, wxBitmap(elnew_xpm));
|
||||||
|
m_bDel = new wxBitmapButton(subp, wxID_ELB_DELETE, wxBitmap(eldel_xpm));
|
||||||
|
m_bUp = new wxBitmapButton(subp, wxID_ELB_UP, wxBitmap(elup_xpm));
|
||||||
|
m_bDown = new wxBitmapButton(subp, wxID_ELB_DOWN, wxBitmap(eldown_xpm));
|
||||||
|
subsizer->Add(m_bEdit, 0, wxALIGN_CENTRE_VERTICAL);
|
||||||
|
subsizer->Add(m_bNew, 0, wxALIGN_CENTRE_VERTICAL);
|
||||||
|
subsizer->Add(m_bDel, 0, wxALIGN_CENTRE_VERTICAL);
|
||||||
|
subsizer->Add(m_bUp, 0, wxALIGN_CENTRE_VERTICAL);
|
||||||
|
subsizer->Add(m_bDown, 0, wxALIGN_CENTRE_VERTICAL);
|
||||||
|
|
||||||
|
subp->SetAutoLayout(TRUE);
|
||||||
|
subp->SetSizer(subsizer);
|
||||||
|
subsizer->Fit(subp);
|
||||||
|
|
||||||
|
sizer->Add(subp, 0, wxEXPAND);
|
||||||
|
m_listCtrl = new CleverListCtrl(this, wxID_ELD_LISTCTRL,
|
||||||
|
wxDefaultPosition, wxDefaultSize,
|
||||||
|
wxLC_REPORT | wxLC_NO_HEADER |
|
||||||
|
wxLC_SINGLE_SEL | wxSUNKEN_BORDER |
|
||||||
|
wxLC_EDIT_LABELS);
|
||||||
|
wxArrayString empty_ar;
|
||||||
|
SetStrings(empty_ar);
|
||||||
|
|
||||||
|
sizer->Add(m_listCtrl, 1, wxEXPAND);
|
||||||
|
|
||||||
|
SetAutoLayout(TRUE);
|
||||||
|
SetSizer(sizer);
|
||||||
|
Layout();
|
||||||
|
}
|
||||||
|
|
||||||
|
void wxEditableListBox::SetStrings(const wxArrayString& strings)
|
||||||
|
{
|
||||||
|
m_listCtrl->DeleteAllItems();
|
||||||
|
size_t i;
|
||||||
|
|
||||||
|
for (i = 0; i < strings.GetCount(); i++)
|
||||||
|
m_listCtrl->InsertItem(i, strings[i]);
|
||||||
|
|
||||||
|
m_listCtrl->InsertItem(strings.GetCount(), _T(""));
|
||||||
|
m_listCtrl->SetItemState(0, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED);
|
||||||
|
}
|
||||||
|
|
||||||
|
void wxEditableListBox::GetStrings(wxArrayString& strings)
|
||||||
|
{
|
||||||
|
strings.Clear();
|
||||||
|
|
||||||
|
for (int i = 0; i < m_listCtrl->GetItemCount()-1; i++)
|
||||||
|
strings.Add(m_listCtrl->GetItemText(i));
|
||||||
|
}
|
||||||
|
|
||||||
|
void wxEditableListBox::OnItemSelected(wxListEvent& event)
|
||||||
|
{
|
||||||
|
m_selection = event.GetIndex();
|
||||||
|
m_bUp->Enable(m_selection != 0 && m_selection < m_listCtrl->GetItemCount()-1);
|
||||||
|
m_bDown->Enable(m_selection < m_listCtrl->GetItemCount()-2);
|
||||||
|
m_bEdit->Enable(m_selection < m_listCtrl->GetItemCount()-1);
|
||||||
|
m_bDel->Enable(m_selection < m_listCtrl->GetItemCount()-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
void wxEditableListBox::OnNewItem(wxCommandEvent& event)
|
||||||
|
{
|
||||||
|
m_listCtrl->SetItemState(m_listCtrl->GetItemCount()-1,
|
||||||
|
wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED);
|
||||||
|
m_edittingNew = TRUE;
|
||||||
|
m_listCtrl->EditLabel(m_selection);
|
||||||
|
}
|
||||||
|
|
||||||
|
void wxEditableListBox::OnEndLabelEdit(wxListEvent& event)
|
||||||
|
{
|
||||||
|
if (m_edittingNew)
|
||||||
|
{
|
||||||
|
m_edittingNew = FALSE;
|
||||||
|
if (!event.GetText().IsEmpty())
|
||||||
|
m_listCtrl->InsertItem(m_listCtrl->GetItemCount(), _T(""));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void wxEditableListBox::OnDelItem(wxCommandEvent& event)
|
||||||
|
{
|
||||||
|
m_listCtrl->DeleteItem(m_selection);
|
||||||
|
m_listCtrl->SetItemState(m_selection,
|
||||||
|
wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED);
|
||||||
|
}
|
||||||
|
|
||||||
|
void wxEditableListBox::OnEditItem(wxCommandEvent& event)
|
||||||
|
{
|
||||||
|
m_listCtrl->EditLabel(m_selection);
|
||||||
|
}
|
||||||
|
|
||||||
|
void wxEditableListBox::OnUpItem(wxCommandEvent& event)
|
||||||
|
{
|
||||||
|
wxString t1, t2;
|
||||||
|
|
||||||
|
t1 = m_listCtrl->GetItemText(m_selection - 1);
|
||||||
|
t2 = m_listCtrl->GetItemText(m_selection);
|
||||||
|
m_listCtrl->SetItemText(m_selection - 1, t2);
|
||||||
|
m_listCtrl->SetItemText(m_selection, t1);
|
||||||
|
m_listCtrl->SetItemState(m_selection - 1,
|
||||||
|
wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED);
|
||||||
|
}
|
||||||
|
|
||||||
|
void wxEditableListBox::OnDownItem(wxCommandEvent& event)
|
||||||
|
{
|
||||||
|
wxString t1, t2;
|
||||||
|
|
||||||
|
t1 = m_listCtrl->GetItemText(m_selection + 1);
|
||||||
|
t2 = m_listCtrl->GetItemText(m_selection);
|
||||||
|
m_listCtrl->SetItemText(m_selection + 1, t2);
|
||||||
|
m_listCtrl->SetItemText(m_selection, t1);
|
||||||
|
m_listCtrl->SetItemState(m_selection + 1,
|
||||||
|
wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED);
|
||||||
|
}
|
22
contrib/src/gizmos/eldel.xpm
Normal file
22
contrib/src/gizmos/eldel.xpm
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
/* XPM */
|
||||||
|
static char * eldel_xpm[] = {
|
||||||
|
"16 16 3 1",
|
||||||
|
" c None",
|
||||||
|
". c #7F0000",
|
||||||
|
"+ c #FFFFFF",
|
||||||
|
" ",
|
||||||
|
" ",
|
||||||
|
" ",
|
||||||
|
" ..+ ..+ ",
|
||||||
|
" ....+ ..+ ",
|
||||||
|
" ....+ ..+ ",
|
||||||
|
" ...+ .+ ",
|
||||||
|
" .....+ ",
|
||||||
|
" ...+ ",
|
||||||
|
" .....+ ",
|
||||||
|
" ...+ ..+ ",
|
||||||
|
" ...+ ..+ ",
|
||||||
|
" ...+ .+ ",
|
||||||
|
" ...+ .+ ",
|
||||||
|
" . . ",
|
||||||
|
" "};
|
21
contrib/src/gizmos/eldown.xpm
Normal file
21
contrib/src/gizmos/eldown.xpm
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
/* XPM */
|
||||||
|
static char * eldown_xpm[] = {
|
||||||
|
"16 16 2 1",
|
||||||
|
" c None",
|
||||||
|
". c #000000",
|
||||||
|
" ",
|
||||||
|
" ",
|
||||||
|
" ... ",
|
||||||
|
" ... ",
|
||||||
|
" ... ",
|
||||||
|
" ... ",
|
||||||
|
" ... ",
|
||||||
|
" ... ",
|
||||||
|
" ........... ",
|
||||||
|
" ......... ",
|
||||||
|
" ....... ",
|
||||||
|
" ..... ",
|
||||||
|
" ... ",
|
||||||
|
" . ",
|
||||||
|
" ",
|
||||||
|
" "};
|
22
contrib/src/gizmos/eledit.xpm
Normal file
22
contrib/src/gizmos/eledit.xpm
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
/* XPM */
|
||||||
|
static char * eledit_xpm[] = {
|
||||||
|
"16 16 3 1",
|
||||||
|
" c None",
|
||||||
|
". c #000000",
|
||||||
|
"+ c #00007F",
|
||||||
|
" ",
|
||||||
|
" ",
|
||||||
|
" .. .. ",
|
||||||
|
" . ",
|
||||||
|
" . ",
|
||||||
|
" ++++ . ++++ ",
|
||||||
|
" ++ . ++ ++",
|
||||||
|
" +++++ . ++++++",
|
||||||
|
" ++ ++ . ++ ",
|
||||||
|
" ++ ++ . ++ ++",
|
||||||
|
" +++++ . ++++ ",
|
||||||
|
" . ",
|
||||||
|
" . ",
|
||||||
|
" .. .. ",
|
||||||
|
" ",
|
||||||
|
" "};
|
24
contrib/src/gizmos/elnew.xpm
Normal file
24
contrib/src/gizmos/elnew.xpm
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
/* XPM */
|
||||||
|
static char * elnew_xpm[] = {
|
||||||
|
"16 16 5 1",
|
||||||
|
" c None",
|
||||||
|
". c #7F7F7F",
|
||||||
|
"+ c #FFFFFF",
|
||||||
|
"@ c #FFFF00",
|
||||||
|
"# c #000000",
|
||||||
|
" ",
|
||||||
|
" ",
|
||||||
|
" . .+ .@ ",
|
||||||
|
" . .@.@# # # ",
|
||||||
|
" @.@+.... # ",
|
||||||
|
" ... @@ ",
|
||||||
|
" @ . @. # ",
|
||||||
|
" .# .@ ",
|
||||||
|
" . # ",
|
||||||
|
" # ",
|
||||||
|
" # ",
|
||||||
|
" # ",
|
||||||
|
" # ",
|
||||||
|
" # # # # # # ",
|
||||||
|
" ",
|
||||||
|
" "};
|
21
contrib/src/gizmos/elup.xpm
Normal file
21
contrib/src/gizmos/elup.xpm
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
/* XPM */
|
||||||
|
static char * elup_xpm[] = {
|
||||||
|
"16 16 2 1",
|
||||||
|
" c None",
|
||||||
|
". c #000000",
|
||||||
|
" ",
|
||||||
|
" . ",
|
||||||
|
" ... ",
|
||||||
|
" ..... ",
|
||||||
|
" ....... ",
|
||||||
|
" ......... ",
|
||||||
|
" ........... ",
|
||||||
|
" ... ",
|
||||||
|
" ... ",
|
||||||
|
" ... ",
|
||||||
|
" ... ",
|
||||||
|
" ... ",
|
||||||
|
" ... ",
|
||||||
|
" ",
|
||||||
|
" ",
|
||||||
|
" "};
|
@@ -11,7 +11,7 @@ WXDIR = $(WXWIN)
|
|||||||
|
|
||||||
LIBTARGET=$(WXDIR)\lib\gizmos.lib
|
LIBTARGET=$(WXDIR)\lib\gizmos.lib
|
||||||
|
|
||||||
OBJECTS = multicell.obj splittree.obj
|
OBJECTS = multicell.obj splittree.obj editlbox.obj
|
||||||
|
|
||||||
!include $(WXDIR)\src\makelib.b32
|
!include $(WXDIR)\src\makelib.b32
|
||||||
|
|
||||||
|
@@ -14,8 +14,7 @@ WXDIR = $(WXWIN)
|
|||||||
|
|
||||||
LIBTARGET=$(WXDIR)\lib\gizmos.lib
|
LIBTARGET=$(WXDIR)\lib\gizmos.lib
|
||||||
|
|
||||||
OBJECTS = basic.obj basic2.obj canvas.obj ogldiag.obj lines.obj misc.obj divided.obj constrnt.obj\
|
OBJECTS = multicell.obj splittree.obj editlbox.obj
|
||||||
composit.obj drawn.obj bmpshape.obj mfutils.obj
|
|
||||||
|
|
||||||
!include $(WXDIR)\src\makelib.bcc
|
!include $(WXDIR)\src\makelib.bcc
|
||||||
|
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
WXDIR = ../../..
|
WXDIR = ../../..
|
||||||
|
|
||||||
LIBTARGET=$(WXDIR)/lib/libgizmos.a
|
LIBTARGET=$(WXDIR)/lib/libgizmos.a
|
||||||
OBJECTS = multicell.o splittree.o
|
OBJECTS = multicell.o splittree.o editlbox.o
|
||||||
|
|
||||||
include $(WXDIR)/src/makelib.g95
|
include $(WXDIR)/src/makelib.g95
|
||||||
|
|
||||||
|
@@ -15,6 +15,7 @@ GIZMOSLIB=$(WXDIR)/lib/libgizmos$(GUISUFFIX).a
|
|||||||
LIB_CPP_SRC=\
|
LIB_CPP_SRC=\
|
||||||
\
|
\
|
||||||
multicell.o\
|
multicell.o\
|
||||||
|
editlbox.o\
|
||||||
splittree.o
|
splittree.o
|
||||||
|
|
||||||
all: $(GIZMOSLIB)
|
all: $(GIZMOSLIB)
|
||||||
|
@@ -23,7 +23,7 @@ LOCALDOCDIR=$(WXDIR)\contrib\docs\latex\gizmos
|
|||||||
|
|
||||||
!include $(WXDIR)\src\makevc.env
|
!include $(WXDIR)\src\makevc.env
|
||||||
|
|
||||||
OBJECTS = $(D)\multicell.obj $(D)\splittree.obj
|
OBJECTS = $(D)\multicell.obj $(D)\splittree.obj $(D)\editlbox.obj
|
||||||
|
|
||||||
LIBTARGET=$(WXDIR)\lib\gizmos$(LIBEXT).lib
|
LIBTARGET=$(WXDIR)\lib\gizmos$(LIBEXT).lib
|
||||||
|
|
||||||
@@ -60,6 +60,11 @@ $(D)\splittree.obj: splittree.$(SRCSUFF)
|
|||||||
$(CPPFLAGS) /c /Fo$@ /Tp $(*B).$(SRCSUFF)
|
$(CPPFLAGS) /c /Fo$@ /Tp $(*B).$(SRCSUFF)
|
||||||
<<
|
<<
|
||||||
|
|
||||||
|
$(D)\editlbox.obj: editlbox.$(SRCSUFF)
|
||||||
|
cl @<<
|
||||||
|
$(CPPFLAGS) /c /Fo$@ /Tp $(*B).$(SRCSUFF)
|
||||||
|
<<
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
-erase $(D)\*.obj
|
-erase $(D)\*.obj
|
||||||
-erase *.sbr
|
-erase *.sbr
|
||||||
|
@@ -10,7 +10,7 @@ THISDIR = $(WXDIR)\contrib\src\gizmos
|
|||||||
NAME = gizmos
|
NAME = gizmos
|
||||||
LNK = $(name).lnk
|
LNK = $(name).lnk
|
||||||
|
|
||||||
OBJECTS = multicell.obj splittree.obj
|
OBJECTS = multicell.obj splittree.obj editlbox.obj
|
||||||
|
|
||||||
all: $(GIZMOSLIB)
|
all: $(GIZMOSLIB)
|
||||||
|
|
||||||
|
@@ -38,6 +38,7 @@
|
|||||||
#include "wx/generic/treectlg.h"
|
#include "wx/generic/treectlg.h"
|
||||||
|
|
||||||
#include "wx/gizmos/splittree.h"
|
#include "wx/gizmos/splittree.h"
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* wxRemotelyScrolledTreeCtrl
|
* wxRemotelyScrolledTreeCtrl
|
||||||
@@ -170,7 +171,7 @@ void wxRemotelyScrolledTreeCtrl::PrepareDC(wxDC& dc)
|
|||||||
scrolledWindow->GetScrollPixelsPerUnit(& xppu2, & yppu2);
|
scrolledWindow->GetScrollPixelsPerUnit(& xppu2, & yppu2);
|
||||||
|
|
||||||
dc.SetDeviceOrigin( -startX * xppu1, -startY * yppu2 );
|
dc.SetDeviceOrigin( -startX * xppu1, -startY * yppu2 );
|
||||||
dc.SetUserScale( win->GetScaleX(), win->GetScaleY() );
|
// dc.SetUserScale( win->GetScaleX(), win->GetScaleY() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -244,14 +245,18 @@ void wxRemotelyScrolledTreeCtrl::AdjustRemoteScrollbars()
|
|||||||
wxRect itemRect;
|
wxRect itemRect;
|
||||||
if (GetBoundingRect(GetRootItem(), 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;
|
int w, h;
|
||||||
GetClientSize(&w, &h);
|
GetClientSize(&w, &h);
|
||||||
|
|
||||||
wxRect rect(0, 0, 0, 0);
|
wxRect rect(0, 0, 0, 0);
|
||||||
CalcTreeSize(rect);
|
CalcTreeSize(rect);
|
||||||
int treeViewHeight = rect.GetHeight()/itemHeight;
|
|
||||||
|
double f = ((double) (rect.GetHeight()) / (double) itemHeight) ;
|
||||||
|
int treeViewHeight = (int) ceil(f);
|
||||||
|
|
||||||
int scrollPixelsPerLine = itemHeight;
|
int scrollPixelsPerLine = itemHeight;
|
||||||
int scrollPos = - (itemRect.y / itemHeight);
|
int scrollPos = - (itemRect.y / itemHeight);
|
||||||
@@ -299,9 +304,6 @@ void wxRemotelyScrolledTreeCtrl::CalcTreeSize(wxRect& rect)
|
|||||||
|
|
||||||
void wxRemotelyScrolledTreeCtrl::CalcTreeSize(const wxTreeItemId& id, 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?)
|
// 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
|
// Q: is the bounding rect relative to the top of the virtual tree workspace
|
||||||
// or the top of the window? How would we convert?
|
// or the top of the window? How would we convert?
|
||||||
@@ -571,7 +573,10 @@ void wxSplitterScrolledWindow::OnScroll(wxScrollWinEvent& event)
|
|||||||
// don't cause an infinite loop
|
// don't cause an infinite loop
|
||||||
static bool inOnScroll = FALSE;
|
static bool inOnScroll = FALSE;
|
||||||
if (inOnScroll)
|
if (inOnScroll)
|
||||||
|
{
|
||||||
|
event.Skip();
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
inOnScroll = TRUE;
|
inOnScroll = TRUE;
|
||||||
|
|
||||||
int orient = event.GetOrientation();
|
int orient = event.GetOrientation();
|
||||||
|
@@ -50,7 +50,7 @@ BSC32=bscmake.exe
|
|||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
LIB32=link.exe -lib
|
LIB32=link.exe -lib
|
||||||
# ADD BASE LIB32 /nologo
|
# ADD BASE LIB32 /nologo
|
||||||
# ADD LIB32 /nologo /out:"..\..\lib\ogl.lib"
|
# ADD LIB32 /nologo /out:"..\..\..\lib\ogl.lib"
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "OglVC - Win32 Debug"
|
!ELSEIF "$(CFG)" == "OglVC - Win32 Debug"
|
||||||
|
|
||||||
@@ -74,7 +74,7 @@ BSC32=bscmake.exe
|
|||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
LIB32=link.exe -lib
|
LIB32=link.exe -lib
|
||||||
# ADD BASE LIB32 /nologo
|
# ADD BASE LIB32 /nologo
|
||||||
# ADD LIB32 /nologo /out:"..\..\lib\ogld.lib"
|
# ADD LIB32 /nologo /out:"..\..\..\lib\ogld.lib"
|
||||||
|
|
||||||
!ENDIF
|
!ENDIF
|
||||||
|
|
||||||
|
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
WXDIR = $(WXWIN)
|
WXDIR = $(WXWIN)
|
||||||
|
|
||||||
LIBTARGET=$(WXDIR)\contrib\lib\ogl.lib
|
LIBTARGET=$(WXDIR)\lib\ogl.lib
|
||||||
|
|
||||||
OBJECTS = basic.obj basic2.obj canvas.obj ogldiag.obj lines.obj misc.obj divided.obj constrnt.obj\
|
OBJECTS = basic.obj basic2.obj canvas.obj ogldiag.obj lines.obj misc.obj divided.obj constrnt.obj\
|
||||||
composit.obj drawn.obj bmpshape.obj mfutils.obj
|
composit.obj drawn.obj bmpshape.obj mfutils.obj
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
WXDIR = $(WXWIN)
|
WXDIR = $(WXWIN)
|
||||||
|
|
||||||
LIBTARGET=$(WXDIR)\contrib\lib\ogl.lib
|
LIBTARGET=$(WXDIR)\lib\ogl.lib
|
||||||
|
|
||||||
OBJECTS = basic.obj basic2.obj canvas.obj ogldiag.obj lines.obj misc.obj divided.obj constrnt.obj\
|
OBJECTS = basic.obj basic2.obj canvas.obj ogldiag.obj lines.obj misc.obj divided.obj constrnt.obj\
|
||||||
composit.obj drawn.obj bmpshape.obj mfutils.obj
|
composit.obj drawn.obj bmpshape.obj mfutils.obj
|
||||||
|
@@ -20,7 +20,7 @@ OGLDIR = $(WXDIR)\contrib\src\ogl
|
|||||||
THISDIR = $(OGLDIR)
|
THISDIR = $(OGLDIR)
|
||||||
DOCDIR = $(WXDIR)\contrib\docs\latex\ogl
|
DOCDIR = $(WXDIR)\contrib\docs\latex\ogl
|
||||||
|
|
||||||
GRAPHICSLIB = $(WXDIR)\contrib\lib\ogl.lib
|
GRAPHICSLIB = $(WXDIR)\lib\ogl.lib
|
||||||
INC = /I$(WXDIR)\include /I$(WXDIR)\contrib\include
|
INC = /I$(WXDIR)\include /I$(WXDIR)\contrib\include
|
||||||
|
|
||||||
# Normally set OPTIONS =
|
# Normally set OPTIONS =
|
||||||
|
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
WXDIR = ../../..
|
WXDIR = ../../..
|
||||||
|
|
||||||
LIBTARGET=$(WXDIR)/contrib/lib/libogl.a
|
LIBTARGET=$(WXDIR)/lib/libogl.a
|
||||||
OBJECTS = basic.o basic2.o canvas.o ogldiag.o lines.o misc.o divided.o constrnt.o\
|
OBJECTS = basic.o basic2.o canvas.o ogldiag.o lines.o misc.o divided.o constrnt.o\
|
||||||
composit.o drawn.o bmpshape.o mfutils.o
|
composit.o drawn.o bmpshape.o mfutils.o
|
||||||
|
|
||||||
|
@@ -28,7 +28,7 @@ PROGRAM=test
|
|||||||
OBJECTS = $(D)\basic.obj $(D)\basic2.obj $(D)\canvas.obj $(D)\ogldiag.obj $(D)\lines.obj $(D)\misc.obj $(D)\divided.obj $(D)\constrnt.obj\
|
OBJECTS = $(D)\basic.obj $(D)\basic2.obj $(D)\canvas.obj $(D)\ogldiag.obj $(D)\lines.obj $(D)\misc.obj $(D)\divided.obj $(D)\constrnt.obj\
|
||||||
$(D)\composit.obj $(D)\drawn.obj $(D)\bmpshape.obj $(D)\mfutils.obj
|
$(D)\composit.obj $(D)\drawn.obj $(D)\bmpshape.obj $(D)\mfutils.obj
|
||||||
|
|
||||||
LIBTARGET=$(WXDIR)\contrib\lib\ogl$(LIBEXT).lib
|
LIBTARGET=$(WXDIR)\lib\ogl$(LIBEXT).lib
|
||||||
|
|
||||||
all: $(D) $(LIBTARGET)
|
all: $(D) $(LIBTARGET)
|
||||||
|
|
||||||
|
@@ -6,7 +6,7 @@ WXDIR = ..\..\..
|
|||||||
|
|
||||||
EXTRACPPFLAGS=/DPROLOGIO
|
EXTRACPPFLAGS=/DPROLOGIO
|
||||||
|
|
||||||
OGLLIB = $(WXDIR)\contrib\lib\ogl.lib
|
OGLLIB = $(WXDIR)\lib\ogl.lib
|
||||||
THISDIR = $(WXDIR)\src\ogl
|
THISDIR = $(WXDIR)\src\ogl
|
||||||
|
|
||||||
NAME = ogl
|
NAME = ogl
|
||||||
|
@@ -95,6 +95,7 @@ ScintillaWX::ScintillaWX(wxStyledTextCtrl* win) {
|
|||||||
wMain = win;
|
wMain = win;
|
||||||
wDraw = win;
|
wDraw = win;
|
||||||
stc = win;
|
stc = win;
|
||||||
|
wheelRotation = 0;
|
||||||
Initialise();
|
Initialise();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -363,6 +364,22 @@ void ScintillaWX::DoVScroll(int type, int pos) {
|
|||||||
ScrollTo(topLineNew);
|
ScrollTo(topLineNew);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ScintillaWX::DoMouseWheel(int rotation, int delta, int linesPerAction) {
|
||||||
|
int topLineNew = topLine;
|
||||||
|
int lines;
|
||||||
|
|
||||||
|
wheelRotation += rotation;
|
||||||
|
lines = wheelRotation / delta;
|
||||||
|
wheelRotation -= lines * delta;
|
||||||
|
if (lines != 0) {
|
||||||
|
lines *= linesPerAction;
|
||||||
|
topLineNew -= lines;
|
||||||
|
ScrollTo(topLineNew);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void ScintillaWX::DoSize(int width, int height) {
|
void ScintillaWX::DoSize(int width, int height) {
|
||||||
PRectangle rcClient(0,0,width,height);
|
PRectangle rcClient(0,0,width,height);
|
||||||
SetScrollBarsTo(rcClient);
|
SetScrollBarsTo(rcClient);
|
||||||
|
@@ -119,6 +119,7 @@ public:
|
|||||||
void DoButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt);
|
void DoButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt);
|
||||||
void DoButtonUp(Point pt, unsigned int curTime, bool ctrl);
|
void DoButtonUp(Point pt, unsigned int curTime, bool ctrl);
|
||||||
void DoButtonMove(Point pt);
|
void DoButtonMove(Point pt);
|
||||||
|
void DoMouseWheel(int rotation, int delta, int linesPerAction);
|
||||||
void DoAddChar(char ch);
|
void DoAddChar(char ch);
|
||||||
int DoKeyDown(int key, bool shift, bool ctrl, bool alt);
|
int DoKeyDown(int key, bool shift, bool ctrl, bool alt);
|
||||||
void DoTick() { Tick(); }
|
void DoTick() { Tick(); }
|
||||||
@@ -146,6 +147,7 @@ private:
|
|||||||
|
|
||||||
wxSTCDropTarget* dropTarget;
|
wxSTCDropTarget* dropTarget;
|
||||||
wxDragResult dragResult;
|
wxDragResult dragResult;
|
||||||
|
int wheelRotation;
|
||||||
};
|
};
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
@@ -19,14 +19,14 @@ from fileinput import FileInput
|
|||||||
IFACE = './scintilla/include/Scintilla.iface'
|
IFACE = './scintilla/include/Scintilla.iface'
|
||||||
H_TEMPLATE = './stc.h.in'
|
H_TEMPLATE = './stc.h.in'
|
||||||
CPP_TEMPLATE = './stc.cpp.in'
|
CPP_TEMPLATE = './stc.cpp.in'
|
||||||
H_DEST = '../../include/wx/stc/stc.h' # './stc_test.h' #
|
H_DEST = '../../include/wx/stc/stc.h'
|
||||||
CPP_DEST = './stc.cpp' #'./stc_test.cpp'
|
CPP_DEST = './stc.cpp'
|
||||||
|
|
||||||
|
|
||||||
# Value prefixes to convert
|
# Value prefixes to convert
|
||||||
valPrefixes = [('SCI_', ''),
|
valPrefixes = [('SCI_', ''),
|
||||||
('SC_', ''),
|
('SC_', ''),
|
||||||
('SCN_', None), # just toss these...
|
('SCN_', None), # just toss these out...
|
||||||
('SCEN_', None),
|
('SCEN_', None),
|
||||||
('SCE_', ''),
|
('SCE_', ''),
|
||||||
('SCLEX_', 'LEX_'),
|
('SCLEX_', 'LEX_'),
|
||||||
@@ -35,7 +35,7 @@ valPrefixes = [('SCI_', ''),
|
|||||||
('SCWS_', 'WS_'),
|
('SCWS_', 'WS_'),
|
||||||
]
|
]
|
||||||
|
|
||||||
# Message funcion values that should have a CMD_ constant as well
|
# Message function values that should have a CMD_ constant as well
|
||||||
cmdValues = [ (2300, 2350), 2011, 2013, (2176, 2180) ]
|
cmdValues = [ (2300, 2350), 2011, 2013, (2176, 2180) ]
|
||||||
|
|
||||||
|
|
||||||
|
@@ -91,6 +91,7 @@ BEGIN_EVENT_TABLE(wxStyledTextCtrl, wxControl)
|
|||||||
EVT_MOTION (wxStyledTextCtrl::OnMouseMove)
|
EVT_MOTION (wxStyledTextCtrl::OnMouseMove)
|
||||||
EVT_LEFT_UP (wxStyledTextCtrl::OnMouseLeftUp)
|
EVT_LEFT_UP (wxStyledTextCtrl::OnMouseLeftUp)
|
||||||
EVT_RIGHT_UP (wxStyledTextCtrl::OnMouseRightUp)
|
EVT_RIGHT_UP (wxStyledTextCtrl::OnMouseRightUp)
|
||||||
|
EVT_MOUSEWHEEL (wxStyledTextCtrl::OnMouseWheel)
|
||||||
EVT_CHAR (wxStyledTextCtrl::OnChar)
|
EVT_CHAR (wxStyledTextCtrl::OnChar)
|
||||||
EVT_KEY_DOWN (wxStyledTextCtrl::OnKeyDown)
|
EVT_KEY_DOWN (wxStyledTextCtrl::OnKeyDown)
|
||||||
EVT_KILL_FOCUS (wxStyledTextCtrl::OnLoseFocus)
|
EVT_KILL_FOCUS (wxStyledTextCtrl::OnLoseFocus)
|
||||||
@@ -1556,6 +1557,14 @@ void wxStyledTextCtrl::OnMouseRightUp(wxMouseEvent& evt) {
|
|||||||
m_swx->DoContextMenu(Point(pt.x, pt.y));
|
m_swx->DoContextMenu(Point(pt.x, pt.y));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void wxStyledTextCtrl::OnMouseWheel(wxMouseEvent& evt) {
|
||||||
|
m_swx->DoMouseWheel(evt.GetWheelRotation(),
|
||||||
|
evt.GetWheelDelta(),
|
||||||
|
evt.GetLinesPerAction());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void wxStyledTextCtrl::OnChar(wxKeyEvent& evt) {
|
void wxStyledTextCtrl::OnChar(wxKeyEvent& evt) {
|
||||||
long key = evt.KeyCode();
|
long key = evt.KeyCode();
|
||||||
if ((key > WXK_ESCAPE) &&
|
if ((key > WXK_ESCAPE) &&
|
||||||
|
@@ -91,6 +91,7 @@ BEGIN_EVENT_TABLE(wxStyledTextCtrl, wxControl)
|
|||||||
EVT_MOTION (wxStyledTextCtrl::OnMouseMove)
|
EVT_MOTION (wxStyledTextCtrl::OnMouseMove)
|
||||||
EVT_LEFT_UP (wxStyledTextCtrl::OnMouseLeftUp)
|
EVT_LEFT_UP (wxStyledTextCtrl::OnMouseLeftUp)
|
||||||
EVT_RIGHT_UP (wxStyledTextCtrl::OnMouseRightUp)
|
EVT_RIGHT_UP (wxStyledTextCtrl::OnMouseRightUp)
|
||||||
|
EVT_MOUSEWHEEL (wxStyledTextCtrl::OnMouseWheel)
|
||||||
EVT_CHAR (wxStyledTextCtrl::OnChar)
|
EVT_CHAR (wxStyledTextCtrl::OnChar)
|
||||||
EVT_KEY_DOWN (wxStyledTextCtrl::OnKeyDown)
|
EVT_KEY_DOWN (wxStyledTextCtrl::OnKeyDown)
|
||||||
EVT_KILL_FOCUS (wxStyledTextCtrl::OnLoseFocus)
|
EVT_KILL_FOCUS (wxStyledTextCtrl::OnLoseFocus)
|
||||||
@@ -350,6 +351,14 @@ void wxStyledTextCtrl::OnMouseRightUp(wxMouseEvent& evt) {
|
|||||||
m_swx->DoContextMenu(Point(pt.x, pt.y));
|
m_swx->DoContextMenu(Point(pt.x, pt.y));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void wxStyledTextCtrl::OnMouseWheel(wxMouseEvent& evt) {
|
||||||
|
m_swx->DoMouseWheel(evt.GetWheelRotation(),
|
||||||
|
evt.GetWheelDelta(),
|
||||||
|
evt.GetLinesPerAction());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void wxStyledTextCtrl::OnChar(wxKeyEvent& evt) {
|
void wxStyledTextCtrl::OnChar(wxKeyEvent& evt) {
|
||||||
long key = evt.KeyCode();
|
long key = evt.KeyCode();
|
||||||
if ((key > WXK_ESCAPE) &&
|
if ((key > WXK_ESCAPE) &&
|
||||||
|
@@ -154,6 +154,7 @@ private:
|
|||||||
void OnMouseMove(wxMouseEvent& evt);
|
void OnMouseMove(wxMouseEvent& evt);
|
||||||
void OnMouseLeftUp(wxMouseEvent& evt);
|
void OnMouseLeftUp(wxMouseEvent& evt);
|
||||||
void OnMouseRightUp(wxMouseEvent& evt);
|
void OnMouseRightUp(wxMouseEvent& evt);
|
||||||
|
void OnMouseWheel(wxMouseEvent& evt);
|
||||||
void OnChar(wxKeyEvent& evt);
|
void OnChar(wxKeyEvent& evt);
|
||||||
void OnKeyDown(wxKeyEvent& evt);
|
void OnKeyDown(wxKeyEvent& evt);
|
||||||
void OnLoseFocus(wxFocusEvent& evt);
|
void OnLoseFocus(wxFocusEvent& evt);
|
||||||
|
@@ -2,7 +2,10 @@
|
|||||||
|
|
||||||
top_srcdir = @top_srcdir@/..
|
top_srcdir = @top_srcdir@/..
|
||||||
top_builddir = ../../..
|
top_builddir = ../../..
|
||||||
libsrc_dir = contrib/src/xml
|
|
||||||
|
expat_dir = $(top_srcdir)/contrib/src/xml/expat
|
||||||
|
libsrc_dir = contrib/src/xml@PATH_IFS@$(expat_dir)/xmlparse@PATH_IFS@$(expat_dir)/xmltok
|
||||||
|
|
||||||
|
|
||||||
TARGET_LIBNAME=libwxxml
|
TARGET_LIBNAME=libwxxml
|
||||||
|
|
||||||
@@ -13,6 +16,9 @@ LIBVERSION_AGE=0
|
|||||||
HEADER_PATH=$(top_srcdir)/contrib/include/wx
|
HEADER_PATH=$(top_srcdir)/contrib/include/wx
|
||||||
HEADER_SUBDIR=xml
|
HEADER_SUBDIR=xml
|
||||||
|
|
||||||
|
EXPAT_DEFS=-I$(expat_dir)/xmlparse -I$(expat_dir)/xmltok
|
||||||
|
EXPAT_OBJECTS=xmltok.o xmlrole.o xmlparse.o
|
||||||
|
|
||||||
HEADERS=xh_all.h xh_bttn.h xh_chckb.h xh_chckl.h xh_choic.h xh_combo.h \
|
HEADERS=xh_all.h xh_bttn.h xh_chckb.h xh_chckl.h xh_choic.h xh_combo.h \
|
||||||
xh_dlg.h xh_gauge.h xh_html.h xh_menu.h xh_notbk.h xh_panel.h \
|
xh_dlg.h xh_gauge.h xh_html.h xh_menu.h xh_notbk.h xh_panel.h \
|
||||||
xh_radbt.h xh_radbx.h xh_sizer.h xh_slidr.h xh_spin.h xh_stbmp.h \
|
xh_radbt.h xh_radbx.h xh_sizer.h xh_slidr.h xh_spin.h xh_stbmp.h \
|
||||||
@@ -20,15 +26,16 @@ HEADERS=xh_all.h xh_bttn.h xh_chckb.h xh_chckl.h xh_choic.h xh_combo.h \
|
|||||||
xh_bmpbt.h xh_cald.h xh_listc.h xh_scrol.h xh_stbox.h xh_tree.h \
|
xh_bmpbt.h xh_cald.h xh_listc.h xh_scrol.h xh_stbox.h xh_tree.h \
|
||||||
xh_stlin.h xh_bmp.h xh_unkwn.h xh_frame.h
|
xh_stlin.h xh_bmp.h xh_unkwn.h xh_frame.h
|
||||||
|
|
||||||
|
OBJECTS=$(EXPAT_OBJECTS) \
|
||||||
OBJECTS=xml.o xmlbin.o xmlbinz.o xmlpars.o xmlres.o xmlrsall.o \
|
xml.o xmlbin.o xmlbinz.o xmlexpat.o xmlwrite.o xmlres.o xmlrsall.o \
|
||||||
xh_bttn.o xh_chckb.o xh_chckl.o xh_choic.o xh_combo.o xh_dlg.o \
|
xh_bttn.o xh_chckb.o xh_chckl.o xh_choic.o xh_combo.o xh_dlg.o \
|
||||||
xh_gauge.o xh_html.o xh_menu.o xh_notbk.o xh_panel.o xh_radbt.o \
|
xh_gauge.o xh_html.o xh_menu.o xh_notbk.o xh_panel.o xh_radbt.o \
|
||||||
xh_radbx.o xh_sizer.o xh_slidr.o xh_spin.o xh_stbmp.o xh_sttxt.o \
|
xh_radbx.o xh_sizer.o xh_slidr.o xh_spin.o xh_stbmp.o xh_sttxt.o \
|
||||||
xh_text.o xh_listb.o xh_toolb.o xh_stlin.o xh_bmp.o xh_unkwn.o \
|
xh_text.o xh_listb.o xh_toolb.o xh_stlin.o xh_bmp.o xh_unkwn.o \
|
||||||
xh_bmpbt.o xh_cald.o xh_listc.o xh_scrol.o xh_stbox.o xh_tree.o
|
xh_bmpbt.o xh_cald.o xh_listc.o xh_scrol.o xh_stbox.o xh_tree.o \
|
||||||
|
xh_frame.o
|
||||||
|
|
||||||
APPEXTRADEFS=-I$(top_srcdir)/contrib/include
|
APPEXTRADEFS=-I$(top_srcdir)/contrib/include $(EXPAT_DEFS)
|
||||||
|
|
||||||
include $(top_builddir)/src/makelib.env
|
include $(top_builddir)/src/makelib.env
|
||||||
|
|
||||||
|
@@ -1,11 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
This is hightly incomplete version, not meant for general use!
|
|
||||||
|
|
||||||
You will need libxml version 2.2.3 or higher, available
|
|
||||||
from http://xmlsoft.org. There is a link to precompiled win32 DLL as well.
|
|
||||||
|
|
||||||
libxml is distributed under either GNU LGPL or W3C IPR
|
|
||||||
(http://www.w3.org/Consortium/Legal/copyright-software-19980720.html),
|
|
||||||
you can choose from them.
|
|
||||||
|
|
39
contrib/src/xml/README.EXPAT
Normal file
39
contrib/src/xml/README.EXPAT
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
|
||||||
|
./expat directory contains stripped-down version of Expat parser distribution
|
||||||
|
by J. Clark. I removed stuff not neccessary for wxXML (docs, samples), if you
|
||||||
|
are interested in it, please download full distribution from Clark's site
|
||||||
|
(http://www.jclark.com).
|
||||||
|
|
||||||
|
Version used is expat-1.2.
|
||||||
|
|
||||||
|
The Expat parser is available is licensed under the MIT license as follows:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
a copy of this software and associated documentation files (the
|
||||||
|
"Software"), to deal in the Software without restriction, including
|
||||||
|
without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included
|
||||||
|
in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||||
|
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
|
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
In other words, there shouldn't be any legal issues with using Expat in
|
||||||
|
your application.
|
||||||
|
|
||||||
|
Vaclav Slavik <v.slavik@volny.cz>
|
20
contrib/src/xml/expat/copying.txt
Normal file
20
contrib/src/xml/expat/copying.txt
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
a copy of this software and associated documentation files (the
|
||||||
|
"Software"), to deal in the Software without restriction, including
|
||||||
|
without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included
|
||||||
|
in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||||
|
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
|
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
3925
contrib/src/xml/expat/xmlparse/xmlparse.c
Normal file
3925
contrib/src/xml/expat/xmlparse/xmlparse.c
Normal file
File diff suppressed because it is too large
Load Diff
527
contrib/src/xml/expat/xmlparse/xmlparse.h
Normal file
527
contrib/src/xml/expat/xmlparse/xmlparse.h
Normal file
@@ -0,0 +1,527 @@
|
|||||||
|
/*
|
||||||
|
Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd
|
||||||
|
See the file copying.txt for copying permission.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef XmlParse_INCLUDED
|
||||||
|
#define XmlParse_INCLUDED 1
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef XMLPARSEAPI
|
||||||
|
#define XMLPARSEAPI /* as nothing */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
typedef void *XML_Parser;
|
||||||
|
|
||||||
|
#ifdef XML_UNICODE_WCHAR_T
|
||||||
|
|
||||||
|
/* XML_UNICODE_WCHAR_T will work only if sizeof(wchar_t) == 2 and wchar_t
|
||||||
|
uses Unicode. */
|
||||||
|
/* Information is UTF-16 encoded as wchar_ts */
|
||||||
|
|
||||||
|
#ifndef XML_UNICODE
|
||||||
|
#define XML_UNICODE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stddef.h>
|
||||||
|
typedef wchar_t XML_Char;
|
||||||
|
typedef wchar_t XML_LChar;
|
||||||
|
|
||||||
|
#else /* not XML_UNICODE_WCHAR_T */
|
||||||
|
|
||||||
|
#ifdef XML_UNICODE
|
||||||
|
|
||||||
|
/* Information is UTF-16 encoded as unsigned shorts */
|
||||||
|
typedef unsigned short XML_Char;
|
||||||
|
typedef char XML_LChar;
|
||||||
|
|
||||||
|
#else /* not XML_UNICODE */
|
||||||
|
|
||||||
|
/* Information is UTF-8 encoded. */
|
||||||
|
typedef char XML_Char;
|
||||||
|
typedef char XML_LChar;
|
||||||
|
|
||||||
|
#endif /* not XML_UNICODE */
|
||||||
|
|
||||||
|
#endif /* not XML_UNICODE_WCHAR_T */
|
||||||
|
|
||||||
|
|
||||||
|
/* Constructs a new parser; encoding is the encoding specified by the external
|
||||||
|
protocol or null if there is none specified. */
|
||||||
|
|
||||||
|
XML_Parser XMLPARSEAPI
|
||||||
|
XML_ParserCreate(const XML_Char *encoding);
|
||||||
|
|
||||||
|
/* Constructs a new parser and namespace processor. Element type names
|
||||||
|
and attribute names that belong to a namespace will be expanded;
|
||||||
|
unprefixed attribute names are never expanded; unprefixed element type
|
||||||
|
names are expanded only if there is a default namespace. The expanded
|
||||||
|
name is the concatenation of the namespace URI, the namespace separator character,
|
||||||
|
and the local part of the name. If the namespace separator is '\0' then
|
||||||
|
the namespace URI and the local part will be concatenated without any
|
||||||
|
separator. When a namespace is not declared, the name and prefix will be
|
||||||
|
passed through without expansion. */
|
||||||
|
|
||||||
|
XML_Parser XMLPARSEAPI
|
||||||
|
XML_ParserCreateNS(const XML_Char *encoding, XML_Char namespaceSeparator);
|
||||||
|
|
||||||
|
|
||||||
|
/* atts is array of name/value pairs, terminated by 0;
|
||||||
|
names and values are 0 terminated. */
|
||||||
|
|
||||||
|
typedef void (*XML_StartElementHandler)(void *userData,
|
||||||
|
const XML_Char *name,
|
||||||
|
const XML_Char **atts);
|
||||||
|
|
||||||
|
typedef void (*XML_EndElementHandler)(void *userData,
|
||||||
|
const XML_Char *name);
|
||||||
|
|
||||||
|
/* s is not 0 terminated. */
|
||||||
|
typedef void (*XML_CharacterDataHandler)(void *userData,
|
||||||
|
const XML_Char *s,
|
||||||
|
int len);
|
||||||
|
|
||||||
|
/* target and data are 0 terminated */
|
||||||
|
typedef void (*XML_ProcessingInstructionHandler)(void *userData,
|
||||||
|
const XML_Char *target,
|
||||||
|
const XML_Char *data);
|
||||||
|
|
||||||
|
/* data is 0 terminated */
|
||||||
|
typedef void (*XML_CommentHandler)(void *userData, const XML_Char *data);
|
||||||
|
|
||||||
|
typedef void (*XML_StartCdataSectionHandler)(void *userData);
|
||||||
|
typedef void (*XML_EndCdataSectionHandler)(void *userData);
|
||||||
|
|
||||||
|
/* This is called for any characters in the XML document for
|
||||||
|
which there is no applicable handler. This includes both
|
||||||
|
characters that are part of markup which is of a kind that is
|
||||||
|
not reported (comments, markup declarations), or characters
|
||||||
|
that are part of a construct which could be reported but
|
||||||
|
for which no handler has been supplied. The characters are passed
|
||||||
|
exactly as they were in the XML document except that
|
||||||
|
they will be encoded in UTF-8. Line boundaries are not normalized.
|
||||||
|
Note that a byte order mark character is not passed to the default handler.
|
||||||
|
There are no guarantees about how characters are divided between calls
|
||||||
|
to the default handler: for example, a comment might be split between
|
||||||
|
multiple calls. */
|
||||||
|
|
||||||
|
typedef void (*XML_DefaultHandler)(void *userData,
|
||||||
|
const XML_Char *s,
|
||||||
|
int len);
|
||||||
|
|
||||||
|
/* This is called for the start of the DOCTYPE declaration when the
|
||||||
|
name of the DOCTYPE is encountered. */
|
||||||
|
typedef void (*XML_StartDoctypeDeclHandler)(void *userData,
|
||||||
|
const XML_Char *doctypeName);
|
||||||
|
|
||||||
|
/* This is called for the start of the DOCTYPE declaration when the
|
||||||
|
closing > is encountered, but after processing any external subset. */
|
||||||
|
typedef void (*XML_EndDoctypeDeclHandler)(void *userData);
|
||||||
|
|
||||||
|
/* This is called for a declaration of an unparsed (NDATA)
|
||||||
|
entity. The base argument is whatever was set by XML_SetBase.
|
||||||
|
The entityName, systemId and notationName arguments will never be null.
|
||||||
|
The other arguments may be. */
|
||||||
|
|
||||||
|
typedef void (*XML_UnparsedEntityDeclHandler)(void *userData,
|
||||||
|
const XML_Char *entityName,
|
||||||
|
const XML_Char *base,
|
||||||
|
const XML_Char *systemId,
|
||||||
|
const XML_Char *publicId,
|
||||||
|
const XML_Char *notationName);
|
||||||
|
|
||||||
|
/* This is called for a declaration of notation.
|
||||||
|
The base argument is whatever was set by XML_SetBase.
|
||||||
|
The notationName will never be null. The other arguments can be. */
|
||||||
|
|
||||||
|
typedef void (*XML_NotationDeclHandler)(void *userData,
|
||||||
|
const XML_Char *notationName,
|
||||||
|
const XML_Char *base,
|
||||||
|
const XML_Char *systemId,
|
||||||
|
const XML_Char *publicId);
|
||||||
|
|
||||||
|
typedef void (*XML_ExternalParsedEntityDeclHandler)(void *userData,
|
||||||
|
const XML_Char *entityName,
|
||||||
|
const XML_Char *base,
|
||||||
|
const XML_Char *systemId,
|
||||||
|
const XML_Char *publicId);
|
||||||
|
|
||||||
|
typedef void (*XML_InternalParsedEntityDeclHandler)(void *userData,
|
||||||
|
const XML_Char *entityName,
|
||||||
|
const XML_Char *replacementText,
|
||||||
|
int replacementTextLength);
|
||||||
|
|
||||||
|
/* When namespace processing is enabled, these are called once for
|
||||||
|
each namespace declaration. The call to the start and end element
|
||||||
|
handlers occur between the calls to the start and end namespace
|
||||||
|
declaration handlers. For an xmlns attribute, prefix will be null.
|
||||||
|
For an xmlns="" attribute, uri will be null. */
|
||||||
|
|
||||||
|
typedef void (*XML_StartNamespaceDeclHandler)(void *userData,
|
||||||
|
const XML_Char *prefix,
|
||||||
|
const XML_Char *uri);
|
||||||
|
|
||||||
|
typedef void (*XML_EndNamespaceDeclHandler)(void *userData,
|
||||||
|
const XML_Char *prefix);
|
||||||
|
|
||||||
|
/* This is called if the document is not standalone (it has an
|
||||||
|
external subset or a reference to a parameter entity, but does not
|
||||||
|
have standalone="yes"). If this handler returns 0, then processing
|
||||||
|
will not continue, and the parser will return a
|
||||||
|
XML_ERROR_NOT_STANDALONE error. */
|
||||||
|
|
||||||
|
typedef int (*XML_NotStandaloneHandler)(void *userData);
|
||||||
|
|
||||||
|
/* This is called for a reference to an external parsed general entity.
|
||||||
|
The referenced entity is not automatically parsed.
|
||||||
|
The application can parse it immediately or later using
|
||||||
|
XML_ExternalEntityParserCreate.
|
||||||
|
The parser argument is the parser parsing the entity containing the reference;
|
||||||
|
it can be passed as the parser argument to XML_ExternalEntityParserCreate.
|
||||||
|
The systemId argument is the system identifier as specified in the entity declaration;
|
||||||
|
it will not be null.
|
||||||
|
The base argument is the system identifier that should be used as the base for
|
||||||
|
resolving systemId if systemId was relative; this is set by XML_SetBase;
|
||||||
|
it may be null.
|
||||||
|
The publicId argument is the public identifier as specified in the entity declaration,
|
||||||
|
or null if none was specified; the whitespace in the public identifier
|
||||||
|
will have been normalized as required by the XML spec.
|
||||||
|
The context argument specifies the parsing context in the format
|
||||||
|
expected by the context argument to
|
||||||
|
XML_ExternalEntityParserCreate; context is valid only until the handler
|
||||||
|
returns, so if the referenced entity is to be parsed later, it must be copied.
|
||||||
|
The handler should return 0 if processing should not continue because of
|
||||||
|
a fatal error in the handling of the external entity.
|
||||||
|
In this case the calling parser will return an XML_ERROR_EXTERNAL_ENTITY_HANDLING
|
||||||
|
error.
|
||||||
|
Note that unlike other handlers the first argument is the parser, not userData. */
|
||||||
|
|
||||||
|
typedef int (*XML_ExternalEntityRefHandler)(XML_Parser parser,
|
||||||
|
const XML_Char *context,
|
||||||
|
const XML_Char *base,
|
||||||
|
const XML_Char *systemId,
|
||||||
|
const XML_Char *publicId);
|
||||||
|
|
||||||
|
/* This structure is filled in by the XML_UnknownEncodingHandler
|
||||||
|
to provide information to the parser about encodings that are unknown
|
||||||
|
to the parser.
|
||||||
|
The map[b] member gives information about byte sequences
|
||||||
|
whose first byte is b.
|
||||||
|
If map[b] is c where c is >= 0, then b by itself encodes the Unicode scalar value c.
|
||||||
|
If map[b] is -1, then the byte sequence is malformed.
|
||||||
|
If map[b] is -n, where n >= 2, then b is the first byte of an n-byte
|
||||||
|
sequence that encodes a single Unicode scalar value.
|
||||||
|
The data member will be passed as the first argument to the convert function.
|
||||||
|
The convert function is used to convert multibyte sequences;
|
||||||
|
s will point to a n-byte sequence where map[(unsigned char)*s] == -n.
|
||||||
|
The convert function must return the Unicode scalar value
|
||||||
|
represented by this byte sequence or -1 if the byte sequence is malformed.
|
||||||
|
The convert function may be null if the encoding is a single-byte encoding,
|
||||||
|
that is if map[b] >= -1 for all bytes b.
|
||||||
|
When the parser is finished with the encoding, then if release is not null,
|
||||||
|
it will call release passing it the data member;
|
||||||
|
once release has been called, the convert function will not be called again.
|
||||||
|
|
||||||
|
Expat places certain restrictions on the encodings that are supported
|
||||||
|
using this mechanism.
|
||||||
|
|
||||||
|
1. Every ASCII character that can appear in a well-formed XML document,
|
||||||
|
other than the characters
|
||||||
|
|
||||||
|
$@\^`{}~
|
||||||
|
|
||||||
|
must be represented by a single byte, and that byte must be the
|
||||||
|
same byte that represents that character in ASCII.
|
||||||
|
|
||||||
|
2. No character may require more than 4 bytes to encode.
|
||||||
|
|
||||||
|
3. All characters encoded must have Unicode scalar values <= 0xFFFF,
|
||||||
|
(ie characters that would be encoded by surrogates in UTF-16
|
||||||
|
are not allowed). Note that this restriction doesn't apply to
|
||||||
|
the built-in support for UTF-8 and UTF-16.
|
||||||
|
|
||||||
|
4. No Unicode character may be encoded by more than one distinct sequence
|
||||||
|
of bytes. */
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
int map[256];
|
||||||
|
void *data;
|
||||||
|
int (*convert)(void *data, const char *s);
|
||||||
|
void (*release)(void *data);
|
||||||
|
} XML_Encoding;
|
||||||
|
|
||||||
|
/* This is called for an encoding that is unknown to the parser.
|
||||||
|
The encodingHandlerData argument is that which was passed as the
|
||||||
|
second argument to XML_SetUnknownEncodingHandler.
|
||||||
|
The name argument gives the name of the encoding as specified in
|
||||||
|
the encoding declaration.
|
||||||
|
If the callback can provide information about the encoding,
|
||||||
|
it must fill in the XML_Encoding structure, and return 1.
|
||||||
|
Otherwise it must return 0.
|
||||||
|
If info does not describe a suitable encoding,
|
||||||
|
then the parser will return an XML_UNKNOWN_ENCODING error. */
|
||||||
|
|
||||||
|
typedef int (*XML_UnknownEncodingHandler)(void *encodingHandlerData,
|
||||||
|
const XML_Char *name,
|
||||||
|
XML_Encoding *info);
|
||||||
|
|
||||||
|
void XMLPARSEAPI
|
||||||
|
XML_SetElementHandler(XML_Parser parser,
|
||||||
|
XML_StartElementHandler start,
|
||||||
|
XML_EndElementHandler end);
|
||||||
|
|
||||||
|
void XMLPARSEAPI
|
||||||
|
XML_SetCharacterDataHandler(XML_Parser parser,
|
||||||
|
XML_CharacterDataHandler handler);
|
||||||
|
|
||||||
|
void XMLPARSEAPI
|
||||||
|
XML_SetProcessingInstructionHandler(XML_Parser parser,
|
||||||
|
XML_ProcessingInstructionHandler handler);
|
||||||
|
void XMLPARSEAPI
|
||||||
|
XML_SetCommentHandler(XML_Parser parser,
|
||||||
|
XML_CommentHandler handler);
|
||||||
|
|
||||||
|
void XMLPARSEAPI
|
||||||
|
XML_SetCdataSectionHandler(XML_Parser parser,
|
||||||
|
XML_StartCdataSectionHandler start,
|
||||||
|
XML_EndCdataSectionHandler end);
|
||||||
|
|
||||||
|
/* This sets the default handler and also inhibits expansion of internal entities.
|
||||||
|
The entity reference will be passed to the default handler. */
|
||||||
|
|
||||||
|
void XMLPARSEAPI
|
||||||
|
XML_SetDefaultHandler(XML_Parser parser,
|
||||||
|
XML_DefaultHandler handler);
|
||||||
|
|
||||||
|
/* This sets the default handler but does not inhibit expansion of internal entities.
|
||||||
|
The entity reference will not be passed to the default handler. */
|
||||||
|
|
||||||
|
void XMLPARSEAPI
|
||||||
|
XML_SetDefaultHandlerExpand(XML_Parser parser,
|
||||||
|
XML_DefaultHandler handler);
|
||||||
|
|
||||||
|
void XMLPARSEAPI
|
||||||
|
XML_SetDoctypeDeclHandler(XML_Parser parser,
|
||||||
|
XML_StartDoctypeDeclHandler start,
|
||||||
|
XML_EndDoctypeDeclHandler end);
|
||||||
|
|
||||||
|
void XMLPARSEAPI
|
||||||
|
XML_SetUnparsedEntityDeclHandler(XML_Parser parser,
|
||||||
|
XML_UnparsedEntityDeclHandler handler);
|
||||||
|
|
||||||
|
void XMLPARSEAPI
|
||||||
|
XML_SetNotationDeclHandler(XML_Parser parser,
|
||||||
|
XML_NotationDeclHandler handler);
|
||||||
|
|
||||||
|
void XMLPARSEAPI
|
||||||
|
XML_SetExternalParsedEntityDeclHandler(XML_Parser parser,
|
||||||
|
XML_ExternalParsedEntityDeclHandler handler);
|
||||||
|
|
||||||
|
void XMLPARSEAPI
|
||||||
|
XML_SetInternalParsedEntityDeclHandler(XML_Parser parser,
|
||||||
|
XML_InternalParsedEntityDeclHandler handler);
|
||||||
|
|
||||||
|
void XMLPARSEAPI
|
||||||
|
XML_SetNamespaceDeclHandler(XML_Parser parser,
|
||||||
|
XML_StartNamespaceDeclHandler start,
|
||||||
|
XML_EndNamespaceDeclHandler end);
|
||||||
|
|
||||||
|
void XMLPARSEAPI
|
||||||
|
XML_SetNotStandaloneHandler(XML_Parser parser,
|
||||||
|
XML_NotStandaloneHandler handler);
|
||||||
|
|
||||||
|
void XMLPARSEAPI
|
||||||
|
XML_SetExternalEntityRefHandler(XML_Parser parser,
|
||||||
|
XML_ExternalEntityRefHandler handler);
|
||||||
|
|
||||||
|
/* If a non-null value for arg is specified here, then it will be passed
|
||||||
|
as the first argument to the external entity ref handler instead
|
||||||
|
of the parser object. */
|
||||||
|
void XMLPARSEAPI
|
||||||
|
XML_SetExternalEntityRefHandlerArg(XML_Parser, void *arg);
|
||||||
|
|
||||||
|
void XMLPARSEAPI
|
||||||
|
XML_SetUnknownEncodingHandler(XML_Parser parser,
|
||||||
|
XML_UnknownEncodingHandler handler,
|
||||||
|
void *encodingHandlerData);
|
||||||
|
|
||||||
|
/* This can be called within a handler for a start element, end element,
|
||||||
|
processing instruction or character data. It causes the corresponding
|
||||||
|
markup to be passed to the default handler. */
|
||||||
|
void XMLPARSEAPI XML_DefaultCurrent(XML_Parser parser);
|
||||||
|
|
||||||
|
/* This value is passed as the userData argument to callbacks. */
|
||||||
|
void XMLPARSEAPI
|
||||||
|
XML_SetUserData(XML_Parser parser, void *userData);
|
||||||
|
|
||||||
|
/* Returns the last value set by XML_SetUserData or null. */
|
||||||
|
#define XML_GetUserData(parser) (*(void **)(parser))
|
||||||
|
|
||||||
|
/* This is equivalent to supplying an encoding argument
|
||||||
|
to XML_ParserCreate. It must not be called after XML_Parse
|
||||||
|
or XML_ParseBuffer. */
|
||||||
|
|
||||||
|
int XMLPARSEAPI
|
||||||
|
XML_SetEncoding(XML_Parser parser, const XML_Char *encoding);
|
||||||
|
|
||||||
|
/* If this function is called, then the parser will be passed
|
||||||
|
as the first argument to callbacks instead of userData.
|
||||||
|
The userData will still be accessible using XML_GetUserData. */
|
||||||
|
|
||||||
|
void XMLPARSEAPI
|
||||||
|
XML_UseParserAsHandlerArg(XML_Parser parser);
|
||||||
|
|
||||||
|
/* Sets the base to be used for resolving relative URIs in system identifiers in
|
||||||
|
declarations. Resolving relative identifiers is left to the application:
|
||||||
|
this value will be passed through as the base argument to the
|
||||||
|
XML_ExternalEntityRefHandler, XML_NotationDeclHandler
|
||||||
|
and XML_UnparsedEntityDeclHandler. The base argument will be copied.
|
||||||
|
Returns zero if out of memory, non-zero otherwise. */
|
||||||
|
|
||||||
|
int XMLPARSEAPI
|
||||||
|
XML_SetBase(XML_Parser parser, const XML_Char *base);
|
||||||
|
|
||||||
|
const XML_Char XMLPARSEAPI *
|
||||||
|
XML_GetBase(XML_Parser parser);
|
||||||
|
|
||||||
|
/* Returns the number of the attribute/value pairs passed in last call
|
||||||
|
to the XML_StartElementHandler that were specified in the start-tag
|
||||||
|
rather than defaulted. Each attribute/value pair counts as 2; thus
|
||||||
|
this correspondds to an index into the atts array passed to the
|
||||||
|
XML_StartElementHandler. */
|
||||||
|
|
||||||
|
int XMLPARSEAPI XML_GetSpecifiedAttributeCount(XML_Parser parser);
|
||||||
|
|
||||||
|
/* Returns the index of the ID attribute passed in the last call to
|
||||||
|
XML_StartElementHandler, or -1 if there is no ID attribute. Each
|
||||||
|
attribute/value pair counts as 2; thus this correspondds to an index
|
||||||
|
into the atts array passed to the XML_StartElementHandler. */
|
||||||
|
int XMLPARSEAPI XML_GetIdAttributeIndex(XML_Parser parser);
|
||||||
|
|
||||||
|
/* Parses some input. Returns 0 if a fatal error is detected.
|
||||||
|
The last call to XML_Parse must have isFinal true;
|
||||||
|
len may be zero for this call (or any other). */
|
||||||
|
int XMLPARSEAPI
|
||||||
|
XML_Parse(XML_Parser parser, const char *s, int len, int isFinal);
|
||||||
|
|
||||||
|
void XMLPARSEAPI *
|
||||||
|
XML_GetBuffer(XML_Parser parser, int len);
|
||||||
|
|
||||||
|
int XMLPARSEAPI
|
||||||
|
XML_ParseBuffer(XML_Parser parser, int len, int isFinal);
|
||||||
|
|
||||||
|
/* Creates an XML_Parser object that can parse an external general entity;
|
||||||
|
context is a '\0'-terminated string specifying the parse context;
|
||||||
|
encoding is a '\0'-terminated string giving the name of the externally specified encoding,
|
||||||
|
or null if there is no externally specified encoding.
|
||||||
|
The context string consists of a sequence of tokens separated by formfeeds (\f);
|
||||||
|
a token consisting of a name specifies that the general entity of the name
|
||||||
|
is open; a token of the form prefix=uri specifies the namespace for a particular
|
||||||
|
prefix; a token of the form =uri specifies the default namespace.
|
||||||
|
This can be called at any point after the first call to an ExternalEntityRefHandler
|
||||||
|
so longer as the parser has not yet been freed.
|
||||||
|
The new parser is completely independent and may safely be used in a separate thread.
|
||||||
|
The handlers and userData are initialized from the parser argument.
|
||||||
|
Returns 0 if out of memory. Otherwise returns a new XML_Parser object. */
|
||||||
|
XML_Parser XMLPARSEAPI
|
||||||
|
XML_ExternalEntityParserCreate(XML_Parser parser,
|
||||||
|
const XML_Char *context,
|
||||||
|
const XML_Char *encoding);
|
||||||
|
|
||||||
|
enum XML_ParamEntityParsing {
|
||||||
|
XML_PARAM_ENTITY_PARSING_NEVER,
|
||||||
|
XML_PARAM_ENTITY_PARSING_UNLESS_STANDALONE,
|
||||||
|
XML_PARAM_ENTITY_PARSING_ALWAYS
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Controls parsing of parameter entities (including the external DTD
|
||||||
|
subset). If parsing of parameter entities is enabled, then references
|
||||||
|
to external parameter entities (including the external DTD subset)
|
||||||
|
will be passed to the handler set with
|
||||||
|
XML_SetExternalEntityRefHandler. The context passed will be 0.
|
||||||
|
Unlike external general entities, external parameter entities can only
|
||||||
|
be parsed synchronously. If the external parameter entity is to be
|
||||||
|
parsed, it must be parsed during the call to the external entity ref
|
||||||
|
handler: the complete sequence of XML_ExternalEntityParserCreate,
|
||||||
|
XML_Parse/XML_ParseBuffer and XML_ParserFree calls must be made during
|
||||||
|
this call. After XML_ExternalEntityParserCreate has been called to
|
||||||
|
create the parser for the external parameter entity (context must be 0
|
||||||
|
for this call), it is illegal to make any calls on the old parser
|
||||||
|
until XML_ParserFree has been called on the newly created parser. If
|
||||||
|
the library has been compiled without support for parameter entity
|
||||||
|
parsing (ie without XML_DTD being defined), then
|
||||||
|
XML_SetParamEntityParsing will return 0 if parsing of parameter
|
||||||
|
entities is requested; otherwise it will return non-zero. */
|
||||||
|
|
||||||
|
int XMLPARSEAPI
|
||||||
|
XML_SetParamEntityParsing(XML_Parser parser,
|
||||||
|
enum XML_ParamEntityParsing parsing);
|
||||||
|
|
||||||
|
enum XML_Error {
|
||||||
|
XML_ERROR_NONE,
|
||||||
|
XML_ERROR_NO_MEMORY,
|
||||||
|
XML_ERROR_SYNTAX,
|
||||||
|
XML_ERROR_NO_ELEMENTS,
|
||||||
|
XML_ERROR_INVALID_TOKEN,
|
||||||
|
XML_ERROR_UNCLOSED_TOKEN,
|
||||||
|
XML_ERROR_PARTIAL_CHAR,
|
||||||
|
XML_ERROR_TAG_MISMATCH,
|
||||||
|
XML_ERROR_DUPLICATE_ATTRIBUTE,
|
||||||
|
XML_ERROR_JUNK_AFTER_DOC_ELEMENT,
|
||||||
|
XML_ERROR_PARAM_ENTITY_REF,
|
||||||
|
XML_ERROR_UNDEFINED_ENTITY,
|
||||||
|
XML_ERROR_RECURSIVE_ENTITY_REF,
|
||||||
|
XML_ERROR_ASYNC_ENTITY,
|
||||||
|
XML_ERROR_BAD_CHAR_REF,
|
||||||
|
XML_ERROR_BINARY_ENTITY_REF,
|
||||||
|
XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF,
|
||||||
|
XML_ERROR_MISPLACED_XML_PI,
|
||||||
|
XML_ERROR_UNKNOWN_ENCODING,
|
||||||
|
XML_ERROR_INCORRECT_ENCODING,
|
||||||
|
XML_ERROR_UNCLOSED_CDATA_SECTION,
|
||||||
|
XML_ERROR_EXTERNAL_ENTITY_HANDLING,
|
||||||
|
XML_ERROR_NOT_STANDALONE
|
||||||
|
};
|
||||||
|
|
||||||
|
/* If XML_Parse or XML_ParseBuffer have returned 0, then XML_GetErrorCode
|
||||||
|
returns information about the error. */
|
||||||
|
|
||||||
|
enum XML_Error XMLPARSEAPI XML_GetErrorCode(XML_Parser parser);
|
||||||
|
|
||||||
|
/* These functions return information about the current parse location.
|
||||||
|
They may be called when XML_Parse or XML_ParseBuffer return 0;
|
||||||
|
in this case the location is the location of the character at which
|
||||||
|
the error was detected.
|
||||||
|
They may also be called from any other callback called to report
|
||||||
|
some parse event; in this the location is the location of the first
|
||||||
|
of the sequence of characters that generated the event. */
|
||||||
|
|
||||||
|
int XMLPARSEAPI XML_GetCurrentLineNumber(XML_Parser parser);
|
||||||
|
int XMLPARSEAPI XML_GetCurrentColumnNumber(XML_Parser parser);
|
||||||
|
long XMLPARSEAPI XML_GetCurrentByteIndex(XML_Parser parser);
|
||||||
|
|
||||||
|
/* Return the number of bytes in the current event.
|
||||||
|
Returns 0 if the event is in an internal entity. */
|
||||||
|
|
||||||
|
int XMLPARSEAPI XML_GetCurrentByteCount(XML_Parser parser);
|
||||||
|
|
||||||
|
/* For backwards compatibility with previous versions. */
|
||||||
|
#define XML_GetErrorLineNumber XML_GetCurrentLineNumber
|
||||||
|
#define XML_GetErrorColumnNumber XML_GetCurrentColumnNumber
|
||||||
|
#define XML_GetErrorByteIndex XML_GetCurrentByteIndex
|
||||||
|
|
||||||
|
/* Frees memory used by the parser. */
|
||||||
|
void XMLPARSEAPI
|
||||||
|
XML_ParserFree(XML_Parser parser);
|
||||||
|
|
||||||
|
/* Returns a string describing the error. */
|
||||||
|
const XML_LChar XMLPARSEAPI *XML_ErrorString(int code);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* not XmlParse_INCLUDED */
|
86
contrib/src/xml/expat/xmltok/ascii.h
Normal file
86
contrib/src/xml/expat/xmltok/ascii.h
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
/*
|
||||||
|
Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
|
||||||
|
See the file copying.txt for copying permission.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define ASCII_A 0x41
|
||||||
|
#define ASCII_B 0x42
|
||||||
|
#define ASCII_C 0x43
|
||||||
|
#define ASCII_D 0x44
|
||||||
|
#define ASCII_E 0x45
|
||||||
|
#define ASCII_F 0x46
|
||||||
|
#define ASCII_G 0x47
|
||||||
|
#define ASCII_H 0x48
|
||||||
|
#define ASCII_I 0x49
|
||||||
|
#define ASCII_J 0x4A
|
||||||
|
#define ASCII_K 0x4B
|
||||||
|
#define ASCII_L 0x4C
|
||||||
|
#define ASCII_M 0x4D
|
||||||
|
#define ASCII_N 0x4E
|
||||||
|
#define ASCII_O 0x4F
|
||||||
|
#define ASCII_P 0x50
|
||||||
|
#define ASCII_Q 0x51
|
||||||
|
#define ASCII_R 0x52
|
||||||
|
#define ASCII_S 0x53
|
||||||
|
#define ASCII_T 0x54
|
||||||
|
#define ASCII_U 0x55
|
||||||
|
#define ASCII_V 0x56
|
||||||
|
#define ASCII_W 0x57
|
||||||
|
#define ASCII_X 0x58
|
||||||
|
#define ASCII_Y 0x59
|
||||||
|
#define ASCII_Z 0x5A
|
||||||
|
|
||||||
|
#define ASCII_a 0x61
|
||||||
|
#define ASCII_b 0x62
|
||||||
|
#define ASCII_c 0x63
|
||||||
|
#define ASCII_d 0x64
|
||||||
|
#define ASCII_e 0x65
|
||||||
|
#define ASCII_f 0x66
|
||||||
|
#define ASCII_g 0x67
|
||||||
|
#define ASCII_h 0x68
|
||||||
|
#define ASCII_i 0x69
|
||||||
|
#define ASCII_j 0x6A
|
||||||
|
#define ASCII_k 0x6B
|
||||||
|
#define ASCII_l 0x6C
|
||||||
|
#define ASCII_m 0x6D
|
||||||
|
#define ASCII_n 0x6E
|
||||||
|
#define ASCII_o 0x6F
|
||||||
|
#define ASCII_p 0x70
|
||||||
|
#define ASCII_q 0x71
|
||||||
|
#define ASCII_r 0x72
|
||||||
|
#define ASCII_s 0x73
|
||||||
|
#define ASCII_t 0x74
|
||||||
|
#define ASCII_u 0x75
|
||||||
|
#define ASCII_v 0x76
|
||||||
|
#define ASCII_w 0x77
|
||||||
|
#define ASCII_x 0x78
|
||||||
|
#define ASCII_y 0x79
|
||||||
|
#define ASCII_z 0x7A
|
||||||
|
|
||||||
|
#define ASCII_0 0x30
|
||||||
|
#define ASCII_1 0x31
|
||||||
|
#define ASCII_2 0x32
|
||||||
|
#define ASCII_3 0x33
|
||||||
|
#define ASCII_4 0x34
|
||||||
|
#define ASCII_5 0x35
|
||||||
|
#define ASCII_6 0x36
|
||||||
|
#define ASCII_7 0x37
|
||||||
|
#define ASCII_8 0x38
|
||||||
|
#define ASCII_9 0x39
|
||||||
|
|
||||||
|
#define ASCII_TAB 0x09
|
||||||
|
#define ASCII_SPACE 0x20
|
||||||
|
#define ASCII_EXCL 0x21
|
||||||
|
#define ASCII_QUOT 0x22
|
||||||
|
#define ASCII_AMP 0x26
|
||||||
|
#define ASCII_APOS 0x27
|
||||||
|
#define ASCII_MINUS 0x2D
|
||||||
|
#define ASCII_PERIOD 0x2E
|
||||||
|
#define ASCII_COLON 0x3A
|
||||||
|
#define ASCII_SEMI 0x3B
|
||||||
|
#define ASCII_LT 0x3C
|
||||||
|
#define ASCII_EQUALS 0x3D
|
||||||
|
#define ASCII_GT 0x3E
|
||||||
|
#define ASCII_LSQB 0x5B
|
||||||
|
#define ASCII_RSQB 0x5D
|
||||||
|
#define ASCII_UNDERSCORE 0x5F
|
37
contrib/src/xml/expat/xmltok/asciitab.h
Normal file
37
contrib/src/xml/expat/xmltok/asciitab.h
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
/*
|
||||||
|
Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
|
||||||
|
See the file copying.txt for copying permission.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* 0x00 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
|
||||||
|
/* 0x04 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
|
||||||
|
/* 0x08 */ BT_NONXML, BT_S, BT_LF, BT_NONXML,
|
||||||
|
/* 0x0C */ BT_NONXML, BT_CR, BT_NONXML, BT_NONXML,
|
||||||
|
/* 0x10 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
|
||||||
|
/* 0x14 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
|
||||||
|
/* 0x18 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
|
||||||
|
/* 0x1C */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
|
||||||
|
/* 0x20 */ BT_S, BT_EXCL, BT_QUOT, BT_NUM,
|
||||||
|
/* 0x24 */ BT_OTHER, BT_PERCNT, BT_AMP, BT_APOS,
|
||||||
|
/* 0x28 */ BT_LPAR, BT_RPAR, BT_AST, BT_PLUS,
|
||||||
|
/* 0x2C */ BT_COMMA, BT_MINUS, BT_NAME, BT_SOL,
|
||||||
|
/* 0x30 */ BT_DIGIT, BT_DIGIT, BT_DIGIT, BT_DIGIT,
|
||||||
|
/* 0x34 */ BT_DIGIT, BT_DIGIT, BT_DIGIT, BT_DIGIT,
|
||||||
|
/* 0x38 */ BT_DIGIT, BT_DIGIT, BT_COLON, BT_SEMI,
|
||||||
|
/* 0x3C */ BT_LT, BT_EQUALS, BT_GT, BT_QUEST,
|
||||||
|
/* 0x40 */ BT_OTHER, BT_HEX, BT_HEX, BT_HEX,
|
||||||
|
/* 0x44 */ BT_HEX, BT_HEX, BT_HEX, BT_NMSTRT,
|
||||||
|
/* 0x48 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||||
|
/* 0x4C */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||||
|
/* 0x50 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||||
|
/* 0x54 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||||
|
/* 0x58 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_LSQB,
|
||||||
|
/* 0x5C */ BT_OTHER, BT_RSQB, BT_OTHER, BT_NMSTRT,
|
||||||
|
/* 0x60 */ BT_OTHER, BT_HEX, BT_HEX, BT_HEX,
|
||||||
|
/* 0x64 */ BT_HEX, BT_HEX, BT_HEX, BT_NMSTRT,
|
||||||
|
/* 0x68 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||||
|
/* 0x6C */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||||
|
/* 0x70 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||||
|
/* 0x74 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||||
|
/* 0x78 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_OTHER,
|
||||||
|
/* 0x7C */ BT_VERBAR, BT_OTHER, BT_OTHER, BT_OTHER,
|
15
contrib/src/xml/expat/xmltok/dllmain.c
Normal file
15
contrib/src/xml/expat/xmltok/dllmain.c
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
/*
|
||||||
|
Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
|
||||||
|
See the file copying.txt for copying permission.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define STRICT 1
|
||||||
|
#define WIN32_LEAN_AND_MEAN 1
|
||||||
|
|
||||||
|
#include <windows.h>
|
||||||
|
|
||||||
|
BOOL WINAPI DllMain(HANDLE hInst, ULONG ul_reason_for_call, LPVOID lpReserved)
|
||||||
|
{
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user