Compare commits
1 Commits
wxPy_2_3_2
...
v2.2.0
Author | SHA1 | Date | |
---|---|---|---|
|
4a91d93c0b |
@@ -37,17 +37,8 @@ base
|
||||
gtk
|
||||
motif
|
||||
win32
|
||||
univ
|
||||
univ-debug
|
||||
univ-release
|
||||
base-debug
|
||||
gtk-debug
|
||||
motif-debug
|
||||
win32-debug
|
||||
base-release
|
||||
gtk-release
|
||||
motif-release
|
||||
win32-release
|
||||
*tags
|
||||
log
|
||||
univtags.cmd
|
||||
|
34
BuildCVS.txt
34
BuildCVS.txt
@@ -2,9 +2,6 @@
|
||||
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
|
||||
----------------------------------------
|
||||
|
||||
@@ -118,38 +115,9 @@ ftp server at ftp://sourceware.cygnus.com/pub/cygwin/.
|
||||
Of course, you can also build the library using plain makefiles (see
|
||||
section I).
|
||||
|
||||
IV) Classic MacOS using CodeWarrior (eg MacOS 8.x/9.x)
|
||||
V) MacOS
|
||||
----------------------------------------
|
||||
|
||||
Refer to the readme.txt and install.txt files in docs/mac to build
|
||||
wxWindows under Classic Mac OS using CodeWarrior.
|
||||
|
||||
If you are checking out the CVS sources using cvs under Mac OS X and
|
||||
compiling under Classic Mac OS, make sure that all text files have a
|
||||
Mac OS type of 'TEXT' otherwise CodeWarrior may ignore them. Checking
|
||||
out the CVS sources using cvs under Mac OS X creates untyped files
|
||||
which can lead to compialtion errors under CodeWarrior which are hard
|
||||
to track down.
|
||||
|
||||
V) MacOS X using configure and the Developer Tools
|
||||
----------------------------------------
|
||||
|
||||
You need to have the Developer Tools installed. If this is not the case,
|
||||
you will need to register at the Apple Developer web site (this is a free
|
||||
registration) in order to download the Developer Tools installer.
|
||||
|
||||
In order to create configure, you need to have the
|
||||
GNU autoconf package (version 2.13 or 2.14) installed
|
||||
on your system and type run "autoconf" in the base
|
||||
directory (or run the autogen.sh script in the same
|
||||
directory, which just calls autoconf).
|
||||
|
||||
-> type: mkdir macbuild
|
||||
-> type: cd macbuild
|
||||
-> type: ../configure --with-mac
|
||||
or type: ../configure
|
||||
-> type: make
|
||||
|
||||
VI) OS/2
|
||||
----------------------------------------
|
||||
|
||||
|
316
Makefile.in
316
Makefile.in
@@ -19,39 +19,36 @@ include ./src/make.env
|
||||
.SUFFIXES: .o .cpp .c .cxx
|
||||
|
||||
.c.o :
|
||||
$(CCC) -c @DEP_INFO_FLAGS@ $(CFLAGS) $(PICFLAGS) @WXMSW_DLL_DEFINES@ -o $@ $<
|
||||
$(CCC) -c @DEP_INFO_FLAGS@ $(CFLAGS) $(PICFLAGS) -o $@ $<
|
||||
|
||||
.cpp.o :
|
||||
$(CC) -c @DEP_INFO_FLAGS@ $(CXXFLAGS) $(PICFLAGS) @WXMSW_DLL_DEFINES@ -o $@ $<
|
||||
$(CC) -c @DEP_INFO_FLAGS@ $(CPPFLAGS) $(PICFLAGS) -o $@ $<
|
||||
|
||||
.cxx.o :
|
||||
$(CC) -c @DEP_INFO_FLAGS@ $(CXXFLAGS) $(PICFLAGS) @WXMSW_DLL_DEFINES@ -o $@ $<
|
||||
$(CC) -c @DEP_INFO_FLAGS@ $(CPPFLAGS) $(PICFLAGS) -o $@ $<
|
||||
|
||||
########################### Paths #################################
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
|
||||
VP1 = @TOOLKIT_VPATH@
|
||||
VP2 = @top_srcdir@/src/common
|
||||
VP3 = @top_srcdir@/src/generic
|
||||
VP4 = @top_srcdir@/src/unix
|
||||
VP5 = @top_srcdir@/src/html
|
||||
VP6 = @top_srcdir@/src/png
|
||||
VP7 = @top_srcdir@/src/jpeg
|
||||
VP8 = @top_srcdir@/src/tiff
|
||||
VP9 = @top_srcdir@/src/zlib
|
||||
VPA = @top_srcdir@/src/regex
|
||||
VP10 = @top_srcdir@/src/iodbc
|
||||
VP11 = @top_srcdir@/src/msw/ole
|
||||
VP12 = $(FTVP01)@PATH_IFS@$(FTVP02)@PATH_IFS@$(FTVP03)@PATH_IFS@$(FTVP04)@PATH_IFS@$(FTVP05)@PATH_IFS@$(FTVP06)@PATH_IFS@$(FTVP07)@PATH_IFS@$(FTVP08)@PATH_IFS@
|
||||
VP13 = $(FTVP09)@PATH_IFS@$(FTVP10)@PATH_IFS@$(FTVP11)@PATH_IFS@$(FTVP12)@PATH_IFS@$(FTVP13)@PATH_IFS@$(FTVP14)@PATH_IFS@$(FTVP15)@PATH_IFS@
|
||||
VP1 = @top_srcdir@/src/common
|
||||
VP2 = @top_srcdir@/src/@TOOLKIT_DIR@
|
||||
VP3 = @top_srcdir@/src/motif/xmcombo
|
||||
VP4 = @top_srcdir@/src/generic
|
||||
VP5 = @top_srcdir@/src/unix
|
||||
VP6 = @top_srcdir@/src/html
|
||||
VP7 = @top_srcdir@/src/png
|
||||
VP8 = @top_srcdir@/src/jpeg
|
||||
VP9 = @top_srcdir@/src/tiff
|
||||
VP10 = @top_srcdir@/src/zlib
|
||||
VP11 = @top_srcdir@/src/iodbc
|
||||
|
||||
# the comment at the end of the next line is needed because otherwise autoconf
|
||||
# would remove this line completely - it contains a built-in hack to remove
|
||||
# any VPATH assignment not containing ':'
|
||||
VPATH = $(VP1)@PATH_IFS@$(VP2)@PATH_IFS@$(VP3)@PATH_IFS@$(VP4)@PATH_IFS@$(VP5)@PATH_IFS@$(VP6)@PATH_IFS@$(VP7)@PATH_IFS@$(VP8)@PATH_IFS@$(VP9)@PATH_IFS@$(VPA)@PATH_IFS@$(VP10)@PATH_IFS@$(VP11)@PATH_IFS@$(VP12)@PATH_IFS@$(VP13) # ':' for autoconf
|
||||
VPATH = $(VP1)@PATH_IFS@$(VP2)@PATH_IFS@$(VP3)@PATH_IFS@$(VP4)@PATH_IFS@$(VP5)@PATH_IFS@$(VP6)@PATH_IFS@$(VP7)@PATH_IFS@$(VP8)@PATH_IFS@$(VP9)@PATH_IFS@$(VP10)@PATH_IFS@$(VP11) # ':' for autoconf
|
||||
|
||||
top_srcdir = @top_srcdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
||||
@@ -121,9 +118,7 @@ GTKDIR = $(WXDIR)/src/gtk
|
||||
MOTIFDIR = $(WXDIR)/src/motif
|
||||
MSWDIR = $(WXDIR)/src/msw
|
||||
PMDIR = $(WXDIR)/src/os2
|
||||
MACDIR = $(WXDIR)/src/mac
|
||||
ODBCDIR = $(WXDIR)/src/iodbc
|
||||
FTDIR = $(WXDIR)/src/freetype
|
||||
INCDIR = $(WXDIR)/include
|
||||
SAMPDIR = $(WXDIR)/samples
|
||||
DEMODIR = $(WXDIR)/demos
|
||||
@@ -135,21 +130,11 @@ INTLDIR = $(WXDIR)/locale
|
||||
|
||||
########################## Archive name ###############################
|
||||
|
||||
# append a version suffix x.y.z to all file names
|
||||
VER_SUFFIX=$(WX_MAJOR_VERSION_NUMBER).$(WX_MINOR_VERSION_NUMBER).$(WX_RELEASE_NUMBER)$(EXTRA_VER)
|
||||
WXARCHIVE=@DISTDIR@-$(VER_SUFFIX).tar.gz
|
||||
WXGLARCHIVE=@DISTDIR@-gl-$(VER_SUFFIX).tar.gz
|
||||
WXSAMPLES=wx$(TOOLKIT)-samples-$(VER_SUFFIX).tar.gz
|
||||
WXDEMOS=wx$(TOOLKIT)-demos-$(VER_SUFFIX).tar.gz
|
||||
|
||||
WXARCHIVE_BZIP=@DISTDIR@-$(VER_SUFFIX).tar.bz2
|
||||
WXGLARCHIVE_BZIP=@DISTDIR@-gl-$(VER_SUFFIX).tar.bz2
|
||||
WXSAMPLES_BZIP=wx$(TOOLKIT)-samples-$(VER_SUFFIX).tar.bz2
|
||||
WXDEMOS_BZIP=wx$(TOOLKIT)-demos-$(VER_SUFFIX).tar.bz2
|
||||
|
||||
DISTDIRNAME=@DISTDIR@-$(VER_SUFFIX)
|
||||
DISTDIR=./_dist_dir/$(DISTDIRNAME)
|
||||
|
||||
WXARCHIVE = @DISTDIR@-$(WX_MAJOR_VERSION_NUMBER).$(WX_MINOR_VERSION_NUMBER).$(WX_RELEASE_NUMBER).tgz
|
||||
WXGLARCHIVE = @DISTDIR@-gl-$(WX_MAJOR_VERSION_NUMBER).$(WX_MINOR_VERSION_NUMBER).$(WX_RELEASE_NUMBER).tgz
|
||||
WXSAMPLES = wx$(TOOLKIT)-samples-$(WX_MAJOR_VERSION_NUMBER).$(WX_MINOR_VERSION_NUMBER).$(WX_RELEASE_NUMBER).tgz
|
||||
WXDEMOS = wx$(TOOLKIT)-demos-$(WX_MAJOR_VERSION_NUMBER).$(WX_MINOR_VERSION_NUMBER).$(WX_RELEASE_NUMBER).tgz
|
||||
DISTDIR = ./_dist_dir/@DISTDIR@
|
||||
|
||||
############################## Files ##################################
|
||||
|
||||
@@ -158,7 +143,7 @@ WX_LINGUAS = `cd $(top_srcdir)/locale && ls *.mo 2> /dev/null | sed -n 's/\.mo//
|
||||
# this line will include a file which defines ALL_SOURCES, ALL_OBJECTS,
|
||||
# ALL_DEPFILES and ALL_HEADERS variables with the complete list of .cpp, .o,
|
||||
# .d and .h/.inl files for the current toolkit
|
||||
include @PORT_FILES@
|
||||
include $(top_srcdir)/@PORT_FILES@
|
||||
|
||||
SOURCES = $(ALL_SOURCES)
|
||||
HEADERS = $(ALL_HEADERS)
|
||||
@@ -170,13 +155,7 @@ DEPFILES = @ALL_DEPFILES@
|
||||
|
||||
# the object files of sublibraries (we assume that they don't change [often],
|
||||
# so we don't generate these lists with tmake but embed them here)
|
||||
REGEXOBJS = \
|
||||
regcomp.o \
|
||||
regexec.o \
|
||||
regerror.o \
|
||||
regfree.o
|
||||
|
||||
ZLIBOBJS = \
|
||||
ZLIBOBJS = \
|
||||
adler32.o \
|
||||
compress.o \
|
||||
crc32.o \
|
||||
@@ -192,7 +171,7 @@ ZLIBOBJS = \
|
||||
infutil.o \
|
||||
inffast.o
|
||||
|
||||
PNGOBJS = \
|
||||
PNGOBJS = \
|
||||
png.o \
|
||||
pngread.o \
|
||||
pngrtran.o \
|
||||
@@ -209,26 +188,8 @@ PNGOBJS = \
|
||||
pngget.o \
|
||||
pngset.o
|
||||
|
||||
FREETYPEOBJS = \
|
||||
ftsystem.o \
|
||||
autohint.o \
|
||||
ftbase.o \
|
||||
ftdebug.o \
|
||||
ftglyph.o \
|
||||
ftinit.o \
|
||||
ftmm.o \
|
||||
cff.o \
|
||||
type1cid.o \
|
||||
psnames.o \
|
||||
psmodule.o \
|
||||
raster1.o \
|
||||
sfnt.o \
|
||||
smooth.o \
|
||||
truetype.o \
|
||||
type1z.o \
|
||||
winfnt.o
|
||||
|
||||
JPEGOBJS = \
|
||||
JPEGOBJS = \
|
||||
jcomapi.o \
|
||||
jutils.o \
|
||||
jerror.o \
|
||||
@@ -276,7 +237,7 @@ JPEGOBJS = \
|
||||
jquant2.o \
|
||||
jdmerge.o
|
||||
|
||||
TIFFOBJS = \
|
||||
TIFFOBJS = \
|
||||
tif_aux.o \
|
||||
tif_close.o \
|
||||
tif_codec.o \
|
||||
@@ -327,15 +288,7 @@ IODBCOBJS = \
|
||||
misc.o \
|
||||
prepare.o \
|
||||
result.o
|
||||
|
||||
OLEOBJS = \
|
||||
automtn.o \
|
||||
dataobj.o \
|
||||
dropsrc.o \
|
||||
droptgt.o \
|
||||
oleutils.o \
|
||||
uuid.o
|
||||
|
||||
|
||||
############################## Rules ##################################
|
||||
|
||||
BURNT_LIBRARY_NAME = @BURNT_LIBRARY_NAME@
|
||||
@@ -356,17 +309,11 @@ all: @WX_ALL@
|
||||
@WX_LIBRARY_NAME_SHARED@: $(OBJECTS)
|
||||
@$(INSTALL) -d ./lib
|
||||
$(SHARED_LD) ./lib/$@ $(BURNT_LIBRARY_NAME) $(OBJECTS) $(EXTRALIBS)
|
||||
|
||||
@WX_LIBRARY_NAME_SHARED_GL@: glcanvas.o @WX_LIBRARY_NAME_SHARED@
|
||||
|
||||
@WX_LIBRARY_NAME_SHARED_GL@: glcanvas.o
|
||||
@$(INSTALL) -d ./lib
|
||||
$(SHARED_LD) ./lib/$@ $(BURNT_LIBRARY_NAME_GL) glcanvas.o ./lib/@WX_LIBRARY_NAME_SHARED@ $(EXTRALIBS) $(OPENGLLIBS)
|
||||
|
||||
./lib/lib@WX_LIBRARY@-$(WX_MAJOR_VERSION_NUMBER).$(WX_MINOR_VERSION_NUMBER).r: ./lib/lib@WX_LIBRARY@-$(WX_MAJOR_VERSION_NUMBER).$(WX_MINOR_VERSION_NUMBER).rsrc
|
||||
$(DEREZ) $^ $(DEREZFLAGS) > $@
|
||||
|
||||
./lib/lib@WX_LIBRARY@-$(WX_MAJOR_VERSION_NUMBER).$(WX_MINOR_VERSION_NUMBER).rsrc: $(MACRESOURCES)
|
||||
$(REZ) $(REZFLAGS) $^ -o $@
|
||||
|
||||
$(SHARED_LD) ./lib/$@ $(BURNT_LIBRARY_NAME_GL) glcanvas.o $(EXTRALIBS)
|
||||
|
||||
CREATE_LINKS: @WX_LIBRARY_NAME_SHARED@
|
||||
@$(RM) ./lib/@WX_LIBRARY_LINK1@
|
||||
@$(RM) ./lib/@WX_LIBRARY_LINK2@
|
||||
@@ -375,7 +322,7 @@ CREATE_LINKS: @WX_LIBRARY_NAME_SHARED@
|
||||
&& $(LN_S) @WX_TARGET_LIBRARY@ @WX_LIBRARY_LINK1@ \
|
||||
&& $(LN_S) @WX_TARGET_LIBRARY@ @WX_LIBRARY_LINK2@ \
|
||||
&& $(LN_S) @WX_TARGET_LIBRARY@ @WX_LIBRARY_LINK3@
|
||||
|
||||
|
||||
CREATE_LINKS_GL: @WX_LIBRARY_NAME_SHARED_GL@
|
||||
@$(RM) ./lib/@WX_LIBRARY_LINK1_GL@
|
||||
@$(RM) ./lib/@WX_LIBRARY_LINK2_GL@
|
||||
@@ -384,7 +331,7 @@ CREATE_LINKS_GL: @WX_LIBRARY_NAME_SHARED_GL@
|
||||
&& $(LN_S) @WX_TARGET_LIBRARY_GL@ @WX_LIBRARY_LINK1_GL@ \
|
||||
&& $(LN_S) @WX_TARGET_LIBRARY_GL@ @WX_LIBRARY_LINK2_GL@ \
|
||||
&& $(LN_S) @WX_TARGET_LIBRARY_GL@ @WX_LIBRARY_LINK3_GL@
|
||||
|
||||
|
||||
CREATE_INSTALLED_LINKS: preinstall
|
||||
$(RM) $(libdir)/@WX_LIBRARY_LINK1@
|
||||
$(RM) $(libdir)/@WX_LIBRARY_LINK2@
|
||||
@@ -393,7 +340,7 @@ CREATE_INSTALLED_LINKS: preinstall
|
||||
&& $(LN_S) @WX_LIBRARY_NAME_SHARED@ @WX_LIBRARY_LINK1@ \
|
||||
&& $(LN_S) @WX_LIBRARY_NAME_SHARED@ @WX_LIBRARY_LINK2@ \
|
||||
&& $(LN_S) @WX_LIBRARY_NAME_SHARED@ @WX_LIBRARY_LINK3@
|
||||
|
||||
|
||||
CREATE_INSTALLED_LINKS_GL: preinstall_gl
|
||||
$(RM) $(libdir)/@WX_LIBRARY_LINK1_GL@
|
||||
$(RM) $(libdir)/@WX_LIBRARY_LINK2_GL@
|
||||
@@ -402,7 +349,7 @@ CREATE_INSTALLED_LINKS_GL: preinstall_gl
|
||||
&& $(LN_S) @WX_LIBRARY_NAME_SHARED_GL@ @WX_LIBRARY_LINK1_GL@ \
|
||||
&& $(LN_S) @WX_LIBRARY_NAME_SHARED_GL@ @WX_LIBRARY_LINK2_GL@ \
|
||||
&& $(LN_S) @WX_LIBRARY_NAME_SHARED_GL@ @WX_LIBRARY_LINK3_GL@
|
||||
|
||||
|
||||
$(OBJECTS): $(WXDIR)/include/wx/defs.h $(WXDIR)/include/wx/object.h
|
||||
|
||||
parser.o: parser.c lexer.c
|
||||
@@ -429,7 +376,7 @@ lexer.c: $(COMMDIR)/lexer.l
|
||||
-include $(DEPFILES)
|
||||
|
||||
afminstall: preinstall
|
||||
@if test ! -d $(datadir); then $(INSTALL) -d $(datadir); fi
|
||||
$(INSTALL) -d $(datadir)
|
||||
$(INSTALL) -d $(datadir)/wx
|
||||
$(INSTALL) -d $(datadir)/wx/afm
|
||||
$(INSTALL) -d $(datadir)/wx/gs_afm
|
||||
@@ -443,9 +390,9 @@ preinstall: $(top_builddir)/lib/@WX_TARGET_LIBRARY@ $(top_builddir)/wx@TOOLKIT_N
|
||||
@echo " Installing wxWindows..."
|
||||
@echo " "
|
||||
|
||||
@if test ! -d $(prefix); then $(INSTALL) -d $(prefix); fi
|
||||
@if test ! -d $(bindir); then $(INSTALL) -d $(bindir); fi
|
||||
@if test ! -d $(libdir); then $(INSTALL) -d $(libdir); fi
|
||||
$(INSTALL) -d $(prefix)
|
||||
$(INSTALL) -d $(bindir)
|
||||
$(INSTALL) -d $(libdir)
|
||||
|
||||
$(INSTALL_SCRIPT) $(top_builddir)/wx@TOOLKIT_NAME@-config $(bindir)/wx@TOOLKIT_NAME@-config
|
||||
cd $(bindir) && rm -f wx-config && $(LN_S) wx@TOOLKIT_NAME@-config wx-config
|
||||
@@ -456,7 +403,7 @@ preinstall: $(top_builddir)/lib/@WX_TARGET_LIBRARY@ $(top_builddir)/wx@TOOLKIT_N
|
||||
$(INSTALL) -d $(libdir)/wx/include/wx
|
||||
$(INSTALL) -d $(libdir)/wx/include/wx/@TOOLKIT_NAME@
|
||||
$(INSTALL_DATA) $(top_builddir)/include/wx/@TOOLKIT_DIR@/setup.h $(libdir)/wx/include/wx/@TOOLKIT_NAME@/setup.h
|
||||
|
||||
|
||||
$(INSTALL) -d $(includedir)/wx
|
||||
@if test "$(USE_GUI)" = 1; then $(INSTALL) -d $(includedir)/wx/@TOOLKIT_DIR@; fi
|
||||
@if test "$(USE_GUI)" = 1; then $(INSTALL) -d $(includedir)/wx/html; fi
|
||||
@@ -468,10 +415,10 @@ preinstall: $(top_builddir)/lib/@WX_TARGET_LIBRARY@ $(top_builddir)/wx@TOOLKIT_N
|
||||
echo "$(INSTALL_DATA) $(top_srcdir)/include/wx/$$p $(includedir)/wx/$$p"; \
|
||||
done
|
||||
|
||||
@if test ! -d $(localedir); then $(INSTALL) -d $(localedir); fi
|
||||
$(INSTALL) -d $(localedir)
|
||||
@for p in $(WX_LINGUAS); do \
|
||||
if test ! -d $(localedir)/$$p; then $(INSTALL) -d $(localedir)/$$p; fi;\
|
||||
if test ! -d $(localedir)/$$p/LC_MESSAGES; then $(INSTALL) -d $(localedir)/$$p/LC_MESSAGES; fi;\
|
||||
$(INSTALL) -d $(localedir)/$$p; \
|
||||
$(INSTALL) -d $(localedir)/$$p/LC_MESSAGES; \
|
||||
$(INSTALL_DATA) $(top_srcdir)/locale/$$p.mo $(localedir)/$$p/LC_MESSAGES/wxstd.mo; \
|
||||
echo "$(INSTALL_DATA) $(top_srcdir)/locale/$$p.mo $(localedir)/$$p/LC_MESSAGES/wxstd.mo"; \
|
||||
done
|
||||
@@ -480,7 +427,7 @@ preinstall_gl: $(top_builddir)/lib/@WX_TARGET_LIBRARY_GL@
|
||||
@echo " "
|
||||
@echo " Installing wxWindows OpenGl add-on..."
|
||||
@echo " "
|
||||
@if test ! -d $(libdir); then $(INSTALL) -d $(libdir); fi
|
||||
$(INSTALL) -d $(libdir)
|
||||
$(INSTALL_PROGRAM) $(top_builddir)/lib/@WX_TARGET_LIBRARY_GL@ $(libdir)/@WX_TARGET_LIBRARY_GL@
|
||||
|
||||
install: @AFMINSTALL@ @WX_ALL_INSTALLED@
|
||||
@@ -578,7 +525,6 @@ ALL_DIST: distclean
|
||||
# but is not used when building wxBase distribution
|
||||
ALL_GUI_DIST: ALL_DIST
|
||||
cp $(WXDIR)/wx$(TOOLKIT).spec $(DISTDIR)
|
||||
cp $(WXDIR)/wxBase.spec $(DISTDIR)
|
||||
cp $(DOCDIR)/$(TOOLKITDIR)/install.txt $(DISTDIR)/INSTALL.txt
|
||||
cp $(DOCDIR)/$(TOOLKITDIR)/changes.txt $(DISTDIR)/CHANGES.txt
|
||||
cp $(DOCDIR)/$(TOOLKITDIR)/readme.txt $(DISTDIR)/README.txt
|
||||
@@ -608,7 +554,7 @@ ALL_GUI_DIST: ALL_DIST
|
||||
mkdir $(DISTDIR)/src/tiff
|
||||
mkdir $(DISTDIR)/src/iodbc
|
||||
mkdir $(DISTDIR)/src/unix
|
||||
cp $(WXDIR)/@PORT_FILES@ $(DISTDIR)
|
||||
cp $(WXDIR)/@PORT_FILES@ $(DISTDIR)/@PORT_FILES@
|
||||
cp $(SRCDIR)/*.in $(DISTDIR)/src
|
||||
cp $(COMMDIR)/*.cpp $(DISTDIR)/src/common
|
||||
cp $(COMMDIR)/*.c $(DISTDIR)/src/common
|
||||
@@ -648,16 +594,16 @@ BASE_DIST: ALL_DIST
|
||||
mkdir $(DISTDIR)/include/wx/unix
|
||||
mkdir $(DISTDIR)/src/common
|
||||
mkdir $(DISTDIR)/src/unix
|
||||
cp $(WXDIR)/@PORT_FILES@ $(DISTDIR)
|
||||
cp $(WXDIR)/@PORT_FILES@ $(DISTDIR)/@PORT_FILES@
|
||||
cp $(WXDIR)/@RPM_FILES@ $(DISTDIR)/@RPM_FILES@
|
||||
cp $(WXDIR)/@RPM_SPEC@ $(DISTDIR)/@RPM_SPEC@
|
||||
cp $(WXDIR)/wxBase*.ds[pw] $(DISTDIR)
|
||||
cp $(WXDIR)/wxBase.dsp $(DISTDIR)
|
||||
cp $(DOCDIR)/install.txt $(DISTDIR)/INSTALL.txt
|
||||
cp $(DOCDIR)/changes.txt $(DISTDIR)/CHANGES.txt
|
||||
cp $(DOCDIR)/readme.txt $(DISTDIR)/README.txt
|
||||
cp $(DOCDIR)/todo.txt $(DISTDIR)/TODO.txt
|
||||
cp $(SRCDIR)/*.in $(DISTDIR)/src
|
||||
cp $(WXDIR)/src/common/*.inc $(DISTDIR)/src/common
|
||||
cp $(WXDIR)/src/common/base.rc $(DISTDIR)/src/common
|
||||
cp $(WXDIR)/src/common/unzip.h $(DISTDIR)/src/common
|
||||
cp $(WXDIR)/src/common/unzip.h $(DISTDIR)/src/common/unzip.h
|
||||
list='$(HEADERS)'; for p in $$list; do \
|
||||
cp $(WXDIR)/include/wx/$$p $(DISTDIR)/include/wx/$$p; \
|
||||
done
|
||||
@@ -665,18 +611,8 @@ BASE_DIST: ALL_DIST
|
||||
cp $(WXDIR)/src/$$p $(DISTDIR)/src/$$p; \
|
||||
done
|
||||
|
||||
mkdir $(DISTDIR)/samples
|
||||
cp $(SAMPDIR)/Makefile.in $(DISTDIR)/samples
|
||||
cp $(SAMPDIR)/configure $(DISTDIR)/samples
|
||||
cp $(SAMPDIR)/configure.in $(DISTDIR)/samples
|
||||
|
||||
mkdir $(DISTDIR)/samples/console
|
||||
cp $(SAMPDIR)/console/Makefile.in $(DISTDIR)/samples/console
|
||||
cp $(SAMPDIR)/console/makefile.unx $(DISTDIR)/samples/console
|
||||
cp $(SAMPDIR)/console/console.cpp $(DISTDIR)/samples/console
|
||||
cp $(SAMPDIR)/console/testdata.fc $(DISTDIR)/samples/console
|
||||
|
||||
GTK_DIST: ALL_GUI_DIST
|
||||
cp $(WXDIR)/wxGTK.spec $(DISTDIR)
|
||||
cp $(INCDIR)/wx/gtk/*.h $(DISTDIR)/include/wx/gtk
|
||||
cp $(INCDIR)/wx/gtk/*.xpm $(DISTDIR)/include/wx/gtk
|
||||
cp $(GTKDIR)/*.cpp $(DISTDIR)/src/gtk
|
||||
@@ -696,9 +632,6 @@ MOTIF_DIST: ALL_GUI_DIST
|
||||
cp $(MOTIFDIR)/xmcombo/*.h $(DISTDIR)/src/motif/xmcombo
|
||||
cp $(MOTIFDIR)/xmcombo/copying.txt $(DISTDIR)/src/motif/xmcombo
|
||||
|
||||
MACX_DIST: ALL_GUI_DIST
|
||||
echo "Apple Mac OS X specific distribution not complete"
|
||||
|
||||
MSW_DIST: ALL_GUI_DIST
|
||||
cp $(WXDIR)/wxWINE.spec $(DISTDIR)
|
||||
cp $(INCDIR)/wx/msw/*.h $(DISTDIR)/include/wx/msw
|
||||
@@ -717,9 +650,9 @@ DEMOS_DIST: ALL_GUI_DIST
|
||||
cp $(DEMODIR)/Makefile.in $(DISTDIR)/demos
|
||||
cp $(DEMODIR)/configure $(DISTDIR)/demos
|
||||
cp $(DEMODIR)/configure.in $(DISTDIR)/demos
|
||||
|
||||
|
||||
cp -R $(DEMODIR)/dbbrowse $(DISTDIR)/demos/dbbrowse
|
||||
|
||||
|
||||
mkdir $(DISTDIR)/demos/bombs
|
||||
cp $(DEMODIR)/bombs/Makefile.in $(DISTDIR)/demos/bombs
|
||||
cp $(DEMODIR)/bombs/makefile.unx $(DISTDIR)/demos/bombs
|
||||
@@ -727,7 +660,7 @@ DEMOS_DIST: ALL_GUI_DIST
|
||||
cp $(DEMODIR)/bombs/*.h $(DISTDIR)/demos/bombs
|
||||
cp $(DEMODIR)/bombs/*.xpm $(DISTDIR)/demos/bombs
|
||||
cp $(DEMODIR)/bombs/readme.txt $(DISTDIR)/demos/bombs
|
||||
|
||||
|
||||
mkdir $(DISTDIR)/demos/forty
|
||||
cp $(DEMODIR)/forty/Makefile.in $(DISTDIR)/demos/forty
|
||||
cp $(DEMODIR)/forty/makefile.unx $(DISTDIR)/demos/forty
|
||||
@@ -735,7 +668,7 @@ DEMOS_DIST: ALL_GUI_DIST
|
||||
cp $(DEMODIR)/forty/*.cpp $(DISTDIR)/demos/forty
|
||||
cp $(DEMODIR)/forty/*.xpm $(DISTDIR)/demos/forty
|
||||
cp $(DEMODIR)/forty/*.xbm $(DISTDIR)/demos/forty
|
||||
|
||||
|
||||
mkdir $(DISTDIR)/demos/life
|
||||
mkdir $(DISTDIR)/demos/life/bitmaps
|
||||
cp $(DEMODIR)/life/Makefile.in $(DISTDIR)/demos/life
|
||||
@@ -744,9 +677,8 @@ DEMOS_DIST: ALL_GUI_DIST
|
||||
cp $(DEMODIR)/life/*.h $(DISTDIR)/demos/life
|
||||
cp $(DEMODIR)/life/*.xpm $(DISTDIR)/demos/life
|
||||
cp $(DEMODIR)/life/*.inc $(DISTDIR)/demos/life
|
||||
cp $(DEMODIR)/life/*.lif $(DISTDIR)/demos/life
|
||||
cp $(DEMODIR)/life/bitmaps/*.xpm $(DISTDIR)/demos/life/bitmaps
|
||||
|
||||
|
||||
mkdir $(DISTDIR)/demos/poem
|
||||
cp $(DEMODIR)/poem/Makefile.in $(DISTDIR)/demos/poem
|
||||
cp $(DEMODIR)/poem/makefile.unx $(DISTDIR)/demos/poem
|
||||
@@ -755,12 +687,12 @@ DEMOS_DIST: ALL_GUI_DIST
|
||||
cp $(DEMODIR)/poem/*.xpm $(DISTDIR)/demos/poem
|
||||
cp $(DEMODIR)/poem/*.dat $(DISTDIR)/demos/poem
|
||||
cp $(DEMODIR)/poem/*.txt $(DISTDIR)/demos/poem
|
||||
|
||||
|
||||
mkdir $(DISTDIR)/demos/fractal
|
||||
cp $(DEMODIR)/fractal/Makefile.in $(DISTDIR)/demos/fractal
|
||||
cp $(DEMODIR)/fractal/makefile.unx $(DISTDIR)/demos/fractal
|
||||
cp $(DEMODIR)/fractal/*.cpp $(DISTDIR)/demos/fractal
|
||||
|
||||
|
||||
SAMPLES_DIST: ALL_GUI_DIST
|
||||
mkdir $(DISTDIR)/samples
|
||||
cp $(SAMPDIR)/Makefile.in $(DISTDIR)/samples
|
||||
@@ -862,16 +794,6 @@ SAMPLES_DIST: ALL_GUI_DIST
|
||||
cp $(SAMPDIR)/dynamic/*.cpp $(DISTDIR)/samples/dynamic
|
||||
cp $(SAMPDIR)/dynamic/*.xpm $(DISTDIR)/samples/dynamic
|
||||
|
||||
mkdir $(DISTDIR)/samples/erase
|
||||
cp $(SAMPDIR)/erase/Makefile.in $(DISTDIR)/samples/erase
|
||||
cp $(SAMPDIR)/erase/makefile.unx $(DISTDIR)/samples/erase
|
||||
cp $(SAMPDIR)/erase/*.cpp $(DISTDIR)/samples/erase
|
||||
|
||||
mkdir $(DISTDIR)/samples/event
|
||||
cp $(SAMPDIR)/event/Makefile.in $(DISTDIR)/samples/event
|
||||
cp $(SAMPDIR)/event/makefile.unx $(DISTDIR)/samples/event
|
||||
cp $(SAMPDIR)/event/*.cpp $(DISTDIR)/samples/event
|
||||
|
||||
mkdir $(DISTDIR)/samples/exec
|
||||
cp $(SAMPDIR)/exec/Makefile.in $(DISTDIR)/samples/exec
|
||||
cp $(SAMPDIR)/exec/makefile.unx $(DISTDIR)/samples/exec
|
||||
@@ -946,11 +868,10 @@ SAMPLES_DIST: ALL_GUI_DIST
|
||||
cp $(SAMPDIR)/image/horse.* $(DISTDIR)/samples/image
|
||||
cp $(SAMPDIR)/image/smile.xbm $(DISTDIR)/samples/image
|
||||
cp $(SAMPDIR)/image/smile.xpm $(DISTDIR)/samples/image
|
||||
|
||||
|
||||
mkdir $(DISTDIR)/samples/internat
|
||||
mkdir $(DISTDIR)/samples/internat/de
|
||||
mkdir $(DISTDIR)/samples/internat/fr
|
||||
mkdir $(DISTDIR)/samples/internat/ru
|
||||
cp $(SAMPDIR)/internat/Makefile.in $(DISTDIR)/samples/internat
|
||||
cp $(SAMPDIR)/internat/makefile.unx $(DISTDIR)/samples/internat
|
||||
cp $(SAMPDIR)/internat/*.cpp $(DISTDIR)/samples/internat
|
||||
@@ -959,10 +880,8 @@ SAMPLES_DIST: ALL_GUI_DIST
|
||||
cp $(SAMPDIR)/internat/*.po $(DISTDIR)/samples/internat
|
||||
cp $(SAMPDIR)/internat/fr/*.mo $(DISTDIR)/samples/internat/fr
|
||||
cp $(SAMPDIR)/internat/de/*.mo $(DISTDIR)/samples/internat/de
|
||||
cp $(SAMPDIR)/internat/ru/*.mo $(DISTDIR)/samples/internat/ru
|
||||
cp $(SAMPDIR)/internat/fr/*.po $(DISTDIR)/samples/internat/fr
|
||||
cp $(SAMPDIR)/internat/de/*.po $(DISTDIR)/samples/internat/de
|
||||
cp $(SAMPDIR)/internat/ru/*.po $(DISTDIR)/samples/internat/ru
|
||||
|
||||
mkdir $(DISTDIR)/samples/ipc
|
||||
cp $(SAMPDIR)/ipc/Makefile.in $(DISTDIR)/samples/ipc
|
||||
@@ -1067,6 +986,11 @@ SAMPLES_DIST: ALL_GUI_DIST
|
||||
cp $(SAMPDIR)/opengl/isosurf/*.h $(DISTDIR)/samples/opengl/isosurf
|
||||
cp $(SAMPDIR)/opengl/isosurf/*.gz $(DISTDIR)/samples/opengl/isosurf
|
||||
|
||||
mkdir $(DISTDIR)/samples/plot
|
||||
cp $(SAMPDIR)/plot/Makefile.in $(DISTDIR)/samples/plot
|
||||
cp $(SAMPDIR)/plot/makefile.unx $(DISTDIR)/samples/plot
|
||||
cp $(SAMPDIR)/plot/*.cpp $(DISTDIR)/samples/plot
|
||||
|
||||
mkdir $(DISTDIR)/samples/png
|
||||
cp $(SAMPDIR)/png/Makefile.in $(DISTDIR)/samples/png
|
||||
cp $(SAMPDIR)/png/makefile.unx $(DISTDIR)/samples/png
|
||||
@@ -1094,7 +1018,7 @@ SAMPLES_DIST: ALL_GUI_DIST
|
||||
cp $(SAMPDIR)/rotate/makefile.unx $(DISTDIR)/samples/rotate
|
||||
cp $(SAMPDIR)/rotate/*.cpp $(DISTDIR)/samples/rotate
|
||||
cp $(SAMPDIR)/rotate/*.bmp $(DISTDIR)/samples/rotate
|
||||
|
||||
|
||||
mkdir $(DISTDIR)/samples/richedit
|
||||
cp $(SAMPDIR)/richedit/Makefile.in $(DISTDIR)/samples/richedit
|
||||
cp $(SAMPDIR)/richedit/makefile.unx $(DISTDIR)/samples/richedit
|
||||
@@ -1103,35 +1027,35 @@ SAMPLES_DIST: ALL_GUI_DIST
|
||||
cp $(SAMPDIR)/richedit/*.xpm $(DISTDIR)/samples/richedit
|
||||
cp $(SAMPDIR)/richedit/README $(DISTDIR)/samples/richedit
|
||||
cp $(SAMPDIR)/richedit/TODO $(DISTDIR)/samples/richedit
|
||||
|
||||
|
||||
mkdir $(DISTDIR)/samples/proplist
|
||||
cp $(SAMPDIR)/proplist/Makefile.in $(DISTDIR)/samples/proplist
|
||||
cp $(SAMPDIR)/proplist/makefile.unx $(DISTDIR)/samples/proplist
|
||||
cp $(SAMPDIR)/proplist/*.cpp $(DISTDIR)/samples/proplist
|
||||
cp $(SAMPDIR)/proplist/*.h $(DISTDIR)/samples/proplist
|
||||
|
||||
|
||||
mkdir $(DISTDIR)/samples/propsize
|
||||
cp $(SAMPDIR)/propsize/Makefile.in $(DISTDIR)/samples/propsize
|
||||
cp $(SAMPDIR)/propsize/makefile.unx $(DISTDIR)/samples/propsize
|
||||
cp $(SAMPDIR)/propsize/*.cpp $(DISTDIR)/samples/propsize
|
||||
cp $(SAMPDIR)/propsize/*.xpm $(DISTDIR)/samples/propsize
|
||||
|
||||
|
||||
mkdir $(DISTDIR)/samples/sashtest
|
||||
cp $(SAMPDIR)/sashtest/Makefile.in $(DISTDIR)/samples/sashtest
|
||||
cp $(SAMPDIR)/sashtest/makefile.unx $(DISTDIR)/samples/sashtest
|
||||
cp $(SAMPDIR)/sashtest/*.cpp $(DISTDIR)/samples/sashtest
|
||||
cp $(SAMPDIR)/sashtest/*.h $(DISTDIR)/samples/sashtest
|
||||
|
||||
|
||||
mkdir $(DISTDIR)/samples/scroll
|
||||
cp $(SAMPDIR)/scroll/Makefile.in $(DISTDIR)/samples/scroll
|
||||
cp $(SAMPDIR)/scroll/makefile.unx $(DISTDIR)/samples/scroll
|
||||
cp $(SAMPDIR)/scroll/*.cpp $(DISTDIR)/samples/scroll
|
||||
|
||||
|
||||
mkdir $(DISTDIR)/samples/scrollsub
|
||||
cp $(SAMPDIR)/scrollsub/Makefile.in $(DISTDIR)/samples/scrollsub
|
||||
cp $(SAMPDIR)/scrollsub/makefile.unx $(DISTDIR)/samples/scrollsub
|
||||
cp $(SAMPDIR)/scrollsub/*.cpp $(DISTDIR)/samples/scrollsub
|
||||
|
||||
|
||||
mkdir $(DISTDIR)/samples/sockets
|
||||
cp $(SAMPDIR)/sockets/Makefile.in $(DISTDIR)/samples/sockets
|
||||
cp $(SAMPDIR)/sockets/makefile.unx $(DISTDIR)/samples/sockets
|
||||
@@ -1142,7 +1066,7 @@ SAMPLES_DIST: ALL_GUI_DIST
|
||||
cp $(SAMPDIR)/splitter/Makefile.in $(DISTDIR)/samples/splitter
|
||||
cp $(SAMPDIR)/splitter/makefile.unx $(DISTDIR)/samples/splitter
|
||||
cp $(SAMPDIR)/splitter/*.cpp $(DISTDIR)/samples/splitter
|
||||
|
||||
|
||||
mkdir $(DISTDIR)/samples/statbar
|
||||
cp $(SAMPDIR)/statbar/Makefile.in $(DISTDIR)/samples/statbar
|
||||
cp $(SAMPDIR)/statbar/makefile.unx $(DISTDIR)/samples/statbar
|
||||
@@ -1154,12 +1078,12 @@ SAMPLES_DIST: ALL_GUI_DIST
|
||||
cp $(SAMPDIR)/text/makefile.unx $(DISTDIR)/samples/text
|
||||
cp $(SAMPDIR)/text/*.cpp $(DISTDIR)/samples/text
|
||||
cp $(SAMPDIR)/text/*.xpm $(DISTDIR)/samples/text
|
||||
|
||||
|
||||
mkdir $(DISTDIR)/samples/thread
|
||||
cp $(SAMPDIR)/thread/Makefile.in $(DISTDIR)/samples/thread
|
||||
cp $(SAMPDIR)/thread/makefile.unx $(DISTDIR)/samples/thread
|
||||
cp $(SAMPDIR)/thread/*.cpp $(DISTDIR)/samples/thread
|
||||
|
||||
|
||||
mkdir $(DISTDIR)/samples/toolbar
|
||||
cp $(SAMPDIR)/toolbar/Makefile.in $(DISTDIR)/samples/toolbar
|
||||
cp $(SAMPDIR)/toolbar/makefile.unx $(DISTDIR)/samples/toolbar
|
||||
@@ -1167,7 +1091,7 @@ SAMPLES_DIST: ALL_GUI_DIST
|
||||
cp $(SAMPDIR)/toolbar/*.xpm $(DISTDIR)/samples/toolbar
|
||||
mkdir $(DISTDIR)/samples/toolbar/bitmaps
|
||||
cp $(SAMPDIR)/toolbar/bitmaps/*.xpm $(DISTDIR)/samples/toolbar/bitmaps
|
||||
|
||||
|
||||
mkdir $(DISTDIR)/samples/treectrl
|
||||
cp $(SAMPDIR)/treectrl/Makefile.in $(DISTDIR)/samples/treectrl
|
||||
cp $(SAMPDIR)/treectrl/makefile.unx $(DISTDIR)/samples/treectrl
|
||||
@@ -1176,33 +1100,33 @@ SAMPLES_DIST: ALL_GUI_DIST
|
||||
cp $(SAMPDIR)/treectrl/*.xpm $(DISTDIR)/samples/treectrl
|
||||
mkdir $(DISTDIR)/samples/treectrl/bitmaps
|
||||
cp $(SAMPDIR)/treectrl/bitmaps/*.bmp $(DISTDIR)/samples/treectrl/bitmaps
|
||||
|
||||
|
||||
mkdir $(DISTDIR)/samples/treelay
|
||||
cp $(SAMPDIR)/treelay/Makefile.in $(DISTDIR)/samples/treelay
|
||||
cp $(SAMPDIR)/treelay/makefile.unx $(DISTDIR)/samples/treelay
|
||||
cp $(SAMPDIR)/treelay/*.cpp $(DISTDIR)/samples/treelay
|
||||
cp $(SAMPDIR)/treelay/*.h $(DISTDIR)/samples/treelay
|
||||
|
||||
|
||||
mkdir $(DISTDIR)/samples/typetest
|
||||
cp $(SAMPDIR)/typetest/Makefile.in $(DISTDIR)/samples/typetest
|
||||
cp $(SAMPDIR)/typetest/makefile.unx $(DISTDIR)/samples/typetest
|
||||
cp $(SAMPDIR)/typetest/*.cpp $(DISTDIR)/samples/typetest
|
||||
cp $(SAMPDIR)/typetest/*.h $(DISTDIR)/samples/typetest
|
||||
cp $(SAMPDIR)/typetest/*.xpm $(DISTDIR)/samples/typetest
|
||||
|
||||
|
||||
mkdir $(DISTDIR)/samples/validate
|
||||
cp $(SAMPDIR)/validate/Makefile.in $(DISTDIR)/samples/validate
|
||||
cp $(SAMPDIR)/validate/makefile.unx $(DISTDIR)/samples/validate
|
||||
cp $(SAMPDIR)/validate/*.cpp $(DISTDIR)/samples/validate
|
||||
cp $(SAMPDIR)/validate/*.h $(DISTDIR)/samples/validate
|
||||
cp $(SAMPDIR)/validate/*.xpm $(DISTDIR)/samples/validate
|
||||
|
||||
|
||||
mkdir $(DISTDIR)/samples/wizard
|
||||
cp $(SAMPDIR)/wizard/Makefile.in $(DISTDIR)/samples/wizard
|
||||
cp $(SAMPDIR)/wizard/makefile.unx $(DISTDIR)/samples/wizard
|
||||
cp $(SAMPDIR)/wizard/*.cpp $(DISTDIR)/samples/wizard
|
||||
cp $(SAMPDIR)/wizard/*.xpm $(DISTDIR)/samples/wizard
|
||||
|
||||
|
||||
UTILS_DIST: ALL_GUI_DIST
|
||||
mkdir $(DISTDIR)/utils
|
||||
cp $(UTILSDIR)/Makefile.in $(DISTDIR)/utils
|
||||
@@ -1269,6 +1193,7 @@ PYTHON_DIST:
|
||||
mkdir $(DISTDIR)/wxPython/demo
|
||||
mkdir $(DISTDIR)/wxPython/demo/bitmaps
|
||||
mkdir $(DISTDIR)/wxPython/demo/data
|
||||
mkdir $(DISTDIR)/wxPython/distrib
|
||||
mkdir $(DISTDIR)/wxPython/src
|
||||
mkdir $(DISTDIR)/wxPython/src/gtk
|
||||
mkdir $(DISTDIR)/wxPython/wxPython
|
||||
@@ -1277,9 +1202,7 @@ PYTHON_DIST:
|
||||
mkdir $(DISTDIR)/wxPython/wxPython/lib/sizers
|
||||
|
||||
cp $(WXDIR)/wxPython/*.txt $(DISTDIR)/wxPython
|
||||
cp $(WXDIR)/wxPython/*.py $(DISTDIR)/wxPython
|
||||
cp $(WXDIR)/wxPython/setup.cfg $(DISTDIR)/wxPython
|
||||
cp $(WXDIR)/wxPython/MANIFEST.in $(DISTDIR)/wxPython
|
||||
cp $(WXDIR)/wxPython/contrib/buildall.py $(DISTDIR)/wxPython/contrib
|
||||
-cp $(WXDIR)/wxPython/contrib/glcanvas/* $(DISTDIR)/wxPython/contrib/glcanvas
|
||||
cp $(WXDIR)/wxPython/contrib/glcanvas/gtk/glcanvas.* $(DISTDIR)/wxPython/contrib/glcanvas/gtk
|
||||
-cp $(WXDIR)/wxPython/contrib/ogl/* $(DISTDIR)/wxPython/contrib/ogl
|
||||
@@ -1287,74 +1210,27 @@ PYTHON_DIST:
|
||||
-cp $(WXDIR)/wxPython/demo/* $(DISTDIR)/wxPython/demo
|
||||
-cp $(WXDIR)/wxPython/demo/bitmaps/* $(DISTDIR)/wxPython/demo/bitmaps
|
||||
-cp $(WXDIR)/wxPython/demo/data/* $(DISTDIR)/wxPython/demo/data
|
||||
cp $(WXDIR)/wxPython/distrib/build.py $(DISTDIR)/wxPython/distrib
|
||||
-cp $(WXDIR)/wxPython/src/* $(DISTDIR)/wxPython/src
|
||||
cp $(WXDIR)/wxPython/src/gtk/*.py $(DISTDIR)/wxPython/src/gtk
|
||||
cp $(WXDIR)/wxPython/src/gtk/*.cpp $(DISTDIR)/wxPython/src/gtk
|
||||
cp $(WXDIR)/wxPython/wxPython/lib/*.py $(DISTDIR)/wxPython/wxPython/lib
|
||||
cp $(WXDIR)/wxPython/wxPython/lib/editor/*.py $(DISTDIR)/wxPython/wxPython/lib/editor
|
||||
cp $(WXDIR)/wxPython/wxPython/lib/sizers/*.py $(DISTDIR)/wxPython/wxPython/lib/sizers
|
||||
|
||||
distclean:
|
||||
$(RM) -r _dist_dir
|
||||
|
||||
# VZ: the -only targets allow to do "make dist bzip-dist-only" without copying
|
||||
# the files twice
|
||||
dist-only:
|
||||
@echo "*** Creating wxWindows distribution in $(DISTDIR)..."
|
||||
@cd _dist_dir && tar ch $(DISTDIRNAME) | gzip -f9 > ../$(WXARCHIVE);
|
||||
@if test "$(USE_GUI)" = 1; then \
|
||||
cd $(DISTDIR); \
|
||||
mv samples wxSamples-$(VER_SUFFIX); \
|
||||
echo "*** Creating wxSamples archive..."; \
|
||||
tar ch wxSamples-$(VER_SUFFIX) | gzip -f9 > ../../$(WXSAMPLES); \
|
||||
mv wxSamples-$(VER_SUFFIX) samples; \
|
||||
mv demos wxDemos-$(VER_SUFFIX); \
|
||||
echo "*** Creating wxDemos archive..."; \
|
||||
tar ch wxDemos-$(VER_SUFFIX) | gzip -f9 > ../../$(WXDEMOS); \
|
||||
mv wxDemos-$(VER_SUFFIX) demos; \
|
||||
fi
|
||||
|
||||
dist: @GUIDIST@
|
||||
cp $(WXDIR)/src/files.lst $(DISTDIR)/src
|
||||
@echo "*** Creating wxWindows distribution in $(DISTDIR)..."
|
||||
@cd _dist_dir && tar ch $(DISTDIRNAME) | gzip -f9 > ../$(WXARCHIVE);
|
||||
@if test "$(USE_GUI)" = 1; then \
|
||||
cd $(DISTDIR); \
|
||||
mv samples wxSamples-$(VER_SUFFIX); \
|
||||
echo "*** Creating wxSamples archive..."; \
|
||||
tar ch wxSamples-$(VER_SUFFIX) | gzip -f9 > ../../$(WXSAMPLES); \
|
||||
mv wxSamples-$(VER_SUFFIX) samples; \
|
||||
mv demos wxDemos-$(VER_SUFFIX); \
|
||||
echo "*** Creating wxDemos archive..."; \
|
||||
tar ch wxDemos-$(VER_SUFFIX) | gzip -f9 > ../../$(WXDEMOS); \
|
||||
mv wxDemos-$(VER_SUFFIX) demos; \
|
||||
fi
|
||||
|
||||
bzip-dist-only:
|
||||
@echo "*** Creating wxWindows distribution in $(DISTDIR)..."
|
||||
@cd _dist_dir && tar ch $(DISTDIRNAME) | bzip2 -f9 > ../$(WXARCHIVE_BZIP);
|
||||
@if test "$(USE_GUI)" = 1; then \
|
||||
cd $(DISTDIR); \
|
||||
mv samples wxSamples-${VER_SUFFIX}; \
|
||||
echo "*** Creating wxSamples archive..."; \
|
||||
tar ch wxSamples-${VER_SUFFIX} | bzip2 -f9 > ../../$(WXSAMPLES_BZIP); \
|
||||
mv wxSamples-${VER_SUFFIX} samples; \
|
||||
mv demos wxDemos-${VER_SUFFIX}; \
|
||||
echo "*** Creating wxDemos archive..."; \
|
||||
tar ch wxDemos-${VER_SUFFIX} | bzip2 -f9 > ../../$(WXDEMOS_BZIP); \
|
||||
mv wxDemos-${VER_SUFFIX} demos; \
|
||||
fi
|
||||
|
||||
bzip-dist: @GUIDIST@
|
||||
cp $(WXDIR)/src/files.lst $(DISTDIR)/src/
|
||||
@echo "*** Creating wxWindows distribution in $(DISTDIR)..."
|
||||
@cd _dist_dir && tar ch $(DISTDIRNAME) | bzip2 -f9 > ../$(WXARCHIVE_BZIP)
|
||||
cd _dist_dir; tar ch @DISTDIR@ | gzip -f9 > $(WXARCHIVE); mv $(WXARCHIVE) ..
|
||||
@if test "$(USE_GUI)" = 1; then \
|
||||
cd $(DISTDIR); \
|
||||
mv samples wxSamples; \
|
||||
tar ch wxSamples | bzip2 -f9 > ../../$(WXSAMPLES_BZIP); \
|
||||
tar ch wxSamples | gzip -f9 > ../../$(WXSAMPLES); \
|
||||
mv wxSamples samples; \
|
||||
mv demos wxDemos; \
|
||||
tar ch wxDemos | bzip2 -f9 > ../../$(WXDEMOS_BZIP); \
|
||||
tar ch wxDemos | gzip -f9 > ../../$(WXDEMOS); \
|
||||
mv wxDemos demos; \
|
||||
fi
|
||||
|
||||
@@ -1374,22 +1250,6 @@ clean:
|
||||
$(RM) *.d
|
||||
$(RM) parser.c
|
||||
$(RM) lexer.c
|
||||
# $(RM) -r ./lib/wx/*
|
||||
$(RM) ./lib/lib*
|
||||
$(RM) -r ./lib/*
|
||||
|
||||
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"` .
|
||||
|
289
aclocal.m4
vendored
289
aclocal.m4
vendored
@@ -1,289 +0,0 @@
|
||||
dnl aclocal.m4 generated automatically by aclocal 1.4
|
||||
|
||||
dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl This program is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
dnl PARTICULAR PURPOSE.
|
||||
|
||||
# Configure paths for GTK+
|
||||
# Owen Taylor 97-11-3
|
||||
|
||||
dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
|
||||
dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS. Uses variables
|
||||
dnl gtk_config_prefix and/or gtk_config_exec_prefix if defined.
|
||||
AC_DEFUN(AM_PATH_GTK,
|
||||
[
|
||||
if test x$gtk_config_exec_prefix != x ; then
|
||||
gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
|
||||
if test x${GTK_CONFIG+set} != xset ; then
|
||||
GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
|
||||
fi
|
||||
fi
|
||||
if test x$gtk_config_prefix != x ; then
|
||||
gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
|
||||
if test x${GTK_CONFIG+set} != xset ; then
|
||||
GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_PATH_PROG(GTK_CONFIG, gtk-config, no)
|
||||
min_gtk_version=ifelse([$1], ,0.99.7,$1)
|
||||
AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
|
||||
no_gtk=""
|
||||
if test "$GTK_CONFIG" != "no" ; then
|
||||
GTK_CFLAGS=`$GTK_CONFIG --cflags`
|
||||
GTK_LIBS=`$GTK_CONFIG --libs gthread`
|
||||
ac_save_CFLAGS="$CFLAGS"
|
||||
ac_save_LIBS="$LIBS"
|
||||
CFLAGS="$CFLAGS $GTK_CFLAGS"
|
||||
LIBS="$LIBS $GTK_LIBS"
|
||||
dnl
|
||||
dnl Now check if the installed GTK is sufficiently new. (Also sanity
|
||||
dnl checks the results of gtk-config to some extent)
|
||||
dnl
|
||||
AC_TRY_RUN([
|
||||
#include <gtk/gtk.h>
|
||||
#include <gtk/gtkfeatures.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
int major, minor, micro;
|
||||
|
||||
if (sscanf("$min_gtk_version", "%d.%d.%d", &major, &minor, µ) != 3) {
|
||||
printf("%s, bad version string\n", "$min_gtk_version");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if ((GTK_MAJOR_VERSION != gtk_major_version) ||
|
||||
(GTK_MINOR_VERSION != gtk_minor_version) ||
|
||||
(GTK_MICRO_VERSION != gtk_micro_version)) {
|
||||
printf("Headers vs. library version mismatch!\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (gtk_minor_version == 1) return FALSE;
|
||||
|
||||
return !((gtk_major_version > major) ||
|
||||
((gtk_major_version == major) && (gtk_minor_version > minor)) ||
|
||||
((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)));
|
||||
}
|
||||
],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
|
||||
CFLAGS="$ac_save_CFLAGS"
|
||||
LIBS="$ac_save_LIBS"
|
||||
else
|
||||
no_gtk=yes
|
||||
fi
|
||||
if test "x$no_gtk" = x ; then
|
||||
AC_MSG_RESULT(yes)
|
||||
ifelse([$2], , :, [$2])
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
GTK_CFLAGS=""
|
||||
GTK_LIBS=""
|
||||
ifelse([$3], , :, [$3])
|
||||
fi
|
||||
AC_SUBST(GTK_CFLAGS)
|
||||
AC_SUBST(GTK_LIBS)
|
||||
])
|
||||
|
||||
dnl AM_PATH_GTK_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
|
||||
dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
|
||||
dnl
|
||||
AC_DEFUN(AM_PATH_GTK_2_0,
|
||||
[dnl
|
||||
dnl Get the cflags and libraries from the gtk-config-2.0 script
|
||||
dnl
|
||||
AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=PFX Prefix where GTK is installed (optional)],
|
||||
gtk_config_prefix="$withval", gtk_config_prefix="")
|
||||
AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)],
|
||||
gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="")
|
||||
AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program],
|
||||
, enable_gtktest=yes)
|
||||
|
||||
for module in . $4
|
||||
do
|
||||
case "$module" in
|
||||
gthread)
|
||||
gtk_config_args="$gtk_config_args gthread"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if test x$gtk_config_exec_prefix != x ; then
|
||||
gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
|
||||
if test x${GTK_CONFIG_2_0+set} != xset ; then
|
||||
GTK_CONFIG_2_0=$gtk_config_exec_prefix/bin/gtk-config-2.0
|
||||
fi
|
||||
fi
|
||||
if test x$gtk_config_prefix != x ; then
|
||||
gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
|
||||
if test x${GTK_CONFIG_2_0+set} != xset ; then
|
||||
GTK_CONFIG_2_0=$gtk_config_prefix/bin/gtk-config-2.0
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_PATH_PROG(GTK_CONFIG_2_0, gtk-config-2.0, no)
|
||||
min_gtk_version=ifelse([$1], ,1.3.1,$1)
|
||||
AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
|
||||
no_gtk=""
|
||||
if test "$GTK_CONFIG_2_0" = "no" ; then
|
||||
no_gtk=yes
|
||||
else
|
||||
GTK_CFLAGS=`$GTK_CONFIG_2_0 $gtk_config_args --cflags`
|
||||
GTK_LIBS=`$GTK_CONFIG_2_0 $gtk_config_args --libs`
|
||||
gtk_config_major_version=`$GTK_CONFIG_2_0 $gtk_config_args --version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
|
||||
gtk_config_minor_version=`$GTK_CONFIG_2_0 $gtk_config_args --version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
|
||||
gtk_config_micro_version=`$GTK_CONFIG_2_0 $gtk_config_args --version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
|
||||
if test "x$enable_gtktest" = "xyes" ; then
|
||||
ac_save_CFLAGS="$CFLAGS"
|
||||
ac_save_LIBS="$LIBS"
|
||||
CFLAGS="$CFLAGS $GTK_CFLAGS"
|
||||
LIBS="$GTK_LIBS $LIBS"
|
||||
dnl
|
||||
dnl Now check if the installed GTK is sufficiently new. (Also sanity
|
||||
dnl checks the results of gtk-config-2.0 to some extent
|
||||
dnl
|
||||
rm -f conf.gtktest
|
||||
AC_TRY_RUN([
|
||||
#include <gtk/gtk.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
int major, minor, micro;
|
||||
char *tmp_version;
|
||||
|
||||
system ("touch conf.gtktest");
|
||||
|
||||
/* HP/UX 9 (%@#!) writes to sscanf strings */
|
||||
tmp_version = g_strdup("$min_gtk_version");
|
||||
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
|
||||
printf("%s, bad version string\n", "$min_gtk_version");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if ((gtk_major_version != $gtk_config_major_version) ||
|
||||
(gtk_minor_version != $gtk_config_minor_version) ||
|
||||
(gtk_micro_version != $gtk_config_micro_version))
|
||||
{
|
||||
printf("\n*** 'gtk-config-2.0 --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
|
||||
$gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
|
||||
gtk_major_version, gtk_minor_version, gtk_micro_version);
|
||||
printf ("*** was found! If gtk-config-2.0 was correct, then it is best\n");
|
||||
printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
|
||||
printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
|
||||
printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
|
||||
printf("*** required on your system.\n");
|
||||
printf("*** If gtk-config-2.0 was wrong, set the environment variable GTK_CONFIG_2_0\n");
|
||||
printf("*** to point to the correct copy of gtk-config-2.0, and remove the file config.cache\n");
|
||||
printf("*** before re-running configure\n");
|
||||
}
|
||||
#if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION)
|
||||
else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
|
||||
(gtk_minor_version != GTK_MINOR_VERSION) ||
|
||||
(gtk_micro_version != GTK_MICRO_VERSION))
|
||||
{
|
||||
printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
|
||||
GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
|
||||
printf("*** library (version %d.%d.%d)\n",
|
||||
gtk_major_version, gtk_minor_version, gtk_micro_version);
|
||||
}
|
||||
#endif /* defined (GTK_MAJOR_VERSION) ... */
|
||||
else
|
||||
{
|
||||
if ((gtk_major_version > major) ||
|
||||
((gtk_major_version == major) && (gtk_minor_version > minor)) ||
|
||||
((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
|
||||
gtk_major_version, gtk_minor_version, gtk_micro_version);
|
||||
printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
|
||||
major, minor, micro);
|
||||
printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
|
||||
printf("***\n");
|
||||
printf("*** If you have already installed a sufficiently new version, this error\n");
|
||||
printf("*** probably means that the wrong copy of the gtk-config-2.0 shell script is\n");
|
||||
printf("*** being found. The easiest way to fix this is to remove the old version\n");
|
||||
printf("*** of GTK+, but you can also set the GTK_CONFIG_2_0 environment to point to the\n");
|
||||
printf("*** correct copy of gtk-config-2.0. (In this case, you will have to\n");
|
||||
printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
|
||||
printf("*** so that the correct libraries are found at run-time))\n");
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
|
||||
CFLAGS="$ac_save_CFLAGS"
|
||||
LIBS="$ac_save_LIBS"
|
||||
fi
|
||||
fi
|
||||
if test "x$no_gtk" = x ; then
|
||||
AC_MSG_RESULT(yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version))
|
||||
ifelse([$2], , :, [$2])
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
if test "$GTK_CONFIG_2_0" = "no" ; then
|
||||
echo "*** The gtk-config-2.0 script installed by GTK could not be found"
|
||||
echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in"
|
||||
echo "*** your path, or set the GTK_CONFIG_2_0 environment variable to the"
|
||||
echo "*** full path to gtk-config-2.0."
|
||||
else
|
||||
if test -f conf.gtktest ; then
|
||||
:
|
||||
else
|
||||
echo "*** Could not run GTK test program, checking why..."
|
||||
CFLAGS="$CFLAGS $GTK_CFLAGS"
|
||||
LIBS="$LIBS $GTK_LIBS"
|
||||
AC_TRY_LINK([
|
||||
#include <gtk/gtk.h>
|
||||
#include <stdio.h>
|
||||
], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
|
||||
[ echo "*** The test program compiled, but did not run. This usually means"
|
||||
echo "*** that the run-time linker is not finding GTK or finding the wrong"
|
||||
echo "*** version of GTK. If it is not finding GTK, you'll need to set your"
|
||||
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
|
||||
echo "*** to the installed location Also, make sure you have run ldconfig if that"
|
||||
echo "*** is required on your system"
|
||||
echo "***"
|
||||
echo "*** If you have an old version installed, it is best to remove it, although"
|
||||
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
|
||||
echo "***"
|
||||
echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
|
||||
echo "*** came with the system with the command"
|
||||
echo "***"
|
||||
echo "*** rpm --erase --nodeps gtk gtk-devel" ],
|
||||
[ echo "*** The test program failed to compile or link. See the file config.log for the"
|
||||
echo "*** exact error that occured. This usually means GTK was incorrectly installed"
|
||||
echo "*** or that you have moved GTK since it was installed. In the latter case, you"
|
||||
echo "*** may want to edit the gtk-config-2.0 script: $GTK_CONFIG_2_0" ])
|
||||
CFLAGS="$ac_save_CFLAGS"
|
||||
LIBS="$ac_save_LIBS"
|
||||
fi
|
||||
fi
|
||||
GTK_CFLAGS=""
|
||||
GTK_LIBS=""
|
||||
ifelse([$3], , :, [$3])
|
||||
fi
|
||||
AC_SUBST(GTK_CFLAGS)
|
||||
AC_SUBST(GTK_LIBS)
|
||||
rm -f conf.gtktest
|
||||
])
|
||||
|
||||
|
452
config.guess
vendored
452
config.guess
vendored
@@ -1,10 +1,8 @@
|
||||
#! /bin/sh
|
||||
# Attempt to guess a canonical system name.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999
|
||||
# Free Software Foundation, Inc.
|
||||
|
||||
version='2000-10-23'
|
||||
|
||||
#
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
@@ -25,7 +23,8 @@ version='2000-10-23'
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Written by Per Bothner <bothner@cygnus.com>.
|
||||
# Please send patches to <config-patches@gnu.org>.
|
||||
# The master version of this file is at the FSF in /home/gd/gnu/lib.
|
||||
# Please send patches to the Autoconf mailing list <autoconf@gnu.org>.
|
||||
#
|
||||
# This script attempts to guess a canonical system name similar to
|
||||
# config.sub. If it succeeds, it prints the system name on stdout, and
|
||||
@@ -38,46 +37,6 @@ version='2000-10-23'
|
||||
# (but try to keep the structure clean).
|
||||
#
|
||||
|
||||
me=`echo "$0" | sed -e 's,.*/,,'`
|
||||
|
||||
usage="\
|
||||
Usage: $0 [OPTION]
|
||||
|
||||
Output the configuration name of this system.
|
||||
|
||||
Operation modes:
|
||||
-h, --help print this help, then exit
|
||||
-V, --version print version number, then exit"
|
||||
|
||||
help="
|
||||
Try \`$me --help' for more information."
|
||||
|
||||
# Parse command line
|
||||
while test $# -gt 0 ; do
|
||||
case "$1" in
|
||||
--version | --vers* | -V )
|
||||
echo "$version" ; exit 0 ;;
|
||||
--help | --h* | -h )
|
||||
echo "$usage"; exit 0 ;;
|
||||
-- ) # Stop option processing
|
||||
shift; break ;;
|
||||
- ) # Use stdin as input.
|
||||
break ;;
|
||||
-* )
|
||||
exec >&2
|
||||
echo "$me: invalid option $1"
|
||||
echo "$help"
|
||||
exit 1 ;;
|
||||
* )
|
||||
break ;;
|
||||
esac
|
||||
done
|
||||
|
||||
if test $# != 0; then
|
||||
echo "$me: too many arguments$help" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Use $HOST_CC if defined. $CC may point to a cross-compiler
|
||||
if test x"$CC_FOR_BUILD" = x; then
|
||||
if test x"$HOST_CC" != x; then
|
||||
@@ -109,43 +68,6 @@ trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15
|
||||
# Note: order is significant - the case branches are not exclusive.
|
||||
|
||||
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
*:NetBSD:*:*)
|
||||
# Netbsd (nbsd) targets should (where applicable) match one or
|
||||
# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
|
||||
# *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
|
||||
# switched to ELF, *-*-netbsd* would select the old
|
||||
# object file format. This provides both forward
|
||||
# compatibility and a consistent mechanism for selecting the
|
||||
# object file format.
|
||||
# Determine the machine/vendor (is the vendor relevant).
|
||||
case "${UNAME_MACHINE}" in
|
||||
amiga) machine=m68k-unknown ;;
|
||||
arm32) machine=arm-unknown ;;
|
||||
atari*) machine=m68k-atari ;;
|
||||
sun3*) machine=m68k-sun ;;
|
||||
mac68k) machine=m68k-apple ;;
|
||||
macppc) machine=powerpc-apple ;;
|
||||
hp3[0-9][05]) machine=m68k-hp ;;
|
||||
ibmrt|romp-ibm) machine=romp-ibm ;;
|
||||
*) machine=${UNAME_MACHINE}-unknown ;;
|
||||
esac
|
||||
# The Operating System including object format.
|
||||
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
|
||||
| grep __ELF__ >/dev/null
|
||||
then
|
||||
# Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
|
||||
# Return netbsd for either. FIX?
|
||||
os=netbsd
|
||||
else
|
||||
os=netbsdelf
|
||||
fi
|
||||
# The OS release
|
||||
release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
|
||||
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
|
||||
# contains redundant information, the shorter form:
|
||||
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
|
||||
echo "${machine}-${os}${release}"
|
||||
exit 0 ;;
|
||||
alpha:OSF1:*:*)
|
||||
if test $UNAME_RELEASE = "V4.0"; then
|
||||
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
|
||||
@@ -155,51 +77,41 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
# A Xn.n version is an unreleased experimental baselevel.
|
||||
# 1.2 uses "1.2" for uname -r.
|
||||
cat <<EOF >$dummy.s
|
||||
.data
|
||||
\$Lformat:
|
||||
.byte 37,100,45,37,120,10,0 # "%d-%x\n"
|
||||
|
||||
.text
|
||||
.globl main
|
||||
.align 4
|
||||
.ent main
|
||||
main:
|
||||
.frame \$30,16,\$26,0
|
||||
ldgp \$29,0(\$27)
|
||||
.prologue 1
|
||||
.long 0x47e03d80 # implver \$0
|
||||
lda \$2,-1
|
||||
.long 0x47e20c21 # amask \$2,\$1
|
||||
lda \$16,\$Lformat
|
||||
mov \$0,\$17
|
||||
not \$1,\$18
|
||||
jsr \$26,printf
|
||||
ldgp \$29,0(\$26)
|
||||
mov 0,\$16
|
||||
jsr \$26,exit
|
||||
.frame \$30,0,\$26,0
|
||||
.prologue 0
|
||||
.long 0x47e03d80 # implver $0
|
||||
lda \$2,259
|
||||
.long 0x47e20c21 # amask $2,$1
|
||||
srl \$1,8,\$2
|
||||
sll \$2,2,\$2
|
||||
sll \$0,3,\$0
|
||||
addl \$1,\$0,\$0
|
||||
addl \$2,\$0,\$0
|
||||
ret \$31,(\$26),1
|
||||
.end main
|
||||
EOF
|
||||
$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
|
||||
if test "$?" = 0 ; then
|
||||
case `./$dummy` in
|
||||
0-0)
|
||||
./$dummy
|
||||
case "$?" in
|
||||
7)
|
||||
UNAME_MACHINE="alpha"
|
||||
;;
|
||||
1-0)
|
||||
15)
|
||||
UNAME_MACHINE="alphaev5"
|
||||
;;
|
||||
1-1)
|
||||
14)
|
||||
UNAME_MACHINE="alphaev56"
|
||||
;;
|
||||
1-101)
|
||||
10)
|
||||
UNAME_MACHINE="alphapca56"
|
||||
;;
|
||||
2-303)
|
||||
16)
|
||||
UNAME_MACHINE="alphaev6"
|
||||
;;
|
||||
2-307)
|
||||
UNAME_MACHINE="alphaev67"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
rm -f $dummy.s $dummy
|
||||
@@ -215,8 +127,11 @@ EOF
|
||||
echo alpha-dec-winnt3.5
|
||||
exit 0 ;;
|
||||
Amiga*:UNIX_System_V:4.0:*)
|
||||
echo m68k-unknown-sysv4
|
||||
echo m68k-cbm-sysv4
|
||||
exit 0;;
|
||||
amiga:NetBSD:*:*)
|
||||
echo m68k-cbm-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
amiga:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
@@ -241,12 +156,12 @@ EOF
|
||||
wgrisc:OpenBSD:*:*)
|
||||
echo mipsel-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:OS/390:*:*)
|
||||
echo i370-ibm-openedition
|
||||
exit 0 ;;
|
||||
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
|
||||
echo arm-acorn-riscix${UNAME_RELEASE}
|
||||
exit 0;;
|
||||
arm32:NetBSD:*:*)
|
||||
echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
|
||||
exit 0 ;;
|
||||
SR2?01:HI-UX/MPP:*:*)
|
||||
echo hppa1.1-hitachi-hiuxmpp
|
||||
exit 0;;
|
||||
@@ -303,12 +218,15 @@ EOF
|
||||
aushp:SunOS:*:*)
|
||||
echo sparc-auspex-sunos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
atari*:NetBSD:*:*)
|
||||
echo m68k-atari-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
atari*:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
# The situation for MiNT is a little confusing. The machine name
|
||||
# can be virtually everything (everything which is not
|
||||
# "atarist" or "atariste" at least should have a processor
|
||||
# "atarist" or "atariste" at least should have a processor
|
||||
# > m68000). The system name ranges from "MiNT" over "FreeMiNT"
|
||||
# to the lowercase version "mint" (or "freemint"). Finally
|
||||
# the system name "TOS" denotes a system which is actually not
|
||||
@@ -332,9 +250,15 @@ EOF
|
||||
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
|
||||
echo m68k-unknown-mint${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
sun3*:NetBSD:*:*)
|
||||
echo m68k-sun-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
sun3*:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mac68k:NetBSD:*:*)
|
||||
echo m68k-apple-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mac68k:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
@@ -347,6 +271,9 @@ EOF
|
||||
powerpc:machten:*:*)
|
||||
echo powerpc-apple-machten${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
macppc:NetBSD:*:*)
|
||||
echo powerpc-apple-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
RISC*:Mach:*:*)
|
||||
echo mips-dec-mach_bsd4.3
|
||||
exit 0 ;;
|
||||
@@ -362,7 +289,6 @@ EOF
|
||||
mips:*:*:UMIPS | mips:*:*:RISCos)
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
#ifdef __cplusplus
|
||||
#include <stdio.h> /* for printf() prototype */
|
||||
int main (int argc, char *argv[]) {
|
||||
#else
|
||||
int main (argc, argv) int argc; char *argv[]; {
|
||||
@@ -402,18 +328,15 @@ EOF
|
||||
AViiON:dgux:*:*)
|
||||
# DG/UX returns AViiON for all architectures
|
||||
UNAME_PROCESSOR=`/usr/bin/uname -p`
|
||||
if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
|
||||
then
|
||||
if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
|
||||
[ ${TARGET_BINARY_INTERFACE}x = x ]
|
||||
then
|
||||
if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then
|
||||
if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \
|
||||
-o ${TARGET_BINARY_INTERFACE}x = x ] ; then
|
||||
echo m88k-dg-dgux${UNAME_RELEASE}
|
||||
else
|
||||
echo m88k-dg-dguxbcs${UNAME_RELEASE}
|
||||
fi
|
||||
else
|
||||
echo i586-dg-dgux${UNAME_RELEASE}
|
||||
echo m88k-dg-dguxbcs${UNAME_RELEASE}
|
||||
fi
|
||||
else echo i586-dg-dgux${UNAME_RELEASE}
|
||||
fi
|
||||
exit 0 ;;
|
||||
M88*:DolphinOS:*:*) # DolphinOS (SVR3)
|
||||
echo m88k-dolphin-sysv3
|
||||
@@ -479,7 +402,7 @@ EOF
|
||||
ibmrt:4.4BSD:*|romp-ibm:BSD:*)
|
||||
echo romp-ibm-bsd4.4
|
||||
exit 0 ;;
|
||||
ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
|
||||
ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and
|
||||
echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
|
||||
exit 0 ;; # report: romp-ibm BSD 4.3
|
||||
*:BOSX:*:*)
|
||||
@@ -500,8 +423,6 @@ EOF
|
||||
9000/[34]?? ) HP_ARCH=m68k ;;
|
||||
9000/[678][0-9][0-9])
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
|
||||
#define _HPUX_SOURCE
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
@@ -532,7 +453,7 @@ EOF
|
||||
exit (0);
|
||||
}
|
||||
EOF
|
||||
(CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
|
||||
($CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
|
||||
rm -f $dummy.c $dummy
|
||||
esac
|
||||
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
|
||||
@@ -626,13 +547,10 @@ EOF
|
||||
-e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
|
||||
exit 0 ;;
|
||||
CRAY*TS:*:*:*)
|
||||
echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||
echo t90-cray-unicos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
CRAY*T3E:*:*:*)
|
||||
echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||
exit 0 ;;
|
||||
CRAY*SV1:*:*:*)
|
||||
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||
echo t3e-cray-unicosmk${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
CRAY-2:*:*:*)
|
||||
echo cray2-cray-unicos
|
||||
@@ -645,10 +563,13 @@ EOF
|
||||
F301:UNIX_System_V:*:*)
|
||||
echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
|
||||
exit 0 ;;
|
||||
hp3[0-9][05]:NetBSD:*:*)
|
||||
echo m68k-hp-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
hp300:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
i?86:BSD/386:*:* | i?86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
|
||||
i?86:BSD/386:*:* | i?86:BSD/OS:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
sparc*:BSD/OS:*:*)
|
||||
@@ -658,8 +579,17 @@ EOF
|
||||
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:FreeBSD:*:*)
|
||||
if test -x /usr/bin/objformat; then
|
||||
if test "elf" = "`/usr/bin/objformat`"; then
|
||||
echo ${UNAME_MACHINE}-unknown-freebsdelf`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'`
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
|
||||
exit 0 ;;
|
||||
*:NetBSD:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
|
||||
exit 0 ;;
|
||||
*:OpenBSD:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
|
||||
exit 0 ;;
|
||||
@@ -669,9 +599,6 @@ EOF
|
||||
i*:MINGW*:*)
|
||||
echo ${UNAME_MACHINE}-pc-mingw32
|
||||
exit 0 ;;
|
||||
i*:PW*:*)
|
||||
echo ${UNAME_MACHINE}-pc-pw32
|
||||
exit 0 ;;
|
||||
i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
|
||||
# How do we know it's Interix rather than the generic POSIX subsystem?
|
||||
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
|
||||
@@ -690,57 +617,31 @@ EOF
|
||||
*:GNU:*:*)
|
||||
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
|
||||
exit 0 ;;
|
||||
i*86:Minix:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-minix
|
||||
exit 0 ;;
|
||||
*:Linux:*:*)
|
||||
# uname on the ARM produces all sorts of strangeness, and we need to
|
||||
# filter it out.
|
||||
case "$UNAME_MACHINE" in
|
||||
armv*) UNAME_MACHINE=$UNAME_MACHINE ;;
|
||||
arm* | sa110*) UNAME_MACHINE="arm" ;;
|
||||
esac
|
||||
|
||||
# The BFD linker knows what the default object file format is, so
|
||||
# first see if it will tell us. cd to the root directory to prevent
|
||||
# problems with other programs or directories called `ld' in the path.
|
||||
ld_supported_emulations=`cd /; ld --help 2>&1 \
|
||||
ld_help_string=`cd /; ld --help 2>&1`
|
||||
ld_supported_emulations=`echo $ld_help_string \
|
||||
| sed -ne '/supported emulations:/!d
|
||||
s/[ ][ ]*/ /g
|
||||
s/.*supported emulations: *//
|
||||
s/ .*//
|
||||
p'`
|
||||
case "$ld_supported_emulations" in
|
||||
*ia64)
|
||||
echo "${UNAME_MACHINE}-unknown-linux"
|
||||
exit 0
|
||||
;;
|
||||
i?86linux)
|
||||
echo "${UNAME_MACHINE}-pc-linux-gnuaout"
|
||||
exit 0
|
||||
;;
|
||||
elf_i?86)
|
||||
TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
|
||||
;;
|
||||
i?86coff)
|
||||
echo "${UNAME_MACHINE}-pc-linux-gnucoff"
|
||||
exit 0
|
||||
;;
|
||||
sparclinux)
|
||||
echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
|
||||
exit 0
|
||||
;;
|
||||
armlinux)
|
||||
echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
|
||||
exit 0
|
||||
;;
|
||||
elf32arm*)
|
||||
echo "${UNAME_MACHINE}-unknown-linux-gnuoldld"
|
||||
exit 0
|
||||
;;
|
||||
armelf_linux*)
|
||||
echo "${UNAME_MACHINE}-unknown-linux-gnu"
|
||||
exit 0
|
||||
;;
|
||||
m68klinux)
|
||||
echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
|
||||
exit 0
|
||||
;;
|
||||
elf32ppc | elf32ppclinux)
|
||||
i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ;;
|
||||
i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 ;;
|
||||
sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
|
||||
armlinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
|
||||
m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
|
||||
elf32ppc)
|
||||
# Determine Lib Version
|
||||
cat >$dummy.c <<EOF
|
||||
#include <features.h>
|
||||
@@ -767,65 +668,49 @@ EOF
|
||||
if test "$?" = 0 ; then
|
||||
LIBC="libc1"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
rm -f $dummy.c $dummy
|
||||
echo powerpc-unknown-linux-gnu${LIBC}
|
||||
exit 0
|
||||
;;
|
||||
shelf_linux)
|
||||
echo "${UNAME_MACHINE}-unknown-linux-gnu"
|
||||
exit 0
|
||||
;;
|
||||
echo powerpc-unknown-linux-gnu${LIBC} ; exit 0 ;;
|
||||
esac
|
||||
|
||||
if test "${UNAME_MACHINE}" = "alpha" ; then
|
||||
cat <<EOF >$dummy.s
|
||||
.data
|
||||
\$Lformat:
|
||||
.byte 37,100,45,37,120,10,0 # "%d-%x\n"
|
||||
|
||||
.text
|
||||
.globl main
|
||||
.align 4
|
||||
.ent main
|
||||
main:
|
||||
.frame \$30,16,\$26,0
|
||||
ldgp \$29,0(\$27)
|
||||
.prologue 1
|
||||
.long 0x47e03d80 # implver \$0
|
||||
lda \$2,-1
|
||||
.long 0x47e20c21 # amask \$2,\$1
|
||||
lda \$16,\$Lformat
|
||||
mov \$0,\$17
|
||||
not \$1,\$18
|
||||
jsr \$26,printf
|
||||
ldgp \$29,0(\$26)
|
||||
mov 0,\$16
|
||||
jsr \$26,exit
|
||||
.end main
|
||||
sed 's/^ //' <<EOF >$dummy.s
|
||||
.globl main
|
||||
.ent main
|
||||
main:
|
||||
.frame \$30,0,\$26,0
|
||||
.prologue 0
|
||||
.long 0x47e03d80 # implver $0
|
||||
lda \$2,259
|
||||
.long 0x47e20c21 # amask $2,$1
|
||||
srl \$1,8,\$2
|
||||
sll \$2,2,\$2
|
||||
sll \$0,3,\$0
|
||||
addl \$1,\$0,\$0
|
||||
addl \$2,\$0,\$0
|
||||
ret \$31,(\$26),1
|
||||
.end main
|
||||
EOF
|
||||
LIBC=""
|
||||
$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
|
||||
if test "$?" = 0 ; then
|
||||
case `./$dummy` in
|
||||
0-0)
|
||||
./$dummy
|
||||
case "$?" in
|
||||
7)
|
||||
UNAME_MACHINE="alpha"
|
||||
;;
|
||||
1-0)
|
||||
15)
|
||||
UNAME_MACHINE="alphaev5"
|
||||
;;
|
||||
1-1)
|
||||
14)
|
||||
UNAME_MACHINE="alphaev56"
|
||||
;;
|
||||
1-101)
|
||||
10)
|
||||
UNAME_MACHINE="alphapca56"
|
||||
;;
|
||||
2-303)
|
||||
16)
|
||||
UNAME_MACHINE="alphaev6"
|
||||
;;
|
||||
2-307)
|
||||
UNAME_MACHINE="alphaev67"
|
||||
;;
|
||||
esac
|
||||
|
||||
objdump --private-headers $dummy | \
|
||||
@@ -839,7 +724,6 @@ EOF
|
||||
elif test "${UNAME_MACHINE}" = "mips" ; then
|
||||
cat >$dummy.c <<EOF
|
||||
#ifdef __cplusplus
|
||||
#include <stdio.h> /* for printf() prototype */
|
||||
int main (int argc, char *argv[]) {
|
||||
#else
|
||||
int main (argc, argv) int argc; char *argv[]; {
|
||||
@@ -855,32 +739,14 @@ EOF
|
||||
EOF
|
||||
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
|
||||
rm -f $dummy.c $dummy
|
||||
elif test "${UNAME_MACHINE}" = "s390"; then
|
||||
echo s390-ibm-linux && exit 0
|
||||
elif test "${UNAME_MACHINE}" = "x86_64"; then
|
||||
echo x86_64-unknown-linux-gnu && exit 0
|
||||
elif test "${UNAME_MACHINE}" = "parisc" -o "${UNAME_MACHINE}" = "hppa"; then
|
||||
# Look for CPU level
|
||||
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
|
||||
PA7*)
|
||||
echo hppa1.1-unknown-linux-gnu
|
||||
;;
|
||||
PA8*)
|
||||
echo hppa2.0-unknown-linux-gnu
|
||||
;;
|
||||
*)
|
||||
echo hppa-unknown-linux-gnu
|
||||
;;
|
||||
esac
|
||||
exit 0
|
||||
else
|
||||
# Either a pre-BFD a.out linker (linux-gnuoldld)
|
||||
# or one that does not give us useful --help.
|
||||
# GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
|
||||
# If ld does not provide *any* "supported emulations:"
|
||||
# that means it is gnuoldld.
|
||||
test -z "$ld_supported_emulations" \
|
||||
&& echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
|
||||
echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:"
|
||||
test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
|
||||
|
||||
case "${UNAME_MACHINE}" in
|
||||
i?86)
|
||||
@@ -894,7 +760,6 @@ EOF
|
||||
cat >$dummy.c <<EOF
|
||||
#include <features.h>
|
||||
#ifdef __cplusplus
|
||||
#include <stdio.h> /* for printf() prototype */
|
||||
int main (int argc, char *argv[]) {
|
||||
#else
|
||||
int main (argc, argv) int argc; char *argv[]; {
|
||||
@@ -917,7 +782,6 @@ EOF
|
||||
EOF
|
||||
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
|
||||
rm -f $dummy.c $dummy
|
||||
test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
|
||||
fi ;;
|
||||
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions
|
||||
# are messed up and put the nodename in both sysname and nodename.
|
||||
@@ -933,21 +797,19 @@ EOF
|
||||
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
|
||||
exit 0 ;;
|
||||
i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
|
||||
UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
|
||||
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
|
||||
echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
|
||||
echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE}
|
||||
else
|
||||
echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
|
||||
echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
|
||||
fi
|
||||
exit 0 ;;
|
||||
i?86:*:5:7*)
|
||||
# Fixed at (any) Pentium or better
|
||||
UNAME_MACHINE=i586
|
||||
if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then
|
||||
echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION}
|
||||
else
|
||||
echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
|
||||
fi
|
||||
UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
|
||||
(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
|
||||
(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) && UNAME_MACHINE=i586
|
||||
(/bin/uname -X|egrep '^Machine.*Pent.*II' >/dev/null) && UNAME_MACHINE=i686
|
||||
(/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) && UNAME_MACHINE=i585
|
||||
echo ${UNAME_MACHINE}-${UNAME_SYSTEM}${UNAME_VERSION}-sysv${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
i?86:*:3.2:*)
|
||||
if test -f /usr/options/cb.name; then
|
||||
@@ -967,11 +829,7 @@ EOF
|
||||
echo ${UNAME_MACHINE}-pc-sysv32
|
||||
fi
|
||||
exit 0 ;;
|
||||
i?86:*DOS:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-msdosdjgpp
|
||||
exit 0 ;;
|
||||
pc:*:*:*)
|
||||
# Left here for compatibility:
|
||||
# uname -m prints for DJGPP always 'pc', but it prints nothing about
|
||||
# the processor, so we play safe by assuming i386.
|
||||
echo i386-pc-msdosdjgpp
|
||||
@@ -995,7 +853,7 @@ EOF
|
||||
exit 0 ;;
|
||||
M68*:*:R3V[567]*:*)
|
||||
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
|
||||
3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
|
||||
3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
|
||||
OS_REL=''
|
||||
test -r /etc/.relid \
|
||||
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
|
||||
@@ -1054,7 +912,7 @@ EOF
|
||||
mc68*:A/UX:*:*)
|
||||
echo m68k-apple-aux${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
news*:NEWS-OS:6*:*)
|
||||
news*:NEWS-OS:*:6*)
|
||||
echo mips-sony-newsos6
|
||||
exit 0 ;;
|
||||
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
|
||||
@@ -1085,41 +943,6 @@ EOF
|
||||
*:Rhapsody:*:*)
|
||||
echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:Darwin:*:*)
|
||||
echo `uname -p`-apple-darwin${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:procnto*:*:* | *:QNX:[0123456789]*:*)
|
||||
if test "${UNAME_MACHINE}" = "x86pc"; then
|
||||
UNAME_MACHINE=pc
|
||||
fi
|
||||
echo `uname -p`-${UNAME_MACHINE}-nto-qnx
|
||||
exit 0 ;;
|
||||
*:QNX:*:4*)
|
||||
echo i386-pc-qnx
|
||||
exit 0 ;;
|
||||
NSR-[KW]:NONSTOP_KERNEL:*:*)
|
||||
echo nsr-tandem-nsk${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:NonStop-UX:*:*)
|
||||
echo mips-compaq-nonstopux
|
||||
exit 0 ;;
|
||||
BS2000:POSIX*:*:*)
|
||||
echo bs2000-siemens-sysv
|
||||
exit 0 ;;
|
||||
DS/*:UNIX_System_V:*:*)
|
||||
echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:Plan9:*:*)
|
||||
# "uname -m" is not consistent, so use $cputype instead. 386
|
||||
# is converted to i386 for consistency with other x86
|
||||
# operating systems.
|
||||
if test "$cputype" = "386"; then
|
||||
UNAME_MACHINE=i386
|
||||
else
|
||||
UNAME_MACHINE="$cputype"
|
||||
fi
|
||||
echo ${UNAME_MACHINE}-unknown-plan9
|
||||
exit 0 ;;
|
||||
esac
|
||||
|
||||
#echo '(No uname command or uname output not recognized.)' 1>&2
|
||||
@@ -1259,47 +1082,6 @@ then
|
||||
esac
|
||||
fi
|
||||
|
||||
cat >&2 <<EOF
|
||||
$0: unable to guess system type
|
||||
|
||||
The $version version of this script cannot recognize your system type.
|
||||
Please download the most up to date version of the config scripts:
|
||||
|
||||
ftp://ftp.gnu.org/pub/gnu/config/
|
||||
|
||||
If the version you run ($0) is already up to date, please
|
||||
send the following data and any information you think might be
|
||||
pertinent to <config-patches@gnu.org> in order to provide the needed
|
||||
information to handle your system.
|
||||
|
||||
config.guess version = $version
|
||||
|
||||
uname -m = `(uname -m) 2>/dev/null || echo unknown`
|
||||
uname -r = `(uname -r) 2>/dev/null || echo unknown`
|
||||
uname -s = `(uname -s) 2>/dev/null || echo unknown`
|
||||
uname -v = `(uname -v) 2>/dev/null || echo unknown`
|
||||
|
||||
/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
|
||||
/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
|
||||
|
||||
hostinfo = `(hostinfo) 2>/dev/null`
|
||||
/bin/universe = `(/bin/universe) 2>/dev/null`
|
||||
/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
|
||||
/bin/arch = `(/bin/arch) 2>/dev/null`
|
||||
/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
|
||||
/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
|
||||
|
||||
UNAME_MACHINE = ${UNAME_MACHINE}
|
||||
UNAME_RELEASE = ${UNAME_RELEASE}
|
||||
UNAME_SYSTEM = ${UNAME_SYSTEM}
|
||||
UNAME_VERSION = ${UNAME_VERSION}
|
||||
EOF
|
||||
#echo '(Unable to guess system type)' 1>&2
|
||||
|
||||
exit 1
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "version='"
|
||||
# time-stamp-format: "%:y-%02m-%02d"
|
||||
# time-stamp-end: "'"
|
||||
# End:
|
||||
|
213
config.sub
vendored
213
config.sub
vendored
@@ -1,10 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Configuration validation subroutine script, version 1.1.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
|
||||
# Free Software Foundation, Inc.
|
||||
|
||||
version='2000-11-04'
|
||||
|
||||
# Copyright (C) 1991, 92-97, 1998, 1999 Free Software Foundation, Inc.
|
||||
# This file is (in principle) common to ALL GNU software.
|
||||
# The presence of a machine in this file suggests that SOME GNU software
|
||||
# can handle that machine. It does not imply ALL GNU software can.
|
||||
@@ -29,8 +25,6 @@ version='2000-11-04'
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Please send patches to <config-patches@gnu.org>.
|
||||
#
|
||||
# Configuration subroutine to validate and canonicalize a configuration type.
|
||||
# Supply the specified configuration type as an argument.
|
||||
# If it is invalid, we print an error message on stderr and exit with code 1.
|
||||
@@ -51,61 +45,30 @@ version='2000-11-04'
|
||||
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
|
||||
# It is wrong to echo any other type of specification.
|
||||
|
||||
me=`echo "$0" | sed -e 's,.*/,,'`
|
||||
if [ x$1 = x ]
|
||||
then
|
||||
echo Configuration name missing. 1>&2
|
||||
echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
|
||||
echo "or $0 ALIAS" 1>&2
|
||||
echo where ALIAS is a recognized configuration type. 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
usage="\
|
||||
Usage: $0 [OPTION] CPU-MFR-OPSYS
|
||||
$0 [OPTION] ALIAS
|
||||
|
||||
Canonicalize a configuration name.
|
||||
|
||||
Operation modes:
|
||||
-h, --help print this help, then exit
|
||||
-V, --version print version number, then exit"
|
||||
|
||||
help="
|
||||
Try \`$me --help' for more information."
|
||||
|
||||
# Parse command line
|
||||
while test $# -gt 0 ; do
|
||||
case "$1" in
|
||||
--version | --vers* | -V )
|
||||
echo "$version" ; exit 0 ;;
|
||||
--help | --h* | -h )
|
||||
echo "$usage"; exit 0 ;;
|
||||
-- ) # Stop option processing
|
||||
shift; break ;;
|
||||
- ) # Use stdin as input.
|
||||
break ;;
|
||||
-* )
|
||||
exec >&2
|
||||
echo "$me: invalid option $1"
|
||||
echo "$help"
|
||||
exit 1 ;;
|
||||
|
||||
*local*)
|
||||
# First pass through any local machine types.
|
||||
echo $1
|
||||
exit 0;;
|
||||
|
||||
* )
|
||||
break ;;
|
||||
esac
|
||||
done
|
||||
|
||||
case $# in
|
||||
0) echo "$me: missing argument$help" >&2
|
||||
exit 1;;
|
||||
1) ;;
|
||||
*) echo "$me: too many arguments$help" >&2
|
||||
exit 1;;
|
||||
# First pass through any local machine types.
|
||||
case $1 in
|
||||
*local*)
|
||||
echo $1
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
|
||||
# Here we must recognize all the valid KERNEL-OS combinations.
|
||||
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
|
||||
case $maybe_os in
|
||||
nto-qnx* | linux-gnu* | storm-chaos*)
|
||||
linux-gnu*)
|
||||
os=-$maybe_os
|
||||
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
|
||||
;;
|
||||
@@ -131,7 +94,7 @@ case $os in
|
||||
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
|
||||
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
|
||||
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
|
||||
-apple | -axis)
|
||||
-apple)
|
||||
os=
|
||||
basic_machine=$1
|
||||
;;
|
||||
@@ -142,7 +105,7 @@ case $os in
|
||||
-scout)
|
||||
;;
|
||||
-wrs)
|
||||
os=-vxworks
|
||||
os=vxworks
|
||||
basic_machine=$1
|
||||
;;
|
||||
-hiux*)
|
||||
@@ -193,46 +156,33 @@ case $os in
|
||||
-psos*)
|
||||
os=-psos
|
||||
;;
|
||||
-mint | -mint[0-9]*)
|
||||
basic_machine=m68k-atari
|
||||
os=-mint
|
||||
;;
|
||||
esac
|
||||
|
||||
# Decode aliases for certain CPU-COMPANY combinations.
|
||||
case $basic_machine in
|
||||
# Recognize the basic CPU types without company name.
|
||||
# Some are omitted here because they have special meanings below.
|
||||
tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
|
||||
| arme[lb] | armv[2345] | armv[345][lb] | pyramid | mn10200 | mn10300 | tron | a29k \
|
||||
tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
|
||||
| arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \
|
||||
| 580 | i960 | h8300 \
|
||||
| x86 | ppcbe | mipsbe | mipsle | shbe | shle | armbe | armle \
|
||||
| hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
|
||||
| hppa64 \
|
||||
| alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \
|
||||
| alphaev6[78] \
|
||||
| we32k | ns16k | clipper | i370 | sh | sh[34] \
|
||||
| powerpc | powerpcle \
|
||||
| alpha | alphaev[4-7] | alphaev56 | alphapca5[67] \
|
||||
| we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \
|
||||
| 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \
|
||||
| mips64orion | mips64orionel | mipstx39 | mipstx39el \
|
||||
| mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
|
||||
| mips64vr5000 | miprs64vr5000el | mcore \
|
||||
| mips64vr5000 | miprs64vr5000el \
|
||||
| sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
|
||||
| thumb | d10v | d30v | fr30 | avr)
|
||||
| thumb | d10v)
|
||||
basic_machine=$basic_machine-unknown
|
||||
;;
|
||||
m6811 | m68hc11 | m6812 | m68hc12)
|
||||
# Motorola 68HC11/12.
|
||||
basic_machine=$basic_machine-unknown
|
||||
os=-none
|
||||
;;
|
||||
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65 | pj | pjl)
|
||||
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65)
|
||||
;;
|
||||
|
||||
# We use `pc' rather than `unknown'
|
||||
# because (1) that's what they normally are, and
|
||||
# (2) the word "unknown" tends to confuse beginning users.
|
||||
i[234567]86 | x86_64)
|
||||
i[34567]86)
|
||||
basic_machine=$basic_machine-pc
|
||||
;;
|
||||
# Object if more than one company name word.
|
||||
@@ -241,28 +191,23 @@ case $basic_machine in
|
||||
exit 1
|
||||
;;
|
||||
# Recognize the basic CPU types with company name.
|
||||
# FIXME: clean up the formatting here.
|
||||
vax-* | tahoe-* | i[234567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
|
||||
vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \
|
||||
| m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
|
||||
| mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
|
||||
| power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
|
||||
| xmp-* | ymp-* \
|
||||
| x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* | armbe-* | armle-* \
|
||||
| hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \
|
||||
| hppa2.0n-* | hppa64-* \
|
||||
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \
|
||||
| alphaev6[78]-* \
|
||||
| hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* | hppa2.0n-* \
|
||||
| alpha-* | alphaev[4-7]-* | alphaev56-* | alphapca5[67]-* \
|
||||
| we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
|
||||
| clipper-* | orion-* \
|
||||
| sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
|
||||
| sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \
|
||||
| mips64el-* | mips64orion-* | mips64orionel-* \
|
||||
| mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
|
||||
| mipstx39-* | mipstx39el-* | mcore-* \
|
||||
| f301-* | armv*-* | s390-* | sv1-* | t3e-* \
|
||||
| mipstx39-* | mipstx39el-* \
|
||||
| f301-* | armv*-* | t3e-* \
|
||||
| m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
|
||||
| thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* \
|
||||
| bs2000-* | tic54x-* | c54x-* | x86_64-*)
|
||||
| thumb-* | v850-* | d30v-* | tic30-* | c30-* )
|
||||
;;
|
||||
# Recognize the various machine names and aliases which stand
|
||||
# for a CPU type and a company and sometimes even an OS.
|
||||
@@ -299,14 +244,14 @@ case $basic_machine in
|
||||
os=-sysv
|
||||
;;
|
||||
amiga | amiga-*)
|
||||
basic_machine=m68k-unknown
|
||||
basic_machine=m68k-cbm
|
||||
;;
|
||||
amigaos | amigados)
|
||||
basic_machine=m68k-unknown
|
||||
basic_machine=m68k-cbm
|
||||
os=-amigaos
|
||||
;;
|
||||
amigaunix | amix)
|
||||
basic_machine=m68k-unknown
|
||||
basic_machine=m68k-cbm
|
||||
os=-sysv4
|
||||
;;
|
||||
apollo68)
|
||||
@@ -360,9 +305,6 @@ case $basic_machine in
|
||||
crds | unos)
|
||||
basic_machine=m68k-crds
|
||||
;;
|
||||
cris | cris-* | etrax*)
|
||||
basic_machine=cris-axis
|
||||
;;
|
||||
da30 | da30-*)
|
||||
basic_machine=m68k-da30
|
||||
;;
|
||||
@@ -483,6 +425,7 @@ case $basic_machine in
|
||||
;;
|
||||
i370-ibm* | ibm*)
|
||||
basic_machine=i370-ibm
|
||||
os=-mvs
|
||||
;;
|
||||
# I'm not sure what "Sysv32" means. Should this be sysv3.2?
|
||||
i[34567]86v32)
|
||||
@@ -517,10 +460,6 @@ case $basic_machine in
|
||||
basic_machine=i386-unknown
|
||||
os=-mingw32
|
||||
;;
|
||||
i[34567]86-pw32 | pw32)
|
||||
basic_machine=i586-unknown
|
||||
os=-pw32
|
||||
;;
|
||||
iris | iris4d)
|
||||
basic_machine=mips-sgi
|
||||
case $os in
|
||||
@@ -549,7 +488,7 @@ case $basic_machine in
|
||||
miniframe)
|
||||
basic_machine=m68000-convergent
|
||||
;;
|
||||
*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
|
||||
*mint | *MiNT)
|
||||
basic_machine=m68k-atari
|
||||
os=-mint
|
||||
;;
|
||||
@@ -567,10 +506,6 @@ case $basic_machine in
|
||||
mips3*)
|
||||
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
|
||||
;;
|
||||
mmix*)
|
||||
basic_machine=mmix-knuth
|
||||
os=-mmixware
|
||||
;;
|
||||
monitor)
|
||||
basic_machine=m68k-rom68k
|
||||
os=-coff
|
||||
@@ -579,10 +514,6 @@ case $basic_machine in
|
||||
basic_machine=i386-unknown
|
||||
os=-msdos
|
||||
;;
|
||||
mvs)
|
||||
basic_machine=i370-ibm
|
||||
os=-mvs
|
||||
;;
|
||||
ncr3000)
|
||||
basic_machine=i486-ncr
|
||||
os=-sysv4
|
||||
@@ -592,7 +523,7 @@ case $basic_machine in
|
||||
os=-netbsd
|
||||
;;
|
||||
netwinder)
|
||||
basic_machine=armv4l-rebel
|
||||
basic_machine=armv4l-corel
|
||||
os=-linux
|
||||
;;
|
||||
news | news700 | news800 | news900)
|
||||
@@ -640,16 +571,9 @@ case $basic_machine in
|
||||
basic_machine=i960-intel
|
||||
os=-mon960
|
||||
;;
|
||||
nonstopux)
|
||||
basic_machine=mips-compaq
|
||||
os=-nonstopux
|
||||
;;
|
||||
np1)
|
||||
basic_machine=np1-gould
|
||||
;;
|
||||
nsr-tandem)
|
||||
basic_machine=nsr-tandem
|
||||
;;
|
||||
op50n-* | op60c-*)
|
||||
basic_machine=hppa1.1-oki
|
||||
os=-proelf
|
||||
@@ -679,19 +603,19 @@ case $basic_machine in
|
||||
pc532 | pc532-*)
|
||||
basic_machine=ns32k-pc532
|
||||
;;
|
||||
pentium | p5 | k5 | k6 | nexgen)
|
||||
pentium | p5 | k5 | k6 | nexen)
|
||||
basic_machine=i586-pc
|
||||
;;
|
||||
pentiumpro | p6 | 6x86 | athlon)
|
||||
pentiumpro | p6 | 6x86)
|
||||
basic_machine=i686-pc
|
||||
;;
|
||||
pentiumii | pentium2)
|
||||
basic_machine=i786-pc
|
||||
;;
|
||||
pentium-* | p5-* | k5-* | k6-* | nexgen-*)
|
||||
pentium-* | p5-* | k5-* | k6-* | nexen-*)
|
||||
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
pentiumpro-* | p6-* | 6x86-* | athlon-*)
|
||||
pentiumpro-* | p6-* | 6x86-*)
|
||||
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
pentiumii-* | pentium2-*)
|
||||
@@ -794,10 +718,6 @@ case $basic_machine in
|
||||
sun386 | sun386i | roadrunner)
|
||||
basic_machine=i386-sun
|
||||
;;
|
||||
sv1)
|
||||
basic_machine=sv1-cray
|
||||
os=-unicos
|
||||
;;
|
||||
symmetry)
|
||||
basic_machine=i386-sequent
|
||||
os=-dynix
|
||||
@@ -806,10 +726,6 @@ case $basic_machine in
|
||||
basic_machine=t3e-cray
|
||||
os=-unicos
|
||||
;;
|
||||
tic54x | c54x*)
|
||||
basic_machine=tic54x-unknown
|
||||
os=-coff
|
||||
;;
|
||||
tx39)
|
||||
basic_machine=mipstx39-unknown
|
||||
;;
|
||||
@@ -911,9 +827,6 @@ case $basic_machine in
|
||||
we32k)
|
||||
basic_machine=we32k-att
|
||||
;;
|
||||
sh3 | sh4)
|
||||
basic_machine=sh-unknown
|
||||
;;
|
||||
sparc | sparcv9)
|
||||
basic_machine=sparc-sun
|
||||
;;
|
||||
@@ -994,25 +907,12 @@ case $os in
|
||||
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
|
||||
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
|
||||
| -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
|
||||
| -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
|
||||
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* | -storm-chaos*)
|
||||
| -interix* | -uwin* | -rhapsody* | -openstep* | -oskit*)
|
||||
# Remember, each alternative MUST END IN *, to match a version number.
|
||||
;;
|
||||
-qnx*)
|
||||
case $basic_machine in
|
||||
x86-* | i[34567]86-*)
|
||||
;;
|
||||
*)
|
||||
os=-nto$os
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
-nto*)
|
||||
os=-nto-qnx
|
||||
;;
|
||||
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
|
||||
| -windows* | -osx | -abug | -netware* | -os9* | -beos* \
|
||||
| -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
|
||||
| -macos* | -mpw* | -magic* | -mon960* | -lnews*)
|
||||
;;
|
||||
-mac*)
|
||||
os=`echo $os | sed -e 's|mac|macos|'`
|
||||
@@ -1026,12 +926,6 @@ case $os in
|
||||
-sunos6*)
|
||||
os=`echo $os | sed -e 's|sunos6|solaris3|'`
|
||||
;;
|
||||
-opened*)
|
||||
os=-openedition
|
||||
;;
|
||||
-wince*)
|
||||
os=-wince
|
||||
;;
|
||||
-osfrose*)
|
||||
os=-osfrose
|
||||
;;
|
||||
@@ -1056,9 +950,6 @@ case $os in
|
||||
-ns2 )
|
||||
os=-nextstep2
|
||||
;;
|
||||
-nsk*)
|
||||
os=-nsk
|
||||
;;
|
||||
# Preserve the version number of sinix5.
|
||||
-sinix5.*)
|
||||
os=`echo $os | sed -e 's|sinix|sysv|'`
|
||||
@@ -1121,7 +1012,7 @@ case $basic_machine in
|
||||
*-acorn)
|
||||
os=-riscix1.2
|
||||
;;
|
||||
arm*-rebel)
|
||||
arm*-corel)
|
||||
os=-linux
|
||||
;;
|
||||
arm*-semi)
|
||||
@@ -1295,7 +1186,7 @@ case $basic_machine in
|
||||
-genix*)
|
||||
vendor=ns
|
||||
;;
|
||||
-mvs* | -opened*)
|
||||
-mvs*)
|
||||
vendor=ibm
|
||||
;;
|
||||
-ptx*)
|
||||
@@ -1322,11 +1213,3 @@ case $basic_machine in
|
||||
esac
|
||||
|
||||
echo $basic_machine$os
|
||||
exit 0
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "version='"
|
||||
# time-stamp-format: "%:y-%02m-%02d"
|
||||
# time-stamp-end: "'"
|
||||
# End:
|
||||
|
2238
configure.in
2238
configure.in
File diff suppressed because it is too large
Load Diff
@@ -8,8 +8,6 @@ all:
|
||||
clean:
|
||||
cd src; make clean
|
||||
cd samples; make clean
|
||||
cd utils; make clean
|
||||
|
||||
|
||||
samples:
|
||||
cd samples; make
|
||||
|
62
contrib/configure
vendored
62
contrib/configure
vendored
@@ -812,45 +812,17 @@ done
|
||||
ac_given_srcdir=$srcdir
|
||||
|
||||
trap 'rm -fr `echo "
|
||||
Makefile
|
||||
src/Makefile
|
||||
src/ogl/Makefile
|
||||
src/mmedia/Makefile
|
||||
src/stc/Makefile
|
||||
src/xrc/Makefile
|
||||
src/canvas/Makefile
|
||||
src/gizmos/Makefile
|
||||
src/plot/Makefile
|
||||
src/applet/Makefile
|
||||
src/fl/Makefile
|
||||
src/net/Makefile
|
||||
samples/Makefile
|
||||
samples/mmedia/Makefile
|
||||
samples/ogl/Makefile
|
||||
samples/ogl/ogledit/Makefile
|
||||
samples/ogl/studio/Makefile
|
||||
samples/stc/Makefile
|
||||
samples/canvas/Makefile
|
||||
samples/canvas/test/Makefile
|
||||
samples/canvas/simple/Makefile
|
||||
samples/gizmos/Makefile
|
||||
samples/gizmos/multicell/Makefile
|
||||
samples/gizmos/splittree/Makefile
|
||||
samples/gizmos/editlbox/Makefile
|
||||
samples/gizmos/dynsash/Makefile
|
||||
samples/gizmos/dynsash_switch/Makefile
|
||||
samples/xrc/Makefile
|
||||
samples/plot/Makefile
|
||||
samples/applet/Makefile
|
||||
samples/fl/Makefile
|
||||
samples/fl/fl_demo1/Makefile
|
||||
samples/fl/fl_demo2/Makefile
|
||||
samples/fl/fl_sample1/Makefile
|
||||
samples/fl/fl_sample2/Makefile
|
||||
samples/fl/fl_sample3/Makefile
|
||||
utils/Makefile
|
||||
utils/wxrc/Makefile
|
||||
utils/wxrcedit/Makefile
|
||||
utils/convertrc/Makefile
|
||||
" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
|
||||
EOF
|
||||
cat >> $CONFIG_STATUS <<EOF
|
||||
@@ -929,45 +901,17 @@ EOF
|
||||
|
||||
cat >> $CONFIG_STATUS <<EOF
|
||||
|
||||
CONFIG_FILES=\${CONFIG_FILES-"src/Makefile
|
||||
CONFIG_FILES=\${CONFIG_FILES-"Makefile
|
||||
src/Makefile
|
||||
src/ogl/Makefile
|
||||
src/mmedia/Makefile
|
||||
src/stc/Makefile
|
||||
src/xrc/Makefile
|
||||
src/canvas/Makefile
|
||||
src/gizmos/Makefile
|
||||
src/plot/Makefile
|
||||
src/applet/Makefile
|
||||
src/fl/Makefile
|
||||
src/net/Makefile
|
||||
samples/Makefile
|
||||
samples/mmedia/Makefile
|
||||
samples/ogl/Makefile
|
||||
samples/ogl/ogledit/Makefile
|
||||
samples/ogl/studio/Makefile
|
||||
samples/stc/Makefile
|
||||
samples/canvas/Makefile
|
||||
samples/canvas/test/Makefile
|
||||
samples/canvas/simple/Makefile
|
||||
samples/gizmos/Makefile
|
||||
samples/gizmos/multicell/Makefile
|
||||
samples/gizmos/splittree/Makefile
|
||||
samples/gizmos/editlbox/Makefile
|
||||
samples/gizmos/dynsash/Makefile
|
||||
samples/gizmos/dynsash_switch/Makefile
|
||||
samples/xrc/Makefile
|
||||
samples/plot/Makefile
|
||||
samples/applet/Makefile
|
||||
samples/fl/Makefile
|
||||
samples/fl/fl_demo1/Makefile
|
||||
samples/fl/fl_demo2/Makefile
|
||||
samples/fl/fl_sample1/Makefile
|
||||
samples/fl/fl_sample2/Makefile
|
||||
samples/fl/fl_sample3/Makefile
|
||||
utils/Makefile
|
||||
utils/wxrc/Makefile
|
||||
utils/wxrcedit/Makefile
|
||||
utils/convertrc/Makefile
|
||||
"}
|
||||
EOF
|
||||
cat >> $CONFIG_STATUS <<\EOF
|
||||
|
@@ -37,43 +37,15 @@ dnl File output
|
||||
|
||||
|
||||
AC_OUTPUT([
|
||||
Makefile
|
||||
src/Makefile
|
||||
src/ogl/Makefile
|
||||
src/mmedia/Makefile
|
||||
src/stc/Makefile
|
||||
src/xrc/Makefile
|
||||
src/canvas/Makefile
|
||||
src/gizmos/Makefile
|
||||
src/plot/Makefile
|
||||
src/applet/Makefile
|
||||
src/fl/Makefile
|
||||
src/net/Makefile
|
||||
samples/Makefile
|
||||
samples/mmedia/Makefile
|
||||
samples/ogl/Makefile
|
||||
samples/ogl/ogledit/Makefile
|
||||
samples/ogl/studio/Makefile
|
||||
samples/stc/Makefile
|
||||
samples/canvas/Makefile
|
||||
samples/canvas/test/Makefile
|
||||
samples/canvas/simple/Makefile
|
||||
samples/gizmos/Makefile
|
||||
samples/gizmos/multicell/Makefile
|
||||
samples/gizmos/splittree/Makefile
|
||||
samples/gizmos/editlbox/Makefile
|
||||
samples/gizmos/dynsash/Makefile
|
||||
samples/gizmos/dynsash_switch/Makefile
|
||||
samples/xrc/Makefile
|
||||
samples/plot/Makefile
|
||||
samples/applet/Makefile
|
||||
samples/fl/Makefile
|
||||
samples/fl/fl_demo1/Makefile
|
||||
samples/fl/fl_demo2/Makefile
|
||||
samples/fl/fl_sample1/Makefile
|
||||
samples/fl/fl_sample2/Makefile
|
||||
samples/fl/fl_sample3/Makefile
|
||||
utils/Makefile
|
||||
utils/wxrc/Makefile
|
||||
utils/wxrcedit/Makefile
|
||||
utils/convertrc/Makefile
|
||||
])
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 440 B |
@@ -214,30 +214,15 @@ been set. In all other cases, you must return FALSE.
|
||||
\membersection{wxSoundFileStream::RepositionStream}\label{wxsoundfilestreamrepositionstream}
|
||||
\func{bool}{RepositionStream}{\param{wxUint32 }{position}}
|
||||
|
||||
This is called by wxSoundFileStream::SetPosition to seek the input stream
|
||||
to the right position. This must be overidden by the file codec class.
|
||||
The position is relative to the beginning of the samples.
|
||||
If it is impossible (as for a piped input stream), you must return FALSE.
|
||||
|
||||
\membersection{wxSoundFileStream::FinishPreparation}\label{wxsoundfilestreamfinishpreparation}
|
||||
\func{void}{FinishPreparation}{\param{wxUint32 }{len}}
|
||||
|
||||
This is an internal function but it must called by the file codec class when
|
||||
the "playing" preparation is finished and you know the size of the stream.
|
||||
If it is an {\it infinite} stream, you should set this to wxSOUND\_INFINITE\_TIME.
|
||||
|
||||
\membersection{wxSoundFileStream::GetData}\label{wxsoundfilestreamgetdata}
|
||||
\func{wxUint32}{GetData}{\param{void* }{buffer}, \param{wxUint32 }{len}}
|
||||
|
||||
This is called by wxSoundFileStream when it needs to get new sound data to
|
||||
send to the device driver (or to a conversion codec). This must be eventually
|
||||
overidden by the file codec class. The default behaviour is simply to read from
|
||||
the input stream.
|
||||
|
||||
\membersection{wxSoundFileStream::PutData}\label{wxsoundfilestreamputdata}
|
||||
\func{wxUint32}{PutData}{\param{const void* }{buffer}, \param{wxUint32 }{len}}
|
||||
|
||||
This is called by wxSoundFileStream when it needs to put new sound data received
|
||||
from the device driver (or from a conversion codec). This must be eventually
|
||||
overidden by the file codec class. The default behaviour is simply to write to
|
||||
the input stream.
|
||||
|
@@ -6,8 +6,8 @@
|
||||
|
||||
\section{\class{wxSoundRouterStream}}\label{wxsoundrouterstream}
|
||||
|
||||
This is the router "codec" class. It should do codec routing when the device
|
||||
driver does not deal with a format.
|
||||
|
||||
Codec router class
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
@@ -17,21 +17,43 @@ driver does not deal with a format.
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxSoundRouterStream::wxSoundRouterStream}\label{wxsoundrouterstreamwxsoundrouterstream}
|
||||
\func{}{wxSoundRouterStream}{\param{wxSoundStream\& }{sndio}}
|
||||
|
||||
\helpref{wxSoundCodec}{wxsoundcodec}
|
||||
\membersection{wxSoundRouterStream::wxSoundRouterStream}\label{wxsoundrouterstreamwxsoundrouterstream}
|
||||
|
||||
\func{}{wxSoundRouterStream}{\param{wxSoundStream\& }{sndio}}
|
||||
|
||||
|
||||
\membersection{wxSoundRouterStream::\destruct{wxSoundRouterStream}}\label{wxsoundrouterstreamdtor}
|
||||
|
||||
\func{}{\destruct{wxSoundRouterStream}}{\void}
|
||||
|
||||
Destructor.
|
||||
|
||||
\membersection{wxSoundRouterStream::Read}\label{wxsoundrouterstreamread}
|
||||
|
||||
\func{wxSoundStream\&}{Read}{\param{void* }{buffer}, \param{wxUint32 }{len}}
|
||||
|
||||
|
||||
\membersection{wxSoundRouterStream::Write}\label{wxsoundrouterstreamwrite}
|
||||
|
||||
\func{wxSoundStream\&}{Write}{\param{const void* }{buffer}, \param{wxUint32 }{len}}
|
||||
|
||||
|
||||
\membersection{wxSoundRouterStream::SetSoundFormat}\label{wxsoundrouterstreamsetsoundformat}
|
||||
|
||||
\func{bool}{SetSoundFormat}{\param{const wxSoundFormatBase\& }{format}}
|
||||
|
||||
SetSoundFormat will first try to setup the device driver with the specified
|
||||
format. If this fails, it will try to find a codec which will convert the
|
||||
input format to a valid format for the device driver. It uses an internal
|
||||
codec database.
|
||||
|
||||
\membersection{wxSoundRouterStream::StartProduction}\label{wxsoundrouterstreamstartproduction}
|
||||
|
||||
\func{bool}{StartProduction}{\param{int }{evt}}
|
||||
|
||||
|
||||
\membersection{wxSoundRouterStream::StopProduction}\label{wxsoundrouterstreamstopproduction}
|
||||
|
||||
\func{bool}{StopProduction}{\void}
|
||||
|
||||
|
||||
\membersection{wxSoundRouterStream::GetBestSize}\label{wxsoundrouterstreamgetbestsize}
|
||||
|
||||
\constfunc{wxUint32}{GetBestSize}{\void}
|
||||
|
||||
|
@@ -1,4 +1,3 @@
|
||||
; Last change: JAC 13 Oct 100 5:16 pm
|
||||
runTwice = yes
|
||||
titleFontSize = 12
|
||||
authorFontSize = 10
|
||||
@@ -14,7 +13,7 @@ htmlBrowseButtons = bitmap
|
||||
winHelpVersion = 3
|
||||
winHelpContents = yes
|
||||
winHelpTitle = "MMedia Manual"
|
||||
truncateFilenames = no
|
||||
truncateFilenames = yes
|
||||
combineSubSections = yes
|
||||
\overview [2] {\rtfonly{See also }\settransparency{on}\sethotspotcolour{off}\sethotspotunderline{on}\winhelponly{\image{}{books.bmp}\settransparency{off}}
|
||||
\htmlonly{\image{}{books.gif}}\helpref{#1}{#2}
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 440 B |
@@ -1,4 +1,4 @@
|
||||
; Last change: JAC 13 Oct 100 5:11 pm
|
||||
; Last change: JS 8 Sep 98 2:54 pm
|
||||
runTwice = yes
|
||||
titleFontSize = 12
|
||||
authorFontSize = 10
|
||||
|
@@ -1,335 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: animate.h
|
||||
// Purpose: Animation classes
|
||||
// Author: Julian Smart and Guillermo Rodriguez Garcia
|
||||
// Modified by:
|
||||
// Created: 13/8/99
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Guillermo Rodriguez Garcia
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_ANIMATEH__
|
||||
#define _WX_ANIMATEH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "animate.h"
|
||||
#endif
|
||||
|
||||
#include <wx/defs.h>
|
||||
#include <wx/string.h>
|
||||
#include <wx/gdicmn.h>
|
||||
#include <wx/list.h>
|
||||
#include <wx/timer.h>
|
||||
|
||||
//#define ANIMDLLEXPORT WXDLLEXPORT
|
||||
#define ANIMDLLEXPORT
|
||||
|
||||
class ANIMDLLEXPORT wxAnimationBase;
|
||||
class ANIMDLLEXPORT wxAnimationPlayer;
|
||||
class WXDLLEXPORT wxImage;
|
||||
|
||||
enum wxAnimationDisposal
|
||||
{
|
||||
wxANIM_UNSPECIFIED = -1,
|
||||
wxANIM_DONOTREMOVE = 0,
|
||||
wxANIM_TOBACKGROUND = 1,
|
||||
wxANIM_TOPREVIOUS = 2
|
||||
} ;
|
||||
|
||||
class ANIMDLLEXPORT wxAnimationTimer: public wxTimer
|
||||
{
|
||||
public:
|
||||
wxAnimationTimer() { m_player = (wxAnimationPlayer*) NULL; }
|
||||
|
||||
virtual void Notify();
|
||||
void SetPlayer(wxAnimationPlayer* player) { m_player = player; }
|
||||
|
||||
protected:
|
||||
wxAnimationPlayer* m_player;
|
||||
};
|
||||
|
||||
/* wxAnimationPlayer
|
||||
* Create an object of this class, and either pass an wxXXXAnimation object in the constructor,
|
||||
* or call SetAnimation. Then call Play().
|
||||
* The wxAnimation object is only destroyed in the destructor if destroyAnimation is TRUE
|
||||
* in the constructor.
|
||||
*/
|
||||
|
||||
class ANIMDLLEXPORT wxAnimationPlayer : public wxObject
|
||||
{
|
||||
DECLARE_CLASS(wxAnimationPlayer)
|
||||
|
||||
public:
|
||||
wxAnimationPlayer(wxAnimationBase *animation = (wxAnimationBase *) NULL, bool destroyAnimation = FALSE);
|
||||
~wxAnimationPlayer();
|
||||
//// Accessors
|
||||
|
||||
void SetAnimation(wxAnimationBase* animation, bool destroyAnimation = FALSE);
|
||||
wxAnimationBase* GetAnimation() const { return m_animation; }
|
||||
|
||||
void SetDestroyAnimation(bool destroyAnimation) { m_destroyAnimation = destroyAnimation; };
|
||||
bool GetDestroyAnimation() const { return m_destroyAnimation; }
|
||||
|
||||
void SetCurrentFrame(int currentFrame) { m_currentFrame = currentFrame; };
|
||||
int GetCurrentFrame() const { return m_currentFrame; }
|
||||
|
||||
void SetWindow(wxWindow* window) { m_window = window; };
|
||||
wxWindow* GetWindow() const { return m_window; }
|
||||
|
||||
void SetPosition(const wxPoint& pos) { m_position = pos; };
|
||||
wxPoint GetPosition() const { return m_position; }
|
||||
|
||||
void SetLooped(bool looped) { m_looped = looped; };
|
||||
bool GetLooped() const { return m_looped; }
|
||||
|
||||
bool HasAnimation() const { return (m_animation != (wxAnimationBase*) NULL); }
|
||||
|
||||
bool IsPlaying() const { return m_isPlaying; }
|
||||
|
||||
// Specify whether the GIF's background colour is to be shown,
|
||||
// or whether the window background should show through (the default)
|
||||
void UseBackgroundColour(bool useBackground) { m_useBackgroundColour = useBackground; }
|
||||
bool UsingBackgroundColour() const { return m_useBackgroundColour; }
|
||||
|
||||
// Set and use a user-specified background colour (valid for transparent
|
||||
// animations only)
|
||||
void SetCustomBackgroundColour(const wxColour& col, bool useCustomBackgroundColour = TRUE)
|
||||
{ m_customBackgroundColour = col; m_useCustomBackgroundColour = useCustomBackgroundColour; }
|
||||
|
||||
bool UsingCustomBackgroundColour() const { return m_useCustomBackgroundColour; }
|
||||
const wxColour& GetCustomBackgroundColour() const { return m_customBackgroundColour; }
|
||||
|
||||
// Another refinement - suppose we're drawing the animation in a separate
|
||||
// control or window. We may wish to use the background of the parent
|
||||
// window as the background of our animation. This allows us to specify
|
||||
// whether to grab from the parent or from this window.
|
||||
void UseParentBackground(bool useParent) { m_useParentBackground = useParent; }
|
||||
bool UsingParentBackground() const { return m_useParentBackground; }
|
||||
|
||||
//// Operations
|
||||
|
||||
// Play
|
||||
virtual bool Play(wxWindow& window, const wxPoint& pos = wxPoint(0, 0), bool looped = TRUE);
|
||||
|
||||
// Build animation (list of wxImages). If not called before Play
|
||||
// is called, Play will call this automatically.
|
||||
virtual bool Build();
|
||||
|
||||
// Stop the animation
|
||||
virtual void Stop();
|
||||
|
||||
// Draw the current view of the animation into this DC.
|
||||
// Call this from your OnPaint, for example.
|
||||
virtual void Draw(wxDC& dc);
|
||||
|
||||
//// Accessing the current animation
|
||||
|
||||
virtual int GetFrameCount() const;
|
||||
virtual wxImage* GetFrame(int i) const; // Creates a new wxImage
|
||||
virtual wxAnimationDisposal GetDisposalMethod(int i) const;
|
||||
virtual wxRect GetFrameRect(int i) const; // Position and size of frame
|
||||
virtual int GetDelay(int i) const; // Delay for this frame
|
||||
|
||||
virtual wxSize GetLogicalScreenSize() const;
|
||||
virtual bool GetBackgroundColour(wxColour& col) const ;
|
||||
virtual bool GetTransparentColour(wxColour& col) const ;
|
||||
|
||||
//// Implementation
|
||||
|
||||
// Play the frame
|
||||
virtual bool PlayFrame(int frame, wxWindow& window, wxPoint& pos);
|
||||
virtual bool PlayFrame();
|
||||
virtual void DrawFrame(int frame, wxDC& dc, const wxPoint& pos);
|
||||
virtual void DrawBackground(wxDC& dc, const wxPoint& pos, const wxColour& colour);
|
||||
|
||||
// Clear the wxImage cache
|
||||
virtual void ClearCache();
|
||||
|
||||
// Save the pertinent area of the window so we can restore
|
||||
// it if drawing transparently
|
||||
void SaveBackground(const wxRect& rect);
|
||||
|
||||
wxBitmap& GetBackingStore() { return m_backingStore; }
|
||||
|
||||
//// Data members
|
||||
protected:
|
||||
wxAnimationBase* m_animation;
|
||||
bool m_destroyAnimation; // Destroy m_animation on deletion of this object
|
||||
wxList m_frames; // List of cached wxBitmap frames.
|
||||
int m_currentFrame; // Current frame
|
||||
wxWindow* m_window; // Window to draw into
|
||||
wxPoint m_position; // Position to draw at
|
||||
bool m_looped; // Looped, or not
|
||||
wxAnimationTimer m_timer; // The timer
|
||||
bool m_isPlaying; // Is the animation playing?
|
||||
wxBitmap m_savedBackground; // Saved background of window portion
|
||||
wxBitmap m_backingStore; // The player draws into this
|
||||
bool m_useBackgroundColour; // Use colour or background
|
||||
wxColour m_customBackgroundColour; // Override animation background
|
||||
bool m_useCustomBackgroundColour;
|
||||
bool m_useParentBackground; // Grab background from parent?
|
||||
};
|
||||
|
||||
/* wxAnimationBase
|
||||
* Base class for animations.
|
||||
* A wxXXXAnimation only stores the animation, providing accessors to wxAnimationPlayer.
|
||||
* Currently an animation is read-only, but we could extend the API for adding frames
|
||||
* programmatically, and perhaps have a wxMemoryAnimation class that stores its frames
|
||||
* in memory, and is able to save all files with suitable filenames. You could then use
|
||||
* e.g. Ulead GIF Animator to load the image files into a GIF animation.
|
||||
*/
|
||||
|
||||
class ANIMDLLEXPORT wxAnimationBase : public wxObject
|
||||
{
|
||||
DECLARE_ABSTRACT_CLASS(wxAnimationBase)
|
||||
|
||||
public:
|
||||
wxAnimationBase() {};
|
||||
~wxAnimationBase() {};
|
||||
|
||||
//// Accessors. Should be overridden by each derived class.
|
||||
|
||||
virtual int GetFrameCount() const = 0;
|
||||
virtual wxImage* GetFrame(int i) const = 0; // Creates a new wxImage
|
||||
virtual wxAnimationDisposal GetDisposalMethod(int i) const = 0;
|
||||
virtual wxRect GetFrameRect(int i) const = 0; // Position and size of frame
|
||||
virtual int GetDelay(int i) const = 0; // Delay for this frame
|
||||
|
||||
virtual wxSize GetLogicalScreenSize() const = 0;
|
||||
virtual bool GetBackgroundColour(wxColour& col) const = 0;
|
||||
virtual bool GetTransparentColour(wxColour& col) const = 0;
|
||||
|
||||
// Is the animation OK?
|
||||
virtual bool IsValid() const = 0;
|
||||
|
||||
//// Operations
|
||||
|
||||
virtual bool LoadFile(const wxString& filename) { return FALSE; }
|
||||
};
|
||||
|
||||
/* wxGIFAnimation
|
||||
* This will be moved to a separate file in due course.
|
||||
*/
|
||||
|
||||
class ANIMDLLEXPORT wxGIFDecoder;
|
||||
|
||||
class ANIMDLLEXPORT wxGIFAnimation : public wxAnimationBase
|
||||
{
|
||||
DECLARE_CLASS(wxGIFAnimation)
|
||||
|
||||
public:
|
||||
wxGIFAnimation() ;
|
||||
~wxGIFAnimation() ;
|
||||
|
||||
//// Accessors
|
||||
|
||||
virtual int GetFrameCount() const;
|
||||
virtual wxImage* GetFrame(int i) const;
|
||||
virtual wxAnimationDisposal GetDisposalMethod(int i) const;
|
||||
virtual wxRect GetFrameRect(int i) const; // Position and size of frame
|
||||
virtual int GetDelay(int i) const; // Delay for this frame
|
||||
|
||||
virtual wxSize GetLogicalScreenSize() const ;
|
||||
virtual bool GetBackgroundColour(wxColour& col) const ;
|
||||
virtual bool GetTransparentColour(wxColour& col) const ;
|
||||
|
||||
virtual bool IsValid() const;
|
||||
|
||||
//// Operations
|
||||
|
||||
virtual bool LoadFile(const wxString& filename);
|
||||
|
||||
protected:
|
||||
|
||||
wxGIFDecoder* m_decoder;
|
||||
};
|
||||
|
||||
/*
|
||||
* wxAnimationCtrlBase
|
||||
* Abstract base class for format-specific animation controls.
|
||||
* This class implements most of the functionality; all a derived
|
||||
* class has to do is create the appropriate animation class on demand.
|
||||
*/
|
||||
|
||||
// Resize to animation size if this is set
|
||||
#define wxAN_FIT_ANIMATION 0x0010
|
||||
|
||||
class ANIMDLLEXPORT wxAnimationCtrlBase: public wxControl
|
||||
{
|
||||
public:
|
||||
wxAnimationCtrlBase() { }
|
||||
wxAnimationCtrlBase(wxWindow *parent, wxWindowID id,
|
||||
const wxString& filename = wxEmptyString,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = wxAN_FIT_ANIMATION|wxNO_BORDER,
|
||||
const wxString& name = wxT("animationControl"))
|
||||
{
|
||||
Create(parent, id, filename, pos, size, style, name);
|
||||
}
|
||||
~wxAnimationCtrlBase();
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxString& filename = wxEmptyString,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = wxAN_FIT_ANIMATION|wxNO_BORDER,
|
||||
const wxString& name = wxT("animationControl"));
|
||||
|
||||
//// Operations
|
||||
virtual bool LoadFile(const wxString& filename = wxEmptyString);
|
||||
virtual bool Play(bool looped = TRUE) ;
|
||||
virtual void Stop() { m_animationPlayer.Stop(); }
|
||||
virtual void FitToAnimation();
|
||||
|
||||
//// Accessors
|
||||
virtual bool IsPlaying() const { return m_animationPlayer.IsPlaying(); }
|
||||
virtual wxAnimationPlayer& GetPlayer() { return m_animationPlayer; }
|
||||
virtual wxAnimationBase* GetAnimation() { return m_animation; }
|
||||
|
||||
const wxString& GetFilename() const { return m_filename; }
|
||||
void SetFilename(const wxString& filename) { m_filename = filename; }
|
||||
|
||||
//// Event handlers
|
||||
void OnPaint(wxPaintEvent& event);
|
||||
|
||||
protected:
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
// Override this in derived classes
|
||||
virtual wxAnimationBase* DoCreateAnimation(const wxString& filename) = 0;
|
||||
|
||||
wxAnimationPlayer m_animationPlayer;
|
||||
wxAnimationBase* m_animation;
|
||||
wxString m_filename;
|
||||
|
||||
private:
|
||||
DECLARE_ABSTRACT_CLASS(wxAnimationCtrlBase)
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
/*
|
||||
* wxGIFAnimationCtrl
|
||||
* Provides a GIF animation class when required.
|
||||
*/
|
||||
|
||||
class ANIMDLLEXPORT wxGIFAnimationCtrl: public wxAnimationCtrlBase
|
||||
{
|
||||
public:
|
||||
wxGIFAnimationCtrl() { }
|
||||
wxGIFAnimationCtrl(wxWindow *parent, wxWindowID id,
|
||||
const wxString& filename = wxEmptyString,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = wxAN_FIT_ANIMATION|wxNO_BORDER,
|
||||
const wxString& name = wxT("animationControl"))
|
||||
{
|
||||
Create(parent, id, filename, pos, size, style, name);
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual wxAnimationBase* DoCreateAnimation(const wxString& filename) ;
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxGIFAnimationCtrl)
|
||||
};
|
||||
|
||||
#endif // _WX_ANIMATEH__
|
||||
|
@@ -1,85 +0,0 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* wxWindows HTML Applet Package
|
||||
*
|
||||
* Copyright (C) 1991-2001 SciTech Software, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* ========================================================================
|
||||
*
|
||||
* The contents of this file are subject to the wxWindows License
|
||||
* Version 3.0 (the "License"); 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/licence3.txt
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* ========================================================================
|
||||
*
|
||||
* 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/html/htmlwin.h"
|
||||
|
||||
// Forward declaration
|
||||
class wxHtmlAppletWindow;
|
||||
|
||||
/*--------------------------- 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 wxHtmlTag& params,
|
||||
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
|
||||
|
@@ -1,95 +0,0 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* wxWindows HTML Applet Package
|
||||
*
|
||||
* Copyright (C) 1991-2001 SciTech Software, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* ========================================================================
|
||||
*
|
||||
* The contents of this file are subject to the wxWindows License
|
||||
* Version 3.0 (the "License"); 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/licence3.txt
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* ========================================================================
|
||||
*
|
||||
* Language: ANSI C++
|
||||
* Environment: Any
|
||||
*
|
||||
* Description: Header file for wxEchoVariable Class, Dynamically constructed
|
||||
* objects representing variables in SSI #echo directive
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __WX_ECHOVAR_H
|
||||
#define __WX_ECHOVAR_H
|
||||
|
||||
/*--------------------------- Class Definitions ---------------------------*/
|
||||
|
||||
/****************************************************************************
|
||||
REMARKS:
|
||||
wxEchoVariable class Definition
|
||||
****************************************************************************/
|
||||
class wxEchoVariable : public wxObject {
|
||||
private:
|
||||
DECLARE_ABSTRACT_CLASS(wxEchoVariable);
|
||||
|
||||
public:
|
||||
wxEchoVariable() : wxObject() {}
|
||||
~wxEchoVariable() {}
|
||||
|
||||
/****************************************************************************
|
||||
RETURNS:
|
||||
The boolean value of the variable
|
||||
|
||||
PARAMETERS:
|
||||
parms - Optional parameter string passed from parm= field in HTML
|
||||
|
||||
REMARKS:
|
||||
To create new variables for the #echo HTML preprocessing directives
|
||||
you need to derive classes from wxEchoVariable and override the
|
||||
pure virtual GetValue function. However this should not be done directly
|
||||
but by using the BEGIN_ECHO_VARIABLE and END_ECHO_VARIABLE macros
|
||||
|
||||
SEE ALSO:
|
||||
wxEchoPrep, BEGIN_ECHO_VARIABLE, END_ECHO_VARIABLE
|
||||
****************************************************************************/
|
||||
virtual wxString GetValue(const char *parms = NULL) const = 0;
|
||||
|
||||
|
||||
public:
|
||||
// static function to retrieve any variable avaliable
|
||||
static wxString FindValue(const wxString &cls, const char *parms = NULL);
|
||||
};
|
||||
|
||||
/*--------------------------------- MACROS --------------------------------*/
|
||||
|
||||
#define ECHO_PARM (_BEV_parm)
|
||||
#define BEGIN_ECHO_VARIABLE(name) \
|
||||
class wxEchoVariable##name : public wxEchoVariable { \
|
||||
private: \
|
||||
DECLARE_DYNAMIC_CLASS(wxEchoVariable##name##); \
|
||||
public: \
|
||||
wxEchoVariable##name##() : wxEchoVariable() {} \
|
||||
virtual wxString GetValue(const char *parms = NULL) const; \
|
||||
}; \
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxEchoVariable##name##, wxEchoVariable); \
|
||||
wxString wxEchoVariable##name :: GetValue(const char *parms) const { \
|
||||
wxString _BEV_parm = wxString(parms);
|
||||
|
||||
#define END_ECHO_VARIABLE(returnval) \
|
||||
return returnval; \
|
||||
}
|
||||
|
||||
#define STRING_ECHO_VARIABLE(name, string) \
|
||||
BEGIN_ECHO_VARIABLE(##name##); \
|
||||
END_ECHO_VARIABLE(wxString(##string##))
|
||||
|
||||
#endif // __WX_ECHOVAR_H
|
||||
|
@@ -1,94 +0,0 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* wxWindows HTML Applet Package
|
||||
*
|
||||
* Copyright (C) 1991-2001 SciTech Software, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* ========================================================================
|
||||
*
|
||||
* The contents of this file are subject to the wxWindows License
|
||||
* Version 3.0 (the "License"); 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/licence3.txt
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* ========================================================================
|
||||
*
|
||||
* Language: ANSI C++
|
||||
* Environment: Any
|
||||
*
|
||||
* Description: Header file for wxIfElseVariable Class, Dynamically constructed
|
||||
* objects representing variables in SSI #if, #else and #endif directives
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __WX_IFELSEVAR_H
|
||||
#define __WX_IFELSEVAR_H
|
||||
|
||||
/*--------------------------- Class Definitions ---------------------------*/
|
||||
|
||||
/****************************************************************************
|
||||
REMARKS:
|
||||
This class is used to create variables for the HTML preprocessor #if, #else,
|
||||
and #endif directives.
|
||||
|
||||
SEE ALSO:
|
||||
wxIfElsePrep
|
||||
****************************************************************************/
|
||||
class wxIfElseVariable : public wxObject {
|
||||
private:
|
||||
DECLARE_ABSTRACT_CLASS(wxIfElseVariable);
|
||||
|
||||
public:
|
||||
wxIfElseVariable() : wxObject() {}
|
||||
~wxIfElseVariable() {}
|
||||
|
||||
/****************************************************************************
|
||||
RETURNS:
|
||||
The boolean value of the variable
|
||||
|
||||
REMARKS:
|
||||
To create new variables for the #if, #else and #endif HTML preprocessing
|
||||
blocks you need to derive classes from wxIfElseVariable and override the
|
||||
pure virtual GetValue function. However this should not be done directly
|
||||
but by using the BEGIN_IFELSE_VARIABLE and END_IFELSE_VARIABLE macros
|
||||
|
||||
SEE ALSO:
|
||||
wxIfElsePrep, BEGIN_IFELSE_VARIABLE, END_IFELSE_VARIABLE
|
||||
****************************************************************************/
|
||||
virtual bool GetValue() const = 0;
|
||||
|
||||
|
||||
public:
|
||||
// static function to retrieve any variable avaliable
|
||||
static bool FindValue(const wxString &cls);
|
||||
};
|
||||
|
||||
/*--------------------------------- MACROS --------------------------------*/
|
||||
|
||||
#define BEGIN_IFELSE_VARIABLE(name) \
|
||||
class wxIfElseVariable##name : public wxIfElseVariable { \
|
||||
private: \
|
||||
DECLARE_DYNAMIC_CLASS(wxIfElseVariable##name##); \
|
||||
public: \
|
||||
wxIfElseVariable##name##() : wxIfElseVariable() {} \
|
||||
virtual bool GetValue() const; \
|
||||
}; \
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxIfElseVariable##name##, wxIfElseVariable); \
|
||||
bool wxIfElseVariable##name :: GetValue() const {
|
||||
|
||||
#define END_IFELSE_VARIABLE(returnval) \
|
||||
return returnval; \
|
||||
}
|
||||
|
||||
#define IFELSE_VARIABLE(name, state) \
|
||||
BEGIN_IFELSE_VARIABLE(##name##); \
|
||||
END_IFELSE_VARIABLE(bool (state))
|
||||
|
||||
#endif // __WX_IFELSEVAR_H
|
||||
|
@@ -1,109 +0,0 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* wxWindows HTML Applet Package
|
||||
*
|
||||
* Copyright (C) 1991-2001 SciTech Software, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* ========================================================================
|
||||
*
|
||||
* The contents of this file are subject to the wxWindows License
|
||||
* Version 3.0 (the "License"); 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/licence3.txt
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* ========================================================================
|
||||
*
|
||||
* Language: ANSI C++
|
||||
* Environment: Any
|
||||
*
|
||||
* Description: Header file for the wxLoadPage Event class
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __WX_LOAD_PAGE_H
|
||||
#define __WX_LOAD_PAGE_H
|
||||
|
||||
#include "wx/html/htmlwin.h"
|
||||
|
||||
// Forward declaration
|
||||
class wxHtmlAppletWindow;
|
||||
|
||||
// If we are compiling this code into a library that links against
|
||||
// the DLL, we need to remove all the __declspec(dllimports) that
|
||||
// would declare our classes below incorrectly.
|
||||
|
||||
#ifndef WXMAKINGDLL
|
||||
#undef WXDLLEXPORT
|
||||
#define WXDLLEXPORT
|
||||
#endif
|
||||
// Declare our local load page event type
|
||||
BEGIN_DECLARE_EVENT_TYPES()
|
||||
DECLARE_EVENT_TYPE(wxEVT_LOAD_PAGE, wxEVT_USER_FIRST+1)
|
||||
DECLARE_EVENT_TYPE(wxEVT_PAGE_LOADED, wxEVT_USER_FIRST+2)
|
||||
END_DECLARE_EVENT_TYPES()
|
||||
|
||||
/*--------------------------- Class Definitions ---------------------------*/
|
||||
|
||||
/****************************************************************************
|
||||
REMARKS:
|
||||
Defines the class for load page events.
|
||||
****************************************************************************/
|
||||
class wxLoadPageEvent : public wxEvent {
|
||||
DECLARE_DYNAMIC_CLASS(wxLoadPageEvent);
|
||||
|
||||
protected:
|
||||
wxString m_hRef;
|
||||
wxHtmlAppletWindow *m_htmlWindow;
|
||||
|
||||
public:
|
||||
// Constructor
|
||||
wxLoadPageEvent(const wxString &hRef = "",wxHtmlAppletWindow *htmlWindow = NULL);
|
||||
|
||||
// Destructor
|
||||
~wxLoadPageEvent() {}
|
||||
|
||||
// Return the hmtl window for the load page operation
|
||||
wxHtmlAppletWindow *GetHtmlWindow() { return m_htmlWindow; };
|
||||
|
||||
// Get the hRef string for the load page operation
|
||||
const wxString & GetHRef() { return m_hRef; };
|
||||
|
||||
// Copy constructor for the object
|
||||
void CopyObject(wxObject& obj) const;
|
||||
};
|
||||
|
||||
|
||||
// Define the macro to create our event type
|
||||
typedef void (wxEvtHandler::*wxLoadPageEventFunction)(wxLoadPageEvent&);
|
||||
#define EVT_LOAD_PAGE(fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_LOAD_PAGE, -1, -1, (wxObjectEventFunction)(wxEventFunction)(wxLoadPageEventFunction) & fn, (wxObject *) NULL ),
|
||||
|
||||
/****************************************************************************
|
||||
REMARKS:
|
||||
Defines the class for pageloaded events.
|
||||
****************************************************************************/
|
||||
class wxPageLoadedEvent : public wxEvent {
|
||||
DECLARE_DYNAMIC_CLASS(wxPageLoadedEvent);
|
||||
|
||||
public:
|
||||
// Constructor
|
||||
wxPageLoadedEvent();
|
||||
|
||||
// Destructor
|
||||
~wxPageLoadedEvent() {}
|
||||
|
||||
// Copy constructor for the object
|
||||
void CopyObject(wxObject& obj) const;
|
||||
};
|
||||
|
||||
// Define the macro to create our event type
|
||||
typedef void (wxEvtHandler::*wxPageLoadedEventFunction)(wxPageLoadedEvent&);
|
||||
#define EVT_PAGE_LOADED(fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_PAGE_LOADED, -1, -1, (wxObjectEventFunction)(wxEventFunction)(wxPageLoadedEventFunction) & fn, (wxObject *) NULL ),
|
||||
|
||||
|
||||
#endif // __WX_LOAD_PAGE_H
|
@@ -1,59 +0,0 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* wxWindows HTML Applet Package
|
||||
*
|
||||
* Copyright (C) 1991-2001 SciTech Software, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* ========================================================================
|
||||
*
|
||||
* The contents of this file are subject to the wxWindows License
|
||||
* Version 3.0 (the "License"); 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/licence3.txt
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* ========================================================================
|
||||
*
|
||||
* Language: ANSI C++
|
||||
* Environment: Any
|
||||
*
|
||||
* Description: Header file for the Preprocessor of the #echo directive
|
||||
* in wxHTML.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __WX_PREPECHO_H
|
||||
#define __WX_PREPECHO_H
|
||||
|
||||
#include "wx/html/htmlproc.h"
|
||||
|
||||
/*--------------------------- Class Definitions ---------------------------*/
|
||||
|
||||
/****************************************************************************
|
||||
REMARKS:
|
||||
Echo Preprocessor class Definition
|
||||
****************************************************************************/
|
||||
class wxEchoPrep : public wxHtmlProcessor {
|
||||
private:
|
||||
//DECLARE_DYNAMIC_CLASS(wxEchoPrep);
|
||||
|
||||
public:
|
||||
wxEchoPrep() : wxHtmlProcessor() {}
|
||||
~wxEchoPrep() {}
|
||||
|
||||
// Process input text and return processed result
|
||||
wxString Process(const wxString& text) const;
|
||||
|
||||
// Return priority value of this processor. The higher, the sooner
|
||||
// is the processor applied to the text.
|
||||
int GetPriority() const { return wxHTML_PRIORITY_SYSTEM-2; }
|
||||
};
|
||||
|
||||
|
||||
#endif // __WX_PREPECHO_H
|
||||
|
@@ -1,59 +0,0 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* wxWindows HTML Applet Package
|
||||
*
|
||||
* Copyright (C) 1991-2001 SciTech Software, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* ========================================================================
|
||||
*
|
||||
* The contents of this file are subject to the wxWindows License
|
||||
* Version 3.0 (the "License"); 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/licence3.txt
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* ========================================================================
|
||||
*
|
||||
* Language: ANSI C++
|
||||
* Environment: Any
|
||||
*
|
||||
* Description: Header file for the Preprocessor of the #if SSI directive
|
||||
* in wxHTML.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __WX_PREPIFELSE_H
|
||||
#define __WX_PREPIFELSE_H
|
||||
|
||||
#include "wx/html/htmlproc.h"
|
||||
|
||||
/*--------------------------- Class Definitions ---------------------------*/
|
||||
|
||||
/****************************************************************************
|
||||
REMARKS:
|
||||
If Else Preprocessor class Definition
|
||||
****************************************************************************/
|
||||
class wxIfElsePrep : public wxHtmlProcessor {
|
||||
private:
|
||||
//DECLARE_DYNAMIC_CLASS(wxIfElsePrep);
|
||||
|
||||
public:
|
||||
wxIfElsePrep() : wxHtmlProcessor() {}
|
||||
~wxIfElsePrep() {}
|
||||
|
||||
// Process input text and return processed result
|
||||
wxString Process(const wxString& text) const;
|
||||
|
||||
// Return priority value of this processor. The higher, the sooner
|
||||
// is the processor applied to the text.
|
||||
int GetPriority() const { return wxHTML_PRIORITY_SYSTEM-2; }
|
||||
};
|
||||
|
||||
|
||||
#endif // __WX_PREPECHO_H
|
||||
|
@@ -1,63 +0,0 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* wxWindows HTML Applet Package
|
||||
*
|
||||
* Copyright (C) 1991-2001 SciTech Software, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* ========================================================================
|
||||
*
|
||||
* The contents of this file are subject to the wxWindows License
|
||||
* Version 3.0 (the "License"); 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/licence3.txt
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* ========================================================================
|
||||
*
|
||||
* Language: ANSI C++
|
||||
* Environment: Any
|
||||
*
|
||||
* Description: Header file for the Preprocessor of the #include directive
|
||||
* in wxHTML.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __WX_PREPINCLUDE_H
|
||||
#define __WX_PREPINCLUDE_H
|
||||
|
||||
#include "wx/html/htmlproc.h"
|
||||
|
||||
/*--------------------------- Class Definitions ---------------------------*/
|
||||
|
||||
/****************************************************************************
|
||||
REMARKS:
|
||||
wxIncludePrep class Definition
|
||||
****************************************************************************/
|
||||
class wxIncludePrep : public wxHtmlProcessor {
|
||||
private:
|
||||
//DECLARE_DYNAMIC_CLASS(wxIncludePrep);
|
||||
wxString DOC_ROOT;
|
||||
|
||||
public:
|
||||
wxIncludePrep() : wxHtmlProcessor() {DOC_ROOT = wxString("");}
|
||||
~wxIncludePrep() {}
|
||||
|
||||
// Process input text and return processed result
|
||||
wxString Process(const wxString& text) const;
|
||||
|
||||
// Return priority value of this processor. The higher, the sooner
|
||||
// is the processor applied to the text.
|
||||
int GetPriority() const { return wxHTML_PRIORITY_SYSTEM; }
|
||||
|
||||
void ChangeDirectory(const wxString &dir);
|
||||
wxString GetDirectory() { return DOC_ROOT; }
|
||||
};
|
||||
|
||||
|
||||
#endif // __WX_PREPINCLUDE_H
|
||||
|
@@ -1,191 +0,0 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* 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"
|
||||
#include "wx/process.h"
|
||||
|
||||
// Forward declare
|
||||
class wxApplet;
|
||||
class wxLoadPageEvent;
|
||||
class wxPageLoadedEvent;
|
||||
class wxIncludePrep;
|
||||
|
||||
// Declare a linked list of wxApplet pointers
|
||||
WX_DECLARE_LIST(wxApplet, wxAppletList);
|
||||
|
||||
/*--------------------------- Class Definitions ---------------------------*/
|
||||
|
||||
/****************************************************************************
|
||||
REMARKS:
|
||||
Defines the class for virtual-link data types
|
||||
****************************************************************************/
|
||||
class VirtualData : public wxObject {
|
||||
private:
|
||||
wxString m_name;
|
||||
wxString m_group;
|
||||
wxString m_href;
|
||||
|
||||
public:
|
||||
// Ctors
|
||||
VirtualData(
|
||||
wxString& name,
|
||||
wxString& group,
|
||||
wxString& href );
|
||||
|
||||
// Gets
|
||||
wxString GetName(){ return m_name;};
|
||||
wxString GetGroup(){ return m_group;};
|
||||
wxString GetHref(){ return m_href;};
|
||||
|
||||
// Sets
|
||||
void SetName (wxString& s){ m_name = s; };
|
||||
void SetGroup(wxString& s){ m_group = s; };
|
||||
void SetHref (wxString& s){ m_href = s; };
|
||||
};
|
||||
|
||||
/****************************************************************************
|
||||
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();
|
||||
|
||||
bool m_mutexLock;
|
||||
wxIncludePrep *incPreprocessor; // deleted by list it is added too in constructor
|
||||
protected:
|
||||
wxAppletList m_AppletList;
|
||||
static wxHashTable m_Cookies;
|
||||
wxToolBarBase *m_NavBar;
|
||||
int m_NavBackId;
|
||||
int m_NavForwardId;
|
||||
wxString m_DocRoot;
|
||||
public:
|
||||
// Constructor
|
||||
wxHtmlAppletWindow(
|
||||
wxWindow *parent,
|
||||
wxWindowID id = -1,
|
||||
wxToolBarBase *navBar = NULL,
|
||||
int navBackId = -1,
|
||||
int navForwardId = -1,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxHW_SCROLLBAR_AUTO,
|
||||
const wxString& name = "htmlAppletWindow",
|
||||
const wxString& docroot = "" );
|
||||
|
||||
// Destructor
|
||||
~wxHtmlAppletWindow();
|
||||
|
||||
// Create an instance of an applet based on it's class name
|
||||
wxApplet *CreateApplet(
|
||||
const wxString& classId,
|
||||
const wxString& iName,
|
||||
const wxHtmlTag ¶ms,
|
||||
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
|
||||
virtual bool LoadPage(const wxString& location);
|
||||
|
||||
// Called when users clicked on hypertext link.
|
||||
virtual 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
|
||||
static bool RegisterCookie(const wxString& name,wxObject *cookie);
|
||||
|
||||
// UnRegister a cookie of data in the applet manager
|
||||
static bool UnRegisterCookie(const wxString& name);
|
||||
|
||||
// Find a cookie of data given it's public name
|
||||
static wxObject *FindCookie(const wxString& name);
|
||||
|
||||
// Event handlers to load a new page
|
||||
void OnLoadPage(wxLoadPageEvent &event);
|
||||
|
||||
// Event handlers to load a new page
|
||||
void OnPageLoaded(wxPageLoadedEvent &event);
|
||||
|
||||
// LoadPage mutex locks
|
||||
void Lock(){ m_mutexLock = true;};
|
||||
void UnLock(){ m_mutexLock = false;};
|
||||
|
||||
// Returns TRUE if the mutex is locked, FALSE otherwise.
|
||||
bool IsLocked(){ return m_mutexLock;};
|
||||
|
||||
// Tries to lock the mutex. If it can't, returns immediately with false.
|
||||
bool TryLock();
|
||||
|
||||
};
|
||||
|
||||
/****************************************************************************
|
||||
REMARKS:
|
||||
Defines the class for AppetProcess
|
||||
***************************************************************************/
|
||||
class AppletProcess : public wxProcess {
|
||||
public:
|
||||
AppletProcess(
|
||||
wxWindow *parent)
|
||||
: wxProcess(parent)
|
||||
{
|
||||
}
|
||||
|
||||
// instead of overriding this virtual function we might as well process the
|
||||
// event from it in the frame class - this might be more convenient in some
|
||||
// cases
|
||||
virtual void OnTerminate(int pid, int status);
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif // __WX_APPLET_WINDOW_H
|
||||
|
@@ -1,76 +0,0 @@
|
||||
#ifndef __WXBOUNDINGBOX_H__
|
||||
#define __WXBOUNDINGBOX_H__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "bbox.cpp"
|
||||
#endif
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/wx.h"
|
||||
#endif
|
||||
|
||||
#include "wx/matrix.h"
|
||||
#include "wx/geometry.h"
|
||||
|
||||
enum OVERLAP {_IN,_ON,_OUT};
|
||||
|
||||
//Purpose The wxBoundingBox class stores one wxBoundingBox.
|
||||
//The wxBoundingBox is defined by two coordiates,
|
||||
//a upperleft coordinate and a lowerright coordinate.
|
||||
class wxBoundingBox
|
||||
{
|
||||
public:
|
||||
wxBoundingBox();
|
||||
wxBoundingBox(wxBoundingBox&);
|
||||
wxBoundingBox(const wxPoint2DDouble&);
|
||||
wxBoundingBox(double xmin, double ymin, double xmax, double ymax);
|
||||
|
||||
bool And(wxBoundingBox*, double Marge = 0);
|
||||
|
||||
void EnLarge(const double Marge);
|
||||
void Shrink(const double Marge);
|
||||
|
||||
void Expand(const wxPoint2DDouble& , const wxPoint2DDouble&);
|
||||
void Expand(const wxPoint2DDouble&);
|
||||
void Expand(double x,double y);
|
||||
void Expand(const wxBoundingBox& bbox);
|
||||
|
||||
OVERLAP Intersect( wxBoundingBox &, double Marge = 0);
|
||||
bool LineIntersect(const wxPoint2DDouble& begin, const wxPoint2DDouble& end );
|
||||
bool PointInBox( const wxPoint2DDouble&, double Marge = 0);
|
||||
bool PointInBox( double, double, double Marge = 0);
|
||||
|
||||
void Reset();
|
||||
|
||||
void Translate( wxPoint2DDouble& );
|
||||
void MapBbox( const wxTransformMatrix& matrix);
|
||||
|
||||
double GetWidth() {return m_maxx-m_minx;};
|
||||
double GetHeight(){return m_maxy-m_miny;};
|
||||
bool GetValid() const;
|
||||
void SetValid(bool);
|
||||
|
||||
void SetBoundingBox(const wxPoint2DDouble& a_point);
|
||||
|
||||
void SetMin(double, double);
|
||||
void SetMax(double, double);
|
||||
inline wxPoint2DDouble GetMin();
|
||||
inline wxPoint2DDouble GetMax();
|
||||
inline double GetMinX(){return m_minx;};
|
||||
inline double GetMinY(){return m_miny;};
|
||||
inline double GetMaxX(){return m_maxx;};
|
||||
inline double GetMaxY(){return m_maxy;};
|
||||
|
||||
wxBoundingBox& operator+( wxBoundingBox& );
|
||||
wxBoundingBox& operator=( const wxBoundingBox& );
|
||||
|
||||
protected:
|
||||
//bounding box in world
|
||||
double m_minx;
|
||||
double m_miny;
|
||||
double m_maxx;
|
||||
double m_maxy;
|
||||
bool m_validbbox;
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,859 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: canvas.h
|
||||
// Author: Robert Roebling
|
||||
// Created: XX/XX/XX
|
||||
// Copyright: 2000 (c) Robert Roebling
|
||||
// Licence: wxWindows Licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __WXCANVAS_H__
|
||||
#define __WXCANVAS_H__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "canvas.cpp"
|
||||
#endif
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/wx.h"
|
||||
#endif
|
||||
|
||||
#include "wx/image.h"
|
||||
#include "wx/txtstrm.h"
|
||||
#include "wx/geometry.h"
|
||||
#include "wx/matrix.h"
|
||||
#include "bbox.h"
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// decls
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
class wxCanvas;
|
||||
class wxCanvasAdmin;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// wxCanvasObject
|
||||
//----------------------------------------------------------------------------
|
||||
enum wxDRAG_MODE
|
||||
{
|
||||
wxDRAG_RECTANGLE,
|
||||
wxDRAG_ONTOP,
|
||||
wxDRAG_REDRAW
|
||||
};
|
||||
|
||||
//:defenition
|
||||
// wxCanvasObject is the base class for Canvas Objects.
|
||||
// All Objects for drawing one the canvas are derived from this class.
|
||||
// It supports dragging and moving methods that can be used in derived
|
||||
// classes for defining several ways of dragging.
|
||||
// Also it is possible to plug in events handlers to do this for all derived classes at once.
|
||||
//
|
||||
// wxCanvasObjects have themselves as their event handlers by default,
|
||||
// but their event handlers could be set to another object entirely. This
|
||||
// separation can reduce the amount of derivation required, and allow
|
||||
// alteration of a wxCanvasObject functionality
|
||||
class wxCanvasObject: public wxEvtHandler
|
||||
{
|
||||
public:
|
||||
|
||||
wxCanvasObject();
|
||||
|
||||
//If the position (x,y) is within the object this return a pointer to the object
|
||||
//Normally this function needs to be defined for each derived wxCanvasObject.
|
||||
//The default is a simple bounding box test.
|
||||
virtual wxCanvasObject* IsHitWorld( double x, double y, double margin = 0 );
|
||||
|
||||
//render this object to the canvas (either on its buffer or directly on the canvas)
|
||||
//this depends on the wxDC that is set for the active canvas.
|
||||
virtual void Render(wxTransformMatrix* cworld, int clip_x, int clip_y, int clip_width, int clip_height );
|
||||
|
||||
//x position in world coordinates of the object
|
||||
virtual double GetPosX()=0;
|
||||
//y position in world coordinates of the object
|
||||
virtual double GetPosY()=0;
|
||||
|
||||
//set position in world coordinates for the object
|
||||
virtual void SetPosXY( double x, double y)=0;
|
||||
|
||||
//absolute moving the object to position x,y in world coordinates
|
||||
//also does an update of the old and new area
|
||||
virtual void MoveAbsolute( double x, double y );
|
||||
|
||||
//relative moving the object to position x,y in world coordinates
|
||||
//also does an update of the old and new area
|
||||
virtual void MoveRelative( double x, double y );
|
||||
|
||||
//relative translate the object to position x,y in world coordinates
|
||||
//does NOT update the old and new area
|
||||
//this function must be defined for each derived object,
|
||||
//it is used internally for dragging and moving objects.
|
||||
virtual void TransLate( double x, double y )=0;
|
||||
|
||||
//choose one of the three diffrenet drag methods |
|
||||
//DRAG_RECTANGLE = as a rectangle when drag is in progress |
|
||||
//DRAG_ONTOP = only redraw the object when dragging |
|
||||
//DRAG_REDRAW = redraw the damaged areas when dragging
|
||||
void SetDragMode(wxDRAG_MODE mode) { m_dragmode=mode; };
|
||||
|
||||
//return the dragmode
|
||||
wxDRAG_MODE GetDragMode() { return m_dragmode; };
|
||||
|
||||
//called when starting a drag
|
||||
virtual void DragStart();
|
||||
//called when dragging is in progress
|
||||
virtual void DragRelative( double x, double y);
|
||||
//called when dragging is ended
|
||||
virtual void DragEnd();
|
||||
|
||||
//return the object if it is part of the given object or
|
||||
//if the given object is part of a group within this object.
|
||||
//For group objects this means recursively search for it.
|
||||
virtual wxCanvasObject* Contains( wxCanvasObject* obj );
|
||||
|
||||
//calculate the boundingbox in world coordinates
|
||||
virtual void CalcBoundingBox()=0;
|
||||
|
||||
//write the object as SVG (scalable vector grafhics
|
||||
virtual void WriteSVG( wxTextOutputStream &stream );
|
||||
|
||||
//get the administrator for the object,
|
||||
//this will give access to the canvas's where it is displayed upon.
|
||||
//It is used to render the object to the active canvas.
|
||||
//Conversion from world to Device coordinates and visa versa is
|
||||
//done using the Active canvas at that moment.
|
||||
wxCanvasAdmin *GetAdmin() { return m_admin; }
|
||||
|
||||
//set the administrator
|
||||
virtual void SetAdmin( wxCanvasAdmin *admin ) { m_admin = admin; }
|
||||
|
||||
//is this a control type of canvas object
|
||||
bool IsControl() { return m_isControl; }
|
||||
//is this a vector type of canvas object
|
||||
bool IsVector() { return m_isVector; }
|
||||
//is this an Image type of canvas object
|
||||
bool IsImage() { return m_isImage; }
|
||||
|
||||
//get minimum X of the boundingbox in world coordinates
|
||||
inline double GetXMin() { return m_bbox.GetMinX(); }
|
||||
//get minimum Y of the boundingbox in world coordinates
|
||||
inline double GetYMin() { return m_bbox.GetMinY(); }
|
||||
//get maximum X of the boundingbox in world coordinates
|
||||
inline double GetXMax() { return m_bbox.GetMaxX(); }
|
||||
//get maximum Y of the boundingbox in world coordinates
|
||||
inline double GetYMax() { return m_bbox.GetMaxY(); }
|
||||
|
||||
//get boundingbox
|
||||
inline wxBoundingBox GetBbox() { return m_bbox; }
|
||||
|
||||
//redirect all mouse events for the canvas to this object
|
||||
void CaptureMouse();
|
||||
//release the mouse capture for this object
|
||||
void ReleaseMouse();
|
||||
//is the mouse captured for this object
|
||||
bool IsCapturedMouse();
|
||||
|
||||
//set if this object will visible (be rendered or not)
|
||||
inline void SetVisible(bool visible) { m_visible=visible; }
|
||||
//get visibility
|
||||
inline bool GetVisible() {return m_visible; }
|
||||
|
||||
//can the object be dragged
|
||||
inline void SetDraggable(bool drag) { m_dragable=drag; }
|
||||
//get if the object can be dragged
|
||||
inline bool GetDraggable() {return m_dragable; }
|
||||
|
||||
//get absolute area in the device coordinates where the object
|
||||
//its boundingbox in world coordinates is first translated using the matrix.
|
||||
wxRect GetAbsoluteArea(const wxTransformMatrix& cworld);
|
||||
|
||||
//get currently used eventhandler (always the first in the list)
|
||||
wxEvtHandler *GetEventHandler() const { return m_eventHandler; }
|
||||
|
||||
//process an event for the object, starting with the first eventhandler
|
||||
// in the list.
|
||||
bool ProcessCanvasObjectEvent(wxEvent& event);
|
||||
|
||||
// push/pop event handler: allows to chain a custom event handler to
|
||||
// already existing ones
|
||||
void PushEventHandler( wxEvtHandler *handler );
|
||||
|
||||
//remove first eventhandler in the list (one will be always stay in)
|
||||
wxEvtHandler *PopEventHandler( bool deleteHandler = FALSE );
|
||||
//append an eventhandler to the list, this event handler will be called
|
||||
//if the other skipped the event to process.
|
||||
void AppendEventHandler(wxEvtHandler *handler);
|
||||
//remove last event handler in the list (one will always stay in)
|
||||
wxEvtHandler *RemoveLastEventHandler(bool deleteHandler);
|
||||
|
||||
protected:
|
||||
|
||||
//administator for rendering and accessing the canvas's
|
||||
wxCanvasAdmin* m_admin;
|
||||
|
||||
//active event handler, default the object itself
|
||||
wxEvtHandler* m_eventHandler;
|
||||
|
||||
bool m_isControl:1;
|
||||
bool m_isVector:1;
|
||||
bool m_isImage:1;
|
||||
bool m_visible:1;
|
||||
bool m_dragable:1;
|
||||
wxDRAG_MODE m_dragmode:3;
|
||||
|
||||
//boundingbox in world coordinates
|
||||
wxBoundingBox m_bbox;
|
||||
|
||||
//used for dragging
|
||||
wxBitmap m_atnewpos;
|
||||
};
|
||||
|
||||
//:defenition
|
||||
// wxCanvasObjectGroup is a container for wxCanvas derived Objects.
|
||||
// It renders itself by calling the render methods of the wxCanvasObjects it contains.
|
||||
// It can have nested groups also, in the same way as the other wxCanvasObjects it already contains.
|
||||
// The group has a matrix to position/rotate/scale the group.
|
||||
class wxCanvasObjectGroup: public wxCanvasObject
|
||||
{
|
||||
public:
|
||||
wxCanvasObjectGroup(double x, double y);
|
||||
virtual ~wxCanvasObjectGroup();
|
||||
|
||||
void SetAdmin(wxCanvasAdmin* admin);
|
||||
|
||||
//prepend a wxCanvasObject to this group
|
||||
virtual void Prepend( wxCanvasObject* obj );
|
||||
//append a wxCanvasObject to this group
|
||||
virtual void Append( wxCanvasObject* obj );
|
||||
//insert a wxCanvasObject to this group
|
||||
virtual void Insert( size_t before, wxCanvasObject* obj );
|
||||
//remove the given object from the group
|
||||
virtual void Remove( wxCanvasObject* obj );
|
||||
|
||||
//those this group contain the given object.
|
||||
//in case of nested groups also search in there to the lowwest level.
|
||||
virtual wxCanvasObject* Contains( wxCanvasObject* obj );
|
||||
|
||||
//returns index of the given wxCanvasObject in this group
|
||||
virtual int IndexOf( wxCanvasObject* obj );
|
||||
|
||||
double GetPosX() { return lworld.GetValue(2,0); }
|
||||
double GetPosY() { return lworld.GetValue(2,1); }
|
||||
void SetPosXY( double x, double y) {lworld.SetValue(2,0,x);lworld.SetValue(2,1,y);CalcBoundingBox();};
|
||||
|
||||
void TransLate( double x, double y );
|
||||
|
||||
void CalcBoundingBox();
|
||||
//remove all wxCanvasObjects from the group (flag for deletion of the objectsalso)
|
||||
void DeleteContents( bool );
|
||||
virtual void Render(wxTransformMatrix* cworld,int x, int y, int width, int height );
|
||||
virtual void WriteSVG( wxTextOutputStream &stream );
|
||||
|
||||
//recursive call the IsHitWorld on all contained objects, the first
|
||||
//one that is hit will be returned
|
||||
wxCanvasObject* IsHitWorld( double x, double y, double margin = 0 );
|
||||
|
||||
//recursive calls for contained objects to set eventhandlers,
|
||||
//and also sets its own eventhandler
|
||||
void PushEventHandler( wxEvtHandler *handler );
|
||||
//recursive calls for contained objects to set eventhandlers,
|
||||
//and also sets its own eventhandler
|
||||
wxEvtHandler *PopEventHandler( bool deleteHandler = FALSE );
|
||||
//recursive calls for contained objects to set eventhandlers,
|
||||
//and also sets its own eventhandler
|
||||
void AppendEventHandler(wxEvtHandler *handler);
|
||||
//recursive calls for contained objects to set eventhandlers,
|
||||
//and also sets its own eventhandler
|
||||
wxEvtHandler *RemoveLastEventHandler(bool deleteHandler);
|
||||
|
||||
protected:
|
||||
|
||||
//to position the object
|
||||
wxTransformMatrix lworld;
|
||||
|
||||
wxList m_objects;
|
||||
|
||||
friend class wxCanvas;
|
||||
};
|
||||
|
||||
//:defenition
|
||||
// wxCanvasObjectRef is a reference to any wxCanvasObject derived class.
|
||||
// It does not duplicate the referenced object.
|
||||
// It has a matrix to reposition/rotate/scale the object it references.
|
||||
// The position/matrix of the referenced Object is accumulated with the one here.
|
||||
class wxCanvasObjectRef: public wxCanvasObject
|
||||
{
|
||||
public:
|
||||
wxCanvasObjectRef(double x, double y,wxCanvasObject* obj);
|
||||
|
||||
//set rotation for the reference
|
||||
void SetRotation(double rotation);
|
||||
|
||||
//set scale in x and y ( > zero)
|
||||
void SetScale( double scalex, double scaley );
|
||||
|
||||
void SetAdmin(wxCanvasAdmin* admin);
|
||||
|
||||
double GetPosX() { return lworld.GetValue(2,0); }
|
||||
double GetPosY() { return lworld.GetValue(2,1); }
|
||||
void SetPosXY( double x, double y) {lworld.SetValue(2,0,x);lworld.SetValue(2,1,y);CalcBoundingBox();};
|
||||
|
||||
void TransLate( double x, double y );
|
||||
void CalcBoundingBox();
|
||||
virtual void Render(wxTransformMatrix* cworld,int x, int y, int width, int height );
|
||||
virtual void WriteSVG( wxTextOutputStream &stream );
|
||||
|
||||
//return this object if one of the objects it references is hit
|
||||
wxCanvasObject* IsHitWorld( double x, double y, double margin = 0 );
|
||||
virtual wxCanvasObject* Contains( wxCanvasObject* obj );
|
||||
|
||||
//recursive calls for contained objects to set eventhandlers,
|
||||
//and also sets its own eventhandler
|
||||
void PushEventHandler( wxEvtHandler *handler );
|
||||
//recursive calls for contained objects to set eventhandlers,
|
||||
//and also sets its own eventhandler
|
||||
wxEvtHandler *PopEventHandler( bool deleteHandler = FALSE );
|
||||
//recursive calls for contained objects to set eventhandlers,
|
||||
//and also sets its own eventhandler
|
||||
void AppendEventHandler(wxEvtHandler *handler);
|
||||
//recursive calls for contained objects to set eventhandlers,
|
||||
//and also sets its own eventhandler
|
||||
wxEvtHandler *RemoveLastEventHandler(bool deleteHandler);
|
||||
|
||||
protected:
|
||||
|
||||
//to position the object
|
||||
wxTransformMatrix lworld;
|
||||
|
||||
//reference to another wxCanvasObject
|
||||
wxCanvasObject* m_obj;
|
||||
};
|
||||
|
||||
//:defenition
|
||||
// wxCanvasRect
|
||||
class wxCanvasRect: public wxCanvasObject
|
||||
{
|
||||
public:
|
||||
wxCanvasRect( double x, double y, double w, double h , double radius=0 );
|
||||
void SetBrush( const wxBrush& brush) { m_brush = brush; };
|
||||
void SetPen( const wxPen& pen) { m_pen = pen; CalcBoundingBox(); };
|
||||
|
||||
double GetPosX() { return m_x; }
|
||||
double GetPosY() { return m_y; }
|
||||
void SetPosXY( double x, double y) {m_x=x; m_y=y; CalcBoundingBox();};
|
||||
|
||||
void TransLate( double x, double y );
|
||||
void CalcBoundingBox();
|
||||
|
||||
virtual void Render(wxTransformMatrix* cworld, int clip_x, int clip_y, int clip_width, int clip_height );
|
||||
virtual void WriteSVG( wxTextOutputStream &stream );
|
||||
|
||||
private:
|
||||
wxPen m_pen;
|
||||
wxBrush m_brush;
|
||||
|
||||
double m_x;
|
||||
double m_y;
|
||||
double m_width;
|
||||
double m_height;
|
||||
double m_radius;
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// wxCanvasCircle
|
||||
//----------------------------------------------------------------------------
|
||||
class wxCanvasCircle: public wxCanvasObject
|
||||
{
|
||||
public:
|
||||
wxCanvasCircle( double x, double y, double radius );
|
||||
void SetBrush( const wxBrush& brush) { m_brush = brush; };
|
||||
void SetPen( const wxPen& pen) { m_pen = pen; CalcBoundingBox(); };
|
||||
|
||||
double GetPosX() { return m_x; }
|
||||
double GetPosY() { return m_y; }
|
||||
void SetPosXY( double x, double y) {m_x=x; m_y=y;CalcBoundingBox(); };
|
||||
|
||||
void TransLate( double x, double y );
|
||||
|
||||
void CalcBoundingBox();
|
||||
|
||||
virtual void Render(wxTransformMatrix* cworld, int clip_x, int clip_y, int clip_width, int clip_height );
|
||||
virtual void WriteSVG( wxTextOutputStream &stream );
|
||||
|
||||
wxCanvasObject* IsHitWorld( double x, double y, double margin = 0 );
|
||||
|
||||
private:
|
||||
wxPen m_pen;
|
||||
wxBrush m_brush;
|
||||
|
||||
double m_x;
|
||||
double m_y;
|
||||
double m_radius;
|
||||
};
|
||||
|
||||
//:defenition
|
||||
// wxCanvasEllipse
|
||||
class wxCanvasEllipse: public wxCanvasObject
|
||||
{
|
||||
public:
|
||||
wxCanvasEllipse( double x, double y, double width, double height );
|
||||
void SetBrush( const wxBrush& brush) { m_brush = brush; };
|
||||
void SetPen( const wxPen& pen) { m_pen = pen; CalcBoundingBox(); };
|
||||
|
||||
double GetPosX() { return m_x; }
|
||||
double GetPosY() { return m_y; }
|
||||
void SetPosXY( double x, double y) {m_x=x; m_y=y; CalcBoundingBox();};
|
||||
|
||||
void TransLate( double x, double y );
|
||||
|
||||
void CalcBoundingBox();
|
||||
|
||||
virtual void Render(wxTransformMatrix* cworld, int clip_x, int clip_y, int clip_width, int clip_height );
|
||||
virtual void WriteSVG( wxTextOutputStream &stream );
|
||||
|
||||
wxCanvasObject* IsHitWorld( double x, double y, double margin = 0 );
|
||||
|
||||
private:
|
||||
wxPen m_pen;
|
||||
wxBrush m_brush;
|
||||
|
||||
double m_x;
|
||||
double m_y;
|
||||
double m_width;
|
||||
double m_height;
|
||||
};
|
||||
|
||||
//:defenition
|
||||
// wxCanvasEllipticArc
|
||||
class wxCanvasEllipticArc: public wxCanvasObject
|
||||
{
|
||||
public:
|
||||
wxCanvasEllipticArc( double x, double y, double width, double height, double start, double end );
|
||||
void SetBrush( const wxBrush& brush) { m_brush = brush; };
|
||||
void SetPen( const wxPen& pen) { m_pen = pen; CalcBoundingBox(); };
|
||||
|
||||
double GetPosX() { return m_x; }
|
||||
double GetPosY() { return m_y; }
|
||||
void SetPosXY( double x, double y) {m_x=x; m_y=y; CalcBoundingBox();};
|
||||
|
||||
void TransLate( double x, double y );
|
||||
void CalcBoundingBox();
|
||||
|
||||
virtual void Render(wxTransformMatrix* cworld, int clip_x, int clip_y, int clip_width, int clip_height );
|
||||
virtual void WriteSVG( wxTextOutputStream &stream );
|
||||
|
||||
wxCanvasObject* IsHitWorld( double x, double y, double margin = 0 );
|
||||
|
||||
private:
|
||||
wxPen m_pen;
|
||||
wxBrush m_brush;
|
||||
|
||||
double m_x;
|
||||
double m_y;
|
||||
double m_width;
|
||||
double m_height;
|
||||
double m_start;
|
||||
double m_end;
|
||||
};
|
||||
|
||||
//:defenition
|
||||
// wxCanvasLine
|
||||
class wxCanvasLine: public wxCanvasObject
|
||||
{
|
||||
public:
|
||||
wxCanvasLine( double x1, double y1, double x2, double y2 );
|
||||
void SetPen( const wxPen& pen) { m_pen = pen; CalcBoundingBox(); };
|
||||
|
||||
|
||||
double GetPosX() { return m_x1; }
|
||||
double GetPosY() { return m_y1; }
|
||||
void SetPosXY( double x, double y) {m_x1=x; m_y1=y; CalcBoundingBox();};
|
||||
|
||||
void TransLate( double x, double y );
|
||||
|
||||
void CalcBoundingBox();
|
||||
|
||||
virtual void Render(wxTransformMatrix* cworld, int clip_x, int clip_y, int clip_width, int clip_height );
|
||||
virtual void WriteSVG( wxTextOutputStream &stream );
|
||||
|
||||
wxCanvasObject* IsHitWorld( double x, double y, double margin = 0 );
|
||||
|
||||
private:
|
||||
wxPen m_pen;
|
||||
|
||||
double m_x1;
|
||||
double m_y1;
|
||||
double m_x2;
|
||||
double m_y2;
|
||||
};
|
||||
|
||||
//:defenition
|
||||
// wxCanvasImage
|
||||
class wxCanvasImage: public wxCanvasObject
|
||||
{
|
||||
public:
|
||||
wxCanvasImage( const wxImage &image, double x, double y, double w, double h );
|
||||
|
||||
double GetPosX() { return m_x; }
|
||||
double GetPosY() { return m_y; }
|
||||
void SetPosXY( double x, double y);
|
||||
|
||||
void TransLate( double x, double y );
|
||||
|
||||
void CalcBoundingBox();
|
||||
|
||||
virtual void Render(wxTransformMatrix* cworld, int clip_x, int clip_y, int clip_width, int clip_height );
|
||||
virtual void WriteSVG( wxTextOutputStream &stream );
|
||||
|
||||
private:
|
||||
double m_x;
|
||||
double m_y;
|
||||
double m_width;
|
||||
double m_height;
|
||||
|
||||
wxImage m_image;
|
||||
int m_orgw,m_orgh;
|
||||
|
||||
// cache
|
||||
wxBitmap m_cBitmap;
|
||||
wxImage m_cImage;
|
||||
int m_cW;
|
||||
int m_cH;
|
||||
double m_cR;
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// wxCanvasControl
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
class wxCanvasControl: public wxCanvasObject
|
||||
{
|
||||
public:
|
||||
wxCanvasControl( wxWindow *control );
|
||||
~wxCanvasControl();
|
||||
|
||||
double GetPosX();
|
||||
double GetPosY();
|
||||
void SetPosXY( double x, double y);
|
||||
|
||||
void TransLate( double x, double y );
|
||||
void MoveRelative( double x, double y );
|
||||
|
||||
void CalcBoundingBox();
|
||||
|
||||
private:
|
||||
wxWindow *m_control;
|
||||
};
|
||||
|
||||
//:defenition
|
||||
// wxCanvasText
|
||||
class wxCanvasText: public wxCanvasObject
|
||||
{
|
||||
public:
|
||||
wxCanvasText( const wxString &text, double x, double y, const wxString &foneFile, int size );
|
||||
~wxCanvasText();
|
||||
|
||||
double GetPosX() { return m_x; }
|
||||
double GetPosY() { return m_y; }
|
||||
void SetPosXY( double x, double y) {m_x=x; m_y=y;CalcBoundingBox(); };
|
||||
|
||||
void TransLate( double x, double y );
|
||||
|
||||
void CalcBoundingBox();
|
||||
|
||||
virtual void Render(wxTransformMatrix* cworld, int clip_x, int clip_y, int clip_width, int clip_height );
|
||||
virtual void WriteSVG( wxTextOutputStream &stream );
|
||||
|
||||
void SetRGB( unsigned char red, unsigned char green, unsigned char blue );
|
||||
void SetFlag( int flag );
|
||||
int GetFlag() { return m_flag; }
|
||||
|
||||
private:
|
||||
wxString m_text;
|
||||
double m_x;
|
||||
double m_y;
|
||||
unsigned char *m_alpha;
|
||||
void *m_faceData;
|
||||
int m_flag;
|
||||
int m_red;
|
||||
int m_green;
|
||||
int m_blue;
|
||||
wxString m_fontFileName;
|
||||
int m_size;
|
||||
};
|
||||
|
||||
//:defenition
|
||||
// wxCanvas is used to display a wxCanvasGroupObject, which contains wxCanvasObject derived
|
||||
// drawable objects. The group to draw is called the root.
|
||||
// All objects are defined in world coordinates, relative to its parent (e.g. nested groups)
|
||||
// There are methods to convert from world to device coordinates and visa versa.
|
||||
// Rendering a draw is normally started on the root, it to a buffer, afterwords
|
||||
// an update of the damaged parts will blitted from the buffer to the screen.
|
||||
// This is done in Idle time, but can also be forced.
|
||||
// World coordinates can be with the Y axis going up are down.
|
||||
// The area of the drawing in world coordinates that is visible on the canvas
|
||||
// can be set. Parts of this area can be zoomed into resulting in scroll bars
|
||||
// to be displayed.
|
||||
class wxCanvas: public wxScrolledWindow
|
||||
{
|
||||
public:
|
||||
// constructors and destructors
|
||||
wxCanvas( wxCanvasAdmin* admin ,wxWindow *parent, wxWindowID id = -1,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxScrolledWindowStyle );
|
||||
virtual ~wxCanvas();
|
||||
|
||||
//background colour for the canvas
|
||||
virtual void SetColour( const wxColour& background );
|
||||
|
||||
//update the area given in device coordinates
|
||||
virtual void Update( int x, int y, int width, int height, bool blit = TRUE );
|
||||
|
||||
//blit all updated areas now to the screen, else it will happen in idle time.
|
||||
//Use this to support dragging for instance, becuase in such cases idle time
|
||||
//will take to long.
|
||||
virtual void UpdateNow();
|
||||
|
||||
//prevent canvas activety
|
||||
virtual void Freeze();
|
||||
//allow canvas activety
|
||||
virtual void Thaw();
|
||||
|
||||
//get the buffer that is used for rendering in general
|
||||
inline wxBitmap *GetBuffer() { return &m_buffer; }
|
||||
//get the DC that is used for rendering
|
||||
inline wxDC *GetDC() { return m_renderDC; }
|
||||
//set the DC that is used for rendering
|
||||
inline void SetDC(wxDC* dc) { m_renderDC=dc; }
|
||||
|
||||
inline int GetBufferWidth() { return m_buffer.GetWidth(); }
|
||||
inline int GetBufferHeight() { return m_buffer.GetHeight(); }
|
||||
|
||||
//updating is needed for the canvas if the buffer did change
|
||||
bool NeedUpdate() { return m_needUpdate; }
|
||||
bool IsFrozen() { return m_frozen; }
|
||||
|
||||
//blit damaged areas in the buffer to the screen
|
||||
void BlitBuffer( wxDC &dc );
|
||||
|
||||
//redirect events to this canvas object
|
||||
void SetCaptureMouse( wxCanvasObject *obj );
|
||||
//are events redirected, if so return the object else NULL
|
||||
inline wxCanvasObject* GetCaptured() { return m_captureMouse;}
|
||||
|
||||
//set the root group where the objects for this canvas are stored
|
||||
void SetRoot(wxCanvasObjectGroup* aroot){m_root=aroot;}
|
||||
|
||||
//get root group that is displayed on the canvas
|
||||
wxCanvasObjectGroup* GetRoot(){return m_root;}
|
||||
|
||||
//scroll the window in device coordinates
|
||||
virtual void ScrollWindow( int dx, int dy,
|
||||
const wxRect* rect = (wxRect *) NULL );
|
||||
|
||||
//get y axis orientation
|
||||
virtual bool GetYaxis() { return FALSE; }
|
||||
|
||||
//get the visible part in world coordinates
|
||||
virtual double GetMinX() const;
|
||||
virtual double GetMinY() const;
|
||||
virtual double GetMaxX() const;
|
||||
virtual double GetMaxY() const;
|
||||
|
||||
//convert from window to virtual coordinates
|
||||
virtual double DeviceToLogicalX(int x) const;
|
||||
virtual double DeviceToLogicalY(int y) const;
|
||||
virtual double DeviceToLogicalXRel(int x) const;
|
||||
virtual double DeviceToLogicalYRel(int y) const;
|
||||
virtual int LogicalToDeviceX(double x) const;
|
||||
virtual int LogicalToDeviceY(double y) const;
|
||||
virtual int LogicalToDeviceXRel(double x) const;
|
||||
virtual int LogicalToDeviceYRel(double y) const;
|
||||
|
||||
protected:
|
||||
wxBitmap m_buffer;
|
||||
|
||||
//always available and m_buffer selected
|
||||
wxDC* m_renderDC;
|
||||
|
||||
bool m_needUpdate;
|
||||
wxList m_updateRects;
|
||||
wxCanvasObjectGroup* m_root;
|
||||
|
||||
wxColour m_background;
|
||||
bool m_frozen;
|
||||
wxCanvasObject *m_lastMouse;
|
||||
wxCanvasObject *m_captureMouse;
|
||||
|
||||
int m_oldDeviceX,m_oldDeviceY;
|
||||
|
||||
wxCanvasAdmin* m_admin;
|
||||
|
||||
private:
|
||||
int m_bufferX,m_bufferY;
|
||||
|
||||
protected:
|
||||
void OnMouse( wxMouseEvent &event );
|
||||
void OnPaint( wxPaintEvent &event );
|
||||
void OnSize( wxSizeEvent &event );
|
||||
void OnIdle( wxIdleEvent &event );
|
||||
void OnSetFocus( wxFocusEvent &event );
|
||||
void OnKillFocus( wxFocusEvent &event );
|
||||
void OnEraseBackground( wxEraseEvent &event );
|
||||
|
||||
private:
|
||||
DECLARE_CLASS(wxCanvas)
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
|
||||
|
||||
class wxVectorCanvas: public wxCanvas
|
||||
{
|
||||
public:
|
||||
// constructors and destructors
|
||||
wxVectorCanvas( wxCanvasAdmin* admin ,wxWindow *parent, wxWindowID id = -1,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxScrolledWindowStyle );
|
||||
|
||||
//scroll the window in device coordinates
|
||||
virtual void ScrollWindow( int dx, int dy,
|
||||
const wxRect* rect = (wxRect *) NULL );
|
||||
|
||||
//set if the Yaxis goes up or down
|
||||
void SetYaxis(bool up) { m_yaxis=up; }
|
||||
|
||||
//get currently used Yaxis setting
|
||||
virtual bool GetYaxis() { return m_yaxis; }
|
||||
|
||||
//to set the total area in world coordinates that can be scrolled.
|
||||
// when totaly zoomed out (SetMappingScroll same size as given here),
|
||||
// this will be the area displayed.
|
||||
// To display all of a drawing, set this here to the boundingbox of the root group
|
||||
// of the canvas.
|
||||
void SetScroll(double vx1,double vy1,double vx2,double vy2);
|
||||
|
||||
//given the virtual size to be displayed, the mappingmatrix will be calculated
|
||||
//in such a manner that it fits (same ratio in width and height) to the window size.
|
||||
//The window size is used to intitialize the mapping.
|
||||
//The virtual size is just an indication, it will be ajusted to fit in the client window ratio.
|
||||
//When border is set an extra margin is added so that the drawing will fit nicely.
|
||||
// To display all of a drawing, set this here to the boundingbox of the root group
|
||||
// of the canvas.
|
||||
void SetMappingScroll(double vx1,double vy1,double vx2,double vy2,bool border);
|
||||
|
||||
//matrix for calculating the virtual coordinate given a screen coordinate
|
||||
wxTransformMatrix GetInverseMappingMatrix();
|
||||
|
||||
//matrix for calculating the screen coordinate given a virtual coordinate
|
||||
wxTransformMatrix GetMappingMatrix();
|
||||
|
||||
//get minimum X of the visible part in world coordinates
|
||||
virtual double GetMinX() const;
|
||||
virtual double GetMinY() const;
|
||||
virtual double GetMaxX() const;
|
||||
virtual double GetMaxY() const;
|
||||
|
||||
//convert from window to virtual coordinates and back
|
||||
virtual double DeviceToLogicalX(int x) const;
|
||||
virtual double DeviceToLogicalY(int y) const;
|
||||
virtual double DeviceToLogicalXRel(int x) const;
|
||||
virtual double DeviceToLogicalYRel(int y) const;
|
||||
virtual int LogicalToDeviceX(double x) const;
|
||||
virtual int LogicalToDeviceY(double y) const;
|
||||
virtual int LogicalToDeviceXRel(double x) const;
|
||||
virtual int LogicalToDeviceYRel(double y) const;
|
||||
|
||||
protected:
|
||||
// up or down
|
||||
bool m_yaxis;
|
||||
|
||||
// holds the matrix for mapping from virtual to screen coordinates
|
||||
wxTransformMatrix m_mapping_matrix;
|
||||
|
||||
// holds the inverse of the mapping matrix
|
||||
wxTransformMatrix m_inverse_mapping;
|
||||
|
||||
//virtual coordinates of total drawing
|
||||
double m_virtm_minX, m_virtm_minY, m_virtm_maxX, m_virtm_maxY;
|
||||
|
||||
// virtual coordinates box
|
||||
double m_virt_minX, m_virt_minY, m_virt_maxX, m_virt_maxY;
|
||||
|
||||
// bounding box
|
||||
double m_minX, m_minY, m_maxX, m_maxY;
|
||||
|
||||
//are scroll bars active?
|
||||
bool m_scrolled;
|
||||
|
||||
private:
|
||||
void OnScroll(wxScrollWinEvent& event);
|
||||
void OnChar( wxKeyEvent &event );
|
||||
void OnSize( wxSizeEvent &event );
|
||||
|
||||
private:
|
||||
DECLARE_CLASS(wxVectorCanvas)
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
|
||||
|
||||
//:defenition
|
||||
//Contains a list of wxCanvas Objects that will be maintained through this class.
|
||||
//Each wxCanvasObject can be displayed on several wxCanvas Objects at the same time.
|
||||
//The active wxCanvas is used to render and convert coordinates from world to device.
|
||||
//So it is important to set the active wxCanvas based on the wxCanvas that has the focus
|
||||
//or is scrolled etc. This is normally done within wxCanvas when appropriate.
|
||||
class wxCanvasAdmin
|
||||
{
|
||||
public:
|
||||
// constructors and destructors
|
||||
wxCanvasAdmin();
|
||||
virtual ~wxCanvasAdmin();
|
||||
|
||||
//convert from window to virtual coordinates
|
||||
double DeviceToLogicalX(int x) const;
|
||||
//convert from window to virtual coordinates
|
||||
double DeviceToLogicalY(int y) const;
|
||||
//convert from window to virtual coordinates relatif
|
||||
double DeviceToLogicalXRel(int x) const;
|
||||
//convert from window to virtual coordinates relatif
|
||||
double DeviceToLogicalYRel(int y) const;
|
||||
//convert from virtual to window coordinates
|
||||
int LogicalToDeviceX(double x) const;
|
||||
//convert from virtual to window coordinates
|
||||
int LogicalToDeviceY(double y) const;
|
||||
//convert from virtual to window coordinates relatif
|
||||
int LogicalToDeviceXRel(double x) const;
|
||||
//convert from virtual to window coordinates relatif
|
||||
int LogicalToDeviceYRel(double y) const;
|
||||
|
||||
//update in the buffer off all canvases, the area given in world coordinates
|
||||
virtual void Update(wxCanvasObject* obj, double x, double y, double width, double height);
|
||||
|
||||
//blit all updated areas now to the screen, else it will happen in idle time.
|
||||
//Use this to support dragging for instance, becuase in such cases idle time
|
||||
//will take to long.
|
||||
virtual void UpdateNow();
|
||||
|
||||
//append another canvas
|
||||
virtual void Append( wxCanvas* canvas );
|
||||
|
||||
//remove a canvas
|
||||
virtual void Remove( wxCanvas* canvas );
|
||||
|
||||
//set the given canvas as active (for rendering, coordinate conversion etc.)
|
||||
void SetActive(wxCanvas* activate);
|
||||
|
||||
//get active canvas
|
||||
inline wxCanvas* GetActive() {return m_active;};
|
||||
|
||||
private:
|
||||
wxList m_canvaslist;
|
||||
wxCanvas* m_active;
|
||||
};
|
||||
|
||||
#endif
|
||||
// WXCANVAS
|
||||
|
@@ -1,58 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: liner.h
|
||||
// Author: Klaas Holwerda
|
||||
// Created: 1/10/2000
|
||||
// Copyright: 2000 (c) Klaas Holwerda
|
||||
// Licence: wxWindows Licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef __WXLINER_H
|
||||
#define __WXLINER_H
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "liner.cpp"
|
||||
#endif
|
||||
|
||||
|
||||
#include "wx/geometry.h"
|
||||
|
||||
enum OUTPRODUCT {R_IS_LEFT,R_IS_ON,R_IS_RIGHT};
|
||||
|
||||
// Status of a point to a wxLine
|
||||
enum R_PointStatus {R_LEFT_SIDE, R_RIGHT_SIDE, R_ON_AREA, R_IN_AREA};
|
||||
|
||||
class wxLine
|
||||
{
|
||||
public:
|
||||
// constructors and destructor
|
||||
wxLine( double x1, double y1, double x2, double y2 );
|
||||
wxLine( const wxPoint2DDouble& a, const wxPoint2DDouble& b);
|
||||
~wxLine();
|
||||
|
||||
wxPoint2DDouble GetBeginPoint(); // Get the beginpoint from a wxLine
|
||||
wxPoint2DDouble GetEndPoint(); // Get the endpoint from a wxLine
|
||||
bool CheckIntersect( wxLine&, double Marge); // Check if two wxLines intersects
|
||||
int Intersect( wxLine&, wxPoint2DDouble& bp ,wxPoint2DDouble& ep ,double Marge) ; // Intersects two wxLines
|
||||
bool Intersect( wxLine& lijn, wxPoint2DDouble& crossing); //intersect two (infinit) lines
|
||||
R_PointStatus PointOnLine( const wxPoint2DDouble& a_Point, double& Distance, double Marge ); //For an infinite wxLine
|
||||
R_PointStatus PointInLine( const wxPoint2DDouble& a_Point, double& Distance, double Marge ); //For a non-infinite wxLine
|
||||
OUTPRODUCT OutProduct( const wxLine& two, double accur); // outproduct of two wxLines
|
||||
double Calculate_Y( double X); // Caclulate Y if X is known
|
||||
void Virtual_Point( wxPoint2DDouble& a_point, double distance) const;
|
||||
wxLine& operator=( const wxLine&); // assignment operator
|
||||
void CalculateLineParameters(); // Calculate the parameters if nessecary
|
||||
void OffsetContour( const wxLine& nextline, double factor,wxPoint2DDouble& offsetpoint) const;
|
||||
|
||||
private:
|
||||
|
||||
int ActionOnTable1(R_PointStatus,R_PointStatus); // Function needed for Intersect
|
||||
int ActionOnTable2(R_PointStatus,R_PointStatus); // Function needed for Intersect
|
||||
|
||||
double m_AA;
|
||||
double m_BB;
|
||||
double m_CC;
|
||||
wxPoint2DDouble m_a;
|
||||
wxPoint2DDouble m_b;
|
||||
bool m_valid_parameters;
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,220 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: polygon.h
|
||||
// Author: Klaas Holwerda
|
||||
// Created: XX/XX/XX
|
||||
// Copyright: 2000 (c) Klaas Holwerda
|
||||
// Licence: wxWindows Licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __WXPOLYGON_H__
|
||||
#define __WXPOLYGON_H__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "polygon.cpp"
|
||||
#endif
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/wx.h"
|
||||
#endif
|
||||
|
||||
#include "wx/matrix.h"
|
||||
#include "wx/geometry.h"
|
||||
#include "bbox.h"
|
||||
#include "canvas.h"
|
||||
|
||||
enum INOUTPOLY {OUTSIDE_POLY,INSIDE_POLY,ON_POLY};
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// wxCanvasPolygon
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
class wxCanvasPolygon: public wxCanvasObject
|
||||
{
|
||||
public:
|
||||
wxCanvasPolygon( int n, wxPoint2DDouble points[], bool spline = FALSE );
|
||||
~wxCanvasPolygon();
|
||||
void SetBrush( const wxBrush& brush) { m_brush = brush; }
|
||||
void SetPen( const wxPen& pen) { m_pen = pen; CalcBoundingBox(); }
|
||||
|
||||
//set colour 1
|
||||
//being the background color if filling with a monochrome bitmap
|
||||
//or in case of gradient filling the starting colour for the fill
|
||||
void SetColour1( const wxColour& fg) { m_textfg=fg;}
|
||||
//set colour 1
|
||||
//being the foreground color if filling with a monochrome bitmap
|
||||
//or in case of gradient filling the ending colour for the fill
|
||||
void SetColour2( const wxColour& bg) { m_textbg=bg;}
|
||||
//transparent filling when bitmapbrush is monochrome
|
||||
void SetTransParent(bool transp) { m_transp=transp;}
|
||||
//gradient filling using lines chnging in colour from colour1 to colour2
|
||||
void SetGradient(bool gradient, const wxPen& gpen, double distance)
|
||||
{ m_gradient=gradient;
|
||||
m_gpen=gpen;
|
||||
m_gdistance=distance;
|
||||
}
|
||||
|
||||
double GetPosX() { return m_points[0].m_x; }
|
||||
double GetPosY() { return m_points[0].m_y; }
|
||||
void SetPosXY( double x, double y);
|
||||
|
||||
void TransLate( double x, double y );
|
||||
void CalcBoundingBox();
|
||||
|
||||
virtual void Render(wxTransformMatrix* cworld, int clip_x, int clip_y, int clip_width, int clip_height );
|
||||
virtual void WriteSVG( wxTextOutputStream &stream );
|
||||
|
||||
wxCanvasObject* IsHitWorld( double x, double y, double margin = 0 );
|
||||
|
||||
INOUTPOLY PointInPolygon(const wxPoint2DDouble& P, double marge);
|
||||
|
||||
private:
|
||||
|
||||
bool MoveUp(double horline, int& index, int direction);
|
||||
void DetectCriticalPoints();
|
||||
void FillPolygon(wxTransformMatrix* cworld, int clip_x, int clip_y, int clip_width, int clip_height );
|
||||
wxList m_CRlist;
|
||||
wxList m_AETlist;
|
||||
|
||||
|
||||
wxBrush m_brush;
|
||||
wxPen m_pen;
|
||||
wxColour m_textbg;
|
||||
wxColour m_textfg;
|
||||
|
||||
//if brush is of type bitmap with a mask fill with mask transparent
|
||||
bool m_transp;
|
||||
bool m_gradient;
|
||||
wxPen m_gpen;
|
||||
double m_gdistance;
|
||||
|
||||
bool m_spline;
|
||||
|
||||
int m_n;
|
||||
wxPoint2DDouble* m_points;
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// wxCanvasPolyline
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
class wxCanvasPolyline: public wxCanvasObject
|
||||
{
|
||||
public:
|
||||
wxCanvasPolyline(int n, wxPoint2DDouble points[]);
|
||||
~wxCanvasPolyline();
|
||||
void SetPen( const wxPen& pen) { m_pen = pen; CalcBoundingBox(); }
|
||||
|
||||
double GetPosX() { return m_points[0].m_x; }
|
||||
double GetPosY() { return m_points[0].m_y; }
|
||||
void SetPosXY( double x, double y);
|
||||
|
||||
void TransLate( double x, double y );
|
||||
void CalcBoundingBox();
|
||||
|
||||
virtual void Render(wxTransformMatrix* cworld, int clip_x, int clip_y, int clip_width, int clip_height );
|
||||
virtual void WriteSVG( wxTextOutputStream &stream );
|
||||
|
||||
wxCanvasObject* IsHitWorld( double x, double y, double margin = 0 );
|
||||
|
||||
bool PointOnPolyline(const wxPoint2DDouble& P, double marge);
|
||||
|
||||
private:
|
||||
|
||||
wxPen m_pen;
|
||||
|
||||
int m_n;
|
||||
wxPoint2DDouble* m_points;
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// wxCanvasPolygon
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
class wxCanvasPolygonL: public wxCanvasObject
|
||||
{
|
||||
public:
|
||||
wxCanvasPolygonL(wxList* points, bool spline = FALSE);
|
||||
~wxCanvasPolygonL();
|
||||
void SetBrush( const wxBrush& brush) { m_brush = brush; }
|
||||
void SetPen( const wxPen& pen) { m_pen = pen; CalcBoundingBox(); }
|
||||
void SetColour1( const wxColour& fg) { m_textfg=fg;}
|
||||
void SetColour2( const wxColour& bg) { m_textbg=bg;}
|
||||
void SetTransParent(bool transp) { m_transp=transp;}
|
||||
|
||||
double GetPosX();
|
||||
double GetPosY();
|
||||
void SetPosXY( double x, double y);
|
||||
void TransLate( double x, double y );
|
||||
void CalcBoundingBox();
|
||||
|
||||
virtual void Render(wxTransformMatrix* cworld, int clip_x, int clip_y, int clip_width, int clip_height );
|
||||
virtual void WriteSVG( wxTextOutputStream &stream );
|
||||
|
||||
wxCanvasObject* IsHitWorld( double x, double y, double margin = 0 );
|
||||
|
||||
INOUTPOLY PointInPolygon(const wxPoint2DDouble& P, double marge);
|
||||
|
||||
private:
|
||||
|
||||
wxBrush m_brush;
|
||||
wxPen m_pen;
|
||||
bool m_spline;
|
||||
wxColour m_textbg;
|
||||
wxColour m_textfg;
|
||||
//if brush is of type bitmap with a mask fill with mask transparent
|
||||
bool m_transp;
|
||||
|
||||
wxList* m_lpoints;
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// wxCanvasPolyline
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
class wxCanvasPolylineL: public wxCanvasObject
|
||||
{
|
||||
public:
|
||||
wxCanvasPolylineL(wxList* points, bool spline );
|
||||
~wxCanvasPolylineL();
|
||||
void SetPen( const wxPen& pen) { m_pen = pen; CalcBoundingBox(); }
|
||||
|
||||
double GetPosX();
|
||||
double GetPosY();
|
||||
void SetPosXY( double x, double y);
|
||||
|
||||
void TransLate( double x, double y );
|
||||
void CalcBoundingBox();
|
||||
|
||||
virtual void Render(wxTransformMatrix* cworld, int clip_x, int clip_y, int clip_width, int clip_height );
|
||||
virtual void WriteSVG( wxTextOutputStream &stream );
|
||||
|
||||
wxCanvasObject* IsHitWorld( double x, double y, double margin = 0 );
|
||||
|
||||
bool PointOnPolyline(const wxPoint2DDouble& P, double marge);
|
||||
|
||||
private:
|
||||
wxPen m_pen;
|
||||
bool m_spline;
|
||||
|
||||
wxList* m_lpoints;
|
||||
};
|
||||
|
||||
//active edge table
|
||||
class wxAET
|
||||
{
|
||||
public:
|
||||
inline void CalculateLineParameters( const wxPoint2DDouble& p1 , const wxPoint2DDouble& p2 );
|
||||
inline void CalculateXs( double y );
|
||||
|
||||
//line paramters
|
||||
bool m_horizontal;
|
||||
double m_BdivA;
|
||||
double m_CdivA;
|
||||
int m_index;
|
||||
int m_direction;
|
||||
//intersection point with scanline;
|
||||
double m_xs;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@@ -1,64 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: No names yet.
|
||||
// Purpose: Contrib. demo
|
||||
// Author: Aleksandras Gluchovas (@Lithuania)
|
||||
// Modified by:
|
||||
// Created: 23/10/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Aleksandras Gluchovas
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __ANTIFLICKPL_G__
|
||||
#define __ANTIFLICKPL_G__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "antiflickpl.h"
|
||||
#endif
|
||||
|
||||
#include "wx/fl/controlbar.h"
|
||||
|
||||
class cbAntiflickerPlugin : public cbPluginBase
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS( cbAntiflickerPlugin )
|
||||
protected:
|
||||
// double-buffers are shared "resource" among all instances of
|
||||
// antiflicker plugin within the application
|
||||
//
|
||||
// TODO:: locking should be implemented, for multithreaded GUIs
|
||||
|
||||
static wxBitmap* mpVertBuf;
|
||||
static wxBitmap* mpHorizBuf;
|
||||
static wxMemoryDC* mpVertBufDc;
|
||||
static wxMemoryDC* mpHorizBufDc;
|
||||
|
||||
static int mRefCount;
|
||||
|
||||
wxDC* mpLRUBufDc; // last-reacently-used buffer
|
||||
wxRect mLRUArea; // last-reacently-used area
|
||||
|
||||
protected:
|
||||
// returns NULL, if sutable buffer is not present
|
||||
wxDC* FindSuitableBuffer( const wxRect& forArea );
|
||||
wxDC* AllocNewBuffer( const wxRect& forArea );
|
||||
wxDC& GetWindowDC();
|
||||
|
||||
wxDC& GetClientDC();
|
||||
public:
|
||||
|
||||
cbAntiflickerPlugin(void);
|
||||
|
||||
cbAntiflickerPlugin( wxFrameLayout* pPanel, int paneMask = wxALL_PANES );
|
||||
|
||||
virtual ~cbAntiflickerPlugin();
|
||||
|
||||
// handlers for plugin events
|
||||
|
||||
void OnStartDrawInArea ( cbStartDrawInAreaEvent& event );
|
||||
void OnFinishDrawInArea( cbFinishDrawInAreaEvent& event );
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif /* __ANTIFLICKPL_G__ */
|
||||
|
@@ -1,122 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: No names yet.
|
||||
// Purpose: Contrib. demo
|
||||
// Author: Aleksandras Gluchovas
|
||||
// Modified by:
|
||||
// Created: 23/09/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Aleksandras Gluchovas
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __BARDRAGPL_G__
|
||||
#define __BARDRAGPL_G__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "bardragpl.h"
|
||||
#endif
|
||||
|
||||
#include "wx/fl/controlbar.h"
|
||||
#include "wx/fl/toolwnd.h"
|
||||
|
||||
class cbBarDragPlugin : public cbPluginBase
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS( cbBarDragPlugin )
|
||||
protected:
|
||||
|
||||
// plugin is active only in bar-dragging state
|
||||
bool mBarDragStarted;
|
||||
bool mCanStick; // flag used to prevent "bouncing" of hint-rectangle
|
||||
wxScreenDC* mpScrDc; // created while tracking hint-rect
|
||||
wxCursor* mpCurCursor;
|
||||
|
||||
// rectnagle shows the position/dimensions of the bar,
|
||||
// if it would be docked now
|
||||
|
||||
wxRect mPrevHintRect;
|
||||
wxRect mHintRect;
|
||||
|
||||
|
||||
int mMouseInRectX;
|
||||
int mMouseInRectY;
|
||||
|
||||
cbDockPane* mpSrcPane; // pane, from which the bar was originally taken
|
||||
int mBarWidthInSrcPane;
|
||||
|
||||
cbDockPane* mpCurPane;
|
||||
|
||||
cbBarInfo* mpDraggedBar; // bar, which is being dragged
|
||||
bool mBarWasFloating;
|
||||
wxRect mFloatedBarBounds;
|
||||
|
||||
public: /*** public properties ***/
|
||||
|
||||
int mInClientHintBorder; // when hint-rect moves within client window area,
|
||||
// the thicker rectangle is drawn using hatched brush,
|
||||
// the default border width for this rectangle is 8 pix.
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
void AdjustHintRect( wxPoint& mousePos );
|
||||
|
||||
void ClipRectInFrame( wxRect& rect );
|
||||
void ClipPosInFrame( wxPoint& pos );
|
||||
|
||||
cbDockPane* HitTestPanes( wxRect& rect );
|
||||
cbDockPane* HitTestPanes( wxPoint& pos );
|
||||
bool HitsPane( cbDockPane* pPane, wxRect& rect );
|
||||
|
||||
void CalcOnScreenDims( wxRect& rect );
|
||||
|
||||
int GetDistanceToPane( cbDockPane* pPane, wxPoint& mousePos );
|
||||
|
||||
bool IsInOtherPane ( wxPoint& mousePos );
|
||||
bool IsInClientArea( wxPoint& mousePos );
|
||||
bool IsInClientArea( wxRect& rect );
|
||||
|
||||
void StickToPane( cbDockPane* pPane, wxPoint& mousePos );
|
||||
void UnstickFromPane( cbDockPane* pPane, wxPoint& mousePos );
|
||||
|
||||
int GetBarWidthInPane( cbDockPane* pPane );
|
||||
int GetBarHeightInPane( cbDockPane* pPane );
|
||||
|
||||
// on-screen hint-tracking related methods
|
||||
|
||||
void StartTracking();
|
||||
|
||||
void DrawHintRect ( wxRect& rect, bool isInClientRect);
|
||||
void EraseHintRect( wxRect& rect, bool isInClientRect);
|
||||
|
||||
void FinishTracking();
|
||||
|
||||
void DoDrawHintRect( wxRect& rect, bool isInClientRect);
|
||||
|
||||
void RectToScr( wxRect& frameRect, wxRect& scrRect );
|
||||
|
||||
void ShowHint( bool prevWasInClient );
|
||||
|
||||
public:
|
||||
cbBarDragPlugin(void);
|
||||
|
||||
cbBarDragPlugin( wxFrameLayout* pPanel, int paneMask = wxALL_PANES );
|
||||
|
||||
virtual ~cbBarDragPlugin();
|
||||
|
||||
// handlers for plugin events
|
||||
|
||||
void OnMouseMove( cbMotionEvent& event );
|
||||
void OnLButtonUp( cbLeftUpEvent& event );
|
||||
void OnLButtonDown( cbLeftDownEvent& event );
|
||||
void OnLDblClick( cbLeftDClickEvent& event );
|
||||
|
||||
// handles event, which oriniates from itself
|
||||
void OnDrawHintRect( cbDrawHintRectEvent& event );
|
||||
|
||||
void OnStartBarDragging( cbStartBarDraggingEvent& event );
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif /* __BARDRAGPL_G__ */
|
||||
|
@@ -1,96 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: No names yet.
|
||||
// Purpose: Contrib. demo
|
||||
// Author: Aleksandras Gluchovas
|
||||
// Modified by:
|
||||
// Created: 30/11/98 (my 22th birthday :-)
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Aleksandras Gluchovas
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __DRAGHINTSPL_G__
|
||||
#define __DRAGHINTSPL_G__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "barhintspl.h"
|
||||
#endif
|
||||
|
||||
#include "wx/fl/controlbar.h"
|
||||
#include "wx/fl/toolwnd.h"
|
||||
|
||||
/*
|
||||
* Intercepts bar-decoration and sizing events, draws 3d-hints
|
||||
* around fixed and flexible bars, similar to those in Microsoft DevStudio 6.x
|
||||
*/
|
||||
|
||||
class cbBarHintsPlugin : public cbPluginBase
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS( cbBarHintsPlugin )
|
||||
|
||||
protected:
|
||||
cbDockPane* mpPane; // is set up temorarely, while handling event
|
||||
|
||||
cbMiniButton* mBoxes[2];
|
||||
|
||||
bool mBtnPressed;
|
||||
bool mClosePressed;
|
||||
cbBarInfo* mpClickedBar;
|
||||
bool mDepressed;
|
||||
|
||||
protected:
|
||||
// drawing helpers
|
||||
|
||||
void Draw3DBox ( wxDC& dc, const wxPoint& pos, bool pressed );
|
||||
void DrawCloseBox ( wxDC& dc, const wxPoint& pos, bool pressed );
|
||||
void DrawCollapseBox( wxDC& dc, const wxPoint& pos,
|
||||
bool atLeft, bool disabled, bool pressed );
|
||||
|
||||
void DrawGrooves ( wxDC& dc, const wxPoint& pos, int length );
|
||||
|
||||
void DoDrawHint( wxDC& dc, wxRect& rect, int pos, int boxOfs, int grooveOfs, bool isFixed );
|
||||
|
||||
void GetHintsLayout( wxRect& rect, cbBarInfo& info,
|
||||
int& boxOfs, int& grooveOfs, int& pos );
|
||||
|
||||
int HitTestHints( cbBarInfo& info, const wxPoint& pos );
|
||||
|
||||
void ExcludeHints( wxRect& rect, cbBarInfo& info );
|
||||
|
||||
void CreateBoxes();
|
||||
|
||||
public:
|
||||
/* public properties */
|
||||
|
||||
bool mCloseBoxOn; // default: ON
|
||||
bool mCollapseBoxOn; // default: ON
|
||||
int mGrooveCount; // default: 2 (two shaded bars)
|
||||
int mHintGap; // default: 5 (pixels from above, below, right and left)
|
||||
int mXWeight; // default: 2 (width in pixels of lines which used for drawing cross)
|
||||
|
||||
public:
|
||||
|
||||
cbBarHintsPlugin(void);
|
||||
|
||||
cbBarHintsPlugin( wxFrameLayout* pLayout, int paneMask = wxALL_PANES );
|
||||
|
||||
~cbBarHintsPlugin();
|
||||
|
||||
void SetGrooveCount( int nGrooves );
|
||||
|
||||
void OnInitPlugin();
|
||||
|
||||
// handlers of plugin-events
|
||||
|
||||
void OnSizeBarWindow( cbSizeBarWndEvent& event );
|
||||
void OnDrawBarDecorations( cbDrawBarDecorEvent& event );
|
||||
|
||||
void OnLeftDown( cbLeftDownEvent& event );
|
||||
void OnLeftUp ( cbLeftUpEvent& event );
|
||||
void OnMotion ( cbMotionEvent& event );
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif /* __DRAGHINTSPL_G__ */
|
||||
|
@@ -1,47 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: No names yet.
|
||||
// Purpose: Contrib. demo
|
||||
// Author: Aleksandras Gluchovas
|
||||
// Modified by:
|
||||
// Created: 28/10/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Aleksandras Gluchovas
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __CBCUSTOM_G__
|
||||
#define __CBCUSTOM_G__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "cbcustom.h"
|
||||
#endif
|
||||
|
||||
#include "wx/fl/controlbar.h"
|
||||
|
||||
class cbSimpleCustomizationPlugin : public cbPluginBase
|
||||
{
|
||||
public:
|
||||
DECLARE_DYNAMIC_CLASS( cbSimpleCustomizationPlugin )
|
||||
|
||||
int mCustMenuItemId;
|
||||
public:
|
||||
|
||||
cbSimpleCustomizationPlugin(void);
|
||||
|
||||
cbSimpleCustomizationPlugin( wxFrameLayout* pPanel, int paneMask = wxALL_PANES );
|
||||
|
||||
// plugin-event handlers
|
||||
|
||||
void OnCustomizeBar( cbCustomizeBarEvent& event );
|
||||
|
||||
void OnCustomizeLayout( cbCustomizeLayoutEvent& event );
|
||||
|
||||
// menu-event handler
|
||||
|
||||
void OnMenuItemSelected( wxCommandEvent& event );
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif /* __CBCUSTOM_G__ */
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,22 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: No names yet.
|
||||
// Purpose: Contrib. demo
|
||||
// Author: Aleksandras Gluchovas
|
||||
// Modified by:
|
||||
// Created: 23/01/99
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Aleksandras Gluchovas
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __DYNBARHND_G__
|
||||
#define __DYNBARHND_G__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "dynbarhnd.h"
|
||||
#endif
|
||||
|
||||
#include "wx/fl/controlbar.h"
|
||||
|
||||
#endif /* __DYNBARHND_G__ */
|
||||
|
@@ -1,204 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: No names yet.
|
||||
// Purpose: Contrib. demo
|
||||
// Author: Aleksandras Gluchovas
|
||||
// Modified by:
|
||||
// Created: ??/10/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Aleksandras Gluchovas
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __DYNTBAR_G__
|
||||
#define __DYNTBAR_G__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "dyntbar.h"
|
||||
#endif
|
||||
|
||||
#include "wx/tbarbase.h"
|
||||
#include "wx/dynarray.h"
|
||||
|
||||
// layout item
|
||||
|
||||
class wxToolLayoutItem : public wxObject
|
||||
{
|
||||
public:
|
||||
wxRect mRect;
|
||||
bool mIsSeparator;
|
||||
};
|
||||
|
||||
class wxDynToolInfo;
|
||||
|
||||
typedef wxToolLayoutItem* wxToolLayoutItemPtrT;
|
||||
typedef wxDynToolInfo* wxDynToolInfoPtrT;
|
||||
|
||||
|
||||
WX_DEFINE_ARRAY( wxToolLayoutItemPtrT, wxLayoutItemArrayT );
|
||||
WX_DEFINE_ARRAY( wxDynToolInfoPtrT, wxDynToolInfoArrayT );
|
||||
|
||||
// base class for layouting algorithm implementations
|
||||
|
||||
class LayoutManagerBase
|
||||
{
|
||||
public:
|
||||
virtual void Layout( const wxSize& parentDim,
|
||||
wxSize& resultingDim,
|
||||
wxLayoutItemArrayT& items,
|
||||
int horizGap,
|
||||
int vertGap ) = 0;
|
||||
|
||||
virtual ~LayoutManagerBase() {}
|
||||
};
|
||||
|
||||
// layouts items in left-to-right order from
|
||||
// top towards bottom
|
||||
|
||||
class BagLayout : public LayoutManagerBase
|
||||
{
|
||||
public:
|
||||
virtual void Layout( const wxSize& parentDim,
|
||||
wxSize& resultingDim,
|
||||
wxLayoutItemArrayT& items,
|
||||
int horizGap,
|
||||
int vertGap );
|
||||
};
|
||||
|
||||
class wxDynToolInfo : public wxToolLayoutItem
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxDynToolInfo)
|
||||
|
||||
public:
|
||||
wxWindow* mpToolWnd;
|
||||
int mIndex;
|
||||
wxSize mRealSize;
|
||||
};
|
||||
|
||||
// layouting orientations for tools
|
||||
|
||||
#define LO_HORIZONTAL 0
|
||||
#define LO_VERTICAL 1
|
||||
#define LO_FIT_TO_WINDOW 2
|
||||
|
||||
// class manages containment and layouting of tool-windows
|
||||
|
||||
class wxDynamicToolBar : public wxToolBarBase
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxDynamicToolBar)
|
||||
protected:
|
||||
|
||||
friend class wxDynamicToolBarSerializer;
|
||||
|
||||
wxDynToolInfoArrayT mTools;
|
||||
LayoutManagerBase* mpLayoutMan;
|
||||
|
||||
protected:
|
||||
virtual void SizeToolWindows();
|
||||
|
||||
public: /* public properties */
|
||||
|
||||
int mSepartorSize; // default: 8
|
||||
int mVertGap; // default: 0
|
||||
int mHorizGap; // default: 0
|
||||
|
||||
public:
|
||||
wxDynamicToolBar();
|
||||
|
||||
wxDynamicToolBar(wxWindow *parent, const wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
||||
const long style = wxNO_BORDER, const int orientation = wxVERTICAL,
|
||||
const int RowsOrColumns = 1, const wxString& name = wxToolBarNameStr);
|
||||
|
||||
~wxDynamicToolBar(void);
|
||||
|
||||
bool Create(wxWindow *parent, const wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
||||
const long style = wxNO_BORDER, const int orientation = wxVERTICAL, const int RowsOrColumns = 1, const wxString& name = wxToolBarNameStr);
|
||||
|
||||
// overridables
|
||||
|
||||
virtual void AddTool( int toolIndex,
|
||||
wxWindow* pToolWindow,
|
||||
const wxSize& size = wxDefaultSize );
|
||||
|
||||
virtual void AddTool( int toolIndex,
|
||||
const wxString& imageFileName,
|
||||
int imageFileType = wxBITMAP_TYPE_BMP,
|
||||
const wxString& labelText = "", bool alignTextRight = FALSE,
|
||||
bool isFlat = TRUE );
|
||||
virtual void AddTool( int toolIndex, wxBitmap labelBmp,
|
||||
const wxString& labelText = "", bool alignTextRight = FALSE,
|
||||
bool isFlat = TRUE );
|
||||
|
||||
// method from wxToolBarBase (for compatibility), only
|
||||
// first two arguments are valid
|
||||
|
||||
virtual wxToolBarToolBase *AddTool(const int toolIndex, const wxBitmap& bitmap, const wxBitmap& pushedBitmap = wxNullBitmap,
|
||||
const bool toggle = FALSE, const long xPos = -1, const long yPos = -1, wxObject *clientData = NULL,
|
||||
const wxString& helpString1 = "", const wxString& helpString2 = "");
|
||||
|
||||
virtual void AddSeparator( wxWindow* pSepartorWnd = NULL );
|
||||
|
||||
wxDynToolInfo* GetToolInfo( int toolIndex );
|
||||
|
||||
void RemveTool( int toolIndex );
|
||||
|
||||
// the default implementation draws shaded line
|
||||
virtual void DrawSeparator( wxDynToolInfo& info, wxDC& dc );
|
||||
|
||||
// see definitions of orientation types
|
||||
virtual bool Layout();
|
||||
|
||||
virtual void GetPreferredDim( const wxSize& givenDim, wxSize& prefDim );
|
||||
|
||||
virtual LayoutManagerBase* CreateDefaulLayout() { return new BagLayout(); }
|
||||
|
||||
virtual void SetLayout( LayoutManagerBase* pLayout );
|
||||
|
||||
virtual void EnableTool(const int toolIndex, const bool enable = TRUE);
|
||||
|
||||
// event handlers
|
||||
|
||||
void OnSize( wxSizeEvent& event );
|
||||
void OnPaint( wxPaintEvent& event );
|
||||
void OnEraseBackground( wxEraseEvent& event );
|
||||
|
||||
// overriden from wxToolBarBase
|
||||
|
||||
virtual bool Realize(void);
|
||||
|
||||
// stuff from the 2.1.15
|
||||
|
||||
virtual wxToolBarToolBase *FindToolForPosition(wxCoord x,
|
||||
wxCoord y) const;
|
||||
|
||||
|
||||
virtual bool DoInsertTool(size_t pos, wxToolBarToolBase *tool);
|
||||
|
||||
// the tool is still in m_tools list when this function is called, it will
|
||||
// only be deleted from it if it succeeds
|
||||
virtual bool DoDeleteTool(size_t pos, wxToolBarToolBase *tool);
|
||||
|
||||
// called when the tools enabled flag changes
|
||||
virtual void DoEnableTool(wxToolBarToolBase *tool, bool enable);
|
||||
|
||||
// called when the tool is toggled
|
||||
virtual void DoToggleTool(wxToolBarToolBase *tool, bool toggle);
|
||||
|
||||
// called when the tools "can be toggled" flag changes
|
||||
virtual void DoSetToggle(wxToolBarToolBase *tool, bool toggle);
|
||||
|
||||
// the functions to create toolbar tools
|
||||
virtual wxToolBarToolBase *CreateTool(int id,
|
||||
const wxBitmap& bitmap1,
|
||||
const wxBitmap& bitmap2,
|
||||
bool toggle,
|
||||
wxObject *clientData,
|
||||
const wxString& shortHelpString,
|
||||
const wxString& longHelpString);
|
||||
virtual wxToolBarToolBase *CreateTool(wxControl *control);
|
||||
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif /* __DYNTBAR_G__ */
|
||||
|
@@ -1,31 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: No names yet.
|
||||
// Purpose: Contrib. demo
|
||||
// Author: Aleksandras Gluchovas
|
||||
// Modified by:
|
||||
// Created: 23/01/99
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Aleksandras Gluchovas
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __DYNTBARHND_G__
|
||||
#define __DYNTBARHND_G__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "dyntbarhnd.h"
|
||||
#endif
|
||||
|
||||
#include "wx/fl/controlbar.h"
|
||||
#include "wx/fl/dyntbar.h"
|
||||
|
||||
class cbDynToolBarDimHandler : public cbBarDimHandlerBase
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS( cbDynToolBarDimHandler )
|
||||
public:
|
||||
void OnChangeBarState(cbBarInfo* pBar, int newState );
|
||||
void OnResizeBar( cbBarInfo* pBar, const wxSize& given, wxSize& preferred );
|
||||
};
|
||||
|
||||
#endif /* __DYNTBARHND_G__ */
|
||||
|
@@ -1,140 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: No names yet.
|
||||
// Purpose: Contrib. demo
|
||||
// Author: Aleksandras Gluchovas
|
||||
// Modified by:
|
||||
// Created: 02/01/99
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Aleksandras Gluchovas
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __FRMVIEW_G__
|
||||
#define __FRMVIEW_G__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "frmview.h"
|
||||
#endif
|
||||
|
||||
#include "wx/module.h"
|
||||
|
||||
#if 0
|
||||
#include "wx/fl/objstore.h"
|
||||
#endif
|
||||
|
||||
class wxObjectStorage;
|
||||
|
||||
#include "wx/fl/controlbar.h"
|
||||
|
||||
class wxFrameManager;
|
||||
|
||||
class wxFrameView : public wxEvtHandler
|
||||
{
|
||||
protected:
|
||||
wxStringList mTopMenus;
|
||||
wxFrameLayout* mpLayout;
|
||||
wxFrameManager* mpFrameMgr;
|
||||
bool mDoToolUpdates;
|
||||
|
||||
friend class wxFrameManager;
|
||||
friend class wxFrameViewSerializer;
|
||||
|
||||
protected:
|
||||
void OnIdle( wxIdleEvent& event);
|
||||
|
||||
public:
|
||||
wxFrameView();
|
||||
~wxFrameView();
|
||||
|
||||
virtual void Activate();
|
||||
virtual void Deactivate();
|
||||
|
||||
wxFrame* GetParentFrame();
|
||||
wxWindow* GetClientWindow();
|
||||
|
||||
wxFrameManager& GetFrameManager();
|
||||
|
||||
void RegisterMenu( const wxString& topMenuName );
|
||||
|
||||
void CreateLayout();
|
||||
wxFrameLayout* GetLayout();
|
||||
void SetLayout( wxFrameLayout* pLayout );
|
||||
void SetToolUpdates( bool doToolUpdates = TRUE );
|
||||
|
||||
|
||||
// hooks for specific frame-views
|
||||
|
||||
virtual void OnInit() {}
|
||||
|
||||
virtual void OnSerialize( wxObjectStorage& store ) {}
|
||||
virtual void OnActiveate() {}
|
||||
virtual void OnDeactivate() {}
|
||||
|
||||
// imp. is mandatory
|
||||
virtual void OnRecreate() {}
|
||||
virtual void OnInitMenus() {}
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
class wxFrame;
|
||||
|
||||
class wxFrameManager : wxObject
|
||||
{
|
||||
protected:
|
||||
wxList mViews;
|
||||
wxWindow* mpFrameWnd;
|
||||
int mActiveViewNo;
|
||||
wxWindow* mpClientWnd;
|
||||
|
||||
#if 0
|
||||
wxObjectStorage mStore;
|
||||
#endif
|
||||
|
||||
wxString mSettingsFile;
|
||||
|
||||
protected:
|
||||
void DoSerialize( wxObjectStorage& store );
|
||||
void DestroyViews();
|
||||
int GetViewNo( wxFrameView* pView );
|
||||
void EnableMenusForView( wxFrameView* pView, bool enable );
|
||||
void SyncAllMenus();
|
||||
|
||||
public:
|
||||
wxFrameManager();
|
||||
~wxFrameManager();
|
||||
|
||||
// if file name is empty, views are are not saved/loaded
|
||||
|
||||
virtual void Init( wxWindow* pMainFrame, const wxString& settingsFile = "" );
|
||||
|
||||
// synonyms
|
||||
wxFrame* GetParentFrame();
|
||||
wxWindow* GetParentWindow();
|
||||
|
||||
int GetActiveViewNo();
|
||||
wxFrameView* GetActiveView();
|
||||
wxNode* GetActiveViewNode();
|
||||
|
||||
wxFrameView* GetView( int viewNo );
|
||||
|
||||
void SetClinetWindow( wxWindow* pFrameClient );
|
||||
wxWindow* GetClientWindow();
|
||||
|
||||
void AddView( wxFrameView* pFrmView );
|
||||
void RemoveView( wxFrameView* pFrmView );
|
||||
|
||||
void ActivateView( int viewNo );
|
||||
void ActivateView( wxFrameView* pFrmView );
|
||||
void DeactivateCurrentView();
|
||||
|
||||
wxObjectStorage& GetObjectStore();
|
||||
|
||||
void SaveViewsNow();
|
||||
bool ReloadViews();
|
||||
|
||||
bool ViewsAreLoaded();
|
||||
};
|
||||
|
||||
#endif /* __FRMVIEW_G__ */
|
||||
|
@@ -1,74 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: No names yet.
|
||||
// Purpose: Contrib. demo
|
||||
// Author: Aleksandras Gluchovas (@Lithuania)
|
||||
// Modified by:
|
||||
// Created: ??/10/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Aleksandras Gluchovas
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __GARBAGEC_G__
|
||||
#define __GARBAGEC_G__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "garbagec.h"
|
||||
#endif
|
||||
|
||||
#include "wx/list.h"
|
||||
|
||||
struct GCItem
|
||||
{
|
||||
void* mpObj;
|
||||
wxList mRefs; // references to other nodes
|
||||
};
|
||||
|
||||
inline void* gc_node_to_obj( wxNode* pGCNode )
|
||||
{
|
||||
return ( (GCItem*) (pGCNode->Data()) )->mpObj;
|
||||
}
|
||||
|
||||
// class implements extremely slow, but probably one of the most simple GC algorithms
|
||||
|
||||
class GarbageCollector
|
||||
{
|
||||
protected:
|
||||
wxList mAllNodes;
|
||||
wxList mRegularLst;
|
||||
wxList mCycledLst;
|
||||
|
||||
wxNode* FindItemNode( void* pForObj );
|
||||
void ResolveReferences();
|
||||
|
||||
wxNode* FindReferenceFreeItemNode();
|
||||
void RemoveReferencesToNode( wxNode* pItemNode );
|
||||
void DestroyItemList( wxList& lst );
|
||||
|
||||
public:
|
||||
|
||||
GarbageCollector() {}
|
||||
|
||||
virtual ~GarbageCollector();
|
||||
|
||||
// prepare data for GC alg.
|
||||
|
||||
virtual void AddObject( void* pObj, int refCnt = 1 );
|
||||
virtual void AddDependency( void* pObj, void* pDependsOnObj );
|
||||
|
||||
// executes GC alg.
|
||||
|
||||
virtual void ArrangeCollection();
|
||||
|
||||
// access results of the alg.
|
||||
|
||||
wxList& GetRegularObjects();
|
||||
wxList& GetCycledObjects();
|
||||
|
||||
// removes all data from GC
|
||||
|
||||
void Reset();
|
||||
};
|
||||
|
||||
#endif /* __GARBAGEC_G__ */
|
||||
|
@@ -1,123 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: No names yet.
|
||||
// Purpose: Contrib. demo
|
||||
// Author: Aleksandras Gluchovas
|
||||
// Modified by:
|
||||
// Created: 19/10/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Aleksandras Gluchovas
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __GCUPDATESMGR_G__
|
||||
#define __GCUPDATESMGR_G__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "gcupdatesmgr.h"
|
||||
#endif
|
||||
|
||||
#include "wx/fl/controlbar.h"
|
||||
#include "wx/fl/updatesmgr.h"
|
||||
|
||||
#include "wx/fl/garbagec.h"
|
||||
|
||||
/*
|
||||
* class implements optimized logic for refreshing
|
||||
* areas of frame layout - which actually need to be updated.
|
||||
* Is used as default updates-manager by wxFrameLayout.
|
||||
*
|
||||
* it is called "Garbage Collecting" u.mgr for it's implementation
|
||||
* tries to find out dependencies between bars, and to order
|
||||
* them ito "hierarchy", this hierarchical sorting resembles
|
||||
* implemenation of heap-garbage collectors, which resolve
|
||||
* dependencies between references.
|
||||
*
|
||||
* Example: there are situations where the order of moving
|
||||
* the windows does matter:
|
||||
*
|
||||
* case 1)
|
||||
* ------ ---
|
||||
* | A | |B|
|
||||
* ------ ---> | |
|
||||
* --- --- ------
|
||||
* |B| | A |
|
||||
* | | ------
|
||||
* ---
|
||||
* (future)
|
||||
* (past)
|
||||
*
|
||||
* past/future positions of A and B windows completely overlapp, i.e.
|
||||
* depend on each other, and there is not solution for
|
||||
* moving the windows witout refreshing both of them,
|
||||
* -- we have cyclic dependency here. The gc. alg will
|
||||
* find this cyclic dependecy and will force "refresh"
|
||||
* after movement.
|
||||
*
|
||||
* case 2)
|
||||
*
|
||||
* ------
|
||||
* | A |
|
||||
* ------ --->
|
||||
* ---
|
||||
* |B| ------
|
||||
* | | | A |
|
||||
* --- ------
|
||||
* ---
|
||||
* |B|
|
||||
* | |
|
||||
* ---
|
||||
*
|
||||
* (future)
|
||||
* (past)
|
||||
*
|
||||
* in this case past/future positions do not overlapp, thus
|
||||
* it's enough only to move windows, without refreshing them.
|
||||
* GC will "notice" it.
|
||||
*
|
||||
* there is also third case, when overlapping is partial
|
||||
* in this case the refershing can be also avoided by
|
||||
* moving windows in the order of "most-dependant" towards the
|
||||
* "least-dependent". GC handles this automatically, by
|
||||
* sorting windows by their dependency-level (or "hierarchy")
|
||||
*
|
||||
* See garbagec.h for more details of this method, garbagec.h/cpp
|
||||
* implement sorting of generic-dependencies (does not deal
|
||||
* with graphical objects directly)
|
||||
*
|
||||
* Summary: improves performance when complex/large windows are
|
||||
* moved around, by reducing number of repaints. Also helps
|
||||
* to avoid dirty non-client areas of moved windows
|
||||
* in some special cases of "overlapping anomalies"
|
||||
*/
|
||||
|
||||
class cbGCUpdatesMgr : public cbSimpleUpdatesMgr
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS( cbGCUpdatesMgr )
|
||||
protected:
|
||||
|
||||
GarbageCollector mGC;
|
||||
|
||||
void DoRepositionItems( wxList& items );
|
||||
|
||||
void AddItem( wxList& itemList,
|
||||
cbBarInfo* pBar,
|
||||
cbDockPane* pPane,
|
||||
wxRect& curBounds,
|
||||
wxRect& prevBounds );
|
||||
|
||||
public:
|
||||
|
||||
cbGCUpdatesMgr(void) {}
|
||||
|
||||
cbGCUpdatesMgr( wxFrameLayout* pPanel );
|
||||
|
||||
// notificiactions received from Frame Layout :
|
||||
|
||||
virtual void OnStartChanges();
|
||||
|
||||
// refreshes parts of the frame layout, which need an update
|
||||
virtual void UpdateNow();
|
||||
};
|
||||
|
||||
#endif /* __GCUPDATESMGR_G__ */
|
||||
|
@@ -1,120 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: No names yet.
|
||||
// Purpose: Contrib. demo
|
||||
// Author: Aleksandras Gluchovas
|
||||
// Modified by:
|
||||
// Created: 9/11/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Aleksandras Gluchovas
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __HINTANIMPL_G__
|
||||
#define __HINTANIMPL_G__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "hintanimpl.h"
|
||||
#endif
|
||||
|
||||
#include "wx/fl/controlbar.h"
|
||||
|
||||
#include "wx/timer.h"
|
||||
|
||||
class cbHintAnimTimer;
|
||||
|
||||
class cbHintAnimationPlugin : public cbPluginBase
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS( cbHintAnimationPlugin )
|
||||
protected:
|
||||
friend class cbHintAnimTimer;
|
||||
|
||||
wxScreenDC* mpScrDc; // created while tracking hint-rect
|
||||
cbHintAnimTimer* mpAnimTimer;
|
||||
|
||||
// FOR NOW:: try it without mutually exculisve locks
|
||||
volatile wxRect mCurRect;
|
||||
|
||||
// state variables
|
||||
|
||||
bool mAnimStarted;
|
||||
bool mStopPending;
|
||||
|
||||
bool mPrevInClient;
|
||||
bool mCurInClient;
|
||||
|
||||
wxRect mPrevRect;
|
||||
|
||||
public:
|
||||
int mMorphDelay; // delay between frames in miliseconds, default: 20
|
||||
int mMaxFrames; // number of iterations for hint morphing, default: 30
|
||||
// (morph duration = mMorphDelay * mMaxFrames msec)
|
||||
|
||||
int mInClientHintBorder; // default: 4 pixels
|
||||
|
||||
bool mAccelerationOn; // TRUE, if morph accelerates, otherwise morph
|
||||
// speed is constant. Default: TRUE
|
||||
|
||||
// TBD:: get/set methods for above members
|
||||
|
||||
protected:
|
||||
void StartTracking();
|
||||
|
||||
void DrawHintRect ( wxRect& rect, bool isInClientRect);
|
||||
void EraseHintRect( wxRect& rect, bool isInClientRect);
|
||||
|
||||
void FinishTracking();
|
||||
|
||||
void DoDrawHintRect( wxRect& rect, bool isInClientRect);
|
||||
|
||||
void RectToScr( wxRect& frameRect, wxRect& scrRect );
|
||||
|
||||
public:
|
||||
cbHintAnimationPlugin(void);
|
||||
|
||||
~cbHintAnimationPlugin();
|
||||
|
||||
cbHintAnimationPlugin( wxFrameLayout* pPanel, int paneMask = wxALL_PANES );
|
||||
|
||||
void OnDrawHintRect( cbDrawHintRectEvent& event );
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
|
||||
// helper classes
|
||||
|
||||
struct MorphInfoT
|
||||
{
|
||||
wxPoint mFrom;
|
||||
wxPoint mTill;
|
||||
};
|
||||
|
||||
class cbHintAnimTimer : public wxTimer
|
||||
{
|
||||
protected:
|
||||
|
||||
friend class cbHintAnimationPlugin;
|
||||
|
||||
wxRect mPrevMorphed;
|
||||
|
||||
MorphInfoT mUpperLeft;
|
||||
MorphInfoT mLowerRight;
|
||||
int mCurIter;
|
||||
|
||||
long mLock;
|
||||
|
||||
cbHintAnimationPlugin* mpPl;
|
||||
|
||||
void MorphPoint( wxPoint& origin, MorphInfoT& info, wxPoint& point );
|
||||
|
||||
public:
|
||||
|
||||
cbHintAnimTimer(void);
|
||||
|
||||
virtual void Notify(void);
|
||||
|
||||
virtual bool Init( cbHintAnimationPlugin* pAnimPl, bool reinit );
|
||||
};
|
||||
|
||||
#endif /* __HINTANIMPL_G__ */
|
||||
|
@@ -1,165 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: No names yet.
|
||||
// Purpose: Contrib. demo
|
||||
// Author: Aleksandras Gluchovas
|
||||
// Modified by:
|
||||
// Created: ??/09/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Aleksandras Gluchovas
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __NEWBMPBTN_G__
|
||||
#define __NEWBMPBTN_G__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "newbmpbtn.h"
|
||||
#endif
|
||||
|
||||
#include "wx/button.h"
|
||||
#include "wx/string.h"
|
||||
|
||||
// button lable-text alignment types
|
||||
|
||||
#define NB_ALIGN_TEXT_RIGHT 0
|
||||
#define NB_ALIGN_TEXT_BOTTOM 1
|
||||
#define NB_NO_TEXT 2
|
||||
#define NB_NO_IMAGE 3
|
||||
|
||||
// classes declared in this header file
|
||||
|
||||
class wxNewBitmapButton;
|
||||
class wxBorderLessBitmapButton;
|
||||
|
||||
// alternative class for wxBmpButton
|
||||
|
||||
class wxNewBitmapButton: public wxPanel
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxNewBitmapButton)
|
||||
|
||||
protected:
|
||||
|
||||
friend class wxNewBitmapButtonSerializer;
|
||||
|
||||
int mTextToLabelGap;
|
||||
int mMarginX;
|
||||
int mMarginY;
|
||||
int mTextAlignment;
|
||||
bool mIsSticky;
|
||||
bool mIsFlat;
|
||||
|
||||
wxString mLabelText;
|
||||
wxString mImageFileName;
|
||||
int mImageFileType;
|
||||
|
||||
wxBitmap mDepressedBmp; // source image for rendering
|
||||
// labels for particular state
|
||||
|
||||
wxBitmap mFocusedBmp; // may not be always present -
|
||||
// only if mHasFocusedBmp is TRUE
|
||||
|
||||
wxBitmap* mpDepressedImg;
|
||||
wxBitmap* mpPressedImg;
|
||||
wxBitmap* mpDisabledImg;
|
||||
wxBitmap* mpFocusedImg;
|
||||
|
||||
// button state variables;
|
||||
bool mDragStarted;
|
||||
bool mIsPressed;
|
||||
bool mIsInFocus;
|
||||
bool mPrevPressedState;
|
||||
bool mPrevInFocusState;
|
||||
|
||||
bool mHasFocusedBmp;
|
||||
|
||||
// type of event which is fired upon depression of this button
|
||||
int mFiredEventType;
|
||||
|
||||
// pens for drawing decorations (borders)
|
||||
wxPen mBlackPen;
|
||||
wxPen mDarkPen;
|
||||
wxPen mGrayPen;
|
||||
wxPen mLightPen;
|
||||
|
||||
bool mIsCreated;
|
||||
int mSizeIsSet;
|
||||
|
||||
protected:
|
||||
void DestroyLabels();
|
||||
|
||||
// returns the label which match the current button state
|
||||
virtual wxBitmap* GetStateLabel();
|
||||
|
||||
virtual void DrawShade( int outerLevel,
|
||||
wxDC& dc,
|
||||
wxPen& upperLeftSidePen,
|
||||
wxPen& lowerRightSidePen );
|
||||
|
||||
bool IsInWindow( int x,int y );
|
||||
|
||||
public:
|
||||
|
||||
wxNewBitmapButton( const wxBitmap& labelBitmap = wxNullBitmap,
|
||||
const wxString& labelText = "",
|
||||
int alignText = NB_ALIGN_TEXT_BOTTOM,
|
||||
bool isFlat = TRUE,
|
||||
// this is the default type of fired events
|
||||
int firedEventType = wxEVT_COMMAND_MENU_SELECTED,
|
||||
int marginX = 2,
|
||||
int marginY = 2,
|
||||
int textToLabelGap = 2,
|
||||
bool isSticky = FALSE
|
||||
);
|
||||
|
||||
// use this constructor if buttons have to be persistant
|
||||
|
||||
wxNewBitmapButton( const wxString& bitmapFileName,
|
||||
const int bitmapFileType = wxBITMAP_TYPE_BMP,
|
||||
const wxString& labelText = "",
|
||||
int alignText = NB_ALIGN_TEXT_BOTTOM,
|
||||
bool isFlat = TRUE,
|
||||
// this is the default type of fired events
|
||||
int firedEventType = wxEVT_COMMAND_MENU_SELECTED,
|
||||
int marginX = 2,
|
||||
int marginY = 2,
|
||||
int textToLabelGap = 2,
|
||||
bool isSticky = FALSE
|
||||
);
|
||||
|
||||
~wxNewBitmapButton();
|
||||
|
||||
// should be called after Create();
|
||||
virtual void Reshape();
|
||||
|
||||
// overridables
|
||||
virtual void SetLabel(const wxBitmap& labelBitmap, const wxString& labelText = "" );
|
||||
|
||||
virtual void SetAlignments( int alignText = NB_ALIGN_TEXT_BOTTOM,
|
||||
int marginX = 2,
|
||||
int marginY = 2,
|
||||
int textToLabelGap = 2);
|
||||
|
||||
virtual void DrawDecorations( wxDC& dc );
|
||||
virtual void DrawLabel( wxDC& dc );
|
||||
|
||||
virtual void RenderLabelImage( wxBitmap*& destBmp, wxBitmap* srcBmp,
|
||||
bool isEnabled = TRUE,
|
||||
bool isPressed = FALSE);
|
||||
|
||||
virtual void RenderLabelImages();
|
||||
virtual void RenderAllLabelImages();
|
||||
|
||||
// event handlers
|
||||
void OnLButtonDown( wxMouseEvent& event );
|
||||
void OnLButtonUp( wxMouseEvent& event );
|
||||
void OnMouseMove( wxMouseEvent& event );
|
||||
void OnSize( wxSizeEvent& event );
|
||||
void OnPaint( wxPaintEvent& event );
|
||||
void OnEraseBackground( wxEraseEvent& event );
|
||||
void OnKillFocus( wxFocusEvent& event );
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif /* __NEWBMPBTN_G__ */
|
||||
|
@@ -1,119 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: No names yet.
|
||||
// Purpose: Central header file for control-bar related classes
|
||||
//
|
||||
// Author: Aleksandras Gluchovas <mailto:alex@soften.ktu.lt>
|
||||
// Modified by:
|
||||
// Created: 06/09/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Aleksandras Gluchovas
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __PANEDRAWPL_G__
|
||||
#define __PANEDRAWPL_G__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "panedrawpl.h"
|
||||
#endif
|
||||
|
||||
#include "wx/fl/controlbar.h"
|
||||
|
||||
/*
|
||||
* Simple, but all-in-one plugin implementation. Resembles look & feel of
|
||||
* to MFC control-bars. Handles painting of pane and items in it.
|
||||
* Fires bar/layout customization event, when user right-clicks bar/pane.
|
||||
* Hooking an instance of this and row-layouting plugins per each pane,
|
||||
* would be enough for the frame layout to function properly.
|
||||
* (they are plugged in autimatically by wxFrameLayout class)
|
||||
*/
|
||||
|
||||
class cbPaneDrawPlugin : public cbPluginBase
|
||||
{
|
||||
public:
|
||||
DECLARE_DYNAMIC_CLASS( cbPaneDrawPlugin )
|
||||
protected:
|
||||
|
||||
// resizing bars/rows state variables
|
||||
bool mResizeStarted;
|
||||
bool mResizeCursorOn;
|
||||
wxPoint mDragOrigin;
|
||||
|
||||
cbBarInfo* mpDraggedBar; // also used when in bar-drag action
|
||||
cbRowInfo* mpResizedRow;
|
||||
|
||||
bool mRowHandleHitted;
|
||||
bool mIsUpperHandle;
|
||||
bool mBarHandleHitted;
|
||||
bool mIsLeftHandle;
|
||||
bool mBarContentHitted;
|
||||
|
||||
// contstraints for dragging the handle
|
||||
wxRect mHandleDragArea;
|
||||
bool mHandleIsVertical;
|
||||
int mHandleOfs;
|
||||
int mDraggedDelta;
|
||||
wxPoint mPrevPos;
|
||||
|
||||
// used for handling, start-draw-in-area events
|
||||
wxClientDC* mpClntDc;
|
||||
|
||||
cbDockPane* mpPane; // is set up temorary short-cut, while handling event
|
||||
|
||||
protected:
|
||||
// helpers
|
||||
void DrawDraggedHandle( const wxPoint& pos, cbDockPane& pane );
|
||||
|
||||
virtual void DrawPaneShade( wxDC& dc, int alignment );
|
||||
virtual void DrawPaneShadeForRow( cbRowInfo* pRow, wxDC& dc );
|
||||
|
||||
virtual void DrawUpperRowHandle( cbRowInfo* pRow, wxDC& dc );
|
||||
virtual void DrawLowerRowHandle( cbRowInfo* pRow, wxDC& dc );
|
||||
|
||||
virtual void DrawUpperRowShades( cbRowInfo* pRow, wxDC& dc, int level );
|
||||
virtual void DrawLowerRowShades( cbRowInfo* pRow, wxDC& dc, int level );
|
||||
|
||||
virtual void DrawBarInnerShadeRect( cbBarInfo* pBar, wxDC& dc );
|
||||
|
||||
virtual void DrawShade( int level, wxRect& rect, int alignment, wxDC& dc );
|
||||
virtual void DrawShade1( int level, wxRect& rect, int alignment, wxDC& dc );
|
||||
|
||||
inline void SetLightPixel( int x, int y, wxDC& dc );
|
||||
inline void SetDarkPixel ( int x, int y, wxDC& dc );
|
||||
|
||||
public:
|
||||
cbPaneDrawPlugin(void);
|
||||
|
||||
cbPaneDrawPlugin( wxFrameLayout* pPanel, int paneMask = wxALL_PANES );
|
||||
|
||||
virtual ~cbPaneDrawPlugin();
|
||||
|
||||
virtual cbPluginBase* Clone() { return new cbPaneDrawPlugin(0,0); }
|
||||
|
||||
// handlers for plugin-events
|
||||
|
||||
void OnLButtonDown( cbLeftDownEvent& event );
|
||||
void OnLDblClick ( cbLeftDClickEvent& event );
|
||||
void OnLButtonUp ( cbLeftUpEvent& event );
|
||||
void OnRButtonUp ( cbRightUpEvent& event );
|
||||
void OnMouseMove ( cbMotionEvent& event );
|
||||
|
||||
void OnDrawPaneBackground ( cbDrawPaneBkGroundEvent& event );
|
||||
void OnDrawPaneDecorations( cbDrawPaneDecorEvent& event );
|
||||
|
||||
void OnDrawRowDecorations ( cbDrawRowDecorEvent& event );
|
||||
void OnDrawRowHandles ( cbDrawRowHandlesEvent& event );
|
||||
void OnDrawRowBackground ( cbDrawRowBkGroundEvent& event );
|
||||
|
||||
void OnSizeBarWindow ( cbSizeBarWndEvent& event );
|
||||
void OnDrawBarDecorations ( cbDrawBarDecorEvent& event );
|
||||
void OnDrawBarHandles ( cbDrawBarHandlesEvent& event );
|
||||
|
||||
void OnStartDrawInArea ( cbStartDrawInAreaEvent& event );
|
||||
void OnFinishDrawInArea ( cbFinishDrawInAreaEvent& event );
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif /* __PANEDRAWPL_G__ */
|
||||
|
@@ -1,164 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: No names yet.
|
||||
// Purpose: Contrib. demo
|
||||
// Author: Aleksandras Gluchovas
|
||||
// Modified by:
|
||||
// Created: 06/10/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Aleksandras Gluchovas
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __ROWDRAGPL_G__
|
||||
#define __ROWDRAGPL_G__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "rowdragpl.h"
|
||||
#endif
|
||||
|
||||
#include "wx/fl/controlbar.h"
|
||||
|
||||
/*
|
||||
* Plugin adds row-dragging fuctionality to the pane.
|
||||
* Handles mouse/movement and pane-background erasing plugin-events.
|
||||
* Behaviour and appearence resembles drag & drop posotioning
|
||||
* of the toolbar-rows int Netscape Comunicator 4.xx.
|
||||
*/
|
||||
|
||||
class cbRowDragPlugin : public cbPluginBase
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS( cbRowDragPlugin )
|
||||
public:
|
||||
// background colours for the highlighted/unhighlighted icons
|
||||
|
||||
wxColour mHightColor; // light-blue for NC-look
|
||||
wxColour mLowColor; // light-gray -/-
|
||||
wxColour mTrianInnerColor; // blue -/-
|
||||
wxPen mTrianInnerPen; // black -/-
|
||||
|
||||
protected:
|
||||
friend class cbRowDragPluginSerializer;
|
||||
|
||||
// drag & drop state variables
|
||||
bool mDragStarted;
|
||||
bool mDecisionMode;
|
||||
wxPoint mDragOrigin;
|
||||
int mCurDragOfs;
|
||||
bool mCaptureIsOn;
|
||||
|
||||
// saved margins of the pane
|
||||
int mSvTopMargin;
|
||||
int mSvBottomMargin;
|
||||
int mSvLeftMargin;
|
||||
int mSvRightMargin;
|
||||
|
||||
//on-screen drawing state variables
|
||||
wxBitmap* mpPaneImage;
|
||||
wxBitmap* mpRowImage;
|
||||
wxBitmap* mpCombinedImage;
|
||||
|
||||
wxScreenDC* mpScrDc;
|
||||
wxRect mCombRect;
|
||||
wxSize mRowImgDim;
|
||||
int mInitialRowOfs;
|
||||
|
||||
// NOTE:: if mpRowInFocus is not NULL, then mCollapsedIconInFocus is -1,
|
||||
// and v.v. (two different items cannot be in focus at the same time)
|
||||
|
||||
cbRowInfo* mpRowInFocus;
|
||||
int mCollapsedIconInFocus;
|
||||
|
||||
cbDockPane* mpPane; // is set up temorarely, while handling event
|
||||
|
||||
wxList mHiddenBars;
|
||||
|
||||
wxBitmap* CaptureDCArea( wxDC& dc, wxRect& area );
|
||||
|
||||
// helpers for drag&drop
|
||||
|
||||
int GetHRowsCountForPane( cbDockPane* pPane );
|
||||
|
||||
void SetMouseCapture( bool captureOn );
|
||||
void PrepareForRowDrag();
|
||||
void ShowDraggedRow( int offset );
|
||||
void ShowPaneImage();
|
||||
void FinishOnScreenDraw();
|
||||
void CollapseRow( cbRowInfo* pRow );
|
||||
void ExpandRow( int collapsedIconIdx );
|
||||
void InsertDraggedRowBefore( cbRowInfo* pBeforeRow );
|
||||
bool ItemIsInFocus();
|
||||
void CheckPrevItemInFocus( cbRowInfo* pRow, int iconIdx );
|
||||
void UnhiglightItemInFocus();
|
||||
|
||||
cbRowInfo* GetFirstRow();
|
||||
|
||||
// "hard-coded metafile" for NN-look
|
||||
|
||||
virtual void DrawTrianUp( wxRect& inRect, wxDC& dc );
|
||||
virtual void DrawTrianDown( wxRect& inRect, wxDC& dc );
|
||||
virtual void DrawTrianRight( wxRect& inRect, wxDC& dc );
|
||||
virtual void Draw3DPattern( wxRect& inRect, wxDC& dc );
|
||||
virtual void DrawRombShades( wxPoint& p1, wxPoint& p2, wxPoint& p3, wxPoint& p4, wxDC& dc );
|
||||
virtual void DrawOrtoRomb( wxRect& inRect, wxDC& dc, wxBrush& bkBrush );
|
||||
virtual void DrawRomb( wxRect& inRect, wxDC& dc, wxBrush& bkBrush );
|
||||
virtual void Draw3DRect( wxRect& inRect, wxDC& dc, wxBrush& bkBrush );
|
||||
virtual void DrawRectShade( wxRect& inRect, wxDC& dc,
|
||||
int level, wxPen& upperPen, wxPen& lowerPen );
|
||||
|
||||
virtual void GetRowHintRect( cbRowInfo* pRow, wxRect& rect );
|
||||
virtual void GetCollapsedInconRect( int iconIdx, wxRect& rect );
|
||||
|
||||
virtual int GetCollapsedIconsPos();
|
||||
|
||||
public:
|
||||
|
||||
cbRowDragPlugin(void);
|
||||
|
||||
cbRowDragPlugin( wxFrameLayout* pLayout, int paneMask = wxALL_PANES );
|
||||
virtual ~cbRowDragPlugin();
|
||||
|
||||
virtual cbPluginBase* Clone() { return new cbRowDragPlugin(NULL,0); }
|
||||
|
||||
virtual void OnInitPlugin();
|
||||
|
||||
// handlers for plugin events (appearence-independent logic)
|
||||
|
||||
void OnMouseMove ( cbMotionEvent& event );
|
||||
void OnLButtonDown( cbLeftDownEvent& event );
|
||||
void OnLButtonUp ( cbLeftUpEvent& event );
|
||||
void OnDrawPaneBackground( cbDrawPaneDecorEvent& event );
|
||||
|
||||
// overridables (appearence-depedent)
|
||||
|
||||
virtual void DrawCollapsedRowIcon( int index, wxDC& dc, bool isHighlighted );
|
||||
virtual void DrawCollapsedRowsBorder( wxDC& dc );
|
||||
virtual void DrawRowsDragHintsBorder( wxDC& dc );
|
||||
virtual void DrawRowDragHint( cbRowInfo* pRow, wxDC& dc, bool isHighlighted );
|
||||
virtual void DrawEmptyRow( wxDC& dc, wxRect& rowBounds );
|
||||
|
||||
virtual int GetCollapsedRowIconHeight();
|
||||
virtual int GetRowDragHintWidth();
|
||||
|
||||
virtual void SetPaneMargins();
|
||||
|
||||
|
||||
virtual bool HitTestCollapsedRowIcon( int iconIdx, const wxPoint& pos );
|
||||
virtual bool HitTestRowDragHint( cbRowInfo* pRow, const wxPoint& pos );
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
// internal helper-class
|
||||
|
||||
class cbHiddenBarInfo : public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS( cbHiddenBarInfo )
|
||||
public:
|
||||
cbBarInfo* mpBar;
|
||||
int mRowNo;
|
||||
int mIconNo;
|
||||
int mAlignment;
|
||||
};
|
||||
|
||||
#endif /* __ROWDRAGPL_G__ */
|
||||
|
@@ -1,87 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: No names yet.
|
||||
// Purpose: Contrib. demo
|
||||
// Author: Aleksandras Gluchovas
|
||||
// Modified by:
|
||||
// Created: 02/10/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Aleksandras Gluchovas
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __ROWLAYOUTPL_G__
|
||||
#define __ROWLAYOUTPL_G__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "rowlayoutpl.h"
|
||||
#endif
|
||||
|
||||
#include "wx/fl/controlbar.h"
|
||||
|
||||
/*
|
||||
* Simple implementation of plugin, which handles row-layouting
|
||||
* requests sent from Frame Layout
|
||||
*/
|
||||
|
||||
class cbRowLayoutPlugin : public cbPluginBase
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS( cbRowLayoutPlugin )
|
||||
protected:
|
||||
cbDockPane* mpPane; // is set up temorarely, while handling event
|
||||
protected:
|
||||
|
||||
// not-fixed-bars layouting related helpers
|
||||
|
||||
void FitBarsToRange( int from, int till, cbBarInfo* pTheBar, cbRowInfo* pRow );
|
||||
void RelayoutNotFixedBarsAround( cbBarInfo* pTheBar, cbRowInfo* pRow );
|
||||
void MinimzeNotFixedBars( cbRowInfo* pRow, cbBarInfo* pBarToPreserve );
|
||||
int GetRowFreeSpace( cbRowInfo* pRow );
|
||||
|
||||
void RecalcLengthRatios( cbRowInfo* pRow );
|
||||
void ApplyLengthRatios( cbRowInfo* pRow );
|
||||
void ExpandNotFixedBars( cbRowInfo* pRow );
|
||||
void AdjustLengthOfInserted( cbRowInfo* pRow, cbBarInfo* pTheBar );
|
||||
|
||||
void DetectBarHandles( cbRowInfo* pRow );
|
||||
void CheckIfAtTheBoundary( cbBarInfo* pTheBar, cbRowInfo& rowInfo );
|
||||
|
||||
|
||||
// row-layouting helpers (simulate "bar-friction")
|
||||
|
||||
int CalcRowHeight( cbRowInfo& row );
|
||||
void LayoutItemsVertically( cbRowInfo& row );
|
||||
|
||||
void StickRightSideBars( cbBarInfo* pToBar );
|
||||
|
||||
void SlideLeftSideBars ( cbBarInfo* pTheBar );
|
||||
void SlideRightSideBars( cbBarInfo* pTheBar );
|
||||
|
||||
void ShiftLeftTrashold ( cbBarInfo* pTheBar, cbRowInfo& row );
|
||||
void ShiftRightTrashold( cbBarInfo* pTheBar, cbRowInfo& row );
|
||||
|
||||
void InsertBefore( cbBarInfo* pBeforeBar,
|
||||
cbBarInfo* pTheBar,
|
||||
cbRowInfo& row
|
||||
);
|
||||
|
||||
void DoInsertBar( cbBarInfo* pTheBar, cbRowInfo& row );
|
||||
|
||||
public:
|
||||
|
||||
cbRowLayoutPlugin(void);
|
||||
|
||||
cbRowLayoutPlugin( wxFrameLayout* pPanel, int paneMask = wxALL_PANES );
|
||||
|
||||
// event handlers
|
||||
|
||||
void OnResizeRow ( cbResizeRowEvent& event );
|
||||
void OnInsertBar ( cbInsertBarEvent& event );
|
||||
void OnRemoveBar ( cbRemoveBarEvent& event );
|
||||
void OnLayoutRow ( cbLayoutRowEvent& event );
|
||||
void OnLayoutRows( cbLayoutRowsEvent& event );
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif /* __ROWLAYOUTPL_G__ */
|
||||
|
@@ -1,216 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: No names yet.
|
||||
// Purpose: Contrib. demo
|
||||
// Author: Aleksandras Gluchovas
|
||||
// Modified by:
|
||||
// Created: 06/09/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Aleksandras Gluchovas
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __TOOLWND_G__
|
||||
#define __TOOLWND_G__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "toolwnd.h"
|
||||
#endif
|
||||
|
||||
#include "wx/frame.h"
|
||||
#include "wx/dynarray.h"
|
||||
|
||||
// fixed settings
|
||||
|
||||
#define BTN_BOX_HEIGHT 12
|
||||
#define BTN_BOX_WIDTH 12
|
||||
#define BTN_X_WIEGHT 2
|
||||
|
||||
class cbMiniButton;
|
||||
|
||||
typedef cbMiniButton* cbMinitButtonPtrT;
|
||||
|
||||
WX_DEFINE_ARRAY( cbMinitButtonPtrT, cbMiniButtonArrayT );
|
||||
|
||||
class wxToolWindow : public wxFrame
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS( wxToolWindow )
|
||||
|
||||
public: /** protected really, accessed only by serializers **/
|
||||
|
||||
cbMiniButtonArrayT mButtons;
|
||||
wxWindow* mpClientWnd;
|
||||
|
||||
wxFont mTitleFont;
|
||||
|
||||
int mTitleHeight;
|
||||
int mClntHorizGap;
|
||||
int mClntVertGap;
|
||||
int mWndVertGap;
|
||||
int mWndHorizGap;
|
||||
int mButtonGap;
|
||||
int mInTitleMargin;
|
||||
int mHintBorder;
|
||||
|
||||
bool mResizeStarted;
|
||||
bool mRealTimeUpdatesOn;
|
||||
|
||||
int mMTolerance;
|
||||
|
||||
int mCursorType;
|
||||
bool mMouseCaptured;
|
||||
|
||||
// drag&drop state variables
|
||||
|
||||
wxPoint mDragOrigin;
|
||||
wxRect mInitialRect;
|
||||
wxRect mPrevHintRect;
|
||||
wxScreenDC* mpScrDc;
|
||||
|
||||
protected:
|
||||
void GetScrWindowRect( wxRect& r );
|
||||
void GetScrMousePos ( wxMouseEvent& event, wxPoint& pos );
|
||||
void SetHintCursor ( int type );
|
||||
|
||||
void CalcResizedRect( wxRect& rect, wxPoint& delta, const wxSize& minDim );
|
||||
void AdjustRectPos( const wxRect& original, const wxSize& newDim, wxRect& newRect );
|
||||
wxSize GetMinimalWndDim();
|
||||
|
||||
void DrawHintRect( const wxRect& r );
|
||||
|
||||
int HitTestWindow( wxMouseEvent& event );
|
||||
|
||||
void LayoutMiniButtons();
|
||||
|
||||
public:
|
||||
|
||||
wxToolWindow();
|
||||
~wxToolWindow();
|
||||
|
||||
void SetClient( wxWindow* pWnd );
|
||||
wxWindow* GetClient();
|
||||
|
||||
void SetTitleFont( wxFont& font );
|
||||
|
||||
// buttons are added in right-to-left order
|
||||
void AddMiniButton( cbMiniButton* pBtn );
|
||||
|
||||
void OnPaint( wxPaintEvent& event );
|
||||
|
||||
void OnMotion( wxMouseEvent& event );
|
||||
void OnLeftDown( wxMouseEvent& event );
|
||||
void OnLeftUp( wxMouseEvent& event );
|
||||
void OnSize( wxSizeEvent& event );
|
||||
|
||||
void OnEraseBackground( wxEraseEvent& event );
|
||||
|
||||
// overridables:
|
||||
|
||||
virtual wxSize GetPreferredSize( const wxSize& given );
|
||||
virtual void OnMiniButtonClicked( int btnIdx ) {}
|
||||
virtual bool HandleTitleClick( wxMouseEvent& event ) { return FALSE; }
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
// FIXME:: the code below should be moved to a separate file
|
||||
|
||||
#include "wx/fl/controlbar.h"
|
||||
|
||||
class cbMiniButton : public wxObject
|
||||
{
|
||||
public:
|
||||
wxPoint mPos;
|
||||
wxSize mDim;
|
||||
bool mVisible;
|
||||
bool mEnabled;
|
||||
|
||||
wxFrameLayout* mpLayout;
|
||||
cbDockPane* mpPane;
|
||||
cbPluginBase* mpPlugin;
|
||||
|
||||
wxWindow* mpWnd;
|
||||
|
||||
bool mWasClicked;
|
||||
bool mDragStarted;
|
||||
|
||||
bool mPressed;
|
||||
public:
|
||||
cbMiniButton();
|
||||
|
||||
void SetPos( const wxPoint& pos );
|
||||
bool HitTest( const wxPoint& pos );
|
||||
|
||||
void OnLeftDown( const wxPoint& pos );
|
||||
void OnLeftUp( const wxPoint& pos );
|
||||
void OnMotion( const wxPoint& pos );
|
||||
|
||||
void Refresh();
|
||||
virtual void Draw( wxDC& dc );
|
||||
|
||||
bool WasClicked();
|
||||
void Reset();
|
||||
|
||||
void Enable( bool enable ) { mEnabled = enable; }
|
||||
|
||||
bool IsPressed() { return mPressed; }
|
||||
};
|
||||
|
||||
// classes specific to wxFrameLayout engine (FOR NOW in here...)
|
||||
|
||||
class cbCloseBox : public cbMiniButton
|
||||
{
|
||||
public:
|
||||
virtual void Draw( wxDC& dc );
|
||||
};
|
||||
|
||||
class cbCollapseBox : public cbMiniButton
|
||||
{
|
||||
public:
|
||||
bool mIsAtLeft;
|
||||
|
||||
virtual void Draw( wxDC& dc );
|
||||
};
|
||||
|
||||
class cbDockBox : public cbMiniButton
|
||||
{
|
||||
public:
|
||||
virtual void Draw( wxDC& dc );
|
||||
};
|
||||
|
||||
class cbFloatedBarWindow : public wxToolWindow
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS( cbFloatedBarWindow )
|
||||
protected:
|
||||
cbBarInfo* mpBar;
|
||||
wxFrameLayout* mpLayout;
|
||||
|
||||
friend class cbFloatedBarWindowSerializer;
|
||||
|
||||
public:
|
||||
cbFloatedBarWindow();
|
||||
|
||||
void SetBar( cbBarInfo* pBar );
|
||||
void SetLayout( wxFrameLayout* pLayout );
|
||||
cbBarInfo* GetBar();
|
||||
|
||||
// given coordinates are those of the bar itself
|
||||
// floated container window's position and size
|
||||
// are ajusted accordingly
|
||||
|
||||
void PositionFloatedWnd( int scrX, int scrY,
|
||||
int width, int height );
|
||||
|
||||
// overriden methods of wxToolWindow
|
||||
|
||||
virtual wxSize GetPreferredSize( const wxSize& given );
|
||||
virtual void OnMiniButtonClicked( int btnIdx );
|
||||
virtual bool HandleTitleClick( wxMouseEvent& event );
|
||||
|
||||
void OnDblClick( wxMouseEvent& event );
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif /* __TOOLWND_G__ */
|
||||
|
||||
|
@@ -1,56 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: No names yet.
|
||||
// Purpose: Contrib. demo
|
||||
// Author: Aleksandras Gluchovas (@Lithuania)
|
||||
// Modified by:
|
||||
// Created: 19/10/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Aleksandras Gluchovas
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __UPDATESMGR_G__
|
||||
#define __UPDATESMGR_G__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "updatesmgr.h"
|
||||
#endif
|
||||
|
||||
#include "wx/fl/controlbar.h"
|
||||
|
||||
/*
|
||||
* class implements slightly optimized logic for refreshing
|
||||
* areas of frame layout - which actually need to be updated.
|
||||
*/
|
||||
|
||||
class cbSimpleUpdatesMgr : public cbUpdatesManagerBase
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS( cbSimpleUpdatesMgr )
|
||||
protected:
|
||||
|
||||
bool WasChanged( cbUpdateMgrData& data, wxRect& currentBounds );
|
||||
|
||||
public:
|
||||
|
||||
cbSimpleUpdatesMgr(void) {}
|
||||
|
||||
cbSimpleUpdatesMgr( wxFrameLayout* pPanel );
|
||||
|
||||
// notificiactions received from Frame Layout (in the order, in which
|
||||
// they usually would be invoked)
|
||||
|
||||
virtual void OnStartChanges();
|
||||
|
||||
virtual void OnRowWillChange( cbRowInfo* pRow, cbDockPane* pInPane );
|
||||
virtual void OnBarWillChange( cbBarInfo* pBar, cbRowInfo* pInRow, cbDockPane* pInPane );
|
||||
virtual void OnPaneMarginsWillChange( cbDockPane* pPane );
|
||||
virtual void OnPaneWillChange( cbDockPane* pPane );
|
||||
|
||||
virtual void OnFinishChanges();
|
||||
|
||||
// refreshes parts of the frame layout, which need an update
|
||||
virtual void UpdateNow();
|
||||
};
|
||||
|
||||
#endif /* __UPDATESMGR_G__ */
|
||||
|
@@ -1,148 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: dynamicsash.h
|
||||
// Purpose: A window which can be dynamically split to an arbitrary depth
|
||||
// and later reunified through the user interface
|
||||
// Author: Matt Kimball
|
||||
// Modified by:
|
||||
// Created: 7/15/2001
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2001 Matt Kimball
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_DYNAMICSASH_H_
|
||||
#define _WX_DYNAMICSASH_H_
|
||||
|
||||
/*
|
||||
|
||||
wxDynamicSashWindow
|
||||
|
||||
wxDynamicSashWindow widgets manages the way other widgets are viewed.
|
||||
When a wxDynamicSashWindow is first shown, it will contain one child
|
||||
view, a viewport for that child, and a pair of scrollbars to allow the
|
||||
user to navigate the child view area. Next to each scrollbar is a small
|
||||
tab. By clicking on either tab and dragging to the appropriate spot, a
|
||||
user can split the view area into two smaller views separated by a
|
||||
draggable sash. Later, when the user wishes to reunify the two subviews,
|
||||
the user simply drags the sash to the side of the window.
|
||||
wxDynamicSashWindow will automatically reparent the appropriate child
|
||||
view back up the window hierarchy, and the wxDynamicSashWindow will have
|
||||
only one child view once again.
|
||||
|
||||
As an application developer, you will simply create a wxDynamicSashWindow
|
||||
using either the Create() function or the more complex constructor
|
||||
provided below, and then create a view window whose parent is the
|
||||
wxDynamicSashWindow. The child should respond to
|
||||
wxDynamicSashSplitEvents -- perhaps with an OnSplit() event handler -- by
|
||||
constructing a new view window whose parent is also the
|
||||
wxDynamicSashWindow. That's it! Now your users can dynamically split
|
||||
and reunify the view you provided.
|
||||
|
||||
If you wish to handle the scrollbar events for your view, rather than
|
||||
allowing wxDynamicSashWindow to do it for you, things are a bit more
|
||||
complex. (You might want to handle scrollbar events yourself, if,
|
||||
for instance, you wish to scroll a subwindow of the view you add to
|
||||
your wxDynamicSashWindow object, rather than scrolling the whole view.)
|
||||
In this case, you will need to construct your wxDynamicSashWindow without
|
||||
the wxMANAGE_SCROLLBARS style and you will need to use the
|
||||
GetHScrollBar() and GetVScrollBar() methods to retrieve the scrollbar
|
||||
controls and call SetEventHanler() on them to redirect the scrolling
|
||||
events whenever your window is reparented by wxDyanmicSashWindow.
|
||||
You will need to set the scrollbars' event handler at three times:
|
||||
|
||||
* When your view is created
|
||||
* When your view receives a wxDynamicSashSplitEvent
|
||||
* When your view receives a wxDynamicSashUnifyEvent
|
||||
|
||||
See the dynsash_switch sample application for an example which does this.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#include <wx/event.h>
|
||||
#include <wx/window.h>
|
||||
class wxScrollBar;
|
||||
|
||||
|
||||
#define wxEVT_DYNAMIC_SASH_BASE (((int)('d' - 'a') << 11) | ((int)('s' - 'a') << 6) | ((int)('h' - 'a') << 1))
|
||||
#define wxEVT_DYNAMIC_SASH_SPLIT (wxEVT_DYNAMIC_SASH_BASE + 1)
|
||||
#define wxEVT_DYNAMIC_SASH_UNIFY (wxEVT_DYNAMIC_SASH_BASE + 2)
|
||||
|
||||
#define EVT_DYNAMIC_SASH_SPLIT(id, func) EVT_CUSTOM(wxEVT_DYNAMIC_SASH_SPLIT, (id), (func))
|
||||
#define EVT_DYNAMIC_SASH_UNIFY(id, func) EVT_CUSTOM(wxEVT_DYNAMIC_SASH_UNIFY, (id), (func))
|
||||
|
||||
|
||||
/*
|
||||
wxMANAGE_SCROLLBARS is a default style of wxDynamicSashWindow which
|
||||
will cause it to respond to scrollbar events for your application by
|
||||
automatically scrolling the child view.
|
||||
*/
|
||||
#define wxMANAGE_SCROLLBARS 0x00800000
|
||||
|
||||
|
||||
/*
|
||||
wxDynamicSashSplitEvents are sent to your view by wxDynamicSashWindow
|
||||
whenever your view is being split by the user. It is your
|
||||
responsibility to handle this event by creating a new view window as
|
||||
a child of the wxDynamicSashWindow. wxDynamicSashWindow will
|
||||
automatically reparent it to the proper place in its window hierarchy.
|
||||
*/
|
||||
class wxDynamicSashSplitEvent : public wxCommandEvent {
|
||||
public:
|
||||
wxDynamicSashSplitEvent();
|
||||
wxDynamicSashSplitEvent(wxObject *target);
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxDynamicSashSplitEvent)
|
||||
};
|
||||
|
||||
/*
|
||||
wxDynamicSashUnifyEvents are sent to your view by wxDynamicSashWindow
|
||||
whenever the sash which splits your view and its sibling is being
|
||||
reunified such that your view is expanding to replace its sibling.
|
||||
You needn't do anything with this event if you are allowing
|
||||
wxDynamicSashWindow to manage your view's scrollbars, but it is useful
|
||||
if you are managing the scrollbars yourself so that you can keep
|
||||
the scrollbars' event handlers connected to your view's event handler
|
||||
class.
|
||||
*/
|
||||
class wxDynamicSashUnifyEvent : public wxCommandEvent {
|
||||
public:
|
||||
wxDynamicSashUnifyEvent();
|
||||
wxDynamicSashUnifyEvent(wxObject *target);
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxDynamicSashUnifyEvent);
|
||||
};
|
||||
|
||||
/*
|
||||
wxDynamicSashWindow. See above.
|
||||
*/
|
||||
class wxDynamicSashWindow : public wxWindow {
|
||||
public:
|
||||
wxDynamicSashWindow();
|
||||
wxDynamicSashWindow(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
||||
long style = wxCLIP_CHILDREN | wxMANAGE_SCROLLBARS,
|
||||
const wxString& name = "dynamicSashWindow");
|
||||
virtual ~wxDynamicSashWindow();
|
||||
|
||||
virtual bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
||||
long style = wxCLIP_CHILDREN | wxMANAGE_SCROLLBARS,
|
||||
const wxString& name = "dynamicSashWindow");
|
||||
virtual wxScrollBar *GetHScrollBar(const wxWindow *child) const;
|
||||
virtual wxScrollBar *GetVScrollBar(const wxWindow *child) const;
|
||||
|
||||
/* This is overloaded from wxWindowBase. It's not here for you to
|
||||
call directly. */
|
||||
virtual void AddChild(wxWindowBase *child);
|
||||
|
||||
private:
|
||||
class wxDynamicSashWindowImpl *m_impl;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxDynamicSashWindow)
|
||||
};
|
||||
|
||||
|
||||
#endif
|
@@ -1,59 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// 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
|
@@ -1,167 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: multicell.h
|
||||
// Purpose: provide two new classes for layout, wxMultiCellSizer and wxMultiCellCanvas
|
||||
// Author: Jonathan Bayer
|
||||
// Modified by:
|
||||
// Created:
|
||||
// RCS-ID: $Id:
|
||||
// Copyright: (c) Jonathan Bayer
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// This was inspired by the gbsizer class written by Alex Andruschak
|
||||
|
||||
|
||||
#ifndef __WX_MULTICELL_H__
|
||||
#define __WX_MULTICELL_H__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "multicell.h"
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// headers
|
||||
// ----------------------------------------------------------------------------
|
||||
// The classes are derived from wxSizer
|
||||
#include "wx/sizer.h"
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// constants
|
||||
// ----------------------------------------------------------------------------
|
||||
enum wxResizable
|
||||
{
|
||||
wxNOT_RESIZABLE = 0x00,
|
||||
wxHORIZENTAL_RESIZABLE = 0x01,
|
||||
wxVERTICAL_RESIZABLE = 0x10,
|
||||
wxRESIZABLE = 0x11
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// classes
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// wxMultiCellItemHandle
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxMultiCellItemHandle: public wxObject
|
||||
{
|
||||
DECLARE_CLASS(wxMultiCellItemHandle);
|
||||
protected:
|
||||
int m_column;
|
||||
int m_row;
|
||||
int m_width;
|
||||
int m_height;
|
||||
wxResizable m_style;
|
||||
wxSize m_fixedSize;
|
||||
int m_alignment;
|
||||
wxSize m_weight;
|
||||
|
||||
public:
|
||||
wxMultiCellItemHandle( int row, int column, int height = 1, int width = 1, wxSize size = wxDefaultSize, wxResizable style = wxNOT_RESIZABLE, wxSize weight = wxSize(1,1), int align = wxALIGN_NOT);
|
||||
wxMultiCellItemHandle( int row, int column, wxSize size, wxResizable style = wxNOT_RESIZABLE, wxSize weight = wxSize(1,1), int align = wxALIGN_NOT);
|
||||
wxMultiCellItemHandle( int row, int column, wxResizable style, wxSize weight = wxSize(1,1), int align = wxALIGN_NOT);
|
||||
wxMultiCellItemHandle( int row, int column, int align);
|
||||
int GetColumn();
|
||||
int GetRow();
|
||||
int GetWidth();
|
||||
int GetHeight();
|
||||
wxResizable GetStyle();
|
||||
wxSize GetLocalSize();
|
||||
int GetAlignment();
|
||||
wxSize GetWeight();
|
||||
|
||||
private:
|
||||
void Initialize( int row, int column, int height = 1, int width = 1, wxSize size = wxDefaultSize, wxResizable style = wxNOT_RESIZABLE, wxSize weight = wxSize(1,1), int align = wxALIGN_NOT);
|
||||
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// wxMultiCellSizer
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxMultiCellSizer : virtual public wxSizer
|
||||
{
|
||||
DECLARE_CLASS(wxMultiCellSizer);
|
||||
|
||||
protected:
|
||||
wxSize m_cell_count;
|
||||
|
||||
public:
|
||||
wxMultiCellSizer(wxSize & size);
|
||||
wxMultiCellSizer(int rows, int cols);
|
||||
~wxMultiCellSizer();
|
||||
|
||||
virtual void RecalcSizes();
|
||||
virtual wxSize CalcMin();
|
||||
bool SetDefaultCellSize(wxSize size);
|
||||
bool SetColumnWidth(int column, int colSize = 5, bool expandable = FALSE);
|
||||
bool SetRowHeight(int row, int rowSize = 5, bool expandable = FALSE);
|
||||
bool EnableGridLines(wxWindow *win);
|
||||
bool SetGridPen(wxPen *pen);
|
||||
void OnPaint(wxDC& dc);
|
||||
|
||||
private:
|
||||
void GetMinimums();
|
||||
int Sum(int *array, int x);
|
||||
|
||||
private:
|
||||
int *m_maxHeight;
|
||||
int *m_maxWidth;
|
||||
int *m_rowStretch;
|
||||
int *m_colStretch;
|
||||
wxSize **m_weights;
|
||||
wxSize **m_minSizes;
|
||||
int m_maxWeights;
|
||||
wxSize m_defaultCellSize;
|
||||
wxWindow *m_win; // usually used for debugging
|
||||
wxPen *m_pen;
|
||||
|
||||
void DrawGridLines(wxDC& dc);
|
||||
void Initialize(wxSize size);
|
||||
};
|
||||
|
||||
|
||||
// wxCell is used internally, so we don't need to declare it here
|
||||
|
||||
class wxCell;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// wxMultiCellCanvas
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
class wxMultiCellCanvas : public wxFlexGridSizer
|
||||
{
|
||||
public:
|
||||
wxMultiCellCanvas(wxWindow *parent, int numRows = 2, int numCols = 2);
|
||||
void Add(wxWindow *win, unsigned int row, unsigned int col);
|
||||
|
||||
void Resize(int numRows, int numCols);
|
||||
int MaxRows()
|
||||
{
|
||||
return m_maxRows;
|
||||
};
|
||||
int MaxCols()
|
||||
{
|
||||
return m_maxCols;
|
||||
};
|
||||
void CalculateConstraints();
|
||||
void SetMinCellSize(const wxSize size)
|
||||
{
|
||||
m_minCellSize = size;
|
||||
};
|
||||
|
||||
private:
|
||||
wxWindow *m_parent;
|
||||
unsigned int m_maxRows, m_maxCols;
|
||||
|
||||
wxSize m_minCellSize;
|
||||
wxCell **m_cells;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/*** End of File ***/
|
@@ -1,227 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: splittree.h
|
||||
// Purpose: Classes to achieve a remotely-scrolled tree in a splitter
|
||||
// window that can be scrolled by a scrolled window higher in the
|
||||
// hierarchy
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 8/7/2000
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_SPLITTREE_H_
|
||||
#define _WX_SPLITTREE_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "splittree.h"
|
||||
#endif
|
||||
|
||||
// Set this to 1 to use generic tree control (doesn't yet work properly)
|
||||
#define USE_GENERIC_TREECTRL 0
|
||||
|
||||
#include "wx/wx.h"
|
||||
#include "wx/treectrl.h"
|
||||
#include "wx/splitter.h"
|
||||
#include "wx/scrolwin.h"
|
||||
|
||||
#if USE_GENERIC_TREECTRL
|
||||
#include "wx/generic/treectlg.h"
|
||||
#ifndef wxTreeCtrl
|
||||
#define wxTreeCtrl wxGenericTreeCtrl
|
||||
#define sm_classwxTreeCtrl sm_classwxGenericTreeCtrl
|
||||
#endif
|
||||
#endif
|
||||
|
||||
class wxRemotelyScrolledTreeCtrl;
|
||||
class wxThinSplitterWindow;
|
||||
class wxSplitterScrolledWindow;
|
||||
|
||||
/*
|
||||
* wxRemotelyScrolledTreeCtrl
|
||||
*
|
||||
* This tree control disables its vertical scrollbar and catches scroll
|
||||
* events passed by a scrolled window higher in the hierarchy.
|
||||
* It also updates the scrolled window vertical scrollbar as appropriate.
|
||||
*/
|
||||
|
||||
class wxRemotelyScrolledTreeCtrl: public wxTreeCtrl
|
||||
{
|
||||
DECLARE_CLASS(wxRemotelyScrolledTreeCtrl)
|
||||
public:
|
||||
wxRemotelyScrolledTreeCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pt = wxDefaultPosition,
|
||||
const wxSize& sz = wxDefaultSize, long style = wxTR_HAS_BUTTONS);
|
||||
~wxRemotelyScrolledTreeCtrl();
|
||||
|
||||
//// Events
|
||||
void OnSize(wxSizeEvent& event);
|
||||
void OnExpand(wxTreeEvent& event);
|
||||
void OnScroll(wxScrollWinEvent& event);
|
||||
|
||||
//// Overrides
|
||||
// Override this in case we're using the generic tree control.
|
||||
// Calls to this should disable the vertical scrollbar.
|
||||
|
||||
// Number of pixels per user unit (0 or -1 for no scrollbar)
|
||||
// Length of virtual canvas in user units
|
||||
// Length of page in user units
|
||||
virtual void SetScrollbars(int pixelsPerUnitX, int pixelsPerUnitY,
|
||||
int noUnitsX, int noUnitsY,
|
||||
int xPos = 0, int yPos = 0,
|
||||
bool noRefresh = FALSE );
|
||||
|
||||
// In case we're using the generic tree control.
|
||||
// Get the view start
|
||||
virtual void GetViewStart(int *x, int *y) const;
|
||||
|
||||
// In case we're using the generic tree control.
|
||||
virtual void PrepareDC(wxDC& dc);
|
||||
|
||||
// In case we're using the generic tree control.
|
||||
virtual int GetScrollPos(int orient) const;
|
||||
|
||||
//// Helpers
|
||||
void HideVScrollbar();
|
||||
|
||||
// Calculate the tree overall size so we can set the scrollbar
|
||||
// correctly
|
||||
void CalcTreeSize(wxRect& rect);
|
||||
void CalcTreeSize(const wxTreeItemId& id, wxRect& rect);
|
||||
|
||||
// Adjust the containing wxScrolledWindow's scrollbars appropriately
|
||||
void AdjustRemoteScrollbars();
|
||||
|
||||
// Find the scrolled window that contains this control
|
||||
wxScrolledWindow* GetScrolledWindow() const;
|
||||
|
||||
// Scroll to the given line (in scroll units where each unit is
|
||||
// the height of an item)
|
||||
void ScrollToLine(int posHoriz, int posVert);
|
||||
|
||||
//// Accessors
|
||||
|
||||
// The companion window is one which will get notified when certain
|
||||
// events happen such as node expansion
|
||||
void SetCompanionWindow(wxWindow* companion) { m_companionWindow = companion; }
|
||||
wxWindow* GetCompanionWindow() const { return m_companionWindow; }
|
||||
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
protected:
|
||||
wxWindow* m_companionWindow;
|
||||
};
|
||||
|
||||
/*
|
||||
* wxTreeCompanionWindow
|
||||
*
|
||||
* A window displaying values associated with tree control items.
|
||||
*/
|
||||
|
||||
class wxTreeCompanionWindow: public wxWindow
|
||||
{
|
||||
public:
|
||||
DECLARE_CLASS(wxTreeCompanionWindow)
|
||||
|
||||
wxTreeCompanionWindow(wxWindow* parent, wxWindowID id = -1,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& sz = wxDefaultSize,
|
||||
long style = 0);
|
||||
|
||||
//// Overrides
|
||||
virtual void DrawItem(wxDC& dc, wxTreeItemId id, const wxRect& rect);
|
||||
|
||||
//// Events
|
||||
void OnPaint(wxPaintEvent& event);
|
||||
void OnScroll(wxScrollWinEvent& event);
|
||||
void OnExpand(wxTreeEvent& event);
|
||||
|
||||
//// Operations
|
||||
|
||||
//// Accessors
|
||||
wxRemotelyScrolledTreeCtrl* GetTreeCtrl() const { return m_treeCtrl; };
|
||||
void SetTreeCtrl(wxRemotelyScrolledTreeCtrl* treeCtrl) { m_treeCtrl = treeCtrl; }
|
||||
|
||||
//// Data members
|
||||
protected:
|
||||
wxRemotelyScrolledTreeCtrl* m_treeCtrl;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* wxThinSplitterWindow
|
||||
*
|
||||
* Implements a splitter with a less obvious sash
|
||||
* than the usual one.
|
||||
*/
|
||||
|
||||
class wxThinSplitterWindow: public wxSplitterWindow
|
||||
{
|
||||
public:
|
||||
DECLARE_DYNAMIC_CLASS(wxThinSplitterWindow)
|
||||
|
||||
wxThinSplitterWindow(wxWindow* parent, wxWindowID id = -1,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& sz = wxDefaultSize,
|
||||
long style = wxSP_3D | wxCLIP_CHILDREN);
|
||||
|
||||
//// Overrides
|
||||
|
||||
void SizeWindows();
|
||||
// Tests for x, y over sash. Overriding this allows us to increase
|
||||
// the tolerance.
|
||||
bool SashHitTest(int x, int y, int tolerance = 2);
|
||||
void DrawSash(wxDC& dc);
|
||||
|
||||
//// Events
|
||||
|
||||
void OnSize(wxSizeEvent& event);
|
||||
|
||||
//// Operations
|
||||
|
||||
//// Accessors
|
||||
|
||||
//// Data members
|
||||
protected:
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
/*
|
||||
* wxSplitterScrolledWindow
|
||||
*
|
||||
* This scrolled window is aware of the fact that one of its
|
||||
* children is a splitter window. It passes on its scroll events
|
||||
* (after some processing) to both splitter children for them
|
||||
* scroll appropriately.
|
||||
*/
|
||||
|
||||
class wxSplitterScrolledWindow: public wxScrolledWindow
|
||||
{
|
||||
public:
|
||||
DECLARE_DYNAMIC_CLASS(wxSplitterScrolledWindow)
|
||||
|
||||
wxSplitterScrolledWindow(wxWindow* parent, wxWindowID id = -1,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& sz = wxDefaultSize,
|
||||
long style = 0);
|
||||
|
||||
//// Overrides
|
||||
|
||||
//// Events
|
||||
|
||||
void OnScroll(wxScrollWinEvent& event);
|
||||
void OnSize(wxSizeEvent& event);
|
||||
|
||||
//// Operations
|
||||
|
||||
//// Accessors
|
||||
|
||||
//// Data members
|
||||
public:
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif
|
||||
// _SPLITTREE_H_
|
@@ -27,7 +27,7 @@ class WXDLLEXPORT wxCDAudio : public wxObject {
|
||||
public:
|
||||
typedef enum { PLAYING, PAUSED, STOPPED } CDstatus;
|
||||
// Table of contents manager
|
||||
class WXDLLEXPORT CDtoc {
|
||||
class CDtoc {
|
||||
protected:
|
||||
wxCDtime *tracks_time, *tracks_pos;
|
||||
wxCDtime total_time;
|
||||
|
@@ -22,7 +22,7 @@
|
||||
// AIFF codec
|
||||
//
|
||||
|
||||
class WXDLLEXPORT wxSoundAiff: public wxSoundFileStream {
|
||||
class wxSoundAiff: public wxSoundFileStream {
|
||||
public:
|
||||
wxSoundAiff(wxInputStream& stream, wxSoundStream& io_sound);
|
||||
wxSoundAiff(wxOutputStream& stream, wxSoundStream& io_sound);
|
||||
|
@@ -112,7 +112,7 @@ class WXDLLEXPORT wxSoundFormatBase {
|
||||
// Base class for sound streams
|
||||
//
|
||||
|
||||
class WXDLLEXPORT wxSoundStream {
|
||||
class wxSoundStream {
|
||||
public:
|
||||
wxSoundStream();
|
||||
virtual ~wxSoundStream();
|
||||
|
@@ -15,7 +15,7 @@
|
||||
#include "wx/defs.h"
|
||||
#include "wx/mmedia/sndbase.h"
|
||||
|
||||
class WXDLLEXPORT wxSoundStreamCodec: public wxSoundStream {
|
||||
class wxSoundStreamCodec: public wxSoundStream {
|
||||
public:
|
||||
wxSoundStreamCodec(wxSoundStream& snd_io);
|
||||
~wxSoundStreamCodec();
|
||||
|
@@ -20,7 +20,7 @@
|
||||
// PCM converter class
|
||||
//
|
||||
|
||||
class WXDLLEXPORT wxSoundStreamPcm: public wxSoundStreamCodec {
|
||||
class wxSoundStreamPcm: public wxSoundStreamCodec {
|
||||
public:
|
||||
typedef void (*ConverterType)(const void *buf_in, void *buf_out,
|
||||
wxUint32 len);
|
||||
|
@@ -5,8 +5,8 @@
|
||||
// Author: Guilhem Lavaux <lavaux@easynet.fr> (C) 2000
|
||||
// CVSID: $Id$
|
||||
// --------------------------------------------------------------------------
|
||||
#ifndef _WX_SNDMSAD_H
|
||||
#define _WX_SNDMSAD_H
|
||||
#ifndef _WX_SNDULAW_H
|
||||
#define _WX_SNDULAW_H
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "sndmsad.h"
|
||||
@@ -17,52 +17,46 @@
|
||||
#include "wx/mmedia/sndcodec.h"
|
||||
#include "wx/mmedia/sndbase.h"
|
||||
|
||||
WX_DEFINE_EXPORTED_ARRAY(wxInt16, wxMSAdpcmCoeffs);
|
||||
WX_DEFINE_EXPORTED_ARRAY(wxUint16, wxMSAdpcmCoeffs);
|
||||
|
||||
//
|
||||
// MSADPCM format
|
||||
//
|
||||
class WXDLLEXPORT wxSoundFormatMSAdpcm: public wxSoundFormatBase {
|
||||
public:
|
||||
wxSoundFormatMSAdpcm();
|
||||
~wxSoundFormatMSAdpcm();
|
||||
|
||||
void SetSampleRate(wxUint32 srate);
|
||||
wxUint32 GetSampleRate() const;
|
||||
|
||||
void SetCoefs(wxInt16 **coefs, wxUint16 ncoefs, wxUint16 coefs_len);
|
||||
void GetCoefs(wxInt16 **&coefs, wxUint16& ncoefs,
|
||||
wxUint16& coefs_len) const;
|
||||
public:
|
||||
wxSoundFormatMSAdpcm();
|
||||
~wxSoundFormatMSAdpcm();
|
||||
|
||||
void SetBlockSize(wxUint16 block_size);
|
||||
wxUint16 GetBlockSize() const;
|
||||
|
||||
void SetChannels(wxUint16 channels);
|
||||
wxUint16 GetChannels() const;
|
||||
|
||||
wxSoundFormatType GetType() const { return wxSOUND_MSADPCM; }
|
||||
wxSoundFormatBase *Clone() const;
|
||||
|
||||
wxUint32 GetTimeFromBytes(wxUint32 bytes) const;
|
||||
wxUint32 GetBytesFromTime(wxUint32 time) const;
|
||||
|
||||
bool operator !=(const wxSoundFormatBase& frmt2) const;
|
||||
void SetSampleRate(wxUint32 srate);
|
||||
wxUint32 GetSampleRate() const;
|
||||
|
||||
protected:
|
||||
wxUint32 m_srate, m_nchannels;
|
||||
wxInt16 **m_coefs;
|
||||
wxUint16 m_ncoefs, m_coefs_len;
|
||||
wxUint16 m_block_size;
|
||||
void SetSamplesBlock(wxUint16 sampblock);
|
||||
wxUint16 GetSamplesBlock() const;
|
||||
|
||||
void SetCoefs(wxMSAdpcmCoefs& coefs);
|
||||
wxMSAdpcmCoefs& GetCoefs() const;
|
||||
|
||||
wxSoundFormatType GetType() const { return wxSOUND_ULAW; }
|
||||
wxSoundFormatBase *Clone() const;
|
||||
|
||||
wxUint32 GetTimeFromBytes(wxUint32 bytes) const;
|
||||
wxUint32 GetBytesFromTime(wxUint32 time) const;
|
||||
|
||||
bool operator !=(const wxSoundFormatBase& frmt2) const;
|
||||
|
||||
protected:
|
||||
wxUint32 m_srate;
|
||||
wxMSAdpcmCoefs *m_coefs;
|
||||
};
|
||||
|
||||
//
|
||||
// MS ADPCM converter class
|
||||
//
|
||||
class WXDLLEXPORT wxSoundRouterStream;
|
||||
class WXDLLEXPORT wxSoundStreamMSAdpcm: public wxSoundStreamCodec {
|
||||
class WXDLLEXPORT wxSoundStreamAdpcm: public wxSoundStreamCodec {
|
||||
public:
|
||||
wxSoundStreamMSAdpcm(wxSoundStream& sndio);
|
||||
~wxSoundStreamMSAdpcm();
|
||||
wxSoundStreamAdpcm(wxSoundStream& sndio);
|
||||
~wxSoundStreamAdpcm();
|
||||
|
||||
wxSoundStream& Read(void *buffer, wxUint32 len);
|
||||
wxSoundStream& Write(const void *buffer, wxUint32 len);
|
||||
@@ -73,32 +67,6 @@ public:
|
||||
|
||||
protected:
|
||||
wxSoundRouterStream *m_router;
|
||||
|
||||
typedef struct {
|
||||
wxInt32 predictor;
|
||||
wxInt16 samp1;
|
||||
wxInt16 samp2;
|
||||
wxInt16 coeff[2];
|
||||
wxInt32 iDelta;
|
||||
} AdpcmState;
|
||||
|
||||
AdpcmState m_state[1];
|
||||
|
||||
bool m_got_header;
|
||||
bool m_stereo;
|
||||
wxInt16 **m_coefs;
|
||||
wxUint16 m_block_size;
|
||||
wxUint16 m_ncoefs;
|
||||
wxUint16 m_next_block;
|
||||
|
||||
protected:
|
||||
wxUint32 DecodeMonoADPCM(const void *in_buffer, void *out_buffer,
|
||||
wxUint32 in_len);
|
||||
wxUint32 DecodeStereoADPCM(const void *in_buffer, void *out_buffer,
|
||||
wxUint32 in_len);
|
||||
void Nibble(wxInt8 nyb,
|
||||
AdpcmState *state,
|
||||
wxInt16 **out_buffer);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@@ -21,7 +21,7 @@
|
||||
// OSS output class
|
||||
//
|
||||
|
||||
class WXDLLEXPORT wxSoundStreamOSS : public wxSoundStream {
|
||||
class wxSoundStreamOSS : public wxSoundStream {
|
||||
public:
|
||||
wxSoundStreamOSS(const wxString& dev_name = wxT("/dev/dsp"));
|
||||
~wxSoundStreamOSS();
|
||||
|
@@ -42,18 +42,12 @@ protected:
|
||||
wxUint32 GetData(void *buffer, wxUint32 len);
|
||||
wxUint32 PutData(const void *buffer, wxUint32 len);
|
||||
|
||||
bool HandleOutputPCM(wxDataInputStream& data, wxUint32 len,
|
||||
wxUint16 channels, wxUint32 sample_fq,
|
||||
wxUint32 byte_p_sec, wxUint16 byte_p_spl,
|
||||
wxUint16 bits_p_spl);
|
||||
bool HandleOutputMSADPCM(wxDataInputStream& data, wxUint32 len,
|
||||
wxUint16 channels, wxUint32 sample_fq,
|
||||
wxUint32 byte_p_sec, wxUint16 byte_p_spl,
|
||||
wxUint16 bits_p_spl);
|
||||
bool HandleOutputG721(wxDataInputStream& data, wxUint32 len,
|
||||
wxUint16 channels, wxUint32 sample_fq,
|
||||
wxUint32 byte_p_sec, wxUint16 byte_p_spl,
|
||||
wxUint16 bits_p_spl);
|
||||
bool HandleOutputPCM(wxDataInputStream& data, wxUint16 channels,
|
||||
wxUint32 sample_fq, wxUint32 byte_p_sec,
|
||||
wxUint16 byte_p_spl, wxUint16 bits_p_spl);
|
||||
bool HandleOutputG721(wxDataInputStream& data, wxUint16 channels,
|
||||
wxUint32 sample_fq, wxUint32 byte_p_sec,
|
||||
wxUint16 byte_p_spl, wxUint16 bits_p_spl);
|
||||
wxSoundFormatBase *HandleInputPCM(wxDataOutputStream& data);
|
||||
wxSoundFormatBase *HandleInputG72X(wxDataOutputStream& data);
|
||||
|
||||
|
@@ -1,43 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: email.h
|
||||
// Purpose: wxEmail: portable email client class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 2001-08-21
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "email.h"
|
||||
#endif
|
||||
|
||||
#ifndef _WX_EMAIL_H_
|
||||
#define _WX_EMAIL_H_
|
||||
|
||||
#include "wx/net/msg.h"
|
||||
|
||||
/*
|
||||
* wxEmail
|
||||
* Miscellaneous email functions
|
||||
*/
|
||||
|
||||
class wxEmail
|
||||
{
|
||||
public:
|
||||
//// Ctor/dtor
|
||||
wxEmail() {};
|
||||
|
||||
//// Operations
|
||||
|
||||
// Send a message.
|
||||
// Specify profile, or leave it to wxWindows to find the current user name
|
||||
static bool Send(wxMailMessage& message, const wxString& profileName = wxEmptyString );
|
||||
|
||||
protected:
|
||||
};
|
||||
|
||||
|
||||
#endif //_WX_EMAIL_H_
|
||||
|
@@ -1,67 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: msg.h
|
||||
// Purpose: wxMailMessage
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 2001-08-21
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "msg.h"
|
||||
#endif
|
||||
|
||||
#ifndef _WX_MSG_H_
|
||||
#define _WX_MSG_H_
|
||||
|
||||
/*
|
||||
* wxMailMessage
|
||||
* Encapsulates an email message
|
||||
*/
|
||||
|
||||
class wxMailMessage
|
||||
{
|
||||
public:
|
||||
|
||||
// A common usage
|
||||
wxMailMessage(const wxString& subject, const wxString& to,
|
||||
const wxString& body, const wxString& attachment = wxEmptyString,
|
||||
const wxString& attachmentTitle = wxEmptyString)
|
||||
{
|
||||
m_to.Add(to);
|
||||
m_subject = subject;
|
||||
m_body = body;
|
||||
if (!attachment.IsEmpty())
|
||||
{
|
||||
m_attachments.Add(attachment);
|
||||
m_attachmentTitles.Add(attachmentTitle);
|
||||
}
|
||||
}
|
||||
|
||||
wxMailMessage() {};
|
||||
|
||||
//// Accessors
|
||||
|
||||
void AddTo(const wxString& to) { m_to.Add(to); }
|
||||
void AddCc(const wxString& cc) { m_cc.Add(cc); }
|
||||
void AddBcc(const wxString& bcc) { m_bcc.Add(bcc); }
|
||||
void AddAttachment(const wxString& attach, const wxString& title = wxEmptyString)
|
||||
{ m_attachments.Add(attach); m_attachmentTitles.Add(title); }
|
||||
|
||||
void SetSubject(const wxString& subject) { m_subject = subject; }
|
||||
void SetBody(const wxString& body) { m_body = body; }
|
||||
|
||||
public:
|
||||
wxArrayString m_to; //The To: Recipients
|
||||
wxArrayString m_cc; //The CC: Recipients
|
||||
wxArrayString m_bcc; //The BCC Recipients
|
||||
wxString m_subject; //The Subject of the message
|
||||
wxString m_body; //The Body of the message
|
||||
wxArrayString m_attachments; //Files to attach to the email
|
||||
wxArrayString m_attachmentTitles; //Titles to use for the email file attachments
|
||||
};
|
||||
|
||||
#endif // _WX_MSG_H_
|
||||
|
@@ -1,56 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: smapi.h
|
||||
// Purpose: Simple MAPI classes
|
||||
// Author: PJ Naughter <pjna@naughter.com>
|
||||
// Modified by: Julian Smart
|
||||
// Created: 2001-08-21
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) PJ Naughter
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "smapi.h"
|
||||
#endif
|
||||
|
||||
#ifndef _WX_SMAPI_H_
|
||||
#define _WX_SMAPI_H_
|
||||
|
||||
#include "wx/net/msg.h"
|
||||
|
||||
class wxMapiData;
|
||||
|
||||
//The class which encapsulates the MAPI connection
|
||||
class wxMapiSession
|
||||
{
|
||||
public:
|
||||
//Constructors / Destructors
|
||||
wxMapiSession();
|
||||
~wxMapiSession();
|
||||
|
||||
//Logon / Logoff Methods
|
||||
bool Logon(const wxString& sProfileName, const wxString& sPassword = wxEmptyString, wxWindow* pParentWnd = NULL);
|
||||
bool LoggedOn() const;
|
||||
bool Logoff();
|
||||
|
||||
//Send a message
|
||||
bool Send(wxMailMessage& message);
|
||||
|
||||
//General MAPI support
|
||||
bool MapiInstalled() const;
|
||||
|
||||
//Error Handling
|
||||
long GetLastError() const;
|
||||
|
||||
protected:
|
||||
//Methods
|
||||
void Initialise();
|
||||
void Deinitialise();
|
||||
bool Resolve(const wxString& sName, void* lppRecip1);
|
||||
|
||||
wxMapiData* m_data;
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif //_WX_SMAPI_H_
|
@@ -1,37 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: web.h
|
||||
// Purpose: wxWeb: portable web browser-related class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 2001-08-21
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "web.h"
|
||||
#endif
|
||||
|
||||
#ifndef _WX_WEB_H_
|
||||
#define _WX_WEB_H_
|
||||
|
||||
/*
|
||||
* wxWeb
|
||||
* Miscellaneous web functions
|
||||
*/
|
||||
|
||||
class wxWeb
|
||||
{
|
||||
public:
|
||||
//// Ctor/dtor
|
||||
wxWeb() {};
|
||||
|
||||
//// Operations
|
||||
|
||||
protected:
|
||||
};
|
||||
|
||||
|
||||
#endif //_WX_WEB_H_
|
||||
|
@@ -1,8 +0,0 @@
|
||||
|
||||
// For /plot.cpp
|
||||
plot_up_bmp BITMAP "wx/plot/plot_up.bmp"
|
||||
plot_dwn_bmp BITMAP "wx/plot/plot_dwn.bmp"
|
||||
plot_enl_bmp BITMAP "wx/plot/plot_enl.bmp"
|
||||
plot_shr_bmp BITMAP "wx/plot/plot_shr.bmp"
|
||||
plot_zin_bmp BITMAP "wx/plot/plot_zin.bmp"
|
||||
plot_zot_bmp BITMAP "wx/plot/plot_zot.bmp"
|
181
contrib/include/wx/stc/SciLexer.h
Normal file
181
contrib/include/wx/stc/SciLexer.h
Normal file
@@ -0,0 +1,181 @@
|
||||
// Scintilla source code edit control
|
||||
// SciLexer - interface to the added lexer functions in the SciLexer version of the edit control
|
||||
// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
#ifndef SCILEXER_H
|
||||
#define SCILEXER_H
|
||||
|
||||
// SciLexer features - not in standard Scintilla
|
||||
|
||||
#define SCLEX_CONTAINER 0
|
||||
#define SCLEX_NULL 1
|
||||
#define SCLEX_PYTHON 2
|
||||
#define SCLEX_CPP 3
|
||||
#define SCLEX_HTML 4
|
||||
#define SCLEX_XML 5
|
||||
#define SCLEX_PERL 6
|
||||
#define SCLEX_SQL 7
|
||||
#define SCLEX_VB 8
|
||||
#define SCLEX_PROPERTIES 9
|
||||
#define SCLEX_ERRORLIST 10
|
||||
#define SCLEX_MAKEFILE 11
|
||||
#define SCLEX_BATCH 12
|
||||
#define SCLEX_XCODE 13
|
||||
#define SCLEX_LATEX 14
|
||||
|
||||
// Lexical states for SCLEX_PYTHON
|
||||
#define SCE_P_DEFAULT 0
|
||||
#define SCE_P_COMMENTLINE 1
|
||||
#define SCE_P_NUMBER 2
|
||||
#define SCE_P_STRING 3
|
||||
#define SCE_P_CHARACTER 4
|
||||
#define SCE_P_WORD 5
|
||||
#define SCE_P_TRIPLE 6
|
||||
#define SCE_P_TRIPLEDOUBLE 7
|
||||
#define SCE_P_CLASSNAME 8
|
||||
#define SCE_P_DEFNAME 9
|
||||
#define SCE_P_OPERATOR 10
|
||||
#define SCE_P_IDENTIFIER 11
|
||||
#define SCE_P_COMMENTBLOCK 12
|
||||
#define SCE_P_STRINGEOL 13
|
||||
|
||||
// Lexical states for SCLEX_CPP, SCLEX_VB
|
||||
#define SCE_C_DEFAULT 0
|
||||
#define SCE_C_COMMENT 1
|
||||
#define SCE_C_COMMENTLINE 2
|
||||
#define SCE_C_COMMENTDOC 3
|
||||
#define SCE_C_NUMBER 4
|
||||
#define SCE_C_WORD 5
|
||||
#define SCE_C_STRING 6
|
||||
#define SCE_C_CHARACTER 7
|
||||
#define SCE_C_UUID 8
|
||||
#define SCE_C_PREPROCESSOR 9
|
||||
#define SCE_C_OPERATOR 10
|
||||
#define SCE_C_IDENTIFIER 11
|
||||
#define SCE_C_STRINGEOL 12
|
||||
|
||||
// Lexical states for SCLEX_HTML, SCLEX_xML
|
||||
#define SCE_H_DEFAULT 0
|
||||
#define SCE_H_TAG 1
|
||||
#define SCE_H_TAGUNKNOWN 2
|
||||
#define SCE_H_ATTRIBUTE 3
|
||||
#define SCE_H_ATTRIBUTEUNKNOWN 4
|
||||
#define SCE_H_NUMBER 5
|
||||
#define SCE_H_DOUBLESTRING 6
|
||||
#define SCE_H_SINGLESTRING 7
|
||||
#define SCE_H_OTHER 8
|
||||
#define SCE_H_COMMENT 9
|
||||
#define SCE_H_ENTITY 10
|
||||
// XML and ASP
|
||||
#define SCE_H_TAGEND 11
|
||||
#define SCE_H_XMLSTART 12
|
||||
#define SCE_H_XMLEND 13
|
||||
#define SCE_H_SCRIPT 14
|
||||
#define SCE_H_ASP 15
|
||||
#define SCE_H_ASPAT 16
|
||||
// Embedded Javascript
|
||||
#define SCE_HJ_START 40
|
||||
#define SCE_HJ_DEFAULT 41
|
||||
#define SCE_HJ_COMMENT 42
|
||||
#define SCE_HJ_COMMENTLINE 43
|
||||
#define SCE_HJ_COMMENTDOC 44
|
||||
#define SCE_HJ_NUMBER 45
|
||||
#define SCE_HJ_WORD 46
|
||||
#define SCE_HJ_KEYWORD 47
|
||||
#define SCE_HJ_DOUBLESTRING 48
|
||||
#define SCE_HJ_SINGLESTRING 49
|
||||
#define SCE_HJ_SYMBOLS 50
|
||||
#define SCE_HJ_STRINGEOL 51
|
||||
// ASP Javascript
|
||||
#define SCE_HJA_START 55
|
||||
#define SCE_HJA_DEFAULT 56
|
||||
#define SCE_HJA_COMMENT 57
|
||||
#define SCE_HJA_COMMENTLINE 58
|
||||
#define SCE_HJA_COMMENTDOC 59
|
||||
#define SCE_HJA_NUMBER 60
|
||||
#define SCE_HJA_WORD 61
|
||||
#define SCE_HJA_KEYWORD 62
|
||||
#define SCE_HJA_DOUBLESTRING 63
|
||||
#define SCE_HJA_SINGLESTRING 64
|
||||
#define SCE_HJA_SYMBOLS 65
|
||||
#define SCE_HJA_STRINGEOL 66
|
||||
// Embedded VBScript
|
||||
#define SCE_HB_START 70
|
||||
#define SCE_HB_DEFAULT 71
|
||||
#define SCE_HB_COMMENTLINE 72
|
||||
#define SCE_HB_NUMBER 73
|
||||
#define SCE_HB_WORD 74
|
||||
#define SCE_HB_STRING 75
|
||||
#define SCE_HB_IDENTIFIER 76
|
||||
#define SCE_HB_STRINGEOL 77
|
||||
// ASP VBScript
|
||||
#define SCE_HBA_START 80
|
||||
#define SCE_HBA_DEFAULT 81
|
||||
#define SCE_HBA_COMMENTLINE 82
|
||||
#define SCE_HBA_NUMBER 83
|
||||
#define SCE_HBA_WORD 84
|
||||
#define SCE_HBA_STRING 85
|
||||
#define SCE_HBA_IDENTIFIER 86
|
||||
#define SCE_HBA_STRINGEOL 87
|
||||
// Embedded Python
|
||||
#define SCE_HP_START 90
|
||||
#define SCE_HP_DEFAULT 91
|
||||
#define SCE_HP_COMMENTLINE 92
|
||||
#define SCE_HP_NUMBER 93
|
||||
#define SCE_HP_STRING 94
|
||||
#define SCE_HP_CHARACTER 95
|
||||
#define SCE_HP_WORD 96
|
||||
#define SCE_HP_TRIPLE 97
|
||||
#define SCE_HP_TRIPLEDOUBLE 98
|
||||
#define SCE_HP_CLASSNAME 99
|
||||
#define SCE_HP_DEFNAME 100
|
||||
#define SCE_HP_OPERATOR 101
|
||||
#define SCE_HP_IDENTIFIER 102
|
||||
// ASP Python
|
||||
#define SCE_HPA_START 105
|
||||
#define SCE_HPA_DEFAULT 106
|
||||
#define SCE_HPA_COMMENTLINE 107
|
||||
#define SCE_HPA_NUMBER 108
|
||||
#define SCE_HPA_STRING 109
|
||||
#define SCE_HPA_CHARACTER 110
|
||||
#define SCE_HPA_WORD 111
|
||||
#define SCE_HPA_TRIPLE 112
|
||||
#define SCE_HPA_TRIPLEDOUBLE 113
|
||||
#define SCE_HPA_CLASSNAME 114
|
||||
#define SCE_HPA_DEFNAME 115
|
||||
#define SCE_HPA_OPERATOR 116
|
||||
#define SCE_HPA_IDENTIFIER 117
|
||||
|
||||
// Lexical states for SCLEX_PERL
|
||||
#define SCE_PL_DEFAULT 0
|
||||
#define SCE_PL_HERE 1
|
||||
#define SCE_PL_COMMENTLINE 2
|
||||
#define SCE_PL_POD 3
|
||||
#define SCE_PL_NUMBER 4
|
||||
#define SCE_PL_WORD 5
|
||||
#define SCE_PL_STRING 6
|
||||
#define SCE_PL_CHARACTER 7
|
||||
#define SCE_PL_PUNCTUATION 8
|
||||
#define SCE_PL_PREPROCESSOR 9
|
||||
#define SCE_PL_OPERATOR 10
|
||||
#define SCE_PL_IDENTIFIER 11
|
||||
#define SCE_PL_SCALAR 12
|
||||
#define SCE_PL_ARRAY 13
|
||||
#define SCE_PL_HASH 14
|
||||
#define SCE_PL_SYMBOLTABLE 15
|
||||
#define SCE_PL_REF 16
|
||||
#define SCE_PL_REGEX 17
|
||||
#define SCE_PL_REGSUBST 18
|
||||
#define SCE_PL_LONGQUOTE 19
|
||||
#define SCE_PL_BACKTICKS 20
|
||||
#define SCE_PL_DATASECTION 21
|
||||
|
||||
// Lexical states for SCLEX_LATEX
|
||||
#define SCE_L_DEFAULT 0
|
||||
#define SCE_L_COMMAND 1
|
||||
#define SCE_L_TAG 2
|
||||
#define SCE_L_MATH 3
|
||||
#define SCE_L_COMMENT 4
|
||||
|
||||
#endif
|
File diff suppressed because it is too large
Load Diff
@@ -1,49 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: xh_all.h
|
||||
// Purpose: includes all xh_*.h files
|
||||
// Author: Vaclav Slavik
|
||||
// Created: 2000/03/05
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2000 Vaclav Slavik
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_XH_ALL_H_
|
||||
#define _WX_XH_ALL_H_
|
||||
|
||||
|
||||
// Existing handlers:
|
||||
|
||||
#include "wx/xrc/xh_menu.h"
|
||||
#include "wx/xrc/xh_panel.h"
|
||||
#include "wx/xrc/xh_dlg.h"
|
||||
#include "wx/xrc/xh_bttn.h"
|
||||
#include "wx/xrc/xh_chckb.h"
|
||||
#include "wx/xrc/xh_gauge.h"
|
||||
#include "wx/xrc/xh_html.h"
|
||||
#include "wx/xrc/xh_spin.h"
|
||||
#include "wx/xrc/xh_sttxt.h"
|
||||
#include "wx/xrc/xh_slidr.h"
|
||||
#include "wx/xrc/xh_radbt.h"
|
||||
#include "wx/xrc/xh_radbx.h"
|
||||
#include "wx/xrc/xh_combo.h"
|
||||
#include "wx/xrc/xh_chckl.h"
|
||||
#include "wx/xrc/xh_choic.h"
|
||||
#include "wx/xrc/xh_sizer.h"
|
||||
#include "wx/xrc/xh_stbmp.h"
|
||||
#include "wx/xrc/xh_notbk.h"
|
||||
#include "wx/xrc/xh_text.h"
|
||||
#include "wx/xrc/xh_listb.h"
|
||||
#include "wx/xrc/xh_toolb.h"
|
||||
#include "wx/xrc/xh_bmpbt.h"
|
||||
#include "wx/xrc/xh_stbox.h"
|
||||
#include "wx/xrc/xh_scrol.h"
|
||||
#include "wx/xrc/xh_tree.h"
|
||||
#include "wx/xrc/xh_cald.h"
|
||||
#include "wx/xrc/xh_listc.h"
|
||||
#include "wx/xrc/xh_stlin.h"
|
||||
#include "wx/xrc/xh_bmp.h"
|
||||
#include "wx/xrc/xh_unkwn.h"
|
||||
#include "wx/xrc/xh_frame.h"
|
||||
|
||||
#endif // _WX_XMLRES_H_
|
@@ -1,38 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: xh_bmp.h
|
||||
// Purpose: XML resource handler for wxBitmap and wxIcon
|
||||
// Author: Vaclav Slavik
|
||||
// Created: 2000/09/00
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2000 Vaclav Slavik
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_XH_BMP_H_
|
||||
#define _WX_XH_BMP_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "xh_bmp.h"
|
||||
#endif
|
||||
|
||||
#include "wx/xrc/xmlres.h"
|
||||
|
||||
|
||||
class WXXMLDLLEXPORT wxBitmapXmlHandler : public wxXmlResourceHandler
|
||||
{
|
||||
public:
|
||||
wxBitmapXmlHandler();
|
||||
virtual wxObject *DoCreateResource();
|
||||
virtual bool CanHandle(wxXmlNode *node);
|
||||
};
|
||||
|
||||
class WXXMLDLLEXPORT wxIconXmlHandler : public wxXmlResourceHandler
|
||||
{
|
||||
public:
|
||||
wxIconXmlHandler();
|
||||
virtual wxObject *DoCreateResource();
|
||||
virtual bool CanHandle(wxXmlNode *node);
|
||||
};
|
||||
|
||||
|
||||
#endif // _WX_XH_BMP_H_
|
@@ -1,30 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: xh_bmpbt.h
|
||||
// Purpose: XML resource handler for bitmap buttons
|
||||
// Author: Brian Gavin
|
||||
// Created: 2000/03/05
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2000 Brian Gavin
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_XH_BMPBT_H_
|
||||
#define _WX_XH_BMPBT_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "xh_bmpbt.h"
|
||||
#endif
|
||||
|
||||
#include "wx/xrc/xmlres.h"
|
||||
|
||||
|
||||
class WXXMLDLLEXPORT wxBitmapButtonXmlHandler : public wxXmlResourceHandler
|
||||
{
|
||||
public:
|
||||
wxBitmapButtonXmlHandler();
|
||||
virtual wxObject *DoCreateResource();
|
||||
virtual bool CanHandle(wxXmlNode *node);
|
||||
};
|
||||
|
||||
|
||||
#endif // _WX_XH_BMPBT_H_
|
@@ -1,29 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: xh_bttn.h
|
||||
// Purpose: XML resource handler for buttons
|
||||
// Author: Vaclav Slavik
|
||||
// Created: 2000/03/05
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2000 Vaclav Slavik
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_XH_BTTN_H_
|
||||
#define _WX_XH_BTTN_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "xh_bttn.h"
|
||||
#endif
|
||||
|
||||
#include "wx/xrc/xmlres.h"
|
||||
|
||||
class WXXMLDLLEXPORT wxButtonXmlHandler : public wxXmlResourceHandler
|
||||
{
|
||||
public:
|
||||
wxButtonXmlHandler();
|
||||
virtual wxObject *DoCreateResource();
|
||||
virtual bool CanHandle(wxXmlNode *node);
|
||||
};
|
||||
|
||||
|
||||
#endif // _WX_XH_BTTN_H_
|
@@ -1,29 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: xh_cald.h
|
||||
// Purpose: XML resource handler for wxCalendarCtrl
|
||||
// Author: Brian Gavin
|
||||
// Created: 2000/09/09
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2000 Brian Gavin
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_XH_CALD_H_
|
||||
#define _WX_XH_CALD_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "xh_cald.h"
|
||||
#endif
|
||||
|
||||
#include "wx/xrc/xmlres.h"
|
||||
|
||||
class WXXMLDLLEXPORT wxCalendarCtrlXmlHandler : public wxXmlResourceHandler
|
||||
{
|
||||
public:
|
||||
wxCalendarCtrlXmlHandler();
|
||||
virtual wxObject *DoCreateResource();
|
||||
virtual bool CanHandle(wxXmlNode *node);
|
||||
};
|
||||
|
||||
|
||||
#endif // _WX_XH_CALD_H_
|
@@ -1,35 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: xh_chckb.h
|
||||
// Purpose: XML resource handler for wxCheckBox
|
||||
// Author: Bob Mitchell
|
||||
// Created: 2000/03/21
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2000 Bob Mitchell and Verant Interactive
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_XH_CHCKB_H_
|
||||
#define _WX_XH_CHCKB_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "xh_chckb.h"
|
||||
#endif
|
||||
|
||||
#include "wx/xrc/xmlres.h"
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_CHECKBOX
|
||||
|
||||
class WXXMLDLLEXPORT wxCheckBoxXmlHandler : public wxXmlResourceHandler
|
||||
{
|
||||
public:
|
||||
wxCheckBoxXmlHandler();
|
||||
virtual wxObject *DoCreateResource();
|
||||
virtual bool CanHandle(wxXmlNode *node);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#endif // _WX_XH_CHECKBOX_H_
|
||||
|
@@ -1,33 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: xh_chckl.h
|
||||
// Purpose: XML resource handler for wxCheckListBox
|
||||
// Author: Bob Mitchell
|
||||
// Created: 2000/03/21
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2000 Bob Mitchell and Verant Interactive
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_XH_CHCKL_H_
|
||||
#define _WX_XH_CHCKL_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "xh_chckl.h"
|
||||
#endif
|
||||
|
||||
#include "wx/xrc/xmlres.h"
|
||||
|
||||
class WXXMLDLLEXPORT wxCheckListXmlHandler : public wxXmlResourceHandler
|
||||
{
|
||||
public:
|
||||
wxCheckListXmlHandler();
|
||||
virtual wxObject *DoCreateResource();
|
||||
virtual bool CanHandle(wxXmlNode *node);
|
||||
private:
|
||||
bool m_insideBox;
|
||||
wxArrayString strList;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif // _WX_XH_CHECKLIST_H_
|
@@ -1,32 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: xh_choic.h
|
||||
// Purpose: XML resource handler for wxChoice
|
||||
// Author: Bob Mitchell
|
||||
// Created: 2000/03/21
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2000 Bob Mitchell and Verant Interactive
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_XH_CHOIC_H_
|
||||
#define _WX_XH_CHOIC_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "xh_choic.h"
|
||||
#endif
|
||||
|
||||
#include "wx/xrc/xmlres.h"
|
||||
|
||||
class WXXMLDLLEXPORT wxChoiceXmlHandler : public wxXmlResourceHandler
|
||||
{
|
||||
public:
|
||||
wxChoiceXmlHandler();
|
||||
virtual wxObject *DoCreateResource();
|
||||
virtual bool CanHandle(wxXmlNode *node);
|
||||
private:
|
||||
bool m_insideBox;
|
||||
wxArrayString strList;
|
||||
};
|
||||
|
||||
|
||||
#endif // _WX_XH_CHOIC_H_
|
@@ -1,35 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: xh_combo.h
|
||||
// Purpose: XML resource handler for wxComboBox
|
||||
// Author: Bob Mitchell
|
||||
// Created: 2000/03/21
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2000 Bob Mitchell and Verant Interactive
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_XH_COMBO_H_
|
||||
#define _WX_XH_COMBO_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "xh_combo.h"
|
||||
#endif
|
||||
|
||||
#include "wx/xrc/xmlres.h"
|
||||
|
||||
#if wxUSE_COMBOBOX
|
||||
|
||||
class WXXMLDLLEXPORT wxComboBoxXmlHandler : public wxXmlResourceHandler
|
||||
{
|
||||
public:
|
||||
wxComboBoxXmlHandler();
|
||||
virtual wxObject *DoCreateResource();
|
||||
virtual bool CanHandle(wxXmlNode *node);
|
||||
private:
|
||||
bool m_insideBox;
|
||||
wxArrayString strList;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif // _WX_XH_COMBO_H_
|
@@ -1,29 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: xh_dlg.h
|
||||
// Purpose: XML resource handler for dialogs
|
||||
// Author: Vaclav Slavik
|
||||
// Created: 2000/03/05
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2000 Vaclav Slavik
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_XH_DLG_H_
|
||||
#define _WX_XH_DLG_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "xh_dlg.h"
|
||||
#endif
|
||||
|
||||
#include "wx/xrc/xmlres.h"
|
||||
|
||||
class WXXMLDLLEXPORT wxDialogXmlHandler : public wxXmlResourceHandler
|
||||
{
|
||||
public:
|
||||
wxDialogXmlHandler();
|
||||
virtual wxObject *DoCreateResource();
|
||||
virtual bool CanHandle(wxXmlNode *node);
|
||||
};
|
||||
|
||||
|
||||
#endif // _WX_XH_DLG_H_
|
@@ -1,29 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: xh_frame.h
|
||||
// Purpose: XML resource handler for dialogs
|
||||
// Author: Vaclav Slavik & Aleks.
|
||||
// Created: 2000/03/05
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2000 Vaclav Slavik
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_XH_FRAME_H_
|
||||
#define _WX_XH_FRAME_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "xh_frame.h"
|
||||
#endif
|
||||
|
||||
#include "wx/xrc/xmlres.h"
|
||||
|
||||
class WXXMLDLLEXPORT wxFrameXmlHandler : public wxXmlResourceHandler
|
||||
{
|
||||
public:
|
||||
wxFrameXmlHandler();
|
||||
virtual wxObject *DoCreateResource();
|
||||
virtual bool CanHandle(wxXmlNode *node);
|
||||
};
|
||||
|
||||
|
||||
#endif // _WX_XH_FRAME_H_
|
@@ -1,40 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: xh_gauge.h
|
||||
// Purpose: XML resource handler for wxGauge
|
||||
// Author: Bob Mitchell
|
||||
// Created: 2000/03/21
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2000 Bob Mitchell and Verant Interactive
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_XH_GAUGE_H_
|
||||
#define _WX_XH_GAUGE_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "xh_gauge.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_GAUGE
|
||||
|
||||
#include "wx/xrc/xmlres.h"
|
||||
|
||||
|
||||
class WXXMLDLLEXPORT wxGaugeXmlHandler : public wxXmlResourceHandler
|
||||
{
|
||||
enum
|
||||
{
|
||||
wxGAUGE_DEFAULT_RANGE = 100
|
||||
};
|
||||
|
||||
public:
|
||||
wxGaugeXmlHandler();
|
||||
virtual wxObject *DoCreateResource();
|
||||
virtual bool CanHandle(wxXmlNode *node);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif // _WX_XH_GAUGE_H_
|
@@ -1,34 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: xh_html.h
|
||||
// Purpose: XML resource handler for wxHtmlWindow
|
||||
// Author: Bob Mitchell
|
||||
// Created: 2000/03/21
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2000 Bob Mitchell and Verant Interactive
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_XH_HTML_H_
|
||||
#define _WX_XH_HTML_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "xh_html.h"
|
||||
#endif
|
||||
|
||||
#include "wx/xrc/xmlres.h"
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_HTML
|
||||
|
||||
class WXXMLDLLEXPORT wxHtmlWindowXmlHandler : public wxXmlResourceHandler
|
||||
{
|
||||
public:
|
||||
wxHtmlWindowXmlHandler();
|
||||
virtual wxObject *DoCreateResource();
|
||||
virtual bool CanHandle(wxXmlNode *node);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif // _WX_XH_SLIDER_H_
|
@@ -1,35 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: xh_listb.h
|
||||
// Purpose: XML resource handler for wxListbox
|
||||
// Author: Bob Mitchell & Vaclav Slavik
|
||||
// Created: 2000/07/29
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2000 Bob Mitchell & Vaclav Slavik
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_XH_LISTB_H_
|
||||
#define _WX_XH_LISTB_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "xh_listb.h"
|
||||
#endif
|
||||
|
||||
#include "wx/xrc/xmlres.h"
|
||||
|
||||
#if wxUSE_LISTBOX
|
||||
|
||||
class WXXMLDLLEXPORT wxListBoxXmlHandler : public wxXmlResourceHandler
|
||||
{
|
||||
public:
|
||||
wxListBoxXmlHandler();
|
||||
virtual wxObject *DoCreateResource();
|
||||
virtual bool CanHandle(wxXmlNode *node);
|
||||
private:
|
||||
bool m_insideBox;
|
||||
wxArrayString strList;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif // _WX_XH_LISTB_H_
|
@@ -1,29 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: xh_listc.h
|
||||
// Purpose: XML resource handler for wxCalendarCtrl
|
||||
// Author: Brian Gavin
|
||||
// Created: 2000/09/09
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2000 Brian Gavin
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_XH_LISTC_H_
|
||||
#define _WX_XH_LISTC_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "xh_listc.h"
|
||||
#endif
|
||||
|
||||
#include "wx/xrc/xmlres.h"
|
||||
|
||||
class WXXMLDLLEXPORT wxListCtrlXmlHandler : public wxXmlResourceHandler
|
||||
{
|
||||
public:
|
||||
wxListCtrlXmlHandler();
|
||||
virtual wxObject *DoCreateResource();
|
||||
virtual bool CanHandle(wxXmlNode *node);
|
||||
};
|
||||
|
||||
|
||||
#endif // _WX_XH_LISTC_H_
|
@@ -1,40 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: xh_menu.h
|
||||
// Purpose: XML resource handler for menus/menubars
|
||||
// Author: Vaclav Slavik
|
||||
// Created: 2000/03/05
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2000 Vaclav Slavik
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_XH_MENU_H_
|
||||
#define _WX_XH_MENU_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "xh_menu.h"
|
||||
#endif
|
||||
|
||||
#include "wx/xrc/xmlres.h"
|
||||
|
||||
class WXXMLDLLEXPORT wxMenuXmlHandler : public wxXmlResourceHandler
|
||||
{
|
||||
public:
|
||||
wxMenuXmlHandler();
|
||||
virtual wxObject *DoCreateResource();
|
||||
virtual bool CanHandle(wxXmlNode *node);
|
||||
|
||||
private:
|
||||
bool m_insideMenu;
|
||||
};
|
||||
|
||||
class WXXMLDLLEXPORT wxMenuBarXmlHandler : public wxXmlResourceHandler
|
||||
{
|
||||
public:
|
||||
wxMenuBarXmlHandler();
|
||||
virtual wxObject *DoCreateResource();
|
||||
virtual bool CanHandle(wxXmlNode *node);
|
||||
};
|
||||
|
||||
|
||||
#endif // _WX_XH_MENU_H_
|
@@ -1,37 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: xh_notbk.h
|
||||
// Purpose: XML resource handler for wxNotebook
|
||||
// Author: Vaclav Slavik
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2000 Vaclav Slavik
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_XH_NOTBK_H_
|
||||
#define _WX_XH_NOTBK_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "xh_notbk.h"
|
||||
#endif
|
||||
|
||||
#include "wx/xrc/xmlres.h"
|
||||
|
||||
#if wxUSE_NOTEBOOK
|
||||
|
||||
class WXDLLEXPORT wxNotebook;
|
||||
|
||||
class WXXMLDLLEXPORT wxNotebookXmlHandler : public wxXmlResourceHandler
|
||||
{
|
||||
public:
|
||||
wxNotebookXmlHandler();
|
||||
virtual wxObject *DoCreateResource();
|
||||
virtual bool CanHandle(wxXmlNode *node);
|
||||
|
||||
private:
|
||||
bool m_isInside;
|
||||
wxNotebook *m_notebook;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif // _WX_XH_NOTBK_H_
|
@@ -1,29 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: xh_panel.h
|
||||
// Purpose: XML resource handler for panels
|
||||
// Author: Vaclav Slavik
|
||||
// Created: 2000/03/05
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2000 Vaclav Slavik
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_XH_PANEL_H_
|
||||
#define _WX_XH_PANEL_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "xh_panel.h"
|
||||
#endif
|
||||
|
||||
#include "wx/xrc/xmlres.h"
|
||||
|
||||
class WXXMLDLLEXPORT wxPanelXmlHandler : public wxXmlResourceHandler
|
||||
{
|
||||
public:
|
||||
wxPanelXmlHandler();
|
||||
virtual wxObject *DoCreateResource();
|
||||
virtual bool CanHandle(wxXmlNode *node);
|
||||
};
|
||||
|
||||
|
||||
#endif // _WX_XH_PANEL_H_
|
@@ -1,33 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: xh_radbt.h
|
||||
// Purpose: XML resource handler for radio buttons
|
||||
// Author: Bob Mitchell
|
||||
// Created: 2000/03/21
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2000 Bob Mitchell and Verant Interactive
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_XH_RADBT_H_
|
||||
#define _WX_XH_RADBT_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "xh_radbt.h"
|
||||
#endif
|
||||
|
||||
#include "wx/xrc/xmlres.h"
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_RADIOBOX
|
||||
|
||||
class WXXMLDLLEXPORT wxRadioButtonXmlHandler : public wxXmlResourceHandler
|
||||
{
|
||||
public:
|
||||
wxRadioButtonXmlHandler();
|
||||
virtual wxObject *DoCreateResource();
|
||||
virtual bool CanHandle(wxXmlNode *node);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif // _WX_XH_RADIOBUTTON_H_
|
@@ -1,35 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: xh_radbx.h
|
||||
// Purpose: XML resource handler for radio box
|
||||
// Author: Bob Mitchell
|
||||
// Created: 2000/03/21
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2000 Bob Mitchell and Verant Interactive
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_XH_RADBX_H_
|
||||
#define _WX_XH_RADBX_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "xh_radbx.h"
|
||||
#endif
|
||||
|
||||
#include "wx/xrc/xmlres.h"
|
||||
|
||||
#if wxUSE_RADIOBOX
|
||||
|
||||
class WXXMLDLLEXPORT wxRadioBoxXmlHandler : public wxXmlResourceHandler
|
||||
{
|
||||
public:
|
||||
wxRadioBoxXmlHandler();
|
||||
virtual wxObject *DoCreateResource();
|
||||
virtual bool CanHandle(wxXmlNode *node);
|
||||
private:
|
||||
bool m_insideBox;
|
||||
wxArrayString strList;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif // _WX_XH_RADBX_H_
|
@@ -1,39 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: xh_scrol.h
|
||||
// Purpose: XML resource handler for wxScrollBar
|
||||
// Author: Brian Gavin
|
||||
// Created: 2000/09/09
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2000 Brian Gavin
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_XH_SCROL_H_
|
||||
#define _WX_XH_SCROL_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "xh_scrol.h"
|
||||
#endif
|
||||
|
||||
#include "wx/xrc/xmlres.h"
|
||||
#include "wx/defs.h"
|
||||
|
||||
|
||||
|
||||
class WXXMLDLLEXPORT wxScrollBarXmlHandler : public wxXmlResourceHandler
|
||||
{
|
||||
enum
|
||||
{
|
||||
wxSL_DEFAULT_VALUE = 0,
|
||||
wxSL_DEFAULT_MIN = 0,
|
||||
wxSL_DEFAULT_MAX = 100
|
||||
};
|
||||
|
||||
public:
|
||||
wxScrollBarXmlHandler();
|
||||
virtual wxObject *DoCreateResource();
|
||||
virtual bool CanHandle(wxXmlNode *node);
|
||||
};
|
||||
|
||||
|
||||
#endif // _WX_XH_SCROL_H_
|
@@ -1,38 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: xh_sizer.h
|
||||
// Purpose: XML resource handler for wxBoxSizer
|
||||
// Author: Vaclav Slavik
|
||||
// Created: 2000/04/24
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2000 Vaclav Slavik
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_XH_SIZER_H_
|
||||
#define _WX_XH_SIZER_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "xh_sizer.h"
|
||||
#endif
|
||||
|
||||
#include "wx/xrc/xmlres.h"
|
||||
|
||||
|
||||
class WXDLLEXPORT wxSizer;
|
||||
|
||||
class WXXMLDLLEXPORT wxSizerXmlHandler : public wxXmlResourceHandler
|
||||
{
|
||||
public:
|
||||
wxSizerXmlHandler();
|
||||
virtual wxObject *DoCreateResource();
|
||||
virtual bool CanHandle(wxXmlNode *node);
|
||||
|
||||
private:
|
||||
bool m_isInside;
|
||||
wxSizer *m_parentSizer;
|
||||
|
||||
bool IsSizerNode(wxXmlNode *node);
|
||||
};
|
||||
|
||||
|
||||
#endif // _WX_XH_BOXSIZER_H_
|
@@ -1,40 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: xh_slidr.h
|
||||
// Purpose: XML resource handler for wxSlider
|
||||
// Author: Bob Mitchell
|
||||
// Created: 2000/03/21
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2000 Bob Mitchell and Verant Interactive
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_XH_SLIDR_H_
|
||||
#define _WX_XH_SLIDR_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "xh_slidr.h"
|
||||
#endif
|
||||
|
||||
#include "wx/xrc/xmlres.h"
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_SLIDER
|
||||
|
||||
class WXXMLDLLEXPORT wxSliderXmlHandler : public wxXmlResourceHandler
|
||||
{
|
||||
enum
|
||||
{
|
||||
wxSL_DEFAULT_VALUE = 0,
|
||||
wxSL_DEFAULT_MIN = 0,
|
||||
wxSL_DEFAULT_MAX = 100
|
||||
};
|
||||
|
||||
public:
|
||||
wxSliderXmlHandler();
|
||||
virtual wxObject *DoCreateResource();
|
||||
virtual bool CanHandle(wxXmlNode *node);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif // _WX_XH_SLIDER_H_
|
@@ -1,55 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: xh_spin.h
|
||||
// Purpose: XML resource handler for wxSpinButton
|
||||
// Author: Bob Mitchell
|
||||
// Created: 2000/03/21
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2000 Bob Mitchell and Verant Interactive
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_XH_SPIN_H_
|
||||
#define _WX_XH_SPIN_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "xh_spin.h"
|
||||
#endif
|
||||
|
||||
#include "wx/xrc/xmlres.h"
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_SPINBTN
|
||||
class WXXMLDLLEXPORT wxSpinButtonXmlHandler : public wxXmlResourceHandler
|
||||
{
|
||||
enum
|
||||
{
|
||||
wxSP_DEFAULT_VALUE = 0,
|
||||
wxSP_DEFAULT_MIN = 0,
|
||||
wxSP_DEFAULT_MAX = 100
|
||||
};
|
||||
|
||||
public:
|
||||
wxSpinButtonXmlHandler();
|
||||
virtual wxObject *DoCreateResource();
|
||||
virtual bool CanHandle(wxXmlNode *node);
|
||||
};
|
||||
#endif
|
||||
|
||||
#if wxUSE_SPINCTRL
|
||||
class WXXMLDLLEXPORT wxSpinCtrlXmlHandler : public wxXmlResourceHandler
|
||||
{
|
||||
enum
|
||||
{
|
||||
wxSP_DEFAULT_VALUE = 0,
|
||||
wxSP_DEFAULT_MIN = 0,
|
||||
wxSP_DEFAULT_MAX = 100
|
||||
};
|
||||
|
||||
public:
|
||||
wxSpinCtrlXmlHandler();
|
||||
virtual wxObject *DoCreateResource();
|
||||
virtual bool CanHandle(wxXmlNode *node);
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif // _WX_XH_SPIN_H_
|
@@ -1,30 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: xh_stbmp.h
|
||||
// Purpose: XML resource handler for wxStaticBitmap
|
||||
// Author: Vaclav Slavik
|
||||
// Created: 2000/04/22
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2000 Vaclav Slavik
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_XH_STBMP_H_
|
||||
#define _WX_XH_STBMP_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "xh_stbmp.h"
|
||||
#endif
|
||||
|
||||
#include "wx/xrc/xmlres.h"
|
||||
|
||||
|
||||
class WXXMLDLLEXPORT wxStaticBitmapXmlHandler : public wxXmlResourceHandler
|
||||
{
|
||||
public:
|
||||
wxStaticBitmapXmlHandler();
|
||||
virtual wxObject *DoCreateResource();
|
||||
virtual bool CanHandle(wxXmlNode *node);
|
||||
};
|
||||
|
||||
|
||||
#endif // _WX_XH_STBMP_H_
|
@@ -1,30 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: xh_stbox.h
|
||||
// Purpose: XML resource handler for wxStaticBox
|
||||
// Author: Brian Gavin
|
||||
// Created: 2000/09/00
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2000 Brian Gavin
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_XH_STBOX_H_
|
||||
#define _WX_XH_STBOX_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "xh_stbox.h"
|
||||
#endif
|
||||
|
||||
#include "wx/xrc/xmlres.h"
|
||||
|
||||
|
||||
class WXXMLDLLEXPORT wxStaticBoxXmlHandler : public wxXmlResourceHandler
|
||||
{
|
||||
public:
|
||||
wxStaticBoxXmlHandler();
|
||||
virtual wxObject *DoCreateResource();
|
||||
virtual bool CanHandle(wxXmlNode *node);
|
||||
};
|
||||
|
||||
|
||||
#endif // _WX_XH_STBOX_H_
|
@@ -1,32 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: xh_stlin.h
|
||||
// Purpose: XML resource handler for wxStaticLine
|
||||
// Author: Vaclav Slavik
|
||||
// Created: 2000/09/00
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2000 Vaclav Slavik
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_XH_STLIN_H_
|
||||
#define _WX_XH_STLIN_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "xh_stlin.h"
|
||||
#endif
|
||||
|
||||
#include "wx/xrc/xmlres.h"
|
||||
|
||||
#if wxUSE_STATLINE
|
||||
|
||||
class WXXMLDLLEXPORT wxStaticLineXmlHandler : public wxXmlResourceHandler
|
||||
{
|
||||
public:
|
||||
wxStaticLineXmlHandler();
|
||||
virtual wxObject *DoCreateResource();
|
||||
virtual bool CanHandle(wxXmlNode *node);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif // _WX_XH_STLIN_H_
|
@@ -1,30 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: xh_sttxt.h
|
||||
// Purpose: XML resource handler for wxStaticBitmap
|
||||
// Author: Bob Mitchell
|
||||
// Created: 2000/03/21
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2000 Bob Mitchell
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_XH_STTXT_H_
|
||||
#define _WX_XH_STTXT_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "xh_sttxt.h"
|
||||
#endif
|
||||
|
||||
#include "wx/xrc/xmlres.h"
|
||||
|
||||
|
||||
class WXXMLDLLEXPORT wxStaticTextXmlHandler : public wxXmlResourceHandler
|
||||
{
|
||||
public:
|
||||
wxStaticTextXmlHandler();
|
||||
virtual wxObject *DoCreateResource();
|
||||
virtual bool CanHandle(wxXmlNode *node);
|
||||
};
|
||||
|
||||
|
||||
#endif // _WX_XH_STBMP_H_
|
@@ -1,30 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: xh_text.h
|
||||
// Purpose: XML resource handler for wxTextCtrl
|
||||
// Author: Aleksandras Gluchovas
|
||||
// Created: 2000/03/21
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2000 Aleksandras Gluchovas
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_XH_TEXT_H_
|
||||
#define _WX_XH_TEXT_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "xh_text.h"
|
||||
#endif
|
||||
|
||||
#include "wx/xrc/xmlres.h"
|
||||
|
||||
|
||||
class WXXMLDLLEXPORT wxTextCtrlXmlHandler : public wxXmlResourceHandler
|
||||
{
|
||||
public:
|
||||
wxTextCtrlXmlHandler();
|
||||
virtual wxObject *DoCreateResource();
|
||||
virtual bool CanHandle(wxXmlNode *node);
|
||||
};
|
||||
|
||||
|
||||
#endif // _WX_XH_TEXT_H_
|
@@ -1,38 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: xh_toolb.h
|
||||
// Purpose: XML resource handler for wxBoxSizer
|
||||
// Author: Vaclav Slavik
|
||||
// Created: 2000/08/11
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2000 Vaclav Slavik
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_XH_TOOLB_H_
|
||||
#define _WX_XH_TOOLB_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "xh_toolb.h"
|
||||
#endif
|
||||
|
||||
#include "wx/xrc/xmlres.h"
|
||||
|
||||
#if wxUSE_TOOLBAR
|
||||
|
||||
class WXDLLEXPORT wxToolBar;
|
||||
|
||||
class WXXMLDLLEXPORT wxToolBarXmlHandler : public wxXmlResourceHandler
|
||||
{
|
||||
public:
|
||||
wxToolBarXmlHandler();
|
||||
virtual wxObject *DoCreateResource();
|
||||
virtual bool CanHandle(wxXmlNode *node);
|
||||
|
||||
private:
|
||||
bool m_isInside;
|
||||
wxToolBar *m_toolbar;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif // _WX_XH_TOOLBAR_H_
|
@@ -1,29 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: xh_tree.h
|
||||
// Purpose: XML resource handler for wxTreeCtrl
|
||||
// Author: Brian Gavin
|
||||
// Created: 2000/09/09
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2000 Brian Gavin
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_XH_TREE_H_
|
||||
#define _WX_XH_TREE_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "xh_tree.h"
|
||||
#endif
|
||||
|
||||
#include "wx/xrc/xmlres.h"
|
||||
|
||||
class WXXMLDLLEXPORT wxTreeCtrlXmlHandler : public wxXmlResourceHandler
|
||||
{
|
||||
public:
|
||||
wxTreeCtrlXmlHandler();
|
||||
virtual wxObject *DoCreateResource();
|
||||
virtual bool CanHandle(wxXmlNode *node);
|
||||
};
|
||||
|
||||
|
||||
#endif // _WX_XH_TREE_H_
|
@@ -1,30 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: xh_unkwn.h
|
||||
// Purpose: XML resource handler for unkown widget
|
||||
// Author: Vaclav Slavik
|
||||
// Created: 2000/03/05
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2000 Vaclav Slavik
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_XH_UNKWN_H_
|
||||
#define _WX_XH_UNKWN_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "xh_unkwn.h"
|
||||
#endif
|
||||
|
||||
#include "wx/xrc/xmlres.h"
|
||||
|
||||
|
||||
class WXXMLDLLEXPORT wxUnknownWidgetXmlHandler : public wxXmlResourceHandler
|
||||
{
|
||||
public:
|
||||
wxUnknownWidgetXmlHandler();
|
||||
virtual wxObject *DoCreateResource();
|
||||
virtual bool CanHandle(wxXmlNode *node);
|
||||
};
|
||||
|
||||
|
||||
#endif // _WX_XH_UNKWN_H_
|
@@ -1,263 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: xml.h
|
||||
// Purpose: wxXmlDocument - XML parser & data holder class
|
||||
// Author: Vaclav Slavik
|
||||
// Created: 2000/03/05
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2000 Vaclav Slavik
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_XML_H_
|
||||
#define _WX_XML_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "xml.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/string.h"
|
||||
#include "wx/object.h"
|
||||
#include "wx/list.h"
|
||||
|
||||
#ifdef WXXMLISDLL
|
||||
#define WXXMLDLLEXPORT WXDLLEXPORT
|
||||
#else
|
||||
#define WXXMLDLLEXPORT
|
||||
#endif
|
||||
|
||||
class WXXMLDLLEXPORT wxXmlNode;
|
||||
class WXXMLDLLEXPORT wxXmlProperty;
|
||||
class WXXMLDLLEXPORT wxXmlDocument;
|
||||
class WXXMLDLLEXPORT wxXmlIOHandler;
|
||||
class WXDLLEXPORT wxInputStream;
|
||||
class WXDLLEXPORT wxOutputStream;
|
||||
|
||||
|
||||
// Represents XML node type.
|
||||
enum wxXmlNodeType
|
||||
{
|
||||
// note: values are synchronized with xmlElementType from libxml
|
||||
wxXML_ELEMENT_NODE = 1,
|
||||
wxXML_ATTRIBUTE_NODE = 2,
|
||||
wxXML_TEXT_NODE = 3,
|
||||
wxXML_CDATA_SECTION_NODE = 4,
|
||||
wxXML_ENTITY_REF_NODE = 5,
|
||||
wxXML_ENTITY_NODE = 6,
|
||||
wxXML_PI_NODE = 7,
|
||||
wxXML_COMMENT_NODE = 8,
|
||||
wxXML_DOCUMENT_NODE = 9,
|
||||
wxXML_DOCUMENT_TYPE_NODE = 10,
|
||||
wxXML_DOCUMENT_FRAG_NODE = 11,
|
||||
wxXML_NOTATION_NODE = 12,
|
||||
wxXML_HTML_DOCUMENT_NODE = 13
|
||||
};
|
||||
|
||||
|
||||
// Types of XML files:
|
||||
|
||||
enum wxXmlIOType
|
||||
{
|
||||
wxXML_IO_AUTO = 0, // detect it automatically
|
||||
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_BINZ // svae in binary zlib-compressed proprietary format
|
||||
};
|
||||
|
||||
|
||||
// Represents node property(ies).
|
||||
// Example: in <img src="hello.gif" id="3"/> "src" is property with value
|
||||
// "hello.gif" and "id" is prop. with value "3".
|
||||
|
||||
class WXXMLDLLEXPORT wxXmlProperty
|
||||
{
|
||||
public:
|
||||
wxXmlProperty() : m_next(NULL) {}
|
||||
wxXmlProperty(const wxString& name, const wxString& value,
|
||||
wxXmlProperty *next)
|
||||
: m_name(name), m_value(value), m_next(next) {}
|
||||
|
||||
wxString GetName() const { return m_name; }
|
||||
wxString GetValue() const { return m_value; }
|
||||
wxXmlProperty *GetNext() const { return m_next; }
|
||||
|
||||
void SetName(const wxString& name) { m_name = name; }
|
||||
void SetValue(const wxString& value) { m_value = value; }
|
||||
void SetNext(wxXmlProperty *next) { m_next = next; }
|
||||
|
||||
private:
|
||||
wxString m_name;
|
||||
wxString m_value;
|
||||
wxXmlProperty *m_next;
|
||||
};
|
||||
|
||||
|
||||
|
||||
// Represents node in XML document. Node has name and may have content
|
||||
// and properties. Most common node types are wxXML_TEXT_NODE (name and props
|
||||
// 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
|
||||
// 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 WXXMLDLLEXPORT wxXmlNode
|
||||
{
|
||||
public:
|
||||
wxXmlNode() : m_properties(NULL), m_parent(NULL),
|
||||
m_children(NULL), m_next(NULL) {}
|
||||
wxXmlNode(wxXmlNode *parent,wxXmlNodeType type,
|
||||
const wxString& name, const wxString& content,
|
||||
wxXmlProperty *props, wxXmlNode *next);
|
||||
~wxXmlNode();
|
||||
|
||||
// copy ctor & operator=. Note that this does NOT copy syblings
|
||||
// and parent pointer, i.e. m_parent and m_next will be NULL
|
||||
// after using copy ctor and are never unmodified by operator=.
|
||||
// On the other hand, it DOES copy children and properties.
|
||||
wxXmlNode(const wxXmlNode& node);
|
||||
wxXmlNode& operator=(const wxXmlNode& node);
|
||||
|
||||
// user-friendly creation:
|
||||
wxXmlNode(wxXmlNodeType type, const wxString& name,
|
||||
const wxString& content = wxEmptyString);
|
||||
void AddChild(wxXmlNode *child);
|
||||
void InsertChild(wxXmlNode *child, wxXmlNode *before_node);
|
||||
bool RemoveChild(wxXmlNode *child);
|
||||
void AddProperty(const wxString& name, const wxString& value);
|
||||
bool DeleteProperty(const wxString& name);
|
||||
|
||||
// access methods:
|
||||
wxXmlNodeType GetType() const { return m_type; }
|
||||
wxString GetName() const { return m_name; }
|
||||
wxString GetContent() const { return m_content; }
|
||||
|
||||
wxXmlNode *GetParent() const { return m_parent; }
|
||||
wxXmlNode *GetNext() const { return m_next; }
|
||||
wxXmlNode *GetChildren() const { return m_children; }
|
||||
|
||||
wxXmlProperty *GetProperties() const { return m_properties; }
|
||||
bool GetPropVal(const wxString& propName, wxString *value) const;
|
||||
wxString GetPropVal(const wxString& propName,
|
||||
const wxString& defaultVal) const;
|
||||
bool HasProp(const wxString& propName) const;
|
||||
|
||||
void SetType(wxXmlNodeType type) { m_type = type; }
|
||||
void SetName(const wxString& name) { m_name = name; }
|
||||
void SetContent(const wxString& con) { m_content = con; }
|
||||
|
||||
void SetParent(wxXmlNode *parent) { m_parent = parent; }
|
||||
void SetNext(wxXmlNode *next) { m_next = next; }
|
||||
void SetChildren(wxXmlNode *child) { m_children = child; }
|
||||
|
||||
void SetProperties(wxXmlProperty *prop) { m_properties = prop; }
|
||||
void AddProperty(wxXmlProperty *prop);
|
||||
|
||||
private:
|
||||
wxXmlNodeType m_type;
|
||||
wxString m_name;
|
||||
wxString m_content;
|
||||
wxXmlProperty *m_properties;
|
||||
wxXmlNode *m_parent, *m_children, *m_next;
|
||||
|
||||
void DoCopy(const wxXmlNode& node);
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// This class holds XML data/document as parsed by libxml. Note that
|
||||
// internal representation is independant on libxml and you can use
|
||||
// it without libxml (see Load/SaveBinary).
|
||||
|
||||
class WXXMLDLLEXPORT wxXmlDocument : public wxObject
|
||||
{
|
||||
public:
|
||||
wxXmlDocument() : wxObject(), m_version(wxT("1.0")), m_root(NULL) {}
|
||||
wxXmlDocument(const wxString& filename,
|
||||
wxXmlIOType io_type = wxXML_IO_AUTO);
|
||||
wxXmlDocument(wxInputStream& stream,
|
||||
wxXmlIOType io_type = wxXML_IO_AUTO);
|
||||
~wxXmlDocument() { delete m_root; }
|
||||
|
||||
wxXmlDocument(const wxXmlDocument& doc);
|
||||
wxXmlDocument& operator=(const wxXmlDocument& doc);
|
||||
|
||||
// Parses .xml file and loads data. Returns TRUE on success, FALSE
|
||||
// otherwise.
|
||||
// NOTE: Any call to this method will result into linking against libxml
|
||||
// and app's binary size will grow by ca. 250kB
|
||||
bool Load(const wxString& filename, wxXmlIOType io_type = wxXML_IO_AUTO);
|
||||
bool Load(wxInputStream& stream, wxXmlIOType io_type = wxXML_IO_AUTO);
|
||||
|
||||
// Saves document as .xml file.
|
||||
bool Save(const wxString& filename,
|
||||
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.
|
||||
wxXmlNode *GetRoot() const { return m_root; }
|
||||
|
||||
// Returns version of document (may be empty).
|
||||
wxString GetVersion() const { return m_version; }
|
||||
// Returns encoding of document (may be empty).
|
||||
// Note: this is the encoding original fail was saved in, *not* the
|
||||
// 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:
|
||||
void SetRoot(wxXmlNode *node) { delete m_root ; m_root = node; }
|
||||
void SetVersion(const wxString& version) { m_version = version; }
|
||||
void SetEncoding(const wxString& encoding) { m_encoding = encoding; }
|
||||
|
||||
static void AddHandler(wxXmlIOHandler *handler);
|
||||
static void CleanUpHandlers();
|
||||
static void InitStandardHandlers();
|
||||
|
||||
protected:
|
||||
static wxList *sm_handlers;
|
||||
|
||||
private:
|
||||
wxString m_version, m_encoding;
|
||||
wxXmlNode *m_root;
|
||||
|
||||
void DoCopy(const wxXmlDocument& doc);
|
||||
};
|
||||
|
||||
|
||||
|
||||
// wxXmlIOHandler takes care of loading and/or saving XML data.
|
||||
// see xmlio.h for available handlers
|
||||
|
||||
class WXXMLDLLEXPORT wxXmlIOHandler : public wxObject
|
||||
{
|
||||
public:
|
||||
wxXmlIOHandler() {}
|
||||
|
||||
virtual wxXmlIOType GetType() = 0;
|
||||
virtual bool CanLoad(wxInputStream& stream) = 0;
|
||||
virtual bool CanSave() = 0;
|
||||
|
||||
virtual bool Load(wxInputStream& stream, wxXmlDocument& doc) = 0;
|
||||
virtual bool Save(wxOutputStream& stream, const wxXmlDocument& doc) = 0;
|
||||
};
|
||||
|
||||
|
||||
|
||||
void wxXmlInitXmlModule();
|
||||
|
||||
#endif // _WX_XML_H_
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user