Compare commits
367 Commits
WXXML_BEFO
...
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 | ||
|
33ac7e6f01 | ||
|
b1d1dc510d | ||
|
f3cf386509 | ||
|
947ea04d01 | ||
|
830ed6d97d | ||
|
2f51a9ecc5 | ||
|
3d5aff50cb | ||
|
a92edd311c | ||
|
0bc0cd5d81 | ||
|
c854c7d92c | ||
|
7699e843c0 | ||
|
c112dde0a0 | ||
|
2900bd1c81 | ||
|
d9a4f62064 | ||
|
5570ec300e | ||
|
35b6b7d54a | ||
|
72d750d462 | ||
|
49348d874d | ||
|
91c41b30c2 | ||
|
9e689c0658 | ||
|
ec5d77998a | ||
|
926bb76c2a | ||
|
ed1ae3fb27 | ||
|
7114b9fa28 | ||
|
b6962846e8 | ||
|
d7ec656498 | ||
|
a51fb6427c | ||
|
adebd2d72c | ||
|
3875544933 | ||
|
51523f25d7 | ||
|
716ed2259a | ||
|
fa3541bd15 | ||
|
6957a370ff | ||
|
468ae730db | ||
|
aafe448833 | ||
|
5e8e25e729 | ||
|
9749497156 | ||
|
dad9554b4c | ||
|
d969af82fc | ||
|
30954328be | ||
|
fa1c6ab937 | ||
|
e74a9319f9 | ||
|
c97e7fa8db | ||
|
c3f4609ebb | ||
|
0de01330ba | ||
|
b86e511a9b | ||
|
424f5e2700 | ||
|
9d8bdf2dbc | ||
|
7f0275efe2 | ||
|
079c842cae | ||
|
3e968053fb | ||
|
56cff98620 | ||
|
f040060e2f | ||
|
6523de8a56 | ||
|
00a32dc1fb | ||
|
29f45f85e9 | ||
|
71d04f7ffd | ||
|
b6c8bd6959 | ||
|
c03b48d7f8 | ||
|
88c49a0f21 | ||
|
df05452ec0 | ||
|
7905ec5558 | ||
|
b0a2157c88 | ||
|
28c6addc20 | ||
|
891000d61b | ||
|
53a240f02b | ||
|
e143729845 | ||
|
67a6726a2c | ||
|
6d56eb5c56 | ||
|
7d88e2447e | ||
|
1216f52d92 | ||
|
a701b7f87e | ||
|
963a1fcd6e | ||
|
94fdced0a0 | ||
|
c2229593ba | ||
|
a0b1b91fe6 | ||
|
9ef2e675a5 | ||
|
b93d0d082d | ||
|
65ba4113c6 | ||
|
3b59b26706 | ||
|
a98f98ac6f | ||
|
6a611b39fe | ||
|
95c8801cdf | ||
|
1309ba6c7e | ||
|
3da2715fb8 | ||
|
2c1c448a24 | ||
|
1cf8c0a9d4 | ||
|
a06c1b9b72 | ||
|
2b813b73cd | ||
|
4ea45e6ba3 | ||
|
e545ddb6e5 | ||
|
6d51f22029 | ||
|
08399e45e7 | ||
|
5fd2b2c6ae | ||
|
cffbfebc68 | ||
|
0bbfe845ed | ||
|
eba0e3477b | ||
|
cb21bd1b10 | ||
|
31929f8009 | ||
|
c96ea65713 | ||
|
a8d4e3ac60 | ||
|
45ef9db336 | ||
|
ce113d5ffe | ||
|
0046ff7c4f | ||
|
3ff75b5a4f | ||
|
775c6f0cd2 | ||
|
a92d972108 | ||
|
b9c15d1092 | ||
|
efe7d6ff7e | ||
|
3417f6618c | ||
|
7529690de8 | ||
|
5cd09f0b8d | ||
|
f1339c5685 | ||
|
3f2bcf3437 | ||
|
1f3943e027 | ||
|
942bef71b0 | ||
|
b06a6b20d5 |
@@ -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
|
||||||
----------------------------------------
|
----------------------------------------
|
||||||
|
|
||||||
|
37
Makefile.in
37
Makefile.in
@@ -42,7 +42,7 @@ VP8 = @top_srcdir@/src/jpeg
|
|||||||
VP9 = @top_srcdir@/src/tiff
|
VP9 = @top_srcdir@/src/tiff
|
||||||
VP10 = @top_srcdir@/src/zlib
|
VP10 = @top_srcdir@/src/zlib
|
||||||
VP11 = @top_srcdir@/src/iodbc
|
VP11 = @top_srcdir@/src/iodbc
|
||||||
VP12 = @top_srcdir@/src/ole
|
VP12 = @top_srcdir@/src/msw/ole
|
||||||
|
|
||||||
FTVP01 = @top_srcdir@/src/freetype/unix
|
FTVP01 = @top_srcdir@/src/freetype/unix
|
||||||
FTVP02 = @top_srcdir@/src/freetype/autohint
|
FTVP02 = @top_srcdir@/src/freetype/autohint
|
||||||
@@ -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
|
||||||
@@ -338,6 +338,14 @@ IODBCOBJS = \
|
|||||||
prepare.o \
|
prepare.o \
|
||||||
result.o
|
result.o
|
||||||
|
|
||||||
|
OLEOBJS = \
|
||||||
|
automtn.o \
|
||||||
|
dataobj.o \
|
||||||
|
dropsrc.o \
|
||||||
|
droptgt.o \
|
||||||
|
oleutils.o \
|
||||||
|
uuid.o
|
||||||
|
|
||||||
############################## Rules ##################################
|
############################## Rules ##################################
|
||||||
|
|
||||||
BURNT_LIBRARY_NAME = @BURNT_LIBRARY_NAME@
|
BURNT_LIBRARY_NAME = @BURNT_LIBRARY_NAME@
|
||||||
@@ -363,6 +371,12 @@ 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/lib@WX_LIBRARY@-${VER_SUFFIX}.r: ./lib/lib@WX_LIBRARY@-${VER_SUFFIX}.rsrc
|
||||||
|
$(DEREZ) $^ $(DEREZFLAGS) > $@
|
||||||
|
|
||||||
|
./lib/lib@WX_LIBRARY@-${VER_SUFFIX}.rsrc: $(MACRESOURCES)
|
||||||
|
$(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@
|
||||||
@$(RM) ./lib/@WX_LIBRARY_LINK2@
|
@$(RM) ./lib/@WX_LIBRARY_LINK2@
|
||||||
@@ -944,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
|
||||||
@@ -1332,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"` .
|
||||||
|
120
configure.in
120
configure.in
@@ -490,6 +490,7 @@ dnl assume Unix
|
|||||||
USE_UNIX=1
|
USE_UNIX=1
|
||||||
USE_WIN32=0
|
USE_WIN32=0
|
||||||
USE_BEOS=0
|
USE_BEOS=0
|
||||||
|
USE_MAC=0
|
||||||
|
|
||||||
USE_LINUX=
|
USE_LINUX=
|
||||||
USE_SGI=
|
USE_SGI=
|
||||||
@@ -504,6 +505,7 @@ USE_ALPHA=
|
|||||||
USE_OSF=
|
USE_OSF=
|
||||||
USE_BSD=
|
USE_BSD=
|
||||||
USE_FREEBSD=
|
USE_FREEBSD=
|
||||||
|
USE_OPENBSD=
|
||||||
USE_NETBSD=
|
USE_NETBSD=
|
||||||
USE_VMS=
|
USE_VMS=
|
||||||
USE_ULTRIX=
|
USE_ULTRIX=
|
||||||
@@ -594,6 +596,13 @@ case "${host}" in
|
|||||||
AC_DEFINE(__BSD__)
|
AC_DEFINE(__BSD__)
|
||||||
DEFAULT_DEFAULT_wxUSE_GTK=1
|
DEFAULT_DEFAULT_wxUSE_GTK=1
|
||||||
;;
|
;;
|
||||||
|
*-*-openbsd*)
|
||||||
|
USE_BSD=1
|
||||||
|
USE_OPENBSD=1
|
||||||
|
AC_DEFINE(__FREEBSD__)
|
||||||
|
AC_DEFINE(__OPENBSD__)
|
||||||
|
DEFAULT_DEFAULT_wxUSE_GTK=1
|
||||||
|
;;
|
||||||
*-*-netbsd*)
|
*-*-netbsd*)
|
||||||
USE_BSD=1
|
USE_BSD=1
|
||||||
USE_NETBSD=1
|
USE_NETBSD=1
|
||||||
@@ -633,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__)
|
||||||
@@ -824,9 +833,11 @@ if test $DEBUG_CONFIGURE = 1; then
|
|||||||
DEFAULT_wxUSE_UNICODE=no
|
DEFAULT_wxUSE_UNICODE=no
|
||||||
DEFAULT_wxUSE_WCSRTOMBS=no
|
DEFAULT_wxUSE_WCSRTOMBS=no
|
||||||
|
|
||||||
|
DEFAULT_wxUSE_IMAGE=no
|
||||||
DEFAULT_wxUSE_GIF=no
|
DEFAULT_wxUSE_GIF=no
|
||||||
DEFAULT_wxUSE_PCX=no
|
DEFAULT_wxUSE_PCX=no
|
||||||
DEFAULT_wxUSE_PNM=no
|
DEFAULT_wxUSE_PNM=no
|
||||||
|
DEFAULT_wxUSE_XPM=no
|
||||||
else
|
else
|
||||||
DEFAULT_wxUSE_THREADS=yes
|
DEFAULT_wxUSE_THREADS=yes
|
||||||
|
|
||||||
@@ -947,9 +958,11 @@ else
|
|||||||
DEFAULT_wxUSE_UNICODE=no
|
DEFAULT_wxUSE_UNICODE=no
|
||||||
DEFAULT_wxUSE_WCSRTOMBS=no
|
DEFAULT_wxUSE_WCSRTOMBS=no
|
||||||
|
|
||||||
|
DEFAULT_wxUSE_IMAGE=yes
|
||||||
DEFAULT_wxUSE_GIF=yes
|
DEFAULT_wxUSE_GIF=yes
|
||||||
DEFAULT_wxUSE_PCX=yes
|
DEFAULT_wxUSE_PCX=yes
|
||||||
DEFAULT_wxUSE_PNM=yes
|
DEFAULT_wxUSE_PNM=yes
|
||||||
|
DEFAULT_wxUSE_XPM=yes
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl WX_ARG_WITH should be used to select whether an external package will be
|
dnl WX_ARG_WITH should be used to select whether an external package will be
|
||||||
@@ -1255,9 +1268,11 @@ dnl ---------------------------------------------------------------------------
|
|||||||
dnl support for image formats that do not rely on external library
|
dnl support for image formats that do not rely on external library
|
||||||
dnl ---------------------------------------------------------------------------
|
dnl ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
WX_ARG_ENABLE(image, [ --enable-image use wxImage class], wxUSE_IMAGE)
|
||||||
WX_ARG_ENABLE(gif, [ --enable-gif use gif images (GIF file format)], wxUSE_GIF)
|
WX_ARG_ENABLE(gif, [ --enable-gif use gif images (GIF file format)], wxUSE_GIF)
|
||||||
WX_ARG_ENABLE(pcx, [ --enable-pcx use pcx images (PCX file format)], wxUSE_PCX)
|
WX_ARG_ENABLE(pcx, [ --enable-pcx use pcx images (PCX file format)], wxUSE_PCX)
|
||||||
WX_ARG_ENABLE(pnm, [ --enable-pnm use pnm images (PNM file format)], wxUSE_PNM)
|
WX_ARG_ENABLE(pnm, [ --enable-pnm use pnm images (PNM file format)], wxUSE_PNM)
|
||||||
|
WX_ARG_ENABLE(pnm, [ --enable-xpm use xpm images (XPM file format)], wxUSE_XPM)
|
||||||
|
|
||||||
fi
|
fi
|
||||||
dnl for GUI only
|
dnl for GUI only
|
||||||
@@ -2090,7 +2105,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"
|
||||||
;;
|
;;
|
||||||
*-*-freebsd* | *-*-netbsd* )
|
*-*-freebsd* | *-*-openbsd* | *-*-netbsd* )
|
||||||
SHARED_LD="${CC} -shared -o"
|
SHARED_LD="${CC} -shared -o"
|
||||||
PIC_FLAG="-fPIC"
|
PIC_FLAG="-fPIC"
|
||||||
if test "$wxUSE_OPENGL" = "yes"; then
|
if test "$wxUSE_OPENGL" = "yes"; then
|
||||||
@@ -2111,6 +2126,8 @@ 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
|
||||||
|
dnl add the resources target
|
||||||
|
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"
|
||||||
@@ -2144,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}"
|
||||||
@@ -2222,10 +2239,7 @@ AC_CHECK_HEADERS(unistd.h)
|
|||||||
dnl defines HAVE_FCNTL_H
|
dnl defines HAVE_FCNTL_H
|
||||||
AC_CHECK_HEADERS(fcntl.h)
|
AC_CHECK_HEADERS(fcntl.h)
|
||||||
dnl defines HAVE_WCHAR_H
|
dnl defines HAVE_WCHAR_H
|
||||||
AC_CHECK_HEADERS(wchar.h, [
|
AC_CHECK_HEADERS(wchar.h)
|
||||||
AC_DEFINE(wxUSE_WCHAR_T)
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl defines HAVE_WCSTR_H
|
dnl defines HAVE_WCSTR_H
|
||||||
AC_CHECK_HEADERS(wcstr.h)
|
AC_CHECK_HEADERS(wcstr.h)
|
||||||
dnl defines HAVE_FNMATCH_H
|
dnl defines HAVE_FNMATCH_H
|
||||||
@@ -2257,6 +2271,22 @@ AC_TYPE_SIZE_T
|
|||||||
dnl defines uid_t and gid_t if not already defined
|
dnl defines uid_t and gid_t if not already defined
|
||||||
AC_TYPE_UID_T
|
AC_TYPE_UID_T
|
||||||
|
|
||||||
|
dnl check for wchar_t
|
||||||
|
AC_CACHE_CHECK([for wchar_t], wx_cv_type_wchar_t,
|
||||||
|
[
|
||||||
|
AC_TRY_COMPILE([#include <wchar.h>],
|
||||||
|
[
|
||||||
|
wchar_t wc, *ws;
|
||||||
|
wc = L'a';
|
||||||
|
ws = L"Hello, world!";
|
||||||
|
],
|
||||||
|
wx_cv_type_wchar_t=yes,
|
||||||
|
wx_cv_type_wchar_t=no)
|
||||||
|
])
|
||||||
|
if test "$wx_cv_type_wchar_t" = yes ; then
|
||||||
|
AC_DEFINE(wxUSE_WCHAR_T)
|
||||||
|
fi
|
||||||
|
|
||||||
dnl ---------------------------------------------------------------------------
|
dnl ---------------------------------------------------------------------------
|
||||||
dnl Checks for structures
|
dnl Checks for structures
|
||||||
dnl ---------------------------------------------------------------------------
|
dnl ---------------------------------------------------------------------------
|
||||||
@@ -2297,13 +2327,37 @@ dnl check the sizes of integral types (give some reasonable default values for
|
|||||||
dnl cross-compiling)
|
dnl cross-compiling)
|
||||||
dnl defines the size of certain types of variables in SIZEOF_<TYPE>
|
dnl defines the size of certain types of variables in SIZEOF_<TYPE>
|
||||||
AC_CHECK_SIZEOF(char, 1)
|
AC_CHECK_SIZEOF(char, 1)
|
||||||
AC_CHECK_SIZEOF(wchar_t, 4)
|
|
||||||
AC_CHECK_SIZEOF(short, 2)
|
AC_CHECK_SIZEOF(short, 2)
|
||||||
AC_CHECK_SIZEOF(int *, 4)
|
AC_CHECK_SIZEOF(int *, 4)
|
||||||
AC_CHECK_SIZEOF(int, 4)
|
AC_CHECK_SIZEOF(int, 4)
|
||||||
AC_CHECK_SIZEOF(long, 4)
|
AC_CHECK_SIZEOF(long, 4)
|
||||||
AC_CHECK_SIZEOF(long long, 0)
|
AC_CHECK_SIZEOF(long long, 0)
|
||||||
|
|
||||||
|
dnl we have to do it ourselves because SGI/Irix's stdio.h does not include
|
||||||
|
dnl wchar_t an AC_CHECK_SIZEOF only includes stdio.h
|
||||||
|
AC_CACHE_CHECK([size of wchar_t], wx_cv_sizeof_wchar_t,
|
||||||
|
[
|
||||||
|
AC_TRY_RUN(
|
||||||
|
[
|
||||||
|
#include <wchar.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
FILE *f=fopen("conftestval", "w");
|
||||||
|
if (!f) exit(1);
|
||||||
|
fprintf(f, "%i", sizeof(wchar_t));
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
],
|
||||||
|
wx_cv_sizeof_wchar_t=`cat conftestval`,
|
||||||
|
wx_cv_sizeof_wchar_t=0,
|
||||||
|
wx_cv_sizeof_wchar_t=4
|
||||||
|
)
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFINE_UNQUOTED(SIZEOF_WCHAR_T, $wx_cv_sizeof_wchar_t)
|
||||||
|
|
||||||
|
|
||||||
dnl for bytesex stuff (don't use AC_C_BIGENDIAN to allow cross-compiling)
|
dnl for bytesex stuff (don't use AC_C_BIGENDIAN to allow cross-compiling)
|
||||||
WX_C_BIGENDIAN
|
WX_C_BIGENDIAN
|
||||||
|
|
||||||
@@ -2334,8 +2388,6 @@ AC_CHECK_LIB(c, wcslen, [
|
|||||||
dnl check for vprintf/vsprintf() which are GNU extensions
|
dnl check for vprintf/vsprintf() which are GNU extensions
|
||||||
AC_FUNC_VPRINTF
|
AC_FUNC_VPRINTF
|
||||||
|
|
||||||
AC_LANG_SAVE
|
|
||||||
AC_LANG_CPLUSPLUS
|
|
||||||
|
|
||||||
dnl check for vsscanf() and vsnprintf() - on some platforms (Linux, glibc
|
dnl check for vsscanf() and vsnprintf() - on some platforms (Linux, glibc
|
||||||
dnl 2.1.1 for the first one, HP-UX for the second) it's available in the
|
dnl 2.1.1 for the first one, HP-UX for the second) it's available in the
|
||||||
@@ -2448,6 +2500,28 @@ AC_LANG_RESTORE
|
|||||||
dnl the following tests are for Unix(like) systems only
|
dnl the following tests are for Unix(like) systems only
|
||||||
if test "$TOOLKIT" != "MSW"; then
|
if test "$TOOLKIT" != "MSW"; then
|
||||||
|
|
||||||
|
dnl check for available version of iconv()
|
||||||
|
|
||||||
|
AC_LANG_SAVE
|
||||||
|
AC_LANG_CPLUSPLUS
|
||||||
|
AC_CACHE_CHECK([if iconv() takes char**], wx_cv_iconv_takes_char,
|
||||||
|
[
|
||||||
|
AC_TRY_COMPILE([#include <iconv.h>],
|
||||||
|
[
|
||||||
|
char **inbuf, **outbuf;
|
||||||
|
iconv_t cd;
|
||||||
|
size_t insz, outsz;
|
||||||
|
iconv(cd, inbuf, &insz, outbuf, &outsz);
|
||||||
|
],
|
||||||
|
wx_cv_iconv_takes_char=yes,
|
||||||
|
wx_cv_iconv_takes_char=no)
|
||||||
|
])
|
||||||
|
AC_LANG_RESTORE
|
||||||
|
if test "$wx_cv_iconv_takes_char" = yes ; then
|
||||||
|
AC_DEFINE(WX_ICONV_TAKES_CHAR)
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
dnl check for POSIX signals if we need them
|
dnl check for POSIX signals if we need them
|
||||||
if test "$wxUSE_ON_FATAL_EXCEPTION" = "yes" -a "$wxUSE_UNIX" = "yes"; then
|
if test "$wxUSE_ON_FATAL_EXCEPTION" = "yes" -a "$wxUSE_UNIX" = "yes"; then
|
||||||
AC_CHECK_FUNCS(sigaction)
|
AC_CHECK_FUNCS(sigaction)
|
||||||
@@ -2731,9 +2805,6 @@ if test "$wxUSE_THREADS" = "yes" ; then
|
|||||||
dnl defined, we do it by directly assigned
|
dnl defined, we do it by directly assigned
|
||||||
dnl PTHREAD_MUTEX_RECURSIVE_MUTEX_INITIALIZER_NP to attr
|
dnl PTHREAD_MUTEX_RECURSIVE_MUTEX_INITIALIZER_NP to attr
|
||||||
|
|
||||||
#ifdef HAVE_PTHREAD_MUTEXATTR_T
|
|
||||||
#elif defined(HAVE_PTHREAD_RECURSIVE_MUTEX_INITIALIZER)
|
|
||||||
|
|
||||||
AC_CACHE_CHECK([for pthread_mutexattr_t], wx_cv_type_pthread_mutexattr_t,
|
AC_CACHE_CHECK([for pthread_mutexattr_t], wx_cv_type_pthread_mutexattr_t,
|
||||||
[
|
[
|
||||||
AC_TRY_COMPILE([#include <pthread.h>],
|
AC_TRY_COMPILE([#include <pthread.h>],
|
||||||
@@ -2833,6 +2904,14 @@ if test "$wxUSE_MAC" = 1 ; then
|
|||||||
TOOLKIT_DEF="${TOOLKIT_DEF} -D__UNIX__ -D__POWERPC__ -DTARGET_CARBON"
|
TOOLKIT_DEF="${TOOLKIT_DEF} -D__UNIX__ -D__POWERPC__ -DTARGET_CARBON"
|
||||||
CFLAGS="${CFLAGS} -fno-common -fpascal-strings"
|
CFLAGS="${CFLAGS} -fno-common -fpascal-strings"
|
||||||
CPPFLAGS="${CPPFLAGS} -fno-common -fpascal-strings"
|
CPPFLAGS="${CPPFLAGS} -fno-common -fpascal-strings"
|
||||||
|
AC_CHECK_PROG(REZ, Rez, Rez, /Developer/Tools/Rez)
|
||||||
|
AC_CHECK_PROG(DEREZ, Derez, Derez, /Developer/Tools/Derez)
|
||||||
|
RESCOMP=${REZ}
|
||||||
|
REZFLAGS="-d __UNIX__ -useDF"
|
||||||
|
DEREZFLAGS="Carbon.r -useDF"
|
||||||
|
RESFLAGS="Carbon.r -t APPL"
|
||||||
|
LIBWXMACRES="\$(LIBWX_MACRES)"
|
||||||
|
LIBWXMACRESCOMP="\$(LIBWX_MACRESCOMP)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$wxUSE_CYGWIN" = 1 ; then
|
if test "$wxUSE_CYGWIN" = 1 ; then
|
||||||
@@ -3876,6 +3955,10 @@ if test "$wxUSE_VALIDATORS" = "yes"; then
|
|||||||
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS validate"
|
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS validate"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test "$wxUSE_IMAGE" = "yes" ; then
|
||||||
|
AC_DEFINE(wxUSE_IMAGE)
|
||||||
|
fi
|
||||||
|
|
||||||
if test "$wxUSE_GIF" = "yes" ; then
|
if test "$wxUSE_GIF" = "yes" ; then
|
||||||
AC_DEFINE(wxUSE_GIF)
|
AC_DEFINE(wxUSE_GIF)
|
||||||
fi
|
fi
|
||||||
@@ -3888,6 +3971,10 @@ if test "$wxUSE_PNM" = "yes" ; then
|
|||||||
AC_DEFINE(wxUSE_PNM)
|
AC_DEFINE(wxUSE_PNM)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test "$wxUSE_XPM" = "yes" ; then
|
||||||
|
AC_DEFINE(wxUSE_XPM)
|
||||||
|
fi
|
||||||
|
|
||||||
dnl ---------------------------------------------------------------------------
|
dnl ---------------------------------------------------------------------------
|
||||||
dnl get the string with OS info - used by wxGetOsDescription()
|
dnl get the string with OS info - used by wxGetOsDescription()
|
||||||
dnl ---------------------------------------------------------------------------
|
dnl ---------------------------------------------------------------------------
|
||||||
@@ -4064,6 +4151,13 @@ AC_SUBST(RCOUTPUTSWITCH)
|
|||||||
AC_SUBST(RESPROGRAM)
|
AC_SUBST(RESPROGRAM)
|
||||||
AC_SUBST(RESCOMP)
|
AC_SUBST(RESCOMP)
|
||||||
AC_SUBST(RESFLAGS)
|
AC_SUBST(RESFLAGS)
|
||||||
|
dnl additional for Mac OS X
|
||||||
|
AC_SUBST(REZ)
|
||||||
|
AC_SUBST(REZFLAGS)
|
||||||
|
AC_SUBST(DEREZ)
|
||||||
|
AC_SUBST(DEREZFLAGS)
|
||||||
|
AC_SUBST(LIBWXMACRES)
|
||||||
|
AC_SUBST(LIBWXMACRESCOMP)
|
||||||
|
|
||||||
dnl These seam to be missing
|
dnl These seam to be missing
|
||||||
AC_SUBST(DLLTOOL)
|
AC_SUBST(DLLTOOL)
|
||||||
|
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);
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
class WXDLLEXPORT wxBitmapXmlHandler : public wxXmlResourceHandler
|
class WXDLLEXPORT wxBitmapXmlHandler : public wxXmlResourceHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxBitmapXmlHandler();
|
wxBitmapXmlHandler();
|
||||||
virtual wxObject *DoCreateResource();
|
virtual wxObject *DoCreateResource();
|
||||||
virtual bool CanHandle(wxXmlNode *node);
|
virtual bool CanHandle(wxXmlNode *node);
|
||||||
@@ -28,7 +28,7 @@ class WXDLLEXPORT wxBitmapXmlHandler : public wxXmlResourceHandler
|
|||||||
|
|
||||||
class WXDLLEXPORT wxIconXmlHandler : public wxXmlResourceHandler
|
class WXDLLEXPORT wxIconXmlHandler : public wxXmlResourceHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxIconXmlHandler();
|
wxIconXmlHandler();
|
||||||
virtual wxObject *DoCreateResource();
|
virtual wxObject *DoCreateResource();
|
||||||
virtual bool CanHandle(wxXmlNode *node);
|
virtual bool CanHandle(wxXmlNode *node);
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
class WXDLLEXPORT wxBitmapButtonXmlHandler : public wxXmlResourceHandler
|
class WXDLLEXPORT wxBitmapButtonXmlHandler : public wxXmlResourceHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxBitmapButtonXmlHandler();
|
wxBitmapButtonXmlHandler();
|
||||||
virtual wxObject *DoCreateResource();
|
virtual wxObject *DoCreateResource();
|
||||||
virtual bool CanHandle(wxXmlNode *node);
|
virtual bool CanHandle(wxXmlNode *node);
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
class WXDLLEXPORT wxButtonXmlHandler : public wxXmlResourceHandler
|
class WXDLLEXPORT wxButtonXmlHandler : public wxXmlResourceHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxButtonXmlHandler();
|
wxButtonXmlHandler();
|
||||||
virtual wxObject *DoCreateResource();
|
virtual wxObject *DoCreateResource();
|
||||||
virtual bool CanHandle(wxXmlNode *node);
|
virtual bool CanHandle(wxXmlNode *node);
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
class WXDLLEXPORT wxCalendarCtrlXmlHandler : public wxXmlResourceHandler
|
class WXDLLEXPORT wxCalendarCtrlXmlHandler : public wxXmlResourceHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxCalendarCtrlXmlHandler();
|
wxCalendarCtrlXmlHandler();
|
||||||
virtual wxObject *DoCreateResource();
|
virtual wxObject *DoCreateResource();
|
||||||
virtual bool CanHandle(wxXmlNode *node);
|
virtual bool CanHandle(wxXmlNode *node);
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
class WXDLLEXPORT wxCheckBoxXmlHandler : public wxXmlResourceHandler
|
class WXDLLEXPORT wxCheckBoxXmlHandler : public wxXmlResourceHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxCheckBoxXmlHandler();
|
wxCheckBoxXmlHandler();
|
||||||
virtual wxObject *DoCreateResource();
|
virtual wxObject *DoCreateResource();
|
||||||
virtual bool CanHandle(wxXmlNode *node);
|
virtual bool CanHandle(wxXmlNode *node);
|
||||||
|
@@ -19,12 +19,12 @@
|
|||||||
|
|
||||||
class WXDLLEXPORT wxCheckListXmlHandler : public wxXmlResourceHandler
|
class WXDLLEXPORT wxCheckListXmlHandler : public wxXmlResourceHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxCheckListXmlHandler();
|
wxCheckListXmlHandler();
|
||||||
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;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -19,12 +19,12 @@
|
|||||||
|
|
||||||
class WXDLLEXPORT wxChoiceXmlHandler : public wxXmlResourceHandler
|
class WXDLLEXPORT wxChoiceXmlHandler : public wxXmlResourceHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxChoiceXmlHandler();
|
wxChoiceXmlHandler();
|
||||||
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;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -21,12 +21,12 @@
|
|||||||
|
|
||||||
class WXDLLEXPORT wxComboBoxXmlHandler : public wxXmlResourceHandler
|
class WXDLLEXPORT wxComboBoxXmlHandler : public wxXmlResourceHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxComboBoxXmlHandler();
|
wxComboBoxXmlHandler();
|
||||||
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;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
class WXDLLEXPORT wxDialogXmlHandler : public wxXmlResourceHandler
|
class WXDLLEXPORT wxDialogXmlHandler : public wxXmlResourceHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxDialogXmlHandler();
|
wxDialogXmlHandler();
|
||||||
virtual wxObject *DoCreateResource();
|
virtual wxObject *DoCreateResource();
|
||||||
virtual bool CanHandle(wxXmlNode *node);
|
virtual bool CanHandle(wxXmlNode *node);
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
class WXDLLEXPORT wxFrameXmlHandler : public wxXmlResourceHandler
|
class WXDLLEXPORT wxFrameXmlHandler : public wxXmlResourceHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxFrameXmlHandler();
|
wxFrameXmlHandler();
|
||||||
virtual wxObject *DoCreateResource();
|
virtual wxObject *DoCreateResource();
|
||||||
virtual bool CanHandle(wxXmlNode *node);
|
virtual bool CanHandle(wxXmlNode *node);
|
||||||
|
@@ -29,7 +29,7 @@ class WXDLLEXPORT wxGaugeXmlHandler : public wxXmlResourceHandler
|
|||||||
wxGAUGE_DEFAULT_RANGE = 100
|
wxGAUGE_DEFAULT_RANGE = 100
|
||||||
};
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxGaugeXmlHandler();
|
wxGaugeXmlHandler();
|
||||||
virtual wxObject *DoCreateResource();
|
virtual wxObject *DoCreateResource();
|
||||||
virtual bool CanHandle(wxXmlNode *node);
|
virtual bool CanHandle(wxXmlNode *node);
|
||||||
|
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
class WXDLLEXPORT wxHtmlWindowXmlHandler : public wxXmlResourceHandler
|
class WXDLLEXPORT wxHtmlWindowXmlHandler : public wxXmlResourceHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxHtmlWindowXmlHandler();
|
wxHtmlWindowXmlHandler();
|
||||||
virtual wxObject *DoCreateResource();
|
virtual wxObject *DoCreateResource();
|
||||||
virtual bool CanHandle(wxXmlNode *node);
|
virtual bool CanHandle(wxXmlNode *node);
|
||||||
|
@@ -21,12 +21,12 @@
|
|||||||
|
|
||||||
class WXDLLEXPORT wxListBoxXmlHandler : public wxXmlResourceHandler
|
class WXDLLEXPORT wxListBoxXmlHandler : public wxXmlResourceHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxListBoxXmlHandler();
|
wxListBoxXmlHandler();
|
||||||
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;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
class WXDLLEXPORT wxListCtrlXmlHandler : public wxXmlResourceHandler
|
class WXDLLEXPORT wxListCtrlXmlHandler : public wxXmlResourceHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxListCtrlXmlHandler();
|
wxListCtrlXmlHandler();
|
||||||
virtual wxObject *DoCreateResource();
|
virtual wxObject *DoCreateResource();
|
||||||
virtual bool CanHandle(wxXmlNode *node);
|
virtual bool CanHandle(wxXmlNode *node);
|
||||||
|
@@ -19,13 +19,13 @@
|
|||||||
|
|
||||||
class WXDLLEXPORT wxMenuXmlHandler : public wxXmlResourceHandler
|
class WXDLLEXPORT wxMenuXmlHandler : public wxXmlResourceHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxMenuXmlHandler();
|
wxMenuXmlHandler();
|
||||||
virtual wxObject *DoCreateResource();
|
virtual wxObject *DoCreateResource();
|
||||||
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
|
||||||
|
@@ -22,14 +22,14 @@ class WXDLLEXPORT wxNotebook;
|
|||||||
|
|
||||||
class WXDLLEXPORT wxNotebookXmlHandler : public wxXmlResourceHandler
|
class WXDLLEXPORT wxNotebookXmlHandler : public wxXmlResourceHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxNotebookXmlHandler();
|
wxNotebookXmlHandler();
|
||||||
virtual wxObject *DoCreateResource();
|
virtual wxObject *DoCreateResource();
|
||||||
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
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
class WXDLLEXPORT wxPanelXmlHandler : public wxXmlResourceHandler
|
class WXDLLEXPORT wxPanelXmlHandler : public wxXmlResourceHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxPanelXmlHandler();
|
wxPanelXmlHandler();
|
||||||
virtual wxObject *DoCreateResource();
|
virtual wxObject *DoCreateResource();
|
||||||
virtual bool CanHandle(wxXmlNode *node);
|
virtual bool CanHandle(wxXmlNode *node);
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
class WXDLLEXPORT wxRadioButtonXmlHandler : public wxXmlResourceHandler
|
class WXDLLEXPORT wxRadioButtonXmlHandler : public wxXmlResourceHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxRadioButtonXmlHandler();
|
wxRadioButtonXmlHandler();
|
||||||
virtual wxObject *DoCreateResource();
|
virtual wxObject *DoCreateResource();
|
||||||
virtual bool CanHandle(wxXmlNode *node);
|
virtual bool CanHandle(wxXmlNode *node);
|
||||||
|
@@ -21,12 +21,12 @@
|
|||||||
|
|
||||||
class WXDLLEXPORT wxRadioBoxXmlHandler : public wxXmlResourceHandler
|
class WXDLLEXPORT wxRadioBoxXmlHandler : public wxXmlResourceHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxRadioBoxXmlHandler();
|
wxRadioBoxXmlHandler();
|
||||||
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;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -29,7 +29,7 @@ class WXDLLEXPORT wxScrollBarXmlHandler : public wxXmlResourceHandler
|
|||||||
wxSL_DEFAULT_MAX = 100
|
wxSL_DEFAULT_MAX = 100
|
||||||
};
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxScrollBarXmlHandler();
|
wxScrollBarXmlHandler();
|
||||||
virtual wxObject *DoCreateResource();
|
virtual wxObject *DoCreateResource();
|
||||||
virtual bool CanHandle(wxXmlNode *node);
|
virtual bool CanHandle(wxXmlNode *node);
|
||||||
|
@@ -22,14 +22,14 @@ class WXDLLEXPORT wxSizer;
|
|||||||
|
|
||||||
class WXDLLEXPORT wxSizerXmlHandler : public wxXmlResourceHandler
|
class WXDLLEXPORT wxSizerXmlHandler : public wxXmlResourceHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxSizerXmlHandler();
|
wxSizerXmlHandler();
|
||||||
virtual wxObject *DoCreateResource();
|
virtual wxObject *DoCreateResource();
|
||||||
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,7 +29,7 @@ class WXDLLEXPORT wxSliderXmlHandler : public wxXmlResourceHandler
|
|||||||
wxSL_DEFAULT_MAX = 100
|
wxSL_DEFAULT_MAX = 100
|
||||||
};
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxSliderXmlHandler();
|
wxSliderXmlHandler();
|
||||||
virtual wxObject *DoCreateResource();
|
virtual wxObject *DoCreateResource();
|
||||||
virtual bool CanHandle(wxXmlNode *node);
|
virtual bool CanHandle(wxXmlNode *node);
|
||||||
|
@@ -28,7 +28,7 @@ class WXDLLEXPORT wxSpinButtonXmlHandler : public wxXmlResourceHandler
|
|||||||
wxSP_DEFAULT_MAX = 100
|
wxSP_DEFAULT_MAX = 100
|
||||||
};
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxSpinButtonXmlHandler();
|
wxSpinButtonXmlHandler();
|
||||||
virtual wxObject *DoCreateResource();
|
virtual wxObject *DoCreateResource();
|
||||||
virtual bool CanHandle(wxXmlNode *node);
|
virtual bool CanHandle(wxXmlNode *node);
|
||||||
@@ -45,7 +45,7 @@ class WXDLLEXPORT wxSpinCtrlXmlHandler : public wxXmlResourceHandler
|
|||||||
wxSP_DEFAULT_MAX = 100
|
wxSP_DEFAULT_MAX = 100
|
||||||
};
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxSpinCtrlXmlHandler();
|
wxSpinCtrlXmlHandler();
|
||||||
virtual wxObject *DoCreateResource();
|
virtual wxObject *DoCreateResource();
|
||||||
virtual bool CanHandle(wxXmlNode *node);
|
virtual bool CanHandle(wxXmlNode *node);
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
class WXDLLEXPORT wxStaticBitmapXmlHandler : public wxXmlResourceHandler
|
class WXDLLEXPORT wxStaticBitmapXmlHandler : public wxXmlResourceHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxStaticBitmapXmlHandler();
|
wxStaticBitmapXmlHandler();
|
||||||
virtual wxObject *DoCreateResource();
|
virtual wxObject *DoCreateResource();
|
||||||
virtual bool CanHandle(wxXmlNode *node);
|
virtual bool CanHandle(wxXmlNode *node);
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
class WXDLLEXPORT wxStaticBoxXmlHandler : public wxXmlResourceHandler
|
class WXDLLEXPORT wxStaticBoxXmlHandler : public wxXmlResourceHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxStaticBoxXmlHandler();
|
wxStaticBoxXmlHandler();
|
||||||
virtual wxObject *DoCreateResource();
|
virtual wxObject *DoCreateResource();
|
||||||
virtual bool CanHandle(wxXmlNode *node);
|
virtual bool CanHandle(wxXmlNode *node);
|
||||||
|
@@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
class WXDLLEXPORT wxStaticLineXmlHandler : public wxXmlResourceHandler
|
class WXDLLEXPORT wxStaticLineXmlHandler : public wxXmlResourceHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxStaticLineXmlHandler();
|
wxStaticLineXmlHandler();
|
||||||
virtual wxObject *DoCreateResource();
|
virtual wxObject *DoCreateResource();
|
||||||
virtual bool CanHandle(wxXmlNode *node);
|
virtual bool CanHandle(wxXmlNode *node);
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
class WXDLLEXPORT wxStaticTextXmlHandler : public wxXmlResourceHandler
|
class WXDLLEXPORT wxStaticTextXmlHandler : public wxXmlResourceHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxStaticTextXmlHandler();
|
wxStaticTextXmlHandler();
|
||||||
virtual wxObject *DoCreateResource();
|
virtual wxObject *DoCreateResource();
|
||||||
virtual bool CanHandle(wxXmlNode *node);
|
virtual bool CanHandle(wxXmlNode *node);
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
class WXDLLEXPORT wxTextCtrlXmlHandler : public wxXmlResourceHandler
|
class WXDLLEXPORT wxTextCtrlXmlHandler : public wxXmlResourceHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxTextCtrlXmlHandler();
|
wxTextCtrlXmlHandler();
|
||||||
virtual wxObject *DoCreateResource();
|
virtual wxObject *DoCreateResource();
|
||||||
virtual bool CanHandle(wxXmlNode *node);
|
virtual bool CanHandle(wxXmlNode *node);
|
||||||
|
@@ -23,14 +23,14 @@ class WXDLLEXPORT wxToolBar;
|
|||||||
|
|
||||||
class WXDLLEXPORT wxToolBarXmlHandler : public wxXmlResourceHandler
|
class WXDLLEXPORT wxToolBarXmlHandler : public wxXmlResourceHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxToolBarXmlHandler();
|
wxToolBarXmlHandler();
|
||||||
virtual wxObject *DoCreateResource();
|
virtual wxObject *DoCreateResource();
|
||||||
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
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
class WXDLLEXPORT wxTreeCtrlXmlHandler : public wxXmlResourceHandler
|
class WXDLLEXPORT wxTreeCtrlXmlHandler : public wxXmlResourceHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxTreeCtrlXmlHandler();
|
wxTreeCtrlXmlHandler();
|
||||||
virtual wxObject *DoCreateResource();
|
virtual wxObject *DoCreateResource();
|
||||||
virtual bool CanHandle(wxXmlNode *node);
|
virtual bool CanHandle(wxXmlNode *node);
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
class WXDLLEXPORT wxUnknownWidgetXmlHandler : public wxXmlResourceHandler
|
class WXDLLEXPORT wxUnknownWidgetXmlHandler : public wxXmlResourceHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxUnknownWidgetXmlHandler();
|
wxUnknownWidgetXmlHandler();
|
||||||
virtual wxObject *DoCreateResource();
|
virtual wxObject *DoCreateResource();
|
||||||
virtual bool CanHandle(wxXmlNode *node);
|
virtual bool CanHandle(wxXmlNode *node);
|
||||||
|
@@ -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
|
||||||
};
|
};
|
||||||
@@ -66,24 +67,25 @@ 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);
|
||||||
};
|
};
|
||||||
@@ -167,11 +177,13 @@ 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,9 +20,33 @@
|
|||||||
#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:
|
||||||
wxXmlIOHandlerBin() {}
|
wxXmlIOHandlerBin() {}
|
||||||
|
|
||||||
virtual wxXmlIOType GetType() { return wxXML_IO_BIN; }
|
virtual wxXmlIOType GetType() { return wxXML_IO_BIN; }
|
||||||
@@ -32,7 +56,7 @@ class WXDLLEXPORT wxXmlIOHandlerBin : public wxXmlIOHandler
|
|||||||
virtual bool Load(wxInputStream& stream, wxXmlDocument& doc);
|
virtual bool Load(wxInputStream& stream, wxXmlDocument& doc);
|
||||||
virtual bool Save(wxOutputStream& stream, const wxXmlDocument& doc);
|
virtual bool Save(wxOutputStream& stream, const wxXmlDocument& doc);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
wxString ReadHeader(wxInputStream& stream);
|
wxString ReadHeader(wxInputStream& stream);
|
||||||
void WriteHeader(wxOutputStream& stream, const wxString& header);
|
void WriteHeader(wxOutputStream& stream, const wxString& header);
|
||||||
};
|
};
|
||||||
@@ -43,7 +67,7 @@ class WXDLLEXPORT wxXmlIOHandlerBin : public wxXmlIOHandler
|
|||||||
|
|
||||||
class WXDLLEXPORT wxXmlIOHandlerBinZ : public wxXmlIOHandlerBin
|
class WXDLLEXPORT wxXmlIOHandlerBinZ : public wxXmlIOHandlerBin
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxXmlIOHandlerBinZ() {}
|
wxXmlIOHandlerBinZ() {}
|
||||||
|
|
||||||
virtual wxXmlIOType GetType() { return wxXML_IO_BINZ; }
|
virtual wxXmlIOType GetType() { return wxXML_IO_BINZ; }
|
||||||
@@ -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,10 +37,33 @@ 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
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxXmlResourceDataRecord() : Doc(NULL), Time(wxDateTime::Now()) {}
|
wxXmlResourceDataRecord() : Doc(NULL), Time(wxDateTime::Now()) {}
|
||||||
~wxXmlResourceDataRecord() {delete Doc;}
|
~wxXmlResourceDataRecord() {delete Doc;}
|
||||||
|
|
||||||
@@ -57,7 +80,7 @@ WX_DECLARE_EXPORTED_OBJARRAY(wxXmlResourceDataRecord, wxXmlResourceDataRecords);
|
|||||||
|
|
||||||
class WXDLLEXPORT wxXmlResource : public wxObject
|
class WXDLLEXPORT wxXmlResource : public wxObject
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// Ctor. If use_locale is TRUE, translatable strings are
|
// Ctor. If use_locale is TRUE, translatable strings are
|
||||||
// translated via _(). You can disable it by passing use_locale=FALSE
|
// translated via _(). You can disable it by passing use_locale=FALSE
|
||||||
// (for example if you provide resource file for each locale)
|
// (for example if you provide resource file for each locale)
|
||||||
@@ -116,12 +139,26 @@ 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);
|
||||||
|
|
||||||
protected:
|
// 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:
|
||||||
// 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.
|
||||||
void UpdateResources();
|
void UpdateResources();
|
||||||
@@ -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;
|
||||||
@@ -184,7 +223,7 @@ extern wxXmlResource *wxTheXmlResource;
|
|||||||
|
|
||||||
class WXDLLEXPORT wxXmlResourceHandler : public wxObject
|
class WXDLLEXPORT wxXmlResourceHandler : public wxObject
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxXmlResourceHandler();
|
wxXmlResourceHandler();
|
||||||
virtual ~wxXmlResourceHandler() {}
|
virtual ~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
|
||||||
|
@@ -292,7 +292,8 @@ void MyCanvas::OnLeftClick(double x, double y, int keys)
|
|||||||
}
|
}
|
||||||
if (info)
|
if (info)
|
||||||
{
|
{
|
||||||
view->GetDocument()->GetCommandProcessor()->Submit(new DiagramCommand(info->GetClassName(), OGLEDIT_ADD_SHAPE, (DiagramDocument *)view->GetDocument(), info,
|
view->GetDocument()->GetCommandProcessor()->Submit(
|
||||||
|
new DiagramCommand((char*) info->GetClassName(), OGLEDIT_ADD_SHAPE, (DiagramDocument *)view->GetDocument(), info,
|
||||||
x, y));
|
x, y));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +1,5 @@
|
|||||||
# Microsoft Developer Studio Project File - Name="StudioVC" - Package Owner=<4>
|
# Microsoft Developer Studio Project File - Name="StudioVC" - Package Owner=<4>
|
||||||
# Microsoft Developer Studio Generated Build File, Format Version 5.00
|
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||||
# (Actually, generated by MakeProject, (c) Julian Smart, 1998)
|
|
||||||
# ** DO NOT EDIT **
|
# ** DO NOT EDIT **
|
||||||
|
|
||||||
# TARGTYPE "Win32 (x86) Application" 0x0101
|
# TARGTYPE "Win32 (x86) Application" 0x0101
|
||||||
@@ -25,6 +24,7 @@ CFG=StudioVC - Win32 Debug
|
|||||||
!MESSAGE
|
!MESSAGE
|
||||||
|
|
||||||
# Begin Project
|
# Begin Project
|
||||||
|
# PROP AllowPerConfigDependencies 0
|
||||||
# PROP Scc_ProjName ""
|
# PROP Scc_ProjName ""
|
||||||
# PROP Scc_LocalPath ""
|
# PROP Scc_LocalPath ""
|
||||||
CPP=cl.exe
|
CPP=cl.exe
|
||||||
@@ -47,8 +47,8 @@ RSC=rc.exe
|
|||||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
|
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
|
||||||
# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../../include" /I "../../../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c
|
# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../../include" /I "../../../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c
|
||||||
# SUBTRACT CPP /YX
|
# SUBTRACT CPP /YX
|
||||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
|
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
|
||||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
|
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
|
||||||
# ADD BASE RSC /l 0x809 /d "NDEBUG"
|
# ADD BASE RSC /l 0x809 /d "NDEBUG"
|
||||||
# ADD RSC /l 0x809 /d "NDEBUG"
|
# ADD RSC /l 0x809 /d "NDEBUG"
|
||||||
BSC32=bscmake.exe
|
BSC32=bscmake.exe
|
||||||
@@ -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/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"
|
||||||
|
|
||||||
@@ -72,9 +72,9 @@ LINK32=link.exe
|
|||||||
# PROP Ignore_Export_Lib 0
|
# PROP Ignore_Export_Lib 0
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
|
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
|
||||||
# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../../../../include" /I "../../../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c
|
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../../include" /I "../../../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c
|
||||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
|
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
|
||||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
|
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
|
||||||
# ADD BASE RSC /l 0x809 /d "_DEBUG"
|
# ADD BASE RSC /l 0x809 /d "_DEBUG"
|
||||||
# ADD RSC /l 0x809 /d "_DEBUG"
|
# ADD RSC /l 0x809 /d "_DEBUG"
|
||||||
BSC32=bscmake.exe
|
BSC32=bscmake.exe
|
||||||
@@ -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/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"
|
||||||
|
|
||||||
@@ -98,9 +98,9 @@ LINK32=link.exe
|
|||||||
# PROP Ignore_Export_Lib 0
|
# PROP Ignore_Export_Lib 0
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
|
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
|
||||||
# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../../../../include" /I "../../../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c
|
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../../include" /I "../../../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c
|
||||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
|
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
|
||||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
|
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
|
||||||
# ADD BASE RSC /l 0x809 /d "_DEBUG"
|
# ADD BASE RSC /l 0x809 /d "_DEBUG"
|
||||||
# ADD RSC /l 0x809 /d "_DEBUG"
|
# ADD RSC /l 0x809 /d "_DEBUG"
|
||||||
BSC32=bscmake.exe
|
BSC32=bscmake.exe
|
||||||
@@ -126,8 +126,8 @@ LINK32=link.exe
|
|||||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
|
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
|
||||||
# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../../include" /I "../../../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c
|
# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../../include" /I "../../../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c
|
||||||
# SUBTRACT CPP /YX
|
# SUBTRACT CPP /YX
|
||||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
|
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
|
||||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
|
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
|
||||||
# ADD BASE RSC /l 0x809 /d "NDEBUG"
|
# ADD BASE RSC /l 0x809 /d "NDEBUG"
|
||||||
# ADD RSC /l 0x809 /d "NDEBUG"
|
# ADD RSC /l 0x809 /d "NDEBUG"
|
||||||
BSC32=bscmake.exe
|
BSC32=bscmake.exe
|
||||||
@@ -147,7 +147,7 @@ LINK32=link.exe
|
|||||||
# Name "StudioVC - Win32 Release DLL"
|
# Name "StudioVC - Win32 Release DLL"
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\studio.cpp
|
SOURCE=.\cspalette.cpp
|
||||||
|
|
||||||
!IF "$(CFG)" == "StudioVC - Win32 Release"
|
!IF "$(CFG)" == "StudioVC - Win32 Release"
|
||||||
|
|
||||||
@@ -167,7 +167,11 @@ SOURCE=.\studio.cpp
|
|||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\cspalette.cpp
|
SOURCE=.\cspalette.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\csprint.cpp
|
||||||
|
|
||||||
!IF "$(CFG)" == "StudioVC - Win32 Release"
|
!IF "$(CFG)" == "StudioVC - Win32 Release"
|
||||||
|
|
||||||
@@ -207,23 +211,7 @@ SOURCE=.\dialogs.cpp
|
|||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\view.cpp
|
SOURCE=.\dialogs.h
|
||||||
|
|
||||||
!IF "$(CFG)" == "StudioVC - Win32 Release"
|
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "StudioVC - Win32 Debug"
|
|
||||||
|
|
||||||
# SUBTRACT CPP /YX /Yc /Yu
|
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "StudioVC - Win32 Debug DLL"
|
|
||||||
|
|
||||||
# SUBTRACT BASE CPP /YX /Yc /Yu
|
|
||||||
# SUBTRACT CPP /YX /Yc /Yu
|
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "StudioVC - Win32 Release DLL"
|
|
||||||
|
|
||||||
!ENDIF
|
|
||||||
|
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
@@ -247,6 +235,10 @@ SOURCE=.\doc.cpp
|
|||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\doc.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\mainfrm.cpp
|
SOURCE=.\mainfrm.cpp
|
||||||
|
|
||||||
!IF "$(CFG)" == "StudioVC - Win32 Release"
|
!IF "$(CFG)" == "StudioVC - Win32 Release"
|
||||||
@@ -267,6 +259,10 @@ SOURCE=.\mainfrm.cpp
|
|||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\mainfrm.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\project.cpp
|
SOURCE=.\project.cpp
|
||||||
|
|
||||||
!IF "$(CFG)" == "StudioVC - Win32 Release"
|
!IF "$(CFG)" == "StudioVC - Win32 Release"
|
||||||
@@ -287,6 +283,10 @@ SOURCE=.\project.cpp
|
|||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\project.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\shapes.cpp
|
SOURCE=.\shapes.cpp
|
||||||
|
|
||||||
!IF "$(CFG)" == "StudioVC - Win32 Release"
|
!IF "$(CFG)" == "StudioVC - Win32 Release"
|
||||||
@@ -307,6 +307,40 @@ SOURCE=.\shapes.cpp
|
|||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\shapes.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\studio.cpp
|
||||||
|
|
||||||
|
!IF "$(CFG)" == "StudioVC - Win32 Release"
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "StudioVC - Win32 Debug"
|
||||||
|
|
||||||
|
# SUBTRACT CPP /YX /Yc /Yu
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "StudioVC - Win32 Debug DLL"
|
||||||
|
|
||||||
|
# SUBTRACT BASE CPP /YX /Yc /Yu
|
||||||
|
# SUBTRACT CPP /YX /Yc /Yu
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "StudioVC - Win32 Release DLL"
|
||||||
|
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\studio.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\studio.rc
|
||||||
|
# ADD BASE RSC /l 0x809
|
||||||
|
# ADD RSC /l 0x809 /i "../../../../include" /i "../../../../contrib/include"
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\symbols.cpp
|
SOURCE=.\symbols.cpp
|
||||||
|
|
||||||
!IF "$(CFG)" == "StudioVC - Win32 Release"
|
!IF "$(CFG)" == "StudioVC - Win32 Release"
|
||||||
@@ -327,67 +361,11 @@ SOURCE=.\symbols.cpp
|
|||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\csprint.cpp
|
SOURCE=.\symbols.h
|
||||||
|
|
||||||
!IF "$(CFG)" == "StudioVC - Win32 Release"
|
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "StudioVC - Win32 Debug"
|
|
||||||
|
|
||||||
# SUBTRACT CPP /YX /Yc /Yu
|
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "StudioVC - Win32 Debug DLL"
|
|
||||||
|
|
||||||
# SUBTRACT BASE CPP /YX /Yc /Yu
|
|
||||||
# SUBTRACT CPP /YX /Yc /Yu
|
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "StudioVC - Win32 Release DLL"
|
|
||||||
|
|
||||||
!ENDIF
|
|
||||||
|
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\studio.h
|
SOURCE=.\view.cpp
|
||||||
|
|
||||||
!IF "$(CFG)" == "StudioVC - Win32 Release"
|
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "StudioVC - Win32 Debug"
|
|
||||||
|
|
||||||
# SUBTRACT CPP /YX /Yc /Yu
|
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "StudioVC - Win32 Debug DLL"
|
|
||||||
|
|
||||||
# SUBTRACT BASE CPP /YX /Yc /Yu
|
|
||||||
# SUBTRACT CPP /YX /Yc /Yu
|
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "StudioVC - Win32 Release DLL"
|
|
||||||
|
|
||||||
!ENDIF
|
|
||||||
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\cspalette.h
|
|
||||||
|
|
||||||
!IF "$(CFG)" == "StudioVC - Win32 Release"
|
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "StudioVC - Win32 Debug"
|
|
||||||
|
|
||||||
# SUBTRACT CPP /YX /Yc /Yu
|
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "StudioVC - Win32 Debug DLL"
|
|
||||||
|
|
||||||
# SUBTRACT BASE CPP /YX /Yc /Yu
|
|
||||||
# SUBTRACT CPP /YX /Yc /Yu
|
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "StudioVC - Win32 Release DLL"
|
|
||||||
|
|
||||||
!ENDIF
|
|
||||||
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\dialogs.h
|
|
||||||
|
|
||||||
!IF "$(CFG)" == "StudioVC - Win32 Release"
|
!IF "$(CFG)" == "StudioVC - Win32 Release"
|
||||||
|
|
||||||
@@ -408,128 +386,6 @@ SOURCE=.\dialogs.h
|
|||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\view.h
|
SOURCE=.\view.h
|
||||||
|
|
||||||
!IF "$(CFG)" == "StudioVC - Win32 Release"
|
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "StudioVC - Win32 Debug"
|
|
||||||
|
|
||||||
# SUBTRACT CPP /YX /Yc /Yu
|
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "StudioVC - Win32 Debug DLL"
|
|
||||||
|
|
||||||
# SUBTRACT BASE CPP /YX /Yc /Yu
|
|
||||||
# SUBTRACT CPP /YX /Yc /Yu
|
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "StudioVC - Win32 Release DLL"
|
|
||||||
|
|
||||||
!ENDIF
|
|
||||||
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\doc.h
|
|
||||||
|
|
||||||
!IF "$(CFG)" == "StudioVC - Win32 Release"
|
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "StudioVC - Win32 Debug"
|
|
||||||
|
|
||||||
# SUBTRACT CPP /YX /Yc /Yu
|
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "StudioVC - Win32 Debug DLL"
|
|
||||||
|
|
||||||
# SUBTRACT BASE CPP /YX /Yc /Yu
|
|
||||||
# SUBTRACT CPP /YX /Yc /Yu
|
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "StudioVC - Win32 Release DLL"
|
|
||||||
|
|
||||||
!ENDIF
|
|
||||||
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\mainfrm.h
|
|
||||||
|
|
||||||
!IF "$(CFG)" == "StudioVC - Win32 Release"
|
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "StudioVC - Win32 Debug"
|
|
||||||
|
|
||||||
# SUBTRACT CPP /YX /Yc /Yu
|
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "StudioVC - Win32 Debug DLL"
|
|
||||||
|
|
||||||
# SUBTRACT BASE CPP /YX /Yc /Yu
|
|
||||||
# SUBTRACT CPP /YX /Yc /Yu
|
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "StudioVC - Win32 Release DLL"
|
|
||||||
|
|
||||||
!ENDIF
|
|
||||||
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\project.h
|
|
||||||
|
|
||||||
!IF "$(CFG)" == "StudioVC - Win32 Release"
|
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "StudioVC - Win32 Debug"
|
|
||||||
|
|
||||||
# SUBTRACT CPP /YX /Yc /Yu
|
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "StudioVC - Win32 Debug DLL"
|
|
||||||
|
|
||||||
# SUBTRACT BASE CPP /YX /Yc /Yu
|
|
||||||
# SUBTRACT CPP /YX /Yc /Yu
|
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "StudioVC - Win32 Release DLL"
|
|
||||||
|
|
||||||
!ENDIF
|
|
||||||
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\shapes.h
|
|
||||||
|
|
||||||
!IF "$(CFG)" == "StudioVC - Win32 Release"
|
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "StudioVC - Win32 Debug"
|
|
||||||
|
|
||||||
# SUBTRACT CPP /YX /Yc /Yu
|
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "StudioVC - Win32 Debug DLL"
|
|
||||||
|
|
||||||
# SUBTRACT BASE CPP /YX /Yc /Yu
|
|
||||||
# SUBTRACT CPP /YX /Yc /Yu
|
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "StudioVC - Win32 Release DLL"
|
|
||||||
|
|
||||||
!ENDIF
|
|
||||||
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\symbols.h
|
|
||||||
|
|
||||||
!IF "$(CFG)" == "StudioVC - Win32 Release"
|
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "StudioVC - Win32 Debug"
|
|
||||||
|
|
||||||
# SUBTRACT CPP /YX /Yc /Yu
|
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "StudioVC - Win32 Debug DLL"
|
|
||||||
|
|
||||||
# SUBTRACT BASE CPP /YX /Yc /Yu
|
|
||||||
# SUBTRACT CPP /YX /Yc /Yu
|
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "StudioVC - Win32 Release DLL"
|
|
||||||
|
|
||||||
!ENDIF
|
|
||||||
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\studio.rc
|
|
||||||
# ADD BASE RSC /l 0x809
|
|
||||||
# ADD RSC /l 0x809 /i "../../../../include" /i "../../../../contrib/include"
|
|
||||||
# End Source File
|
# End Source File
|
||||||
# End Target
|
# End Target
|
||||||
# End Project
|
# End Project
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
Microsoft Developer Studio Workspace File, Format Version 5.00
|
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
@@ -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
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user