Compare commits
1 Commits
WX_HTML_BE
...
OLD_MAKEFI
Author | SHA1 | Date | |
---|---|---|---|
|
062162483a |
175
Makefile
Normal file
175
Makefile
Normal file
@@ -0,0 +1,175 @@
|
||||
# Top-level Makefile for wxGTK by Wolfram Gloger
|
||||
# based on the version for wx-Xt by Martin Sperl
|
||||
|
||||
SHELL=/bin/sh
|
||||
|
||||
DIRS=src
|
||||
|
||||
#if DIRS are defind make only executes in these diretories
|
||||
all::
|
||||
@if test "x$(DIRS)" = x; then \
|
||||
for i in src samples utils user; do \
|
||||
echo "entering directory $$i building $@"; \
|
||||
(cd $$i; ${MAKE} -k $@); \
|
||||
done; \
|
||||
else \
|
||||
for i in $(DIRS) xxx; do \
|
||||
if test "$$i" != xxx; then \
|
||||
echo "entering directory $$i building $@"; \
|
||||
(cd $$i; ${MAKE} -k $@); \
|
||||
fi; \
|
||||
done; \
|
||||
fi
|
||||
|
||||
# what to do if a target is not understood:
|
||||
# pass it on to all the children...
|
||||
|
||||
.DEFAULT::
|
||||
@if test "x$(DIRS)" = x; then \
|
||||
for i in src samples utils user; do \
|
||||
echo "entering directory $$i building $@"; \
|
||||
(cd $$i; ${MAKE} -k $@); \
|
||||
done; \
|
||||
else \
|
||||
for i in $(DIRS) xxx; do \
|
||||
if test "$$i" != xxx; then \
|
||||
echo "entering directory $$i building $@"; \
|
||||
(cd $$i; ${MAKE} -k $@); \
|
||||
fi; \
|
||||
done; \
|
||||
fi
|
||||
|
||||
src::
|
||||
@echo "entering directory src building all"
|
||||
@cd src; ${MAKE} all
|
||||
|
||||
samples::
|
||||
@echo "entering directory samples building all"
|
||||
@cd samples; ${MAKE} all
|
||||
|
||||
utils::
|
||||
@echo "entering directory utils building all"
|
||||
@cd utils; ${MAKE} all
|
||||
|
||||
user::
|
||||
@echo "entering directory user building all"
|
||||
@cd user; ${MAKE} all
|
||||
|
||||
install::
|
||||
@echo "entering directory src for installing"
|
||||
@cd src; ${MAKE} install
|
||||
# @echo "entering directory utils for installing"
|
||||
# @cd utils; ${MAKE} install
|
||||
|
||||
# the following ones recreate all Makefiles.
|
||||
|
||||
makefiles:: recreate
|
||||
Makefiles:: recreate
|
||||
recreate::
|
||||
@setup/general/createall
|
||||
|
||||
# the following ones define what needs to be done to distribute the
|
||||
# library and its components
|
||||
|
||||
distribute:: distrib
|
||||
distrib:: distrib_base distrib_user join_utils join_samples
|
||||
|
||||
distrib_samples::
|
||||
@echo "entering directory samples creating distribution files"
|
||||
@(cd samples; ${MAKE} -k distrib)
|
||||
|
||||
distrib_user::
|
||||
@echo "entering directory user creating distribution files"
|
||||
@(cd user; ${MAKE} -k distrib)
|
||||
|
||||
distrib_utils::
|
||||
@echo "entering directory utils creating distribution files"
|
||||
@(cd utils; ${MAKE} -k distrib)
|
||||
|
||||
join_utils:: distrib_utils
|
||||
@$(MAKE) join \
|
||||
BASEDIR=utils \
|
||||
FILES=`echo distrib/utils/*.tgz `
|
||||
|
||||
join_samples:: distrib_samples
|
||||
@$(MAKE) join \
|
||||
BASEDIR=samples \
|
||||
FILES=`echo distrib/samples/*.tgz `
|
||||
|
||||
join_user:: distrib_user
|
||||
@$(MAKE) join \
|
||||
BASEDIR=user \
|
||||
FILES=`echo distrib/user/*.tgz `
|
||||
|
||||
join::
|
||||
@# needed are BASEDIR and FILES
|
||||
@if test "x$$BASEDIR" = x; then\
|
||||
echo "BASEDIR not specified.";\
|
||||
exit -1;\
|
||||
fi
|
||||
@if test "x$$FILES" != x ; then \
|
||||
echo "putting all seperate distribution files:";\
|
||||
echo "$$FILES";\
|
||||
echo "into distrib/$(BASEDIR).tgz";\
|
||||
src/gtk/setup/general/jointar $(BASEDIR) $$FILES distrib/$(BASEDIR).tgz; \
|
||||
else \
|
||||
echo "Nothing to join - deleting..."; \
|
||||
echo "This may be the case, if you have not specified FILES."\
|
||||
rm -f distrib/$(BASEDIR).tgz; \
|
||||
fi
|
||||
|
||||
distrib_base::
|
||||
@if test ! -d distrib ; then mkdir distrib; fi;
|
||||
@if test ! -f system.list ; then \
|
||||
echo "dummy" > system.list;\
|
||||
fi
|
||||
@(curr=`pwd`; direc=`basename $$curr`;\
|
||||
(cd ..; \
|
||||
echo creating distrib/$$direc.tar from the current directory;\
|
||||
tar -cf /tmp/$$direc.tar \
|
||||
$$direc/COPYING\
|
||||
$$direc/INSTALL\
|
||||
$$direc/Makefile\
|
||||
$$direc/template.mak\
|
||||
$$direc/configure\
|
||||
$$direc/configure.in\
|
||||
$$direc/config.guess\
|
||||
$$direc/config.sub\
|
||||
$$direc/install-sh\
|
||||
$$direc/user/Makefile \
|
||||
$$direc/utils/Makefile \
|
||||
$$direc/samples/Makefile \
|
||||
;\
|
||||
sed "s|^\(.*\)$$|/\1/|g" $$direc/system.list \
|
||||
| uniq > /tmp/$$direc.list; \
|
||||
echo "/RCS/" >> /tmp/$$direc.list; \
|
||||
for each in misc docs wx src setup; do \
|
||||
tar -uf /tmp/$$direc.tar \
|
||||
`\
|
||||
find $$direc/$$each \( -type f -o -type l \) -print \
|
||||
| fgrep -vf /tmp/$$direc.list \
|
||||
| grep -v "[~#]$$" \
|
||||
` ;\
|
||||
done; \
|
||||
echo compressing $$direc.tar to $$direc.tgz;\
|
||||
gzip -9 -c /tmp/$$direc.tar > $$direc/distrib/$$direc.tgz;\
|
||||
rm /tmp/$$direc.tar /tmp/$$direc.list;\
|
||||
)\
|
||||
)
|
||||
|
||||
# the following ones are only needed if configure.in has changed
|
||||
# and needs to be updated...
|
||||
|
||||
config:: configure
|
||||
|
||||
configure::
|
||||
@autoconf
|
||||
@cat configure \
|
||||
| sed "s/config.cache/\$$OSTYPE.config.cache/g" \
|
||||
| sed "s/config.status/\$$OSTYPE.config.status/g" \
|
||||
| sed "s/\*\*--/ --/g" \
|
||||
> configure1
|
||||
@chmod a+x configure1
|
||||
@mv configure1 configure
|
||||
|
||||
|
599
config.guess
vendored
Executable file
599
config.guess
vendored
Executable file
@@ -0,0 +1,599 @@
|
||||
#! /bin/sh
|
||||
# Attempt to guess a canonical system name.
|
||||
# Copyright (C) 1992, 93, 94, 95, 1996 Free Software Foundation, Inc.
|
||||
#
|
||||
# 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
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Written by Per Bothner <bothner@cygnus.com>.
|
||||
# The master version of this file is at the FSF in /home/gd/gnu/lib.
|
||||
#
|
||||
# This script attempts to guess a canonical system name similar to
|
||||
# config.sub. If it succeeds, it prints the system name on stdout, and
|
||||
# exits with 0. Otherwise, it exits with 1.
|
||||
#
|
||||
# The plan is that this can be called by configure scripts if you
|
||||
# don't specify an explicit system type (host/target name).
|
||||
#
|
||||
# Only a few systems have been added to this list; please add others
|
||||
# (but try to keep the structure clean).
|
||||
#
|
||||
|
||||
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
|
||||
# (ghazi@noc.rutgers.edu 8/24/94.)
|
||||
if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
|
||||
PATH=$PATH:/.attbin ; export PATH
|
||||
fi
|
||||
|
||||
UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
|
||||
UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
|
||||
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
|
||||
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
|
||||
|
||||
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
|
||||
alpha:OSF1:[VX]*:*)
|
||||
# After 1.2, OSF1 uses "V1.3" for uname -r.
|
||||
# After 4.x, OSF1 uses "X4.x" for uname -r.
|
||||
echo alpha-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VX]//'`
|
||||
exit 0 ;;
|
||||
alpha:OSF1:*:*)
|
||||
# 1.2 uses "1.2" for uname -r.
|
||||
echo alpha-dec-osf${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
21064:Windows_NT:50:3)
|
||||
echo alpha-dec-winnt3.5
|
||||
exit 0 ;;
|
||||
Amiga*:UNIX_System_V:4.0:*)
|
||||
echo m68k-cbm-sysv4
|
||||
exit 0;;
|
||||
amiga:NetBSD:*:*)
|
||||
echo m68k-cbm-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
|
||||
echo arm-acorn-riscix${UNAME_RELEASE}
|
||||
exit 0;;
|
||||
Pyramid*:OSx*:*:*)
|
||||
if test "`(/bin/universe) 2>/dev/null`" = att ; then
|
||||
echo pyramid-pyramid-sysv3
|
||||
else
|
||||
echo pyramid-pyramid-bsd
|
||||
fi
|
||||
exit 0 ;;
|
||||
sun4*:SunOS:5.*:*)
|
||||
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
||||
exit 0 ;;
|
||||
i86pc:SunOS:5.*:*)
|
||||
echo i386-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
||||
exit 0 ;;
|
||||
sun4*:SunOS:6*:*)
|
||||
# According to config.sub, this is the proper way to canonicalize
|
||||
# SunOS6. Hard to guess exactly what SunOS6 will be like, but
|
||||
# it's likely to be more like Solaris than SunOS4.
|
||||
echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
||||
exit 0 ;;
|
||||
sun4*:SunOS:*:*)
|
||||
case "`/usr/bin/arch -k`" in
|
||||
Series*|S4*)
|
||||
UNAME_RELEASE=`uname -v`
|
||||
;;
|
||||
esac
|
||||
# Japanese Language versions have a version number like `4.1.3-JL'.
|
||||
echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
|
||||
exit 0 ;;
|
||||
sun3*:SunOS:*:*)
|
||||
echo m68k-sun-sunos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
atari*:NetBSD:*:*)
|
||||
echo m68k-atari-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
sun3*:NetBSD:*:*)
|
||||
echo m68k-sun-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mac68k:NetBSD:*:*)
|
||||
echo m68k-apple-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
RISC*:ULTRIX:*:*)
|
||||
echo mips-dec-ultrix${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
VAX*:ULTRIX*:*:*)
|
||||
echo vax-dec-ultrix${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mips:*:4*:UMIPS)
|
||||
echo mips-mips-riscos4sysv
|
||||
exit 0 ;;
|
||||
mips:*:5*:RISCos)
|
||||
echo mips-mips-riscos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
Night_Hawk:Power_UNIX:*:*)
|
||||
echo powerpc-harris-powerunix
|
||||
exit 0 ;;
|
||||
m88k:CX/UX:7*:*)
|
||||
echo m88k-harris-cxux7
|
||||
exit 0 ;;
|
||||
m88k:*:4*:R4*)
|
||||
echo m88k-motorola-sysv4
|
||||
exit 0 ;;
|
||||
m88k:*:3*:R3*)
|
||||
echo m88k-motorola-sysv3
|
||||
exit 0 ;;
|
||||
AViiON:dgux:*:*)
|
||||
# DG/UX returns AViiON for all architectures
|
||||
UNAME_PROCESSOR=`uname -p`
|
||||
if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88100 ] ; 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}
|
||||
fi
|
||||
exit 0 ;;
|
||||
M88*:DolphinOS:*:*) # DolphinOS (SVR3)
|
||||
echo m88k-dolphin-sysv3
|
||||
exit 0 ;;
|
||||
M88*:*:R3*:*)
|
||||
# Delta 88k system running SVR3
|
||||
echo m88k-motorola-sysv3
|
||||
exit 0 ;;
|
||||
XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
|
||||
echo m88k-tektronix-sysv3
|
||||
exit 0 ;;
|
||||
Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
|
||||
echo m68k-tektronix-bsd
|
||||
exit 0 ;;
|
||||
*:IRIX*:*:*)
|
||||
echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
|
||||
exit 0 ;;
|
||||
????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
|
||||
echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
|
||||
exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
|
||||
i[34]86:AIX:*:*)
|
||||
echo i386-ibm-aix
|
||||
exit 0 ;;
|
||||
*:AIX:2:3)
|
||||
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
|
||||
sed 's/^ //' << EOF >dummy.c
|
||||
#include <sys/systemcfg.h>
|
||||
|
||||
main()
|
||||
{
|
||||
if (!__power_pc())
|
||||
exit(1);
|
||||
puts("powerpc-ibm-aix3.2.5");
|
||||
exit(0);
|
||||
}
|
||||
EOF
|
||||
${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
|
||||
rm -f dummy.c dummy
|
||||
echo rs6000-ibm-aix3.2.5
|
||||
elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
|
||||
echo rs6000-ibm-aix3.2.4
|
||||
else
|
||||
echo rs6000-ibm-aix3.2
|
||||
fi
|
||||
exit 0 ;;
|
||||
*:AIX:*:4)
|
||||
if /usr/sbin/lsattr -EHl proc0 | grep POWER >/dev/null 2>&1; then
|
||||
IBM_ARCH=rs6000
|
||||
else
|
||||
IBM_ARCH=powerpc
|
||||
fi
|
||||
if [ -x /usr/bin/oslevel ] ; then
|
||||
IBM_REV=`/usr/bin/oslevel`
|
||||
else
|
||||
IBM_REV=4.${UNAME_RELEASE}
|
||||
fi
|
||||
echo ${IBM_ARCH}-ibm-aix${IBM_REV}
|
||||
exit 0 ;;
|
||||
*:AIX:*:*)
|
||||
echo rs6000-ibm-aix
|
||||
exit 0 ;;
|
||||
ibmrt:4.4BSD:*|romp-ibm:BSD:*)
|
||||
echo romp-ibm-bsd4.4
|
||||
exit 0 ;;
|
||||
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:*:*)
|
||||
echo rs6000-bull-bosx
|
||||
exit 0 ;;
|
||||
DPX/2?00:B.O.S.:*:*)
|
||||
echo m68k-bull-sysv3
|
||||
exit 0 ;;
|
||||
9000/[34]??:4.3bsd:1.*:*)
|
||||
echo m68k-hp-bsd
|
||||
exit 0 ;;
|
||||
hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
|
||||
echo m68k-hp-bsd4.4
|
||||
exit 0 ;;
|
||||
9000/[3478]??:HP-UX:*:*)
|
||||
case "${UNAME_MACHINE}" in
|
||||
9000/31? ) HP_ARCH=m68000 ;;
|
||||
9000/[34]?? ) HP_ARCH=m68k ;;
|
||||
9000/7?? | 9000/8?[679] ) HP_ARCH=hppa1.1 ;;
|
||||
9000/8?? ) HP_ARCH=hppa1.0 ;;
|
||||
esac
|
||||
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
|
||||
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
|
||||
exit 0 ;;
|
||||
3050*:HI-UX:*:*)
|
||||
sed 's/^ //' << EOF >dummy.c
|
||||
#include <unistd.h>
|
||||
int
|
||||
main ()
|
||||
{
|
||||
long cpu = sysconf (_SC_CPU_VERSION);
|
||||
/* The order matters, because CPU_IS_HP_MC68K erroneously returns
|
||||
true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
|
||||
results, however. */
|
||||
if (CPU_IS_PA_RISC (cpu))
|
||||
{
|
||||
switch (cpu)
|
||||
{
|
||||
case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
|
||||
case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
|
||||
case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
|
||||
default: puts ("hppa-hitachi-hiuxwe2"); break;
|
||||
}
|
||||
}
|
||||
else if (CPU_IS_HP_MC68K (cpu))
|
||||
puts ("m68k-hitachi-hiuxwe2");
|
||||
else puts ("unknown-hitachi-hiuxwe2");
|
||||
exit (0);
|
||||
}
|
||||
EOF
|
||||
${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
|
||||
rm -f dummy.c dummy
|
||||
echo unknown-hitachi-hiuxwe2
|
||||
exit 0 ;;
|
||||
9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
|
||||
echo hppa1.1-hp-bsd
|
||||
exit 0 ;;
|
||||
9000/8??:4.3bsd:*:*)
|
||||
echo hppa1.0-hp-bsd
|
||||
exit 0 ;;
|
||||
hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
|
||||
echo hppa1.1-hp-osf
|
||||
exit 0 ;;
|
||||
hp8??:OSF1:*:*)
|
||||
echo hppa1.0-hp-osf
|
||||
exit 0 ;;
|
||||
parisc*:Lites*:*:*)
|
||||
echo hppa1.1-hp-lites
|
||||
exit 0 ;;
|
||||
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
|
||||
echo c1-convex-bsd
|
||||
exit 0 ;;
|
||||
C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
|
||||
if getsysinfo -f scalar_acc
|
||||
then echo c32-convex-bsd
|
||||
else echo c2-convex-bsd
|
||||
fi
|
||||
exit 0 ;;
|
||||
C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
|
||||
echo c34-convex-bsd
|
||||
exit 0 ;;
|
||||
C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
|
||||
echo c38-convex-bsd
|
||||
exit 0 ;;
|
||||
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
|
||||
echo c4-convex-bsd
|
||||
exit 0 ;;
|
||||
CRAY*X-MP:*:*:*)
|
||||
echo xmp-cray-unicos
|
||||
exit 0 ;;
|
||||
CRAY*Y-MP:*:*:*)
|
||||
echo ymp-cray-unicos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
CRAY*C90:*:*:*)
|
||||
echo c90-cray-unicos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
CRAY-2:*:*:*)
|
||||
echo cray2-cray-unicos
|
||||
exit 0 ;;
|
||||
hp3[0-9][05]:NetBSD:*:*)
|
||||
echo m68k-hp-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
i[34]86:BSD/386:*:* | *:BSD/OS:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:FreeBSD:*:*)
|
||||
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 ;;
|
||||
i*:CYGWIN*:*)
|
||||
echo i386-unknown-cygwin32
|
||||
exit 0 ;;
|
||||
p*:CYGWIN*:*)
|
||||
echo powerpcle-unknown-cygwin32
|
||||
exit 0 ;;
|
||||
*:GNU:*:*)
|
||||
echo `echo ${UNAME_MACHINE}|sed -e 's,/.*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
|
||||
exit 0 ;;
|
||||
*:Linux:*:*)
|
||||
# The BFD linker knows what the default object file format is, so
|
||||
# first see if it will tell us.
|
||||
ld_help_string=`ld --help 2>&1`
|
||||
if echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: elf_i[345]86"; then
|
||||
echo "${UNAME_MACHINE}-unknown-linux" ; exit 0
|
||||
elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i[345]86linux"; then
|
||||
echo "${UNAME_MACHINE}-unknown-linuxaout" ; exit 0
|
||||
elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i[345]86coff"; then
|
||||
echo "${UNAME_MACHINE}-unknown-linuxcoff" ; exit 0
|
||||
elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: m68kelf"; then
|
||||
echo "${UNAME_MACHINE}-unknown-linux" ; exit 0
|
||||
elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: m68klinux"; then
|
||||
echo "${UNAME_MACHINE}-unknown-linuxaout" ; exit 0
|
||||
elif test "${UNAME_MACHINE}" = "alpha" ; then
|
||||
echo alpha-unknown-linux ; exit 0
|
||||
else
|
||||
# Either a pre-BFD a.out linker (linuxoldld) or one that does not give us
|
||||
# useful --help. Gcc wants to distinguish between linuxoldld and linuxaout.
|
||||
test ! -d /usr/lib/ldscripts/. \
|
||||
&& echo "${UNAME_MACHINE}-unknown-linuxoldld" && exit 0
|
||||
# Determine whether the default compiler is a.out or elf
|
||||
cat >dummy.c <<EOF
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
char *argv[];
|
||||
{
|
||||
#ifdef __ELF__
|
||||
printf ("%s-unknown-linux\n", argv[1]);
|
||||
#else
|
||||
printf ("%s-unknown-linuxaout\n", argv[1]);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
|
||||
rm -f dummy.c dummy
|
||||
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.
|
||||
i[34]86:DYNIX/ptx:4*:*)
|
||||
echo i386-sequent-sysv4
|
||||
exit 0 ;;
|
||||
i[34]86:*:4.*:* | i[34]86:SYSTEM_V:4.*:*)
|
||||
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
|
||||
echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE}
|
||||
else
|
||||
echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}
|
||||
fi
|
||||
exit 0 ;;
|
||||
i[34]86:*:3.2:*)
|
||||
if test -f /usr/options/cb.name; then
|
||||
UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
|
||||
echo ${UNAME_MACHINE}-unknown-isc$UNAME_REL
|
||||
elif /bin/uname -X 2>/dev/null >/dev/null ; then
|
||||
UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
|
||||
(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
|
||||
(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
|
||||
&& UNAME_MACHINE=i586
|
||||
echo ${UNAME_MACHINE}-unknown-sco$UNAME_REL
|
||||
else
|
||||
echo ${UNAME_MACHINE}-unknown-sysv32
|
||||
fi
|
||||
exit 0 ;;
|
||||
Intel:Mach:3*:*)
|
||||
echo i386-unknown-mach3
|
||||
exit 0 ;;
|
||||
paragon:*:*:*)
|
||||
echo i860-intel-osf1
|
||||
exit 0 ;;
|
||||
i860:*:4.*:*) # i860-SVR4
|
||||
if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
|
||||
echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
|
||||
else # Add other i860-SVR4 vendors below as they are discovered.
|
||||
echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
|
||||
fi
|
||||
exit 0 ;;
|
||||
mini*:CTIX:SYS*5:*)
|
||||
# "miniframe"
|
||||
echo m68010-convergent-sysv
|
||||
exit 0 ;;
|
||||
M680[234]0:*:R3V[567]*:*)
|
||||
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
|
||||
3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0)
|
||||
uname -p 2>/dev/null | grep 86 >/dev/null \
|
||||
&& echo i486-ncr-sysv4.3 && exit 0 ;;
|
||||
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
|
||||
uname -p 2>/dev/null | grep 86 >/dev/null \
|
||||
&& echo i486-ncr-sysv4 && exit 0 ;;
|
||||
m680[234]0:LynxOS:2.[23]*:*)
|
||||
echo m68k-lynx-lynxos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mc68030:UNIX_System_V:4.*:*)
|
||||
echo m68k-atari-sysv4
|
||||
exit 0 ;;
|
||||
i[34]86:LynxOS:2.[23]*:*)
|
||||
echo i386-lynx-lynxos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
TSUNAMI:LynxOS:2.[23]*:*)
|
||||
echo sparc-lynx-lynxos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
rs6000:LynxOS:2.[23]*:*)
|
||||
echo rs6000-lynx-lynxos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
RM*:SINIX-*:*:*)
|
||||
echo mips-sni-sysv4
|
||||
exit 0 ;;
|
||||
*:SINIX-*:*:*)
|
||||
if uname -p 2>/dev/null >/dev/null ; then
|
||||
UNAME_MACHINE=`(uname -p) 2>/dev/null`
|
||||
echo ${UNAME_MACHINE}-sni-sysv4
|
||||
else
|
||||
echo ns32k-sni-sysv
|
||||
fi
|
||||
exit 0 ;;
|
||||
mc68*:A/UX:*:*)
|
||||
echo m68k-apple-aux${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
R3000:*System_V*:*:*)
|
||||
if [ -d /usr/nec ]; then
|
||||
echo mips-nec-sysv${UNAME_RELEASE}
|
||||
else
|
||||
echo mips-unknown-sysv${UNAME_RELEASE}
|
||||
fi
|
||||
exit 0 ;;
|
||||
esac
|
||||
|
||||
#echo '(No uname command or uname output not recognized.)' 1>&2
|
||||
#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
|
||||
|
||||
cat >dummy.c <<EOF
|
||||
#ifdef _SEQUENT_
|
||||
# include <sys/types.h>
|
||||
# include <sys/utsname.h>
|
||||
#endif
|
||||
main ()
|
||||
{
|
||||
#if defined (sony)
|
||||
#if defined (MIPSEB)
|
||||
/* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
|
||||
I don't know.... */
|
||||
printf ("mips-sony-bsd\n"); exit (0);
|
||||
#else
|
||||
#include <sys/param.h>
|
||||
printf ("m68k-sony-newsos%s\n",
|
||||
#ifdef NEWSOS4
|
||||
"4"
|
||||
#else
|
||||
""
|
||||
#endif
|
||||
); exit (0);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined (__arm) && defined (__acorn) && defined (__unix)
|
||||
printf ("arm-acorn-riscix"); exit (0);
|
||||
#endif
|
||||
|
||||
#if defined (hp300) && !defined (hpux)
|
||||
printf ("m68k-hp-bsd\n"); exit (0);
|
||||
#endif
|
||||
|
||||
#if defined (NeXT)
|
||||
#if !defined (__ARCHITECTURE__)
|
||||
#define __ARCHITECTURE__ "m68k"
|
||||
#endif
|
||||
int version;
|
||||
version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
|
||||
printf ("%s-next-nextstep%s\n", __ARCHITECTURE__, version==2 ? "2" : "3");
|
||||
exit (0);
|
||||
#endif
|
||||
|
||||
#if defined (MULTIMAX) || defined (n16)
|
||||
#if defined (UMAXV)
|
||||
printf ("ns32k-encore-sysv\n"); exit (0);
|
||||
#else
|
||||
#if defined (CMU)
|
||||
printf ("ns32k-encore-mach\n"); exit (0);
|
||||
#else
|
||||
printf ("ns32k-encore-bsd\n"); exit (0);
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined (__386BSD__)
|
||||
printf ("i386-unknown-bsd\n"); exit (0);
|
||||
#endif
|
||||
|
||||
#if defined (sequent)
|
||||
#if defined (i386)
|
||||
printf ("i386-sequent-dynix\n"); exit (0);
|
||||
#endif
|
||||
#if defined (ns32000)
|
||||
printf ("ns32k-sequent-dynix\n"); exit (0);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined (_SEQUENT_)
|
||||
struct utsname un;
|
||||
|
||||
uname(&un);
|
||||
|
||||
if (strncmp(un.version, "V2", 2) == 0) {
|
||||
printf ("i386-sequent-ptx2\n"); exit (0);
|
||||
}
|
||||
if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
|
||||
printf ("i386-sequent-ptx1\n"); exit (0);
|
||||
}
|
||||
printf ("i386-sequent-ptx\n"); exit (0);
|
||||
|
||||
#endif
|
||||
|
||||
#if defined (vax)
|
||||
#if !defined (ultrix)
|
||||
printf ("vax-dec-bsd\n"); exit (0);
|
||||
#else
|
||||
printf ("vax-dec-ultrix\n"); exit (0);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined (alliant) && defined (i860)
|
||||
printf ("i860-alliant-bsd\n"); exit (0);
|
||||
#endif
|
||||
|
||||
exit (1);
|
||||
}
|
||||
EOF
|
||||
|
||||
${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0
|
||||
rm -f dummy.c dummy
|
||||
|
||||
# Apollos put the system type in the environment.
|
||||
|
||||
test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
|
||||
|
||||
# Convex versions that predate uname can use getsysinfo(1)
|
||||
|
||||
if [ -x /usr/convex/getsysinfo ]
|
||||
then
|
||||
case `getsysinfo -f cpu_type` in
|
||||
c1*)
|
||||
echo c1-convex-bsd
|
||||
exit 0 ;;
|
||||
c2*)
|
||||
if getsysinfo -f scalar_acc
|
||||
then echo c32-convex-bsd
|
||||
else echo c2-convex-bsd
|
||||
fi
|
||||
exit 0 ;;
|
||||
c34*)
|
||||
echo c34-convex-bsd
|
||||
exit 0 ;;
|
||||
c38*)
|
||||
echo c38-convex-bsd
|
||||
exit 0 ;;
|
||||
c4*)
|
||||
echo c4-convex-bsd
|
||||
exit 0 ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
#echo '(Unable to guess system type)' 1>&2
|
||||
|
||||
exit 1
|
927
config.sub
vendored
Executable file
927
config.sub
vendored
Executable file
@@ -0,0 +1,927 @@
|
||||
#! /bin/sh
|
||||
# Configuration validation subroutine script, version 1.1.
|
||||
# Copyright (C) 1991, 92, 93, 94, 95, 1996 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.
|
||||
#
|
||||
# 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
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
# Boston, MA 02111-1307, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# 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.
|
||||
# Otherwise, we print the canonical config type on stdout and succeed.
|
||||
|
||||
# This file is supposed to be the same for all GNU packages
|
||||
# and recognize all the CPU types, system types and aliases
|
||||
# that are meaningful with *any* GNU software.
|
||||
# Each package is responsible for reporting which valid configurations
|
||||
# it does not support. The user should be able to distinguish
|
||||
# a failure to support a valid configuration from a meaningless
|
||||
# configuration.
|
||||
|
||||
# The goal of this file is to map all the various variations of a given
|
||||
# machine specification into a single specification in the form:
|
||||
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
|
||||
# or in some cases, the newer four-part form:
|
||||
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
|
||||
# It is wrong to echo any other type of specification.
|
||||
|
||||
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
|
||||
|
||||
# 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
|
||||
linux-gnu*)
|
||||
os=-$maybe_os
|
||||
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
|
||||
;;
|
||||
*)
|
||||
basic_machine=`echo $1 | sed 's/-[^-]*$//'`
|
||||
if [ $basic_machine != $1 ]
|
||||
then os=`echo $1 | sed 's/.*-/-/'`
|
||||
else os=; fi
|
||||
;;
|
||||
esac
|
||||
|
||||
### Let's recognize common machines as not being operating systems so
|
||||
### that things like config.sub decstation-3100 work. We also
|
||||
### recognize some manufacturers as not being operating systems, so we
|
||||
### can provide default operating systems below.
|
||||
case $os in
|
||||
-sun*os*)
|
||||
# Prevent following clause from handling this invalid input.
|
||||
;;
|
||||
-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
|
||||
-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
|
||||
-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
|
||||
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
|
||||
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
|
||||
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
|
||||
-apple)
|
||||
os=
|
||||
basic_machine=$1
|
||||
;;
|
||||
-hiux*)
|
||||
os=-hiuxwe2
|
||||
;;
|
||||
-sco5)
|
||||
os=sco3.2v5
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-sco4)
|
||||
os=-sco3.2v4
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-sco3.2.[4-9]*)
|
||||
os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-sco3.2v[4-9]*)
|
||||
# Don't forget version if it is 3.2v4 or newer.
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-sco*)
|
||||
os=-sco3.2v2
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-isc)
|
||||
os=-isc2.2
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-clix*)
|
||||
basic_machine=clipper-intergraph
|
||||
;;
|
||||
-isc*)
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-lynx*)
|
||||
os=-lynxos
|
||||
;;
|
||||
-ptx*)
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
|
||||
;;
|
||||
-windowsnt*)
|
||||
os=`echo $os | sed -e 's/windowsnt/winnt/'`
|
||||
;;
|
||||
-psos*)
|
||||
os=-psos
|
||||
;;
|
||||
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 | m68k | m68000 | m88k | ns32k | arm \
|
||||
| arme[lb] | pyramid \
|
||||
| tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \
|
||||
| alpha | we32k | ns16k | clipper | i370 | sh \
|
||||
| powerpc | powerpcle | 1750a | dsp16xx | mips64 | mipsel \
|
||||
| pdp11 | mips64el | mips64orion | mips64orionel \
|
||||
| sparc | sparclet | sparclite | sparc64)
|
||||
basic_machine=$basic_machine-unknown
|
||||
;;
|
||||
# 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[3456]86)
|
||||
basic_machine=$basic_machine-pc
|
||||
;;
|
||||
# Object if more than one company name word.
|
||||
*-*-*)
|
||||
echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
|
||||
exit 1
|
||||
;;
|
||||
# Recognize the basic CPU types with company name.
|
||||
vax-* | tahoe-* | i[3456]86-* | i860-* | m68k-* | m68000-* | m88k-* \
|
||||
| sparc-* | ns32k-* | fx80-* | arm-* | c[123]* \
|
||||
| mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* | power-* \
|
||||
| none-* | 580-* | cray2-* | h8300-* | i960-* | xmp-* | ymp-* \
|
||||
| hppa-* | hppa1.0-* | hppa1.1-* | alpha-* | we32k-* | cydra-* | ns16k-* \
|
||||
| pn-* | np1-* | xps100-* | clipper-* | orion-* | sparclite-* \
|
||||
| pdp11-* | sh-* | powerpc-* | powerpcle-* | sparc64-* | mips64-* | mipsel-* \
|
||||
| mips64el-* | mips64orion-* | mips64orionel-* | f301-*)
|
||||
;;
|
||||
# Recognize the various machine names and aliases which stand
|
||||
# for a CPU type and a company and sometimes even an OS.
|
||||
3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
|
||||
basic_machine=m68000-att
|
||||
;;
|
||||
3b*)
|
||||
basic_machine=we32k-att
|
||||
;;
|
||||
alliant | fx80)
|
||||
basic_machine=fx80-alliant
|
||||
;;
|
||||
altos | altos3068)
|
||||
basic_machine=m68k-altos
|
||||
;;
|
||||
am29k)
|
||||
basic_machine=a29k-none
|
||||
os=-bsd
|
||||
;;
|
||||
amdahl)
|
||||
basic_machine=580-amdahl
|
||||
os=-sysv
|
||||
;;
|
||||
amiga | amiga-*)
|
||||
basic_machine=m68k-cbm
|
||||
;;
|
||||
amigados)
|
||||
basic_machine=m68k-cbm
|
||||
os=-amigados
|
||||
;;
|
||||
amigaunix | amix)
|
||||
basic_machine=m68k-cbm
|
||||
os=-sysv4
|
||||
;;
|
||||
apollo68)
|
||||
basic_machine=m68k-apollo
|
||||
os=-sysv
|
||||
;;
|
||||
aux)
|
||||
basic_machine=m68k-apple
|
||||
os=-aux
|
||||
;;
|
||||
balance)
|
||||
basic_machine=ns32k-sequent
|
||||
os=-dynix
|
||||
;;
|
||||
convex-c1)
|
||||
basic_machine=c1-convex
|
||||
os=-bsd
|
||||
;;
|
||||
convex-c2)
|
||||
basic_machine=c2-convex
|
||||
os=-bsd
|
||||
;;
|
||||
convex-c32)
|
||||
basic_machine=c32-convex
|
||||
os=-bsd
|
||||
;;
|
||||
convex-c34)
|
||||
basic_machine=c34-convex
|
||||
os=-bsd
|
||||
;;
|
||||
convex-c38)
|
||||
basic_machine=c38-convex
|
||||
os=-bsd
|
||||
;;
|
||||
cray | ymp)
|
||||
basic_machine=ymp-cray
|
||||
os=-unicos
|
||||
;;
|
||||
cray2)
|
||||
basic_machine=cray2-cray
|
||||
os=-unicos
|
||||
;;
|
||||
[ctj]90-cray)
|
||||
basic_machine=c90-cray
|
||||
os=-unicos
|
||||
;;
|
||||
crds | unos)
|
||||
basic_machine=m68k-crds
|
||||
;;
|
||||
da30 | da30-*)
|
||||
basic_machine=m68k-da30
|
||||
;;
|
||||
decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
|
||||
basic_machine=mips-dec
|
||||
;;
|
||||
delta | 3300 | motorola-3300 | motorola-delta \
|
||||
| 3300-motorola | delta-motorola)
|
||||
basic_machine=m68k-motorola
|
||||
;;
|
||||
delta88)
|
||||
basic_machine=m88k-motorola
|
||||
os=-sysv3
|
||||
;;
|
||||
dpx20 | dpx20-*)
|
||||
basic_machine=rs6000-bull
|
||||
os=-bosx
|
||||
;;
|
||||
dpx2* | dpx2*-bull)
|
||||
basic_machine=m68k-bull
|
||||
os=-sysv3
|
||||
;;
|
||||
ebmon29k)
|
||||
basic_machine=a29k-amd
|
||||
os=-ebmon
|
||||
;;
|
||||
elxsi)
|
||||
basic_machine=elxsi-elxsi
|
||||
os=-bsd
|
||||
;;
|
||||
encore | umax | mmax)
|
||||
basic_machine=ns32k-encore
|
||||
;;
|
||||
fx2800)
|
||||
basic_machine=i860-alliant
|
||||
;;
|
||||
genix)
|
||||
basic_machine=ns32k-ns
|
||||
;;
|
||||
gmicro)
|
||||
basic_machine=tron-gmicro
|
||||
os=-sysv
|
||||
;;
|
||||
h3050r* | hiux*)
|
||||
basic_machine=hppa1.1-hitachi
|
||||
os=-hiuxwe2
|
||||
;;
|
||||
h8300hms)
|
||||
basic_machine=h8300-hitachi
|
||||
os=-hms
|
||||
;;
|
||||
harris)
|
||||
basic_machine=m88k-harris
|
||||
os=-sysv3
|
||||
;;
|
||||
hp300-*)
|
||||
basic_machine=m68k-hp
|
||||
;;
|
||||
hp300bsd)
|
||||
basic_machine=m68k-hp
|
||||
os=-bsd
|
||||
;;
|
||||
hp300hpux)
|
||||
basic_machine=m68k-hp
|
||||
os=-hpux
|
||||
;;
|
||||
hp9k2[0-9][0-9] | hp9k31[0-9])
|
||||
basic_machine=m68000-hp
|
||||
;;
|
||||
hp9k3[2-9][0-9])
|
||||
basic_machine=m68k-hp
|
||||
;;
|
||||
hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7)
|
||||
basic_machine=hppa1.1-hp
|
||||
;;
|
||||
hp9k8[0-9][0-9] | hp8[0-9][0-9])
|
||||
basic_machine=hppa1.0-hp
|
||||
;;
|
||||
hppa-next)
|
||||
os=-nextstep3
|
||||
;;
|
||||
i370-ibm* | ibm*)
|
||||
basic_machine=i370-ibm
|
||||
os=-mvs
|
||||
;;
|
||||
# I'm not sure what "Sysv32" means. Should this be sysv3.2?
|
||||
i[3456]86v32)
|
||||
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
|
||||
os=-sysv32
|
||||
;;
|
||||
i[3456]86v4*)
|
||||
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
|
||||
os=-sysv4
|
||||
;;
|
||||
i[3456]86v)
|
||||
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
|
||||
os=-sysv
|
||||
;;
|
||||
i[3456]86sol2)
|
||||
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
|
||||
os=-solaris2
|
||||
;;
|
||||
iris | iris4d)
|
||||
basic_machine=mips-sgi
|
||||
case $os in
|
||||
-irix*)
|
||||
;;
|
||||
*)
|
||||
os=-irix4
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
isi68 | isi)
|
||||
basic_machine=m68k-isi
|
||||
os=-sysv
|
||||
;;
|
||||
m88k-omron*)
|
||||
basic_machine=m88k-omron
|
||||
;;
|
||||
magnum | m3230)
|
||||
basic_machine=mips-mips
|
||||
os=-sysv
|
||||
;;
|
||||
merlin)
|
||||
basic_machine=ns32k-utek
|
||||
os=-sysv
|
||||
;;
|
||||
miniframe)
|
||||
basic_machine=m68000-convergent
|
||||
;;
|
||||
mips3*-*)
|
||||
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
|
||||
;;
|
||||
mips3*)
|
||||
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
|
||||
;;
|
||||
ncr3000)
|
||||
basic_machine=i486-ncr
|
||||
os=-sysv4
|
||||
;;
|
||||
news | news700 | news800 | news900)
|
||||
basic_machine=m68k-sony
|
||||
os=-newsos
|
||||
;;
|
||||
news1000)
|
||||
basic_machine=m68030-sony
|
||||
os=-newsos
|
||||
;;
|
||||
news-3600 | risc-news)
|
||||
basic_machine=mips-sony
|
||||
os=-newsos
|
||||
;;
|
||||
next | m*-next )
|
||||
basic_machine=m68k-next
|
||||
case $os in
|
||||
-nextstep* )
|
||||
;;
|
||||
-ns2*)
|
||||
os=-nextstep2
|
||||
;;
|
||||
*)
|
||||
os=-nextstep3
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
nh3000)
|
||||
basic_machine=m68k-harris
|
||||
os=-cxux
|
||||
;;
|
||||
nh[45]000)
|
||||
basic_machine=m88k-harris
|
||||
os=-cxux
|
||||
;;
|
||||
nindy960)
|
||||
basic_machine=i960-intel
|
||||
os=-nindy
|
||||
;;
|
||||
np1)
|
||||
basic_machine=np1-gould
|
||||
;;
|
||||
pa-hitachi)
|
||||
basic_machine=hppa1.1-hitachi
|
||||
os=-hiuxwe2
|
||||
;;
|
||||
paragon)
|
||||
basic_machine=i860-intel
|
||||
os=-osf
|
||||
;;
|
||||
pbd)
|
||||
basic_machine=sparc-tti
|
||||
;;
|
||||
pbb)
|
||||
basic_machine=m68k-tti
|
||||
;;
|
||||
pc532 | pc532-*)
|
||||
basic_machine=ns32k-pc532
|
||||
;;
|
||||
pentium | p5)
|
||||
basic_machine=i586-intel
|
||||
;;
|
||||
pentiumpro | p6)
|
||||
basic_machine=i686-intel
|
||||
;;
|
||||
pentium-* | p5-*)
|
||||
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
pentiumpro-* | p6-*)
|
||||
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
k5)
|
||||
# We don't have specific support for AMD's K5 yet, so just call it a Pentium
|
||||
basic_machine=i586-amd
|
||||
;;
|
||||
nexen)
|
||||
# We don't have specific support for Nexgen yet, so just call it a Pentium
|
||||
basic_machine=i586-nexgen
|
||||
;;
|
||||
pn)
|
||||
basic_machine=pn-gould
|
||||
;;
|
||||
power) basic_machine=rs6000-ibm
|
||||
;;
|
||||
ppc) basic_machine=powerpc-unknown
|
||||
;;
|
||||
ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
ppcle | powerpclittle | ppc-le | powerpc-little)
|
||||
basic_machine=powerpcle-unknown
|
||||
;;
|
||||
ppcle-* | powerpclittle-*)
|
||||
basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
ps2)
|
||||
basic_machine=i386-ibm
|
||||
;;
|
||||
rm[46]00)
|
||||
basic_machine=mips-siemens
|
||||
;;
|
||||
rtpc | rtpc-*)
|
||||
basic_machine=romp-ibm
|
||||
;;
|
||||
sequent)
|
||||
basic_machine=i386-sequent
|
||||
;;
|
||||
sh)
|
||||
basic_machine=sh-hitachi
|
||||
os=-hms
|
||||
;;
|
||||
sps7)
|
||||
basic_machine=m68k-bull
|
||||
os=-sysv2
|
||||
;;
|
||||
spur)
|
||||
basic_machine=spur-unknown
|
||||
;;
|
||||
sun2)
|
||||
basic_machine=m68000-sun
|
||||
;;
|
||||
sun2os3)
|
||||
basic_machine=m68000-sun
|
||||
os=-sunos3
|
||||
;;
|
||||
sun2os4)
|
||||
basic_machine=m68000-sun
|
||||
os=-sunos4
|
||||
;;
|
||||
sun3os3)
|
||||
basic_machine=m68k-sun
|
||||
os=-sunos3
|
||||
;;
|
||||
sun3os4)
|
||||
basic_machine=m68k-sun
|
||||
os=-sunos4
|
||||
;;
|
||||
sun4os3)
|
||||
basic_machine=sparc-sun
|
||||
os=-sunos3
|
||||
;;
|
||||
sun4os4)
|
||||
basic_machine=sparc-sun
|
||||
os=-sunos4
|
||||
;;
|
||||
sun4sol2)
|
||||
basic_machine=sparc-sun
|
||||
os=-solaris2
|
||||
;;
|
||||
sun3 | sun3-*)
|
||||
basic_machine=m68k-sun
|
||||
;;
|
||||
sun4)
|
||||
basic_machine=sparc-sun
|
||||
;;
|
||||
sun386 | sun386i | roadrunner)
|
||||
basic_machine=i386-sun
|
||||
;;
|
||||
symmetry)
|
||||
basic_machine=i386-sequent
|
||||
os=-dynix
|
||||
;;
|
||||
tower | tower-32)
|
||||
basic_machine=m68k-ncr
|
||||
;;
|
||||
udi29k)
|
||||
basic_machine=a29k-amd
|
||||
os=-udi
|
||||
;;
|
||||
ultra3)
|
||||
basic_machine=a29k-nyu
|
||||
os=-sym1
|
||||
;;
|
||||
vaxv)
|
||||
basic_machine=vax-dec
|
||||
os=-sysv
|
||||
;;
|
||||
vms)
|
||||
basic_machine=vax-dec
|
||||
os=-vms
|
||||
;;
|
||||
vpp*|vx|vx-*)
|
||||
basic_machine=f301-fujitsu
|
||||
;;
|
||||
vxworks960)
|
||||
basic_machine=i960-wrs
|
||||
os=-vxworks
|
||||
;;
|
||||
vxworks68)
|
||||
basic_machine=m68k-wrs
|
||||
os=-vxworks
|
||||
;;
|
||||
vxworks29k)
|
||||
basic_machine=a29k-wrs
|
||||
os=-vxworks
|
||||
;;
|
||||
xmp)
|
||||
basic_machine=xmp-cray
|
||||
os=-unicos
|
||||
;;
|
||||
xps | xps100)
|
||||
basic_machine=xps100-honeywell
|
||||
;;
|
||||
none)
|
||||
basic_machine=none-none
|
||||
os=-none
|
||||
;;
|
||||
|
||||
# Here we handle the default manufacturer of certain CPU types. It is in
|
||||
# some cases the only manufacturer, in others, it is the most popular.
|
||||
mips)
|
||||
basic_machine=mips-mips
|
||||
;;
|
||||
romp)
|
||||
basic_machine=romp-ibm
|
||||
;;
|
||||
rs6000)
|
||||
basic_machine=rs6000-ibm
|
||||
;;
|
||||
vax)
|
||||
basic_machine=vax-dec
|
||||
;;
|
||||
pdp11)
|
||||
basic_machine=pdp11-dec
|
||||
;;
|
||||
we32k)
|
||||
basic_machine=we32k-att
|
||||
;;
|
||||
sparc)
|
||||
basic_machine=sparc-sun
|
||||
;;
|
||||
cydra)
|
||||
basic_machine=cydra-cydrome
|
||||
;;
|
||||
orion)
|
||||
basic_machine=orion-highlevel
|
||||
;;
|
||||
orion105)
|
||||
basic_machine=clipper-highlevel
|
||||
;;
|
||||
*)
|
||||
echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# Here we canonicalize certain aliases for manufacturers.
|
||||
case $basic_machine in
|
||||
*-digital*)
|
||||
basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
|
||||
;;
|
||||
*-commodore*)
|
||||
basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
# Decode manufacturer-specific aliases for certain operating systems.
|
||||
|
||||
if [ x"$os" != x"" ]
|
||||
then
|
||||
case $os in
|
||||
# First match some system type aliases
|
||||
# that might get confused with valid system types.
|
||||
# -solaris* is a basic system type, with this one exception.
|
||||
-solaris1 | -solaris1.*)
|
||||
os=`echo $os | sed -e 's|solaris1|sunos4|'`
|
||||
;;
|
||||
-solaris)
|
||||
os=-solaris2
|
||||
;;
|
||||
-unixware* | svr4*)
|
||||
os=-sysv4
|
||||
;;
|
||||
-gnu/linux*)
|
||||
os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
|
||||
;;
|
||||
# First accept the basic system types.
|
||||
# The portable systems comes first.
|
||||
# Each alternative MUST END IN A *, to match a version number.
|
||||
# -sysv* is not here because it comes later, after sysvr4.
|
||||
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
|
||||
| -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
|
||||
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
|
||||
| -amigados* | -msdos* | -newsos* | -unicos* | -aof* | -aos* \
|
||||
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
|
||||
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
|
||||
| -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
|
||||
| -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
|
||||
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
|
||||
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
|
||||
| -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
|
||||
| -linux-gnu* | -uxpv*)
|
||||
# Remember, each alternative MUST END IN *, to match a version number.
|
||||
;;
|
||||
-linux*)
|
||||
os=`echo $os | sed -e 's|linux|linux-gnu|'`
|
||||
;;
|
||||
-sunos5*)
|
||||
os=`echo $os | sed -e 's|sunos5|solaris2|'`
|
||||
;;
|
||||
-sunos6*)
|
||||
os=`echo $os | sed -e 's|sunos6|solaris3|'`
|
||||
;;
|
||||
-osfrose*)
|
||||
os=-osfrose
|
||||
;;
|
||||
-osf*)
|
||||
os=-osf
|
||||
;;
|
||||
-utek*)
|
||||
os=-bsd
|
||||
;;
|
||||
-dynix*)
|
||||
os=-bsd
|
||||
;;
|
||||
-acis*)
|
||||
os=-aos
|
||||
;;
|
||||
-ctix* | -uts*)
|
||||
os=-sysv
|
||||
;;
|
||||
-ns2 )
|
||||
os=-nextstep2
|
||||
;;
|
||||
# Preserve the version number of sinix5.
|
||||
-sinix5.*)
|
||||
os=`echo $os | sed -e 's|sinix|sysv|'`
|
||||
;;
|
||||
-sinix*)
|
||||
os=-sysv4
|
||||
;;
|
||||
-triton*)
|
||||
os=-sysv3
|
||||
;;
|
||||
-oss*)
|
||||
os=-sysv3
|
||||
;;
|
||||
-svr4)
|
||||
os=-sysv4
|
||||
;;
|
||||
-svr3)
|
||||
os=-sysv3
|
||||
;;
|
||||
-sysvr4)
|
||||
os=-sysv4
|
||||
;;
|
||||
# This must come after -sysvr4.
|
||||
-sysv*)
|
||||
;;
|
||||
-xenix)
|
||||
os=-xenix
|
||||
;;
|
||||
-none)
|
||||
;;
|
||||
*)
|
||||
# Get rid of the `-' at the beginning of $os.
|
||||
os=`echo $os | sed 's/[^-]*-//'`
|
||||
echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
else
|
||||
|
||||
# Here we handle the default operating systems that come with various machines.
|
||||
# The value should be what the vendor currently ships out the door with their
|
||||
# machine or put another way, the most popular os provided with the machine.
|
||||
|
||||
# Note that if you're going to try to match "-MANUFACTURER" here (say,
|
||||
# "-sun"), then you have to tell the case statement up towards the top
|
||||
# that MANUFACTURER isn't an operating system. Otherwise, code above
|
||||
# will signal an error saying that MANUFACTURER isn't an operating
|
||||
# system, and we'll never get to this point.
|
||||
|
||||
case $basic_machine in
|
||||
*-acorn)
|
||||
os=-riscix1.2
|
||||
;;
|
||||
arm*-semi)
|
||||
os=-aout
|
||||
;;
|
||||
pdp11-*)
|
||||
os=-none
|
||||
;;
|
||||
*-dec | vax-*)
|
||||
os=-ultrix4.2
|
||||
;;
|
||||
m68*-apollo)
|
||||
os=-domain
|
||||
;;
|
||||
i386-sun)
|
||||
os=-sunos4.0.2
|
||||
;;
|
||||
m68000-sun)
|
||||
os=-sunos3
|
||||
# This also exists in the configure program, but was not the
|
||||
# default.
|
||||
# os=-sunos4
|
||||
;;
|
||||
*-tti) # must be before sparc entry or we get the wrong os.
|
||||
os=-sysv3
|
||||
;;
|
||||
sparc-* | *-sun)
|
||||
os=-sunos4.1.1
|
||||
;;
|
||||
*-ibm)
|
||||
os=-aix
|
||||
;;
|
||||
*-hp)
|
||||
os=-hpux
|
||||
;;
|
||||
*-hitachi)
|
||||
os=-hiux
|
||||
;;
|
||||
i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
|
||||
os=-sysv
|
||||
;;
|
||||
*-cbm)
|
||||
os=-amigados
|
||||
;;
|
||||
*-dg)
|
||||
os=-dgux
|
||||
;;
|
||||
*-dolphin)
|
||||
os=-sysv3
|
||||
;;
|
||||
m68k-ccur)
|
||||
os=-rtu
|
||||
;;
|
||||
m88k-omron*)
|
||||
os=-luna
|
||||
;;
|
||||
*-next )
|
||||
os=-nextstep
|
||||
;;
|
||||
*-sequent)
|
||||
os=-ptx
|
||||
;;
|
||||
*-crds)
|
||||
os=-unos
|
||||
;;
|
||||
*-ns)
|
||||
os=-genix
|
||||
;;
|
||||
i370-*)
|
||||
os=-mvs
|
||||
;;
|
||||
*-next)
|
||||
os=-nextstep3
|
||||
;;
|
||||
*-gould)
|
||||
os=-sysv
|
||||
;;
|
||||
*-highlevel)
|
||||
os=-bsd
|
||||
;;
|
||||
*-encore)
|
||||
os=-bsd
|
||||
;;
|
||||
*-sgi)
|
||||
os=-irix
|
||||
;;
|
||||
*-siemens)
|
||||
os=-sysv4
|
||||
;;
|
||||
*-masscomp)
|
||||
os=-rtu
|
||||
;;
|
||||
f301-fujitsu)
|
||||
os=-uxpv
|
||||
;;
|
||||
*)
|
||||
os=-none
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Here we handle the case where we know the os, and the CPU type, but not the
|
||||
# manufacturer. We pick the logical manufacturer.
|
||||
vendor=unknown
|
||||
case $basic_machine in
|
||||
*-unknown)
|
||||
case $os in
|
||||
-riscix*)
|
||||
vendor=acorn
|
||||
;;
|
||||
-sunos*)
|
||||
vendor=sun
|
||||
;;
|
||||
-aix*)
|
||||
vendor=ibm
|
||||
;;
|
||||
-hpux*)
|
||||
vendor=hp
|
||||
;;
|
||||
-hiux*)
|
||||
vendor=hitachi
|
||||
;;
|
||||
-unos*)
|
||||
vendor=crds
|
||||
;;
|
||||
-dgux*)
|
||||
vendor=dg
|
||||
;;
|
||||
-luna*)
|
||||
vendor=omron
|
||||
;;
|
||||
-genix*)
|
||||
vendor=ns
|
||||
;;
|
||||
-mvs*)
|
||||
vendor=ibm
|
||||
;;
|
||||
-ptx*)
|
||||
vendor=sequent
|
||||
;;
|
||||
-vxsim* | -vxworks*)
|
||||
vendor=wrs
|
||||
;;
|
||||
-aux*)
|
||||
vendor=apple
|
||||
;;
|
||||
esac
|
||||
basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
|
||||
;;
|
||||
esac
|
||||
|
||||
echo $basic_machine$os
|
1807
configure.in
Normal file
1807
configure.in
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,83 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: xh_html.cpp
|
||||
// Purpose: XRC resource for wxHtmlWindow
|
||||
// Author: Bob Mitchell
|
||||
// Created: 2000/03/21
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2000 Bob Mitchell and Verant Interactive
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma implementation "xh_html.h"
|
||||
#endif
|
||||
|
||||
// For compilers that support precompilation, includes "wx.h".
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#include "wx/xrc/xh_html.h"
|
||||
|
||||
#if wxUSE_HTML
|
||||
|
||||
#include "wx/html/htmlwin.h"
|
||||
#include "wx/filesys.h"
|
||||
|
||||
|
||||
wxHtmlWindowXmlHandler::wxHtmlWindowXmlHandler()
|
||||
: wxXmlResourceHandler()
|
||||
{
|
||||
XRC_ADD_STYLE(wxHW_SCROLLBAR_NEVER);
|
||||
XRC_ADD_STYLE(wxHW_SCROLLBAR_AUTO);
|
||||
AddWindowStyles();
|
||||
}
|
||||
|
||||
wxObject *wxHtmlWindowXmlHandler::DoCreateResource()
|
||||
{
|
||||
XRC_MAKE_INSTANCE(control, wxHtmlWindow)
|
||||
|
||||
control->Create(m_parentAsWindow,
|
||||
GetID(),
|
||||
GetPosition(), GetSize(),
|
||||
GetStyle(wxT("style"), wxHW_SCROLLBAR_AUTO),
|
||||
GetName());
|
||||
|
||||
if (HasParam(wxT("borders")))
|
||||
{
|
||||
control->SetBorders(GetDimension(wxT("borders")));
|
||||
}
|
||||
|
||||
if (HasParam(wxT("url")))
|
||||
{
|
||||
wxString url = GetParamValue(wxT("url"));
|
||||
wxFileSystem& fsys = GetCurFileSystem();
|
||||
|
||||
wxFSFile *f = fsys.OpenFile(url);
|
||||
if (f)
|
||||
{
|
||||
control->LoadPage(f->GetLocation());
|
||||
delete f;
|
||||
}
|
||||
else
|
||||
control->LoadPage(url);
|
||||
}
|
||||
|
||||
else if (HasParam(wxT("htmlcode")))
|
||||
{
|
||||
control->SetPage(GetText(wxT("htmlcode")));
|
||||
}
|
||||
|
||||
SetupWindow(control);
|
||||
|
||||
return control;
|
||||
}
|
||||
|
||||
bool wxHtmlWindowXmlHandler::CanHandle(wxXmlNode *node)
|
||||
{
|
||||
return IsOfClass(node, wxT("wxHtmlWindow"));
|
||||
}
|
||||
|
||||
#endif // wxUSE_HTML
|
@@ -1,262 +0,0 @@
|
||||
%
|
||||
% automatically generated by HelpGen from
|
||||
% htmlcell.tex at 21/Mar/99 22:45:23
|
||||
%
|
||||
|
||||
\section{\class{wxHtmlCell}}\label{wxhtmlcell}
|
||||
|
||||
Internal data structure. It represents fragments of parsed HTML
|
||||
page, the so-called {\bf cell} - a word, picture, table, horizontal line and so on.
|
||||
It is used by \helpref{wxHtmlWindow}{wxhtmlwindow} and
|
||||
\helpref{wxHtmlWinParser}{wxhtmlwinparser} to represent HTML page in memory.
|
||||
|
||||
You can divide cells into two groups : {\it visible} cells with non-zero width and
|
||||
height and {\it helper} cells (usually with zero width and height) that
|
||||
perform special actions such as color or font change.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{Include files}
|
||||
|
||||
<wx/html/htmlcell.h>
|
||||
|
||||
\wxheading{See Also}
|
||||
|
||||
\helpref{Cells Overview}{cells},
|
||||
\helpref{wxHtmlContainerCell}{wxhtmlcontainercell}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxHtmlCell::wxHtmlCell}\label{wxhtmlcellwxhtmlcell}
|
||||
|
||||
\func{}{wxHtmlCell}{\void}
|
||||
|
||||
Constructor.
|
||||
|
||||
\membersection{wxHtmlCell::AdjustPagebreak}\label{wxhtmlcelladjustpagebreak}
|
||||
|
||||
\func{virtual bool}{AdjustPagebreak}{\param{int * }{pagebreak}}
|
||||
|
||||
This method is used to adjust pagebreak position. The parameter is
|
||||
variable that contains y-coordinate of page break (= horizontal line that
|
||||
should not be crossed by words, images etc.). If this cell cannot be divided
|
||||
into two pieces (each one on another page) then it moves the pagebreak
|
||||
few pixels up.
|
||||
|
||||
Returns true if pagebreak was modified, false otherwise
|
||||
|
||||
Usage:
|
||||
\begin{verbatim}
|
||||
while (container->AdjustPagebreak(&p)) {}
|
||||
\end{verbatim}
|
||||
|
||||
\membersection{wxHtmlCell::Draw}\label{wxhtmlcelldraw}
|
||||
|
||||
\func{virtual void}{Draw}{\param{wxDC\& }{dc}, \param{int }{x}, \param{int }{y}, \param{int }{view\_y1}, \param{int }{view\_y2}}
|
||||
|
||||
Renders the cell.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{dc}{Device context to which the cell is to be drawn}
|
||||
|
||||
\docparam{x,y}{Coordinates of parent's upper left corner (origin). You must
|
||||
add this to m\_PosX,m\_PosY when passing coordinates to dc's methods
|
||||
Example : {\tt dc -> DrawText("hello", x + m\_PosX, y + m\_PosY)}}
|
||||
|
||||
\docparam{view\_y1}{y-coord of the first line visible in window. This is
|
||||
used to optimize rendering speed}
|
||||
|
||||
\docparam{view\_y2}{y-coord of the last line visible in window. This is
|
||||
used to optimize rendering speed}
|
||||
|
||||
\membersection{wxHtmlCell::DrawInvisible}\label{wxhtmlcelldrawinvisible}
|
||||
|
||||
\func{virtual void}{DrawInvisible}{\param{wxDC\& }{dc}, \param{int }{x}, \param{int }{y}}
|
||||
|
||||
This method is called instead of \helpref{Draw}{wxhtmlcelldraw} when the
|
||||
cell is certainly out of the screen (and thus invisible). This is not
|
||||
nonsense - some tags (like \helpref{wxHtmlColourCell}{wxhtmlcolourcell}
|
||||
or font setter) must be drawn even if they are invisible!
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{dc}{Device context to which the cell is to be drawn}
|
||||
|
||||
\docparam{x,y}{Coordinates of parent's upper left corner. You must
|
||||
add this to m\_PosX,m\_PosY when passing coordinates to dc's methods
|
||||
Example : {\tt dc -> DrawText("hello", x + m\_PosX, y + m\_PosY)}}
|
||||
|
||||
\membersection{wxHtmlCell::Find}\label{wxhtmlcellfind}
|
||||
|
||||
\func{virtual const wxHtmlCell*}{Find}{\param{int }{condition}, \param{const void* }{param}}
|
||||
|
||||
Returns pointer to itself if this cell matches condition (or if any of the cells
|
||||
following in the list matches), NULL otherwise.
|
||||
(In other words if you call top-level container's Find it will
|
||||
return pointer to the first cell that matches the condition)
|
||||
|
||||
It is recommended way how to obtain pointer to particular cell or
|
||||
to cell of some type (e.g. wxHtmlAnchorCell reacts on
|
||||
wxHTML\_COND\_ISANCHOR condition)
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{condition}{Unique integer identifier of condition}
|
||||
|
||||
\docparam{param}{Optional parameters}
|
||||
|
||||
\wxheading{Defined conditions}
|
||||
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{{\bf wxHTML\_COND\_ISANCHOR}}{Finds particular anchor.
|
||||
{\it param} is pointer to wxString with name of the anchor.}
|
||||
\twocolitem{{\bf wxHTML\_COND\_USER}}{User-defined conditions start
|
||||
from this number.}
|
||||
\end{twocollist}
|
||||
|
||||
\membersection{wxHtmlCell::GetDescent}\label{wxhtmlcellgetdescent}
|
||||
|
||||
\constfunc{int}{GetDescent}{\void}
|
||||
|
||||
Returns descent value of the cell (m\_Descent member).
|
||||
\helponly{See explanation:
|
||||
|
||||
\image{}{descent.bmp}
|
||||
}
|
||||
|
||||
\membersection{wxHtmlCell::GetHeight}\label{wxhtmlcellgetheight}
|
||||
|
||||
\constfunc{int}{GetHeight}{\void}
|
||||
|
||||
Returns height of the cell (m\_Height member).
|
||||
|
||||
\membersection{wxHtmlCell::GetId}\label{wxhtmlcellgetid}
|
||||
|
||||
\constfunc{virtual wxString}{GetId}{\void}
|
||||
|
||||
Returns unique cell identifier if there is any, empty string otherwise.
|
||||
|
||||
\membersection{wxHtmlCell::GetLink}\label{wxhtmlcellgetlink}
|
||||
|
||||
\constfunc{virtual wxHtmlLinkInfo*}{GetLink}{\param{int }{x = 0}, \param{int }{y = 0}}
|
||||
|
||||
Returns hypertext link if associated with this cell or NULL otherwise.
|
||||
See \helpref{wxHtmlLinkInfo}{wxhtmllinkinfo}.
|
||||
(Note: this makes sense only for visible tags).
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{x,y}{Coordinates of position where the user pressed mouse button.
|
||||
These coordinates are used e.g. by COLORMAP. Values are relative to the
|
||||
upper left corner of THIS cell (i.e. from 0 to m\_Width or m\_Height)}
|
||||
|
||||
\membersection{wxHtmlCell::GetNext}\label{wxhtmlcellgetnext}
|
||||
|
||||
\constfunc{wxHtmlCell*}{GetNext}{\void}
|
||||
|
||||
Returns pointer to the next cell in list (see htmlcell.h if you're
|
||||
interested in details).
|
||||
|
||||
\membersection{wxHtmlCell::GetParent}\label{wxhtmlcellgetparent}
|
||||
|
||||
\constfunc{wxHtmlContainerCell*}{GetParent}{\void}
|
||||
|
||||
Returns pointer to parent container.
|
||||
|
||||
\membersection{wxHtmlCell::GetPosX}\label{wxhtmlcellgetposx}
|
||||
|
||||
\constfunc{int}{GetPosX}{\void}
|
||||
|
||||
Returns X position within parent (the value is relative to parent's
|
||||
upper left corner). The returned value is meaningful only if
|
||||
parent's \helpref{Layout}{wxhtmlcelllayout} was called before!
|
||||
|
||||
\membersection{wxHtmlCell::GetPosY}\label{wxhtmlcellgetposy}
|
||||
|
||||
\constfunc{int}{GetPosY}{\void}
|
||||
|
||||
Returns Y position within parent (the value is relative to parent's
|
||||
upper left corner). The returned value is meaningful only if
|
||||
parent's \helpref{Layout}{wxhtmlcelllayout} was called before!
|
||||
|
||||
\membersection{wxHtmlCell::GetWidth}\label{wxhtmlcellgetwidth}
|
||||
|
||||
\constfunc{int}{GetWidth}{\void}
|
||||
|
||||
Returns width of the cell (m\_Width member).
|
||||
|
||||
\membersection{wxHtmlCell::Layout}\label{wxhtmlcelllayout}
|
||||
|
||||
\func{virtual void}{Layout}{\param{int }{w}}
|
||||
|
||||
This method performs two actions:
|
||||
|
||||
\begin{enumerate}\itemsep=0pt
|
||||
\item adjusts the cell's width according to the fact that maximal possible width is {\it w}.
|
||||
(this has sense when working with horizontal lines, tables etc.)
|
||||
\item prepares layout (=fill-in m\_PosX, m\_PosY (and sometimes m\_Height) members)
|
||||
based on actual width {\it w}
|
||||
\end{enumerate}
|
||||
|
||||
It must be called before displaying cells structure because
|
||||
m\_PosX and m\_PosY are undefined (or invalid)
|
||||
before calling Layout.
|
||||
|
||||
\membersection{wxHtmlCell::OnMouseClick}\label{wxhtmlcellonmouseclick}
|
||||
|
||||
\func{virtual void}{OnMouseClick}{\param{wxWindow* }{parent}, \param{int}{x}, \param{int }{y}, \param{const wxMouseEvent\& }{event}}
|
||||
|
||||
This function is simple event handler. Each time the user clicks mouse button over a cell
|
||||
within \helpref{wxHtmlWindow}{wxhtmlwindow} this method of that cell is called. Default behavior is
|
||||
that it calls \helpref{wxHtmlWindow::LoadPage}{wxhtmlwindowloadpage}.
|
||||
|
||||
\wxheading{Note}
|
||||
|
||||
If you need more "advanced" event handling
|
||||
you should use wxHtmlBinderCell instead.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{parent}{parent window (always wxHtmlWindow!)}
|
||||
|
||||
\docparam{x, y}{coordinates of mouse click (this is relative to cell's origin}
|
||||
|
||||
\docparam{left, middle, right}{boolean flags for mouse buttons. true if the left/middle/right
|
||||
button is pressed, false otherwise}
|
||||
|
||||
\membersection{wxHtmlCell::SetId}\label{wxhtmlcellsetid}
|
||||
|
||||
\func{void}{SetId}{\param{const wxString\& }{id}}
|
||||
|
||||
Sets unique cell identifier. Default value is no identifier, i.e. empty string.
|
||||
|
||||
\membersection{wxHtmlCell::SetLink}\label{wxhtmlcellsetlink}
|
||||
|
||||
\func{void}{SetLink}{\param{const wxHtmlLinkInfo\& }{link}}
|
||||
|
||||
Sets the hypertext link associated with this cell. (Default value
|
||||
is \helpref{wxHtmlLinkInfo}{wxhtmllinkinfo}("", "") (no link))
|
||||
|
||||
\membersection{wxHtmlCell::SetNext}\label{wxhtmlcellsetnext}
|
||||
|
||||
\func{void}{SetNext}{\param{wxHtmlCell }{*cell}}
|
||||
|
||||
Sets the next cell in the list. This shouldn't be called by user - it is
|
||||
to be used only by \helpref{wxHtmlContainerCell::InsertCell}{wxhtmlcontainercellinsertcell}.
|
||||
|
||||
\membersection{wxHtmlCell::SetParent}\label{wxhtmlcellsetparent}
|
||||
|
||||
\func{void}{SetParent}{\param{wxHtmlContainerCell }{*p}}
|
||||
|
||||
Sets parent container of this cell. This is called from
|
||||
\helpref{wxHtmlContainerCell::InsertCell}{wxhtmlcontainercellinsertcell}.
|
||||
|
||||
\membersection{wxHtmlCell::SetPos}\label{wxhtmlcellsetpos}
|
||||
|
||||
\func{void}{SetPos}{\param{int }{x}, \param{int }{y}}
|
||||
|
||||
Sets the cell's position within parent container.
|
||||
|
@@ -1,37 +0,0 @@
|
||||
%
|
||||
% automatically generated by HelpGen from
|
||||
% htmlcolourcell.tex at 14/Mar/99 20:13:37
|
||||
%
|
||||
|
||||
\section{\class{wxHtmlColourCell}}\label{wxhtmlcolourcell}
|
||||
|
||||
This cell changes the colour of either the background or the foreground.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxHtmlCell}{wxhtmlcell}
|
||||
|
||||
\wxheading{Include files}
|
||||
|
||||
<wx/html/htmlcell.h>
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxHtmlColourCell::wxHtmlColourCell}\label{wxhtmlcolourcellwxhtmlcolourcell}
|
||||
|
||||
\func{}{wxHtmlColourCell}{\param{wxColour }{clr}, \param{int }{flags = wxHTML\_CLR\_FOREGROUND}}
|
||||
|
||||
Constructor.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{clr}{The color}
|
||||
|
||||
\docparam{flags}{Can be one of following:
|
||||
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{{\bf wxHTML\_CLR\_FOREGROUND}}{change color of text}
|
||||
\twocolitem{{\bf wxHTML\_CLR\_BACKGROUND}}{change background color}
|
||||
\end{twocollist}
|
||||
}
|
||||
|
@@ -1,250 +0,0 @@
|
||||
%
|
||||
% automatically generated by HelpGen from
|
||||
% htmlcontainercell.tex at 21/Mar/99 22:45:23
|
||||
%
|
||||
|
||||
\section{\class{wxHtmlContainerCell}}\label{wxhtmlcontainercell}
|
||||
|
||||
The wxHtmlContainerCell class is an implementation of a cell that may
|
||||
contain more cells in it. It is heavily used in the wxHTML layout algorithm.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxHtmlCell}{wxhtmlcell}
|
||||
|
||||
\wxheading{Include files}
|
||||
|
||||
<wx/html/htmlcell.h>
|
||||
|
||||
\wxheading{See Also}
|
||||
|
||||
\helpref{Cells Overview}{cells}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxHtmlContainerCell::wxHtmlContainerCell}\label{wxhtmlcontainercellwxhtmlcontainercell}
|
||||
|
||||
\func{}{wxHtmlContainerCell}{\param{wxHtmlContainerCell }{*parent}}
|
||||
|
||||
Constructor. {\it parent} is pointer to parent container or NULL.
|
||||
|
||||
|
||||
\membersection{wxHtmlContainerCell::GetAlignHor}\label{wxhtmlcontainercellgetalignhor}
|
||||
|
||||
\constfunc{int}{GetAlignHor}{\void}
|
||||
|
||||
Returns container's horizontal alignment.
|
||||
|
||||
\membersection{wxHtmlContainerCell::GetAlignVer}\label{wxhtmlcontainercellgetalignver}
|
||||
|
||||
\constfunc{int}{GetAlignVer}{\void}
|
||||
|
||||
Returns container's vertical alignment.
|
||||
|
||||
\membersection{wxHtmlContainerCell::GetBackgroundColour}\label{wxhtmlcontainercellgetbackgroundcolour}
|
||||
|
||||
\func{wxColour}{GetBackgroundColour}{\void}
|
||||
|
||||
Returns the background colour of the container or {\tt wxNullColour} if no background
|
||||
colour is set.
|
||||
|
||||
\membersection{wxHtmlContainerCell::GetFirstCell}\label{wxhtmlcontainercellgetfirstcell}
|
||||
|
||||
\func{wxHtmlCell*}{GetFirstCell}{\void}
|
||||
|
||||
Returns pointer to the first cell in the list.
|
||||
You can then use wxHtmlCell's GetNext method to obtain pointer to the next
|
||||
cell in list.
|
||||
|
||||
{\bf Note:} This shouldn't be used by the end user. If you need some way of
|
||||
finding particular cell in the list, try \helpref{Find}{wxhtmlcellfind} method
|
||||
instead.
|
||||
|
||||
\membersection{wxHtmlContainerCell::GetIndent}\label{wxhtmlcontainercellgetindent}
|
||||
|
||||
\constfunc{int}{GetIndent}{\param{int }{ind}}
|
||||
|
||||
Returns the indentation. {\it ind} is one of the {\bf wxHTML\_INDENT\_*} constants.
|
||||
|
||||
{\bf Note:} You must call \helpref{GetIndentUnits}{wxhtmlcontainercellgetindentunits}
|
||||
with same {\it ind} parameter in order to correctly interpret the returned integer value.
|
||||
It is NOT always in pixels!
|
||||
|
||||
\membersection{wxHtmlContainerCell::GetIndentUnits}\label{wxhtmlcontainercellgetindentunits}
|
||||
|
||||
\constfunc{int}{GetIndentUnits}{\param{int }{ind}}
|
||||
|
||||
Returns the units of indentation for {\it ind} where {\it ind} is one
|
||||
of the {\bf wxHTML\_INDENT\_*} constants.
|
||||
|
||||
\membersection{wxHtmlContainerCell::InsertCell}\label{wxhtmlcontainercellinsertcell}
|
||||
|
||||
\func{void}{InsertCell}{\param{wxHtmlCell }{*cell}}
|
||||
|
||||
Inserts new cell into the container.
|
||||
|
||||
\membersection{wxHtmlContainerCell::SetAlign}\label{wxhtmlcontainercellsetalign}
|
||||
|
||||
\func{void}{SetAlign}{\param{const wxHtmlTag\& }{tag}}
|
||||
|
||||
Sets the container's alignment (both horizontal and vertical) according to
|
||||
the values stored in {\it tag}. (Tags {\tt ALIGN} parameter is extracted.) In fact
|
||||
it is only a front-end to \helpref{SetAlignHor}{wxhtmlcontainercellsetalignhor}
|
||||
and \helpref{SetAlignVer}{wxhtmlcontainercellsetalignver}.
|
||||
|
||||
\membersection{wxHtmlContainerCell::SetAlignHor}\label{wxhtmlcontainercellsetalignhor}
|
||||
|
||||
\func{void}{SetAlignHor}{\param{int }{al}}
|
||||
|
||||
Sets the container's {\it horizontal alignment}. During \helpref{Layout}{wxhtmlcelllayout}
|
||||
each line is aligned according to {\it al} value.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{al}{new horizontal alignment. May be one of these values:
|
||||
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{{\bf wxHTML\_ALIGN\_LEFT}}{lines are left-aligned (default)}
|
||||
\twocolitem{{\bf wxHTML\_ALIGN\_JUSTIFY}}{lines are justified}
|
||||
\twocolitem{{\bf wxHTML\_ALIGN\_CENTER}}{lines are centered}
|
||||
\twocolitem{{\bf wxHTML\_ALIGN\_RIGHT}}{lines are right-aligned}
|
||||
\end{twocollist}
|
||||
}
|
||||
|
||||
\membersection{wxHtmlContainerCell::SetAlignVer}\label{wxhtmlcontainercellsetalignver}
|
||||
|
||||
\func{void}{SetAlignVer}{\param{int }{al}}
|
||||
|
||||
Sets the container's {\it vertical alignment}. This is per-line alignment!
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{al}{new vertical alignment. May be one of these values:
|
||||
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{{\bf wxHTML\_ALIGN\_BOTTOM}}{cells are over the line (default)}
|
||||
\twocolitem{{\bf wxHTML\_ALIGN\_CENTER}}{cells are centered on line}
|
||||
\twocolitem{{\bf wxHTML\_ALIGN\_TOP}}{cells are under the line}
|
||||
\end{twocollist}
|
||||
|
||||
\helponly{\image{}{alignv.bmp}}
|
||||
}
|
||||
|
||||
\membersection{wxHtmlContainerCell::SetBackgroundColour}\label{wxhtmlcontainercellsetbackgroundcolour}
|
||||
|
||||
\func{void}{SetBackgroundColour}{\param{const wxColour\& }{clr}}
|
||||
|
||||
Sets the background colour for this container.
|
||||
|
||||
\membersection{wxHtmlContainerCell::SetBorder}\label{wxhtmlcontainercellsetborder}
|
||||
|
||||
\func{void}{SetBorder}{\param{const wxColour\& }{clr1}, \param{const wxColour\& }{clr2}}
|
||||
|
||||
Sets the border (frame) colours. A border is a rectangle around the container.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{clr1}{Colour of top and left lines}
|
||||
|
||||
\docparam{clr2}{Colour of bottom and right lines}
|
||||
|
||||
\membersection{wxHtmlContainerCell::SetIndent}\label{wxhtmlcontainercellsetindent}
|
||||
|
||||
\func{void}{SetIndent}{\param{int }{i}, \param{int }{what}, \param{int }{units = wxHTML\_UNITS\_PIXELS}}
|
||||
|
||||
Sets the indentation (free space between borders of container and subcells).
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{i}{Indentation value.}
|
||||
|
||||
\docparam{what}{Determines which of the four borders we're setting. It is OR
|
||||
combination of following constants:
|
||||
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{{\bf wxHTML\_INDENT\_TOP}}{top border}
|
||||
\twocolitem{{\bf wxHTML\_INDENT\_BOTTOM}}{bottom}
|
||||
\twocolitem{{\bf wxHTML\_INDENT\_LEFT}}{left}
|
||||
\twocolitem{{\bf wxHTML\_INDENT\_RIGHT}}{right}
|
||||
\twocolitem{{\bf wxHTML\_INDENT\_HORIZONTAL}}{left and right}
|
||||
\twocolitem{{\bf wxHTML\_INDENT\_VERTICAL}}{top and bottom}
|
||||
\twocolitem{{\bf wxHTML\_INDENT\_ALL}}{all 4 borders}
|
||||
\end{twocollist}
|
||||
|
||||
\helponly{\image{}{indent.bmp}}
|
||||
}
|
||||
|
||||
\docparam{units}{Units of {\it i}. This parameter affects interpretation of {\it} value.
|
||||
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{{\bf wxHTML\_UNITS\_PIXELS}}{{\it i} is number of pixels}
|
||||
\twocolitem{{\bf wxHTML\_UNITS\_PERCENT}}{{\it i} is interpreted as percents of width
|
||||
of parent container}
|
||||
\end{twocollist}
|
||||
}
|
||||
|
||||
\membersection{wxHtmlContainerCell::SetMinHeight}\label{wxhtmlcontainercellsetminheight}
|
||||
|
||||
\func{void}{SetMinHeight}{\param{int }{h}, \param{int }{align = wxHTML\_ALIGN\_TOP}}
|
||||
|
||||
Sets minimal height of the container.
|
||||
|
||||
When container's \helpref{Layout}{wxhtmlcelllayout} is called, m\_Height
|
||||
is set depending on layout of subcells to the height of area covered
|
||||
by layed-out subcells. Calling this method guarantees you that the height
|
||||
of container is never smaller than {\it h} - even if the subcells cover
|
||||
much smaller area.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{h}{The minimal height.}
|
||||
|
||||
\docparam{align}{If height of the container is lower than the minimum height, empty space must be inserted
|
||||
somewhere in order to ensure minimal height. This parameter is one of {\bf wxHTML\_ALIGN\_TOP,
|
||||
wxHTML\_ALIGN\_BOTTOM, wxHTML\_ALIGN\_CENTER}. It refers to the {\it contents}, not to the
|
||||
empty place.}
|
||||
|
||||
\membersection{wxHtmlContainerCell::SetWidthFloat}\label{wxhtmlcontainercellsetwidthfloat}
|
||||
|
||||
\func{void}{SetWidthFloat}{\param{int }{w}, \param{int }{units}}
|
||||
|
||||
\func{void}{SetWidthFloat}{\param{const wxHtmlTag\& }{tag}, \param{double }{pixel\_scale = 1.0}}
|
||||
|
||||
Sets floating width adjustment.
|
||||
|
||||
The normal behaviour of container is that its width is the same as the width of
|
||||
parent container (and thus you can have only one sub-container per line).
|
||||
You can change this by setting FWA.
|
||||
|
||||
{\it pixel\_scale} is number of real pixels that equals to 1 HTML pixel.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{w}{Width of the container. If the value is negative it means
|
||||
complement to full width of parent container (e.g.
|
||||
{\tt SetWidthFloat(-50, wxHTML\_UNITS\_PIXELS)} sets the width
|
||||
of container to parent's width minus 50 pixels. This is useful when
|
||||
creating tables - you can call SetWidthFloat(50) and SetWidthFloat(-50))}
|
||||
|
||||
\docparam{units}{Units of {\it w} This parameter affects the interpretation of {\it} value.
|
||||
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{{\bf wxHTML\_UNITS\_PIXELS}}{{\it w} is number of pixels}
|
||||
\twocolitem{{\bf wxHTML\_UNITS\_PERCENT}}{{\it w} is interpreted as percents of width
|
||||
of parent container}
|
||||
\end{twocollist}
|
||||
}
|
||||
|
||||
\docparam{tag}{In the second version of method, {\it w} and {\it units}
|
||||
info is extracted from tag's {\tt WIDTH} parameter.}
|
||||
|
||||
\pythonnote{The second form of this method is named
|
||||
SetWidthFloatFromTag in wxPython.}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@@ -1,111 +0,0 @@
|
||||
%
|
||||
% automatically generated by HelpGen from
|
||||
% htmprint.h at 17/Oct/99 12:48:02
|
||||
%
|
||||
|
||||
\section{\class{wxHtmlDCRenderer}}\label{wxhtmldcrenderer}
|
||||
|
||||
This class can render HTML document into a specified area of a DC. You can use it
|
||||
in your own printing code, although use of \helpref{wxHtmlEasyPrinting}{wxhtmleasyprinting}
|
||||
or \helpref{wxHtmlPrintout}{wxhtmlprintout} is strongly recommended.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{Include files}
|
||||
|
||||
<wx/html/htmprint.h>
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxHtmlDCRenderer::wxHtmlDCRenderer}\label{wxhtmldcrendererwxhtmldcrenderer}
|
||||
|
||||
\func{}{wxHtmlDCRenderer}{\void}
|
||||
|
||||
Constructor.
|
||||
|
||||
\membersection{wxHtmlDCRenderer::SetDC}\label{wxhtmldcrenderersetdc}
|
||||
|
||||
\func{void}{SetDC}{\param{wxDC* }{dc}, \param{double }{pixel\_scale = 1.0}}
|
||||
|
||||
Assign DC instance to the renderer.
|
||||
|
||||
{\it pixel\_scale} can be used when rendering to high-resolution DCs (e.g. printer) to adjust size of pixel metrics.
|
||||
(Many dimensions in HTML are given in pixels -- e.g. image sizes. 300x300 image would be only one
|
||||
inch wide on typical printer. With pixel\_scale = 3.0 it would be 3 inches.)
|
||||
|
||||
\membersection{wxHtmlDCRenderer::SetFonts}\label{wxhtmldcrenderersetfonts}
|
||||
|
||||
\func{void}{SetFonts}{\param{wxString }{normal\_face}, \param{wxString }{fixed\_face}, \param{const int }{*sizes = NULL}}
|
||||
|
||||
Sets fonts. See \helpref{wxHtmlWindow::SetFonts}{wxhtmlwindowsetfonts} for
|
||||
detailed description.
|
||||
|
||||
See also \helpref{SetSize}{wxhtmldcrenderersetsize}.
|
||||
|
||||
\membersection{wxHtmlDCRenderer::SetSize}\label{wxhtmldcrenderersetsize}
|
||||
|
||||
\func{void}{SetSize}{\param{int }{width}, \param{int }{height}}
|
||||
|
||||
Set size of output rectangle, in pixels. Note that you {\bf can't} change
|
||||
width of the rectangle between calls to \helpref{Render}{wxhtmldcrendererrender}!
|
||||
(You can freely change height.)
|
||||
|
||||
\membersection{wxHtmlDCRenderer::SetHtmlText}\label{wxhtmldcrenderersethtmltext}
|
||||
|
||||
\func{void}{SetHtmlText}{\param{const wxString\& }{html}, \param{const wxString\& }{basepath = wxEmptyString}, \param{bool }{isdir = true}}
|
||||
|
||||
Assign text to the renderer. \helpref{Render}{wxhtmldcrendererrender} then draws
|
||||
the text onto DC.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{html}{HTML text. This is {\it not} a filename.}
|
||||
|
||||
\docparam{basepath}{base directory (html string would be stored there if it was in
|
||||
file). It is used to determine path for loading images, for example.}
|
||||
|
||||
\docparam{isdir}{false if basepath is filename, true if it is directory name
|
||||
(see \helpref{wxFileSystem}{wxfilesystem} for detailed explanation)}
|
||||
|
||||
\membersection{wxHtmlDCRenderer::Render}\label{wxhtmldcrendererrender}
|
||||
|
||||
\func{int}{Render}{\param{int }{x}, \param{int }{y}, \param{int }{from = 0}, \param{int }{dont\_render = false}}
|
||||
|
||||
Renders HTML text to the DC.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{x,y}{ position of upper-left corner of printing rectangle (see \helpref{SetSize}{wxhtmldcrenderersetsize})}
|
||||
|
||||
\docparam{from}{y-coordinate of the very first visible cell}
|
||||
|
||||
\docparam{dont\_render}{if true then this method only returns y coordinate of the next page
|
||||
and does not output anything}
|
||||
|
||||
Returned value is y coordinate of first cell than didn't fit onto page.
|
||||
Use this value as {\it from} in next call to Render in order to print multipages
|
||||
document.
|
||||
|
||||
\wxheading{Caution!}
|
||||
|
||||
The Following three methods {\bf must} always be called before any call to Render (preferably
|
||||
in this order):
|
||||
|
||||
\begin{itemize}\itemsep=0pt
|
||||
\item \helpref{SetDC}{wxhtmldcrenderersetdc}
|
||||
\item \helpref{SetSize}{wxhtmldcrenderersetsize}
|
||||
\item \helpref{SetHtmlText}{wxhtmldcrenderersethtmltext}
|
||||
\end{itemize}
|
||||
|
||||
{\bf Render() changes the DC's user scale and does NOT restore it.}
|
||||
|
||||
\membersection{wxHtmlDCRenderer::GetTotalHeight}\label{wxhtmldcrenderergettotalheight}
|
||||
|
||||
\func{int}{GetTotalHeight}{\void}
|
||||
|
||||
Returns the height of the HTML text. This is important if area height (see \helpref{SetSize}{wxhtmldcrenderersetsize})
|
||||
is smaller that total height and thus the page cannot fit into it. In that case you're supposed to
|
||||
call \helpref{Render}{wxhtmldcrendererrender} as long as its return value is smaller than GetTotalHeight's.
|
||||
|
@@ -1,164 +0,0 @@
|
||||
%
|
||||
% automatically generated by HelpGen from
|
||||
% htmprint.h at 17/Oct/99 12:48:02
|
||||
%
|
||||
|
||||
\section{\class{wxHtmlEasyPrinting}}\label{wxhtmleasyprinting}
|
||||
|
||||
This class provides very simple interface to printing
|
||||
architecture. It allows you to print HTML documents using
|
||||
only a few commands.
|
||||
|
||||
\wxheading{Note}
|
||||
|
||||
Do not create this class on the stack only. You should create an instance on app
|
||||
startup and use this instance for all printing operations. The reason is that
|
||||
this class stores various settings in it.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{Include files}
|
||||
|
||||
<wx/html/htmprint.h>
|
||||
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxHtmlEasyPrinting::wxHtmlEasyPrinting}\label{wxhtmleasyprintingwxhtmleasyprinting}
|
||||
|
||||
\func{}{wxHtmlEasyPrinting}{\param{const wxString\& }{name = "Printing"}, \param{wxWindow* }{parentWindow = NULL}}
|
||||
|
||||
Constructor.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{name}{Name of the printing object. Used by preview frames and setup dialogs.}
|
||||
|
||||
\docparam{parentWindow}{pointer to the window that will own the preview frame and setup dialogs. May be NULL.}
|
||||
|
||||
\membersection{wxHtmlEasyPrinting::PreviewFile}\label{wxhtmleasyprintingpreviewfile}
|
||||
|
||||
\func{bool}{PreviewFile}{\param{const wxString\& }{htmlfile}}
|
||||
|
||||
Preview HTML file.
|
||||
|
||||
Returns false in case of error -- call
|
||||
\helpref{wxPrinter::GetLastError}{wxprintergetlasterror} to get detailed
|
||||
information about the kind of the error.
|
||||
|
||||
|
||||
\membersection{wxHtmlEasyPrinting::PreviewText}\label{wxhtmleasyprintingpreviewtext}
|
||||
|
||||
\func{bool}{PreviewText}{\param{const wxString\& }{htmltext}, \param{const wxString\& }{basepath = wxEmptyString}}
|
||||
|
||||
Preview HTML text (not file!).
|
||||
|
||||
Returns false in case of error -- call
|
||||
\helpref{wxPrinter::GetLastError}{wxprintergetlasterror} to get detailed
|
||||
information about the kind of the error.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{htmltext}{HTML text.}
|
||||
|
||||
\docparam{basepath}{base directory (html string would be stored there if it was in
|
||||
file). It is used to determine path for loading images, for example.}
|
||||
|
||||
\membersection{wxHtmlEasyPrinting::PrintFile}\label{wxhtmleasyprintingprintfile}
|
||||
|
||||
\func{bool}{PrintFile}{\param{const wxString\& }{htmlfile}}
|
||||
|
||||
Print HTML file.
|
||||
|
||||
Returns false in case of error -- call
|
||||
\helpref{wxPrinter::GetLastError}{wxprintergetlasterror} to get detailed
|
||||
information about the kind of the error.
|
||||
|
||||
\membersection{wxHtmlEasyPrinting::PrintText}\label{wxhtmleasyprintingprinttext}
|
||||
|
||||
\func{bool}{PrintText}{\param{const wxString\& }{htmltext}, \param{const wxString\& }{basepath = wxEmptyString}}
|
||||
|
||||
Print HTML text (not file!).
|
||||
|
||||
Returns false in case of error -- call
|
||||
\helpref{wxPrinter::GetLastError}{wxprintergetlasterror} to get detailed
|
||||
information about the kind of the error.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{htmltext}{HTML text.}
|
||||
|
||||
\docparam{basepath}{base directory (html string would be stored there if it was in
|
||||
file). It is used to determine path for loading images, for example.}
|
||||
|
||||
\membersection{wxHtmlEasyPrinting::PrinterSetup}\label{wxhtmleasyprintingprintersetup}
|
||||
|
||||
\func{void}{PrinterSetup}{\void}
|
||||
|
||||
Display printer setup dialog and allows the user to modify settings.
|
||||
|
||||
\membersection{wxHtmlEasyPrinting::PageSetup}\label{wxhtmleasyprintingpagesetup}
|
||||
|
||||
\func{void}{PageSetup}{\void}
|
||||
|
||||
Display page setup dialog and allows the user to modify settings.
|
||||
|
||||
\membersection{wxHtmlEasyPrinting::SetFonts}\label{wxhtmleasyprintingsetfonts}
|
||||
|
||||
\func{void}{SetFonts}{\param{wxString }{normal\_face}, \param{wxString }{fixed\_face}, \param{const int }{*sizes = NULL}}
|
||||
|
||||
Sets fonts. See \helpref{wxHtmlWindow::SetFonts}{wxhtmlwindowsetfonts} for
|
||||
detailed description.
|
||||
|
||||
\membersection{wxHtmlEasyPrinting::SetHeader}\label{wxhtmleasyprintingsetheader}
|
||||
|
||||
\func{void}{SetHeader}{\param{const wxString\& }{header}, \param{int }{pg = wxPAGE\_ALL}}
|
||||
|
||||
Set page header.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{header}{HTML text to be used as header. You can use macros in it:
|
||||
|
||||
\begin{itemize}\itemsep=0pt
|
||||
\item @PAGENUM@ is replaced by page number
|
||||
\item @PAGESCNT@ is replaced by total number of pages
|
||||
\end{itemize}
|
||||
}
|
||||
|
||||
\docparam{pg}{one of wxPAGE\_ODD, wxPAGE\_EVEN and wxPAGE\_ALL constants.}
|
||||
|
||||
\membersection{wxHtmlEasyPrinting::SetFooter}\label{wxhtmleasyprintingsetfooter}
|
||||
|
||||
\func{void}{SetFooter}{\param{const wxString\& }{footer}, \param{int }{pg = wxPAGE\_ALL}}
|
||||
|
||||
Set page footer.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{footer}{HTML text to be used as footer. You can use macros in it:
|
||||
|
||||
\begin{itemize}\itemsep=0pt
|
||||
\item @PAGENUM@ is replaced by page number
|
||||
\item @PAGESCNT@ is replaced by total number of pages
|
||||
\end{itemize}
|
||||
}
|
||||
|
||||
\docparam{pg}{one of wxPAGE\_ODD, wxPAGE\_EVEN and wxPAGE\_ALL constants.}
|
||||
|
||||
\membersection{wxHtmlEasyPrinting::GetPrintData}\label{wxhtmleasyprintinggetprintdata}
|
||||
|
||||
\func{wxPrintData*}{GetPrintData}{\void}
|
||||
|
||||
Returns pointer to \helpref{wxPrintData}{wxprintdata} instance used by this class. You can
|
||||
set its parameters (via SetXXXX methods).
|
||||
|
||||
\membersection{wxHtmlEasyPrinting::GetPageSetupData}\label{wxhtmleasyprintinggetpagesetupdata}
|
||||
|
||||
\func{wxPageSetupDialogData*}{GetPageSetupData}{\void}
|
||||
|
||||
Returns a pointer to \helpref{wxPageSetupDialogData}{wxpagesetupdialogdata} instance used by
|
||||
this class. You can set its parameters (via SetXXXX methods).
|
||||
|
@@ -1,63 +0,0 @@
|
||||
%
|
||||
% automatically generated by HelpGen from
|
||||
% htmlfilter.tex at 29/Mar/99 18:35:09
|
||||
%
|
||||
|
||||
\section{\class{wxHtmlFilter}}\label{wxhtmlfilter}
|
||||
|
||||
This class is an input filter for \helpref{wxHtmlWindow}{wxhtmlwindow}.
|
||||
It allows you to read and display files of different file formats.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{Include files}
|
||||
|
||||
<wx/html/htmlfilt.h>
|
||||
|
||||
|
||||
\wxheading{See Also}
|
||||
|
||||
\helpref{Overview}{filters}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxHtmlFilter::wxHtmlFilter}\label{wxhtmlfilterwxhtmlfilter}
|
||||
|
||||
\func{}{wxHtmlFilter}{\void}
|
||||
|
||||
Constructor.
|
||||
|
||||
\membersection{wxHtmlFilter::CanRead}\label{wxhtmlfiltercanread}
|
||||
|
||||
\func{bool}{CanRead}{\param{const wxFSFile\& }{file}}
|
||||
|
||||
Returns true if this filter is capable of reading file {\it file}.
|
||||
|
||||
Example:
|
||||
|
||||
\begin{verbatim}
|
||||
bool MyFilter::CanRead(const wxFSFile& file)
|
||||
{
|
||||
return (file.GetMimeType() == "application/x-ugh");
|
||||
}
|
||||
\end{verbatim}
|
||||
|
||||
\membersection{wxHtmlFilter::ReadFile}\label{wxhtmlfilterreadfile}
|
||||
|
||||
\func{wxString}{ReadFile}{\param{const wxFSFile\& }{file}}
|
||||
|
||||
Reads the file and returns string with HTML document.
|
||||
|
||||
Example:
|
||||
|
||||
\begin{verbatim}
|
||||
wxString MyImgFilter::ReadFile(const wxFSFile& file)
|
||||
{
|
||||
return "<html><body><img src=\"" +
|
||||
file.GetLocation() +
|
||||
"\"></body></html>";
|
||||
}
|
||||
\end{verbatim}
|
||||
|
@@ -1,221 +0,0 @@
|
||||
%
|
||||
% automatically generated by HelpGen from
|
||||
% htmlhelp.h at 02/May/99 19:58:53
|
||||
%
|
||||
|
||||
\section{\class{wxHtmlHelpController}}\label{wxhtmlhelpcontroller}
|
||||
|
||||
{\bf WARNING!} Although this class has an API compatible with other wxWindows
|
||||
help controllers as documented by \helpref{wxHelpController}{wxhelpcontroller}, it
|
||||
is recommended that you use the enhanced capabilities of wxHtmlHelpController's API.
|
||||
|
||||
This help controller provides an easy way of displaying HTML help in your
|
||||
application (see {\it test} sample). The help system is based on {\bf books}
|
||||
(see \helpref{AddBook}{wxhtmlhelpcontrolleraddbook}). A book is a logical
|
||||
section of documentation (for example "User's Guide" or "Programmer's Guide" or
|
||||
"C++ Reference" or "wxWindows Reference"). The help controller can handle as
|
||||
many books as you want.
|
||||
|
||||
wxHTML uses Microsoft's HTML Help Workshop project files (.hhp, .hhk, .hhc) as its
|
||||
native format. The file format is described \helpref{here}{helpformat}.
|
||||
Have a look at docs/html/ directory where sample project files are stored.
|
||||
|
||||
You can use Tex2RTF to produce these files when generating HTML, if you set {\bf htmlWorkshopFiles} to {\bf true} in
|
||||
your tex2rtf.ini file.
|
||||
|
||||
\wxheading{Note}
|
||||
|
||||
It is strongly recommended to use preprocessed {\bf .hhp.cached} version of
|
||||
projects. It can be either created on-the-fly (see
|
||||
\helpref{SetTempDir}{wxhtmlhelpcontrollersettempdir}) or you can use
|
||||
{\bf hhp2cached} utility from {\it utils/hhp2cached} to create it and
|
||||
distribute the cached version together with helpfiles. See {\it samples/html/help}
|
||||
sample for demonstration of its use.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{Information about wxBestHelpController}{wxhelpcontroller}
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
wxHelpControllerBase
|
||||
|
||||
\wxheading{Include files}
|
||||
|
||||
<wx/html/helpctrl.h>
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxHtmlHelpController::wxHtmlHelpController}\label{wxhtmlhelpcontrollerwxhtmlhelpcontroller}
|
||||
|
||||
\func{}{wxHtmlHelpController}{\param{int }{style = wxHF\_DEFAULT\_STYLE}}
|
||||
|
||||
Constructor.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
{\it style} is combination of these flags:
|
||||
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{\windowstyle{wxHF\_TOOLBAR}}{Help frame has toolbar.}
|
||||
\twocolitem{\windowstyle{wxHF\_FLAT\_TOOLBAR}}{Help frame has toolbar with flat buttons (aka coolbar).}
|
||||
\twocolitem{\windowstyle{wxHF\_CONTENTS}}{Help frame has contents panel.}
|
||||
\twocolitem{\windowstyle{wxHF\_INDEX}}{Help frame has index panel.}
|
||||
\twocolitem{\windowstyle{wxHF\_SEARCH}}{Help frame has search panel.}
|
||||
\twocolitem{\windowstyle{wxHF\_BOOKMARKS}}{Help frame has bookmarks controls.}
|
||||
\twocolitem{\windowstyle{wxHF\_OPEN\_FILES}}{Allow user to open arbitrary HTML document.}
|
||||
\twocolitem{\windowstyle{wxHF\_PRINT}}{Toolbar contains "print" button.}
|
||||
\twocolitem{\windowstyle{wxHF\_MERGE\_BOOKS}}{Contents pane does not show
|
||||
book nodes. All books are merged together and appear as single book to the
|
||||
user.}
|
||||
\twocolitem{\windowstyle{wxHF\_ICONS\_BOOK}}{All nodes in contents pane
|
||||
have a book icon. This is how Microsoft's HTML help viewer behaves.}
|
||||
\twocolitem{\windowstyle{wxHF\_ICONS\_FOLDER}}{Book nodes in contents pane have
|
||||
a book icon, book's sections have a folder icon. This is the default.}
|
||||
\twocolitem{\windowstyle{wxHF\_ICONS\_BOOK\_CHAPTER}}{Both book nodes and
|
||||
nodes of top-level sections of a book (i.e. chapters) have a book icon,
|
||||
all other sections (sections, subsections, ...) have a folder icon.}
|
||||
\twocolitem{\windowstyle{wxHF\_DEFAULT\_STYLE}}{{\tt wxHF\_TOOLBAR | wxHF\_CONTENTS
|
||||
| wxHF\_INDEX | wxHF\_SEARCH | wxHF\_BOOKMARKS | wxHF\_PRINT}}
|
||||
\end{twocollist}
|
||||
|
||||
\membersection{wxHtmlHelpController::AddBook}\label{wxhtmlhelpcontrolleraddbook}
|
||||
|
||||
\func{bool}{AddBook}{\param{const wxFileName\& }{book\_file}, \param{bool }{show\_wait\_msg}}
|
||||
|
||||
\func{bool}{AddBook}{\param{const wxString\& }{book\_url}, \param{bool }{show\_wait\_msg}}
|
||||
|
||||
Adds book (\helpref{.hhp file}{helpformat} - HTML Help Workshop project file) into the list of loaded books.
|
||||
This must be called at least once before displaying any help.
|
||||
|
||||
{\it book\_file} or {\it book\_url} may be either .hhp file or ZIP archive
|
||||
that contains arbitrary number of .hhp files in
|
||||
top-level directory. This ZIP archive must have .zip or .htb extension
|
||||
(the latter stands for "HTML book"). In other words,
|
||||
{\tt AddBook(wxFileName("help.zip"))}
|
||||
is possible and, in fact, recommended way.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{show\_wait\_msg}{If true then a decoration-less window with progress message is displayed.}
|
||||
\docparam{book\_file}{Help book filename. It is recommended to use this prototype
|
||||
instead of the one taking URL, because it is less error-prone.}
|
||||
\docparam{book\_url}{Help book URL (note that syntax of filename and URL is
|
||||
different on most platforms)}
|
||||
|
||||
\wxheading{Note}
|
||||
|
||||
Don't forget to install wxFileSystem ZIP handler with
|
||||
{\tt wxFileSystem::AddHandler(new wxZipFSHandler);} before calling this method
|
||||
on a .zip or .htb file!
|
||||
|
||||
\membersection{wxHtmlHelpController::CreateHelpFrame}\label{wxhtmlhelpcontrollercreatehelpframe}
|
||||
|
||||
\func{virtual wxHtmlHelpFrame*}{CreateHelpFrame}{\param{wxHtmlHelpData * }{data}}
|
||||
|
||||
This protected virtual method may be overridden so that the controller
|
||||
uses slightly different frame. See {\it samples/html/helpview} sample for
|
||||
an example.
|
||||
\membersection{wxHtmlHelpController::Display}\label{wxhtmlhelpcontrollerdisplay}
|
||||
|
||||
\func{void}{Display}{\param{const wxString\& }{x}}
|
||||
|
||||
Displays page {\it x}. This is THE important function - it is used to display
|
||||
the help in application.
|
||||
|
||||
You can specify the page in many ways:
|
||||
|
||||
\begin{itemize}\itemsep=0pt
|
||||
\item as direct filename of HTML document
|
||||
\item as chapter name (from contents) or as a book name
|
||||
\item as some word from index
|
||||
\item even as any word (will be searched)
|
||||
\end{itemize}
|
||||
|
||||
Looking for the page runs in these steps:
|
||||
|
||||
\begin{enumerate}\itemsep=0pt
|
||||
\item try to locate file named x (if x is for example "doc/howto.htm")
|
||||
\item try to open starting page of book named x
|
||||
\item try to find x in contents (if x is for example "How To ...")
|
||||
\item try to find x in index (if x is for example "How To ...")
|
||||
\item switch to Search panel and start searching
|
||||
\end{enumerate}
|
||||
|
||||
\func{void}{Display}{\param{const int }{id}}
|
||||
|
||||
This alternative form is used to search help contents by numeric IDs.
|
||||
|
||||
\pythonnote{The second form of this method is named DisplayId in
|
||||
wxPython.}
|
||||
|
||||
\membersection{wxHtmlHelpController::DisplayContents}\label{wxhtmlhelpcontrollerdisplaycontents}
|
||||
|
||||
\func{void}{DisplayContents}{\void}
|
||||
|
||||
Displays help window and focuses contents panel.
|
||||
|
||||
\membersection{wxHtmlHelpController::DisplayIndex}\label{wxhtmlhelpcontrollerdisplayindex}
|
||||
|
||||
\func{void}{DisplayIndex}{\void}
|
||||
|
||||
Displays help window and focuses index panel.
|
||||
|
||||
\membersection{wxHtmlHelpController::KeywordSearch}\label{wxhtmlhelpcontrollerkeywordsearch}
|
||||
|
||||
\func{bool}{KeywordSearch}{\param{const wxString\& }{keyword}}
|
||||
|
||||
Displays help window, focuses search panel and starts searching.
|
||||
Returns true if the keyword was found.
|
||||
|
||||
{\bf Important:} KeywordSearch searches only pages listed in .hhc file(s).
|
||||
You should list all pages in the contents file.
|
||||
|
||||
\membersection{wxHtmlHelpController::ReadCustomization}\label{wxhtmlhelpcontrollerreadcustomization}
|
||||
|
||||
\func{void}{ReadCustomization}{\param{wxConfigBase* }{cfg}, \param{wxString }{path = wxEmptyString}}
|
||||
|
||||
Reads the controller's setting (position of window, etc.)
|
||||
|
||||
\membersection{wxHtmlHelpController::SetTempDir}\label{wxhtmlhelpcontrollersettempdir}
|
||||
|
||||
\func{void}{SetTempDir}{\param{const wxString\& }{path}}
|
||||
|
||||
Sets the path for storing temporary files - cached binary versions of index and contents files. These binary
|
||||
forms are much faster to read. Default value is empty string (empty string means
|
||||
that no cached data are stored). Note that these files are {\it not}
|
||||
deleted when program exits.
|
||||
|
||||
Once created these cached files will be used in all subsequent executions
|
||||
of your application. If cached files become older than corresponding .hhp
|
||||
file (e.g. if you regenerate documentation) it will be refreshed.
|
||||
|
||||
\membersection{wxHtmlHelpController::SetTitleFormat}\label{wxhtmlhelpcontrollersettitleformat}
|
||||
|
||||
\func{void}{SetTitleFormat}{\param{const wxString\& }{format}}
|
||||
|
||||
Sets format of title of the frame. Must contain exactly one "\%s"
|
||||
(for title of displayed HTML page).
|
||||
|
||||
\membersection{wxHtmlHelpController::UseConfig}\label{wxhtmlhelpcontrolleruseconfig}
|
||||
|
||||
\func{void}{UseConfig}{\param{wxConfigBase* }{config}, \param{const wxString\& }{rootpath = wxEmptyString}}
|
||||
|
||||
Associates {\it config} object with the controller.
|
||||
|
||||
If there is associated config object, wxHtmlHelpController automatically
|
||||
reads and writes settings (including wxHtmlWindow's settings) when needed.
|
||||
|
||||
The only thing you must do is create wxConfig object and call UseConfig.
|
||||
|
||||
If you do not use {\it UseConfig}, wxHtmlHelpController will use
|
||||
default wxConfig object if available (for details see
|
||||
\helpref{wxConfigBase::Get}{wxconfigbaseget} and
|
||||
\helpref{wxConfigBase::Set}{wxconfigbaseset}).
|
||||
|
||||
\membersection{wxHtmlHelpController::WriteCustomization}\label{wxhtmlhelpcontrollerwritecustomization}
|
||||
|
||||
\func{void}{WriteCustomization}{\param{wxConfigBase* }{cfg}, \param{wxString }{path = wxEmptyString}}
|
||||
|
||||
Stores controllers setting (position of window etc.)
|
||||
|
@@ -1,87 +0,0 @@
|
||||
%
|
||||
% automatically generated by HelpGen from
|
||||
% helpdata.h at 24/Oct/99 18:03:10
|
||||
%
|
||||
|
||||
\section{\class{wxHtmlHelpData}}\label{wxhtmlhelpdata}
|
||||
|
||||
This class is used by \helpref{wxHtmlHelpController}{wxhtmlhelpcontroller}
|
||||
and \helpref{wxHtmlHelpFrame}{wxhtmlhelpframe} to access HTML help items.
|
||||
It is internal class and should not be used directly - except for the case
|
||||
you're writing your own HTML help controller.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{Include files}
|
||||
|
||||
<wx/html/helpdata.h>
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxHtmlHelpData::wxHtmlHelpData}\label{wxhtmlhelpdatawxhtmlhelpdata}
|
||||
|
||||
\func{}{wxHtmlHelpData}{\void}
|
||||
|
||||
Constructor.
|
||||
|
||||
\membersection{wxHtmlHelpData::AddBook}\label{wxhtmlhelpdataaddbook}
|
||||
|
||||
\func{bool}{AddBook}{\param{const wxString\& }{book\_url}}
|
||||
|
||||
Adds new book. {\it book} is URL (not filename!) of HTML help project (hhp)
|
||||
or ZIP file that contains arbitrary number of .hhp projects (this zip
|
||||
file can have either .zip or .htb extension, htb stands for "html book").
|
||||
Returns success.
|
||||
|
||||
\membersection{wxHtmlHelpData::FindPageById}\label{wxhtmlhelpdatafindpagebyid}
|
||||
|
||||
\func{wxString}{FindPageById}{\param{int }{id}}
|
||||
|
||||
Returns page's URL based on integer ID stored in project.
|
||||
|
||||
\membersection{wxHtmlHelpData::FindPageByName}\label{wxhtmlhelpdatafindpagebyname}
|
||||
|
||||
\func{wxString}{FindPageByName}{\param{const wxString\& }{page}}
|
||||
|
||||
Returns page's URL based on its (file)name.
|
||||
|
||||
\membersection{wxHtmlHelpData::GetBookRecArray}\label{wxhtmlhelpdatagetbookrecarray}
|
||||
|
||||
\func{const wxHtmlBookRecArray\&}{GetBookRecArray}{\void}
|
||||
|
||||
Returns array with help books info.
|
||||
|
||||
\membersection{wxHtmlHelpData::GetContents}\label{wxhtmlhelpdatagetcontents}
|
||||
|
||||
\func{wxHtmlContentsItem*}{GetContents}{\void}
|
||||
|
||||
Returns contents lists pointer.
|
||||
|
||||
\membersection{wxHtmlHelpData::GetContentsCnt}\label{wxhtmlhelpdatagetcontentscnt}
|
||||
|
||||
\func{int}{GetContentsCnt}{\void}
|
||||
|
||||
Returns size of contents list.
|
||||
|
||||
\membersection{wxHtmlHelpData::GetIndex}\label{wxhtmlhelpdatagetindex}
|
||||
|
||||
\func{wxHtmlContentsItem*}{GetIndex}{\void}
|
||||
|
||||
Returns pointer to index items list.
|
||||
|
||||
\membersection{wxHtmlHelpData::GetIndexCnt}\label{wxhtmlhelpdatagetindexcnt}
|
||||
|
||||
\func{int}{GetIndexCnt}{\void}
|
||||
|
||||
Returns size of index list.
|
||||
|
||||
\membersection{wxHtmlHelpData::SetTempDir}\label{wxhtmlhelpdatasettempdir}
|
||||
|
||||
\func{void}{SetTempDir}{\param{const wxString\& }{path}}
|
||||
|
||||
Sets temporary directory where binary cached versions of MS HTML Workshop
|
||||
files will be stored. (This is turned off by default and you can enable
|
||||
this feature by setting non-empty temp dir.)
|
||||
|
@@ -1,170 +0,0 @@
|
||||
%
|
||||
% automatically generated by HelpGen from
|
||||
% helpfrm.h at 24/Oct/99 18:03:10
|
||||
%
|
||||
|
||||
\section{\class{wxHtmlHelpFrame}}\label{wxhtmlhelpframe}
|
||||
|
||||
This class is used by \helpref{wxHtmlHelpController}{wxhtmlhelpcontroller}
|
||||
to display help.
|
||||
It is an internal class and should not be used directly - except for the case
|
||||
when you're writing your own HTML help controller.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxFrame}{wxframe}
|
||||
|
||||
\wxheading{Include files}
|
||||
|
||||
<wx/html/helpfrm.h>
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxHtmlHelpFrame::wxHtmlHelpFrame}\label{wxhtmlhelpframewxhtmlhelpframe}
|
||||
|
||||
\func{}{wxHtmlHelpFrame}{\param{wxHtmlHelpData* }{data = NULL}}
|
||||
|
||||
\func{}{wxHtmlHelpFrame}{\param{wxWindow* }{parent}, \param{int }{wxWindowID}, \param{const wxString\& }{title = wxEmptyString}, \param{int }{style = wxHF\_DEFAULT\_STYLE}, \param{wxHtmlHelpData* }{data = NULL}}
|
||||
|
||||
Constructor.
|
||||
|
||||
{\it style} is combination of these flags:
|
||||
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{\windowstyle{wxHF\_TOOLBAR}}{Help frame has toolbar.}
|
||||
\twocolitem{\windowstyle{wxHF\_FLAT\_TOOLBAR}}{Help frame has toolbar with flat buttons (aka coolbar).}
|
||||
\twocolitem{\windowstyle{wxHF\_CONTENTS}}{Help frame has contents panel.}
|
||||
\twocolitem{\windowstyle{wxHF\_INDEX}}{Help frame has index panel.}
|
||||
\twocolitem{\windowstyle{wxHF\_SEARCH}}{Help frame has search panel.}
|
||||
\twocolitem{\windowstyle{wxHF\_BOOKMARKS}}{Help frame has bookmarks controls.}
|
||||
\twocolitem{\windowstyle{wxHF\_OPEN\_FILES}}{Allow user to open arbitrary HTML document.}
|
||||
\twocolitem{\windowstyle{wxHF\_PRINT}}{Toolbar contains "print" button.}
|
||||
\twocolitem{\windowstyle{wxHF\_MERGE\_BOOKS}}{Contents pane does not show
|
||||
book nodes. All books are merged together and appear as single book to the
|
||||
user.}
|
||||
\twocolitem{\windowstyle{wxHF\_ICONS\_BOOK}}{All nodes in contents pane
|
||||
have a book icon. This is how Microsoft's HTML help viewer behaves.}
|
||||
\twocolitem{\windowstyle{wxHF\_ICONS\_FOLDER}}{Book nodes in contents pane have
|
||||
a book icon, book's sections have a folder icon. This is the default.}
|
||||
\twocolitem{\windowstyle{wxHF\_ICONS\_BOOK\_CHAPTER}}{Both book nodes and
|
||||
nodes of top-level sections of a book (i.e. chapters) have a book icon,
|
||||
all other sections (sections, subsections, ...) have a folder icon.}
|
||||
\twocolitem{\windowstyle{wxHF\_DEFAULT\_STYLE}}{{\tt wxHF\_TOOLBAR | wxHF\_CONTENTS
|
||||
| wxHF\_INDEX | wxHF\_SEARCH | wxHF\_BOOKMARKS | wxHF\_PRINT}}
|
||||
\end{twocollist}
|
||||
|
||||
\membersection{wxHtmlHelpFrame::Create}\label{wxhtmlhelpframecreate}
|
||||
|
||||
\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID }{id}, \param{const wxString\& }{title = wxEmptyString}, \param{int }{style = wxHF\_DEFAULT\_STYLE}}
|
||||
|
||||
Creates the frame. See \helpref{the constructor}{wxhtmlhelpframewxhtmlhelpframe}
|
||||
for parameters description.
|
||||
|
||||
\membersection{wxHtmlHelpFrame::CreateContents}\label{wxhtmlhelpframecreatecontents}
|
||||
|
||||
\func{void}{CreateContents}{\param{bool }{show\_progress = false}}
|
||||
|
||||
Creates contents panel. (May take some time.)
|
||||
|
||||
\membersection{wxHtmlHelpFrame::CreateIndex}\label{wxhtmlhelpframecreateindex}
|
||||
|
||||
\func{void}{CreateIndex}{\param{bool }{show\_progress = false}}
|
||||
|
||||
Creates index panel. (May take some time.)
|
||||
|
||||
\membersection{wxHtmlHelpFrame::CreateSearch}\label{wxhtmlhelpframecreatesearch}
|
||||
|
||||
\func{void}{CreateSearch}{\void}
|
||||
|
||||
Creates search panel.
|
||||
|
||||
\membersection{wxHtmlHelpFrame::Display}\label{wxhtmlhelpframedisplay}
|
||||
|
||||
\func{bool}{Display}{\param{const wxString\& }{x}}
|
||||
|
||||
\func{bool}{Display}{\param{const int }{id}}
|
||||
|
||||
Displays page x. If not found it will give the user the choice of
|
||||
searching books.
|
||||
Looking for the page runs in these steps:
|
||||
|
||||
\begin{enumerate}\itemsep=0pt
|
||||
\item try to locate file named x (if x is for example "doc/howto.htm")
|
||||
\item try to open starting page of book x
|
||||
\item try to find x in contents (if x is for example "How To ...")
|
||||
\item try to find x in index (if x is for example "How To ...")
|
||||
\end{enumerate}
|
||||
|
||||
The second form takes numeric ID as the parameter.
|
||||
(uses extension to MS format, <param name="ID" value=id>)
|
||||
|
||||
\pythonnote{The second form of this method is named DisplayId in
|
||||
wxPython.}
|
||||
|
||||
\membersection{wxHtmlHelpFrame::DisplayContents}\label{wxhtmlhelpframedisplaycontents}
|
||||
|
||||
\func{bool}{DisplayContents}{\void}
|
||||
|
||||
Displays contents panel.
|
||||
|
||||
\membersection{wxHtmlHelpFrame::DisplayIndex}\label{wxhtmlhelpframedisplayindex}
|
||||
|
||||
\func{bool}{DisplayIndex}{\void}
|
||||
|
||||
Displays index panel.
|
||||
|
||||
\membersection{wxHtmlHelpFrame::GetData}\label{wxhtmlhelpframegetdata}
|
||||
|
||||
\func{wxHtmlHelpData*}{GetData}{\void}
|
||||
|
||||
Return wxHtmlHelpData object.
|
||||
|
||||
\membersection{wxHtmlHelpFrame::KeywordSearch}\label{wxhtmlhelpframekeywordsearch}
|
||||
|
||||
\func{bool}{KeywordSearch}{\param{const wxString\& }{keyword}}
|
||||
|
||||
Search for given keyword.
|
||||
|
||||
\membersection{wxHtmlHelpFrame::ReadCustomization}\label{wxhtmlhelpframereadcustomization}
|
||||
|
||||
\func{void}{ReadCustomization}{\param{wxConfigBase* }{cfg}, \param{const wxString\& }{path = wxEmptyString}}
|
||||
|
||||
Reads user's settings for this frame (see \helpref{wxHtmlHelpController::ReadCustomization}{wxhtmlhelpcontrollerreadcustomization})
|
||||
|
||||
\membersection{wxHtmlHelpFrame::RefreshLists}\label{wxhtmlhelpframerefreshlists}
|
||||
|
||||
\func{void}{RefreshLists}{\param{bool }{show\_progress = false}}
|
||||
|
||||
Refresh all panels. This is necessary if a new book was added.
|
||||
|
||||
\membersection{wxHtmlHelpFrame::SetTitleFormat}\label{wxhtmlhelpframesettitleformat}
|
||||
|
||||
\func{void}{SetTitleFormat}{\param{const wxString\& }{format}}
|
||||
|
||||
Sets the frame's title format. {\it format} must contain exactly one "\%s"
|
||||
(it will be replaced by the page title).
|
||||
|
||||
\membersection{wxHtmlHelpFrame::UseConfig}\label{wxhtmlhelpframeuseconfig}
|
||||
|
||||
\func{void}{UseConfig}{\param{wxConfigBase* }{config}, \param{const wxString\& }{rootpath = wxEmptyString}}
|
||||
|
||||
Add books to search choice panel.
|
||||
|
||||
\membersection{wxHtmlHelpFrame::WriteCustomization}\label{wxhtmlhelpframewritecustomization}
|
||||
|
||||
\func{void}{WriteCustomization}{\param{wxConfigBase* }{cfg}, \param{const wxString\& }{path = wxEmptyString}}
|
||||
|
||||
Saves user's settings for this frame (see \helpref{wxHtmlHelpController::WriteCustomization}{wxhtmlhelpcontrollerwritecustomization}).
|
||||
|
||||
\membersection{wxHtmlHelpFrame::AddToolbarButtons}\label{wxhtmlhelpframeaddtoolbarbuttons}
|
||||
|
||||
\func{virtual void}{AddToolbarButtons}{\param{wxToolBar *}{toolBar}, \param{int }{style}}
|
||||
|
||||
You may override this virtual method to add more buttons into help frame's
|
||||
toolbar. {\it toolBar} is a pointer to the toolbar and {\it style} is the style
|
||||
flag as passed to Create method.
|
||||
|
||||
wxToolBar::Realize is called immediately after returning from this function.
|
||||
|
||||
See {\it samples/html/helpview} for an example.
|
||||
|
@@ -1,59 +0,0 @@
|
||||
\section{\class{wxHtmlLinkInfo}}\label{wxhtmllinkinfo}
|
||||
|
||||
This class stores all necessary information about hypertext
|
||||
links (as represented by {\tt <A>} tag in HTML documents). In
|
||||
current implementation it stores URL and target frame name.
|
||||
{\it Note that frames are not currently supported by wxHTML!}
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{Include files}
|
||||
|
||||
<wx/html/htmlcell.h>
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxHtmlLinkInfo::wxHtmlLinkInfo}\label{wxhtmllinkinfowxhtmllinkinfo}
|
||||
|
||||
\func{}{wxHtmlLinkInfo}{\void}
|
||||
|
||||
Default ctor.
|
||||
|
||||
\func{}{wxHtmlLinkInfo}{\param{const wxString\& }{href}, \param{const wxString\& }{target = wxEmptyString}}
|
||||
|
||||
Construct hypertext link from HREF (aka URL) and TARGET (name of target
|
||||
frame).
|
||||
|
||||
\membersection{wxHtmlLinkInfo::GetEvent}\label{wxhtmllinkinfogetevent}
|
||||
|
||||
\func{const wxMouseEvent *}{GetEvent}{\void}
|
||||
|
||||
Return pointer to event that generated OnLinkClicked event. Valid
|
||||
only within \helpref{wxHtmlWindow::OnLinkClicked}{wxhtmlwindowonlinkclicked},
|
||||
NULL otherwise.
|
||||
|
||||
\membersection{wxHtmlLinkInfo::GetHtmlCell}\label{wxhtmllinkinfogethtmlcell}
|
||||
|
||||
\func{const wxHtmlCell *}{GetHtmlCell}{\void}
|
||||
|
||||
Return pointer to the cell that was clicked. Valid
|
||||
only within \helpref{wxHtmlWindow::OnLinkClicked}{wxhtmlwindowonlinkclicked},
|
||||
NULL otherwise.
|
||||
|
||||
|
||||
\membersection{wxHtmlLinkInfo::GetHref}\label{wxhtmllinkinfogethref}
|
||||
|
||||
\func{wxString}{GetHref}{\void}
|
||||
|
||||
Return {\it HREF} value of the {\tt <A>} tag.
|
||||
|
||||
\membersection{wxHtmlLinkInfo::GetTarget}\label{wxhtmllinkinfogettarget}
|
||||
|
||||
\func{wxString}{GetTarget}{\void}
|
||||
|
||||
Return {\it TARGET} value of the {\tt <A>} tag (this value
|
||||
is used to specify in which frame should be the page pointed
|
||||
by \helpref{Href}{wxhtmllinkinfogethref} opened).
|
||||
|
@@ -1,82 +0,0 @@
|
||||
\subsection{Cells and Containers}\label{cells}
|
||||
|
||||
This article describes mechanism used by
|
||||
\helpref{wxHtmlWinParser}{wxhtmlwinparser} and
|
||||
\helpref{wxHtmlWindow}{wxhtmlwindow} to parse and display HTML documents.
|
||||
|
||||
\wxheading{Cells}
|
||||
|
||||
You can divide any text (or HTML) into small fragments. Let's call these
|
||||
fragments {\bf cells}. Cell is for example one word, horizontal line, image
|
||||
or any other part of document. Each cell has width and height (except special
|
||||
"magic" cells with zero dimensions - e.g. colour changers or font changers).
|
||||
|
||||
See \helpref{wxHtmlCell}{wxhtmlcell}.
|
||||
|
||||
\wxheading{Containers}
|
||||
|
||||
Container is kind of cell that may contain sub-cells. Its size depends
|
||||
on number and sizes of its sub-cells (and also depends on width of window).
|
||||
|
||||
See \helpref{wxHtmlContainerCell}{wxhtmlcontainercell},
|
||||
\helpref{wxHtmlCell::Layout}{wxhtmlcelllayout}.
|
||||
|
||||
\begin{comment}
|
||||
% Bitmap is corrupt!
|
||||
This image shows you cells and containers:
|
||||
|
||||
\helponly{\image{}{contbox.bmp}}
|
||||
\end{comment}
|
||||
\wxheading{Using Containers in Tag Handler}
|
||||
|
||||
\helpref{wxHtmlWinParser}{wxhtmlwinparser} provides a user-friendly way
|
||||
of managing containers. It is based on the idea of opening and closing containers.
|
||||
|
||||
Use \helpref{OpenContainer}{wxhtmlwinparseropencontainer} to open new
|
||||
a container {\it within an already opened container}. This new container is a
|
||||
{\it sub-container} of the old one. (If you want to create a new container with
|
||||
the same depth level you can call {\tt CloseContainer(); OpenContainer();}.)
|
||||
|
||||
Use \helpref{CloseContainer}{wxhtmlwinparserclosecontainer} to close the
|
||||
container. This doesn't create a new container with same depth level but
|
||||
it returns "control" to the parent container.
|
||||
|
||||
\begin{comment}
|
||||
% Bitmap corrupt!
|
||||
See explanation:
|
||||
|
||||
\helponly{\image{}{cont.bmp}}
|
||||
\end{comment}
|
||||
It is clear there must be same number of calls to
|
||||
OpenContainer as to CloseContainer...
|
||||
|
||||
\wxheading{Example}
|
||||
|
||||
This code creates a new paragraph (container at same depth level)
|
||||
with "Hello, world!":
|
||||
|
||||
\begin{verbatim}
|
||||
m_WParser -> CloseContainer();
|
||||
c = m_WParser -> OpenContainer();
|
||||
|
||||
m_WParser -> AddWord("Hello, ");
|
||||
m_WParser -> AddWord("world!");
|
||||
|
||||
m_WParser -> CloseContainer();
|
||||
m_WParser -> OpenContainer();
|
||||
\end{verbatim}
|
||||
|
||||
\begin{comment}
|
||||
% Bitmap corrupt!
|
||||
and here is image of the situation:
|
||||
|
||||
\helponly{\image{}{hello.bmp}}
|
||||
\end{comment}
|
||||
|
||||
You can see that there was opened container before running the code. We closed
|
||||
it, created our own container, then closed our container and opened
|
||||
new container. The result was that we had {\it same depth level} after
|
||||
executing. This is general rule that should be followed by tag handlers:
|
||||
leave depth level of containers unmodified (in other words, number of
|
||||
OpenContainer and CloseContainer calls should be same within \helpref{HandleTag}{wxhtmltaghandlerhandletag}'s body).
|
||||
|
@@ -1,10 +0,0 @@
|
||||
\subsection{Input Filters}\label{filters}
|
||||
|
||||
The wxHTML library provides a mechanism for reading and displaying
|
||||
files of many different file formats.
|
||||
|
||||
\helpref{wxHtmlWindow::LoadPage}{wxhtmlwindowloadpage} can load not
|
||||
only HTML files but any known file. To make a file type known to wxHtmlWindow
|
||||
you must create a \helpref{wxHtmlFilter}{wxhtmlfilter} filter and
|
||||
register it using \helpref{wxHtmlWindow::AddFilter}{wxhtmlwindowaddfilter}.
|
||||
|
@@ -1,146 +0,0 @@
|
||||
\subsection{Tag Handlers}\label{handlers}
|
||||
|
||||
The wxHTML library provides architecture of pluggable {\it tag handlers}.
|
||||
Tag handler is class that understands particular HTML tag (or tags) and is
|
||||
able to interpret it.
|
||||
|
||||
\helpref{wxHtmlWinParser}{wxhtmlwinparser} has static table of {\bf modules}.
|
||||
Each module contains one or more tag handlers. Each time a new wxHtmlWinParser
|
||||
object is constructed all modules are scanned and handlers are added
|
||||
to wxHtmlParser's list of available handlers (note: wxHtmlParser's list
|
||||
is non-static).
|
||||
|
||||
\wxheading{How it works}
|
||||
|
||||
Common tag handler's \helpref{HandleTag}{wxhtmltaghandlerhandletag} method
|
||||
works in four steps:
|
||||
|
||||
\begin{enumerate}\itemsep=0pt
|
||||
\item Save state of parent parser into local variables
|
||||
\item Change parser state according to tag's params
|
||||
\item Parse text between the tag and paired ending tag (if present)
|
||||
\item Restore original parser state
|
||||
\end{enumerate}
|
||||
|
||||
See \helpref{wxHtmlWinParser}{wxhtmlwinparser} for methods for modifying
|
||||
parser's state. In general you can do things like opening/closing containers,
|
||||
changing colors, fonts etc.
|
||||
|
||||
\wxheading{Providing own tag handlers}
|
||||
|
||||
You should create new .cpp file and place following lines into it:
|
||||
|
||||
\begin{verbatim}
|
||||
#include <mod_templ.h>
|
||||
#include <forcelink.h>
|
||||
FORCE_LINK_ME(yourmodulefilenamewithoutcpp)
|
||||
\end{verbatim}
|
||||
|
||||
Then you must define handlers and one module.
|
||||
|
||||
\wxheading{Tag handlers}
|
||||
|
||||
The handler is derived from \helpref{wxHtmlWinTagHandler}{wxhtmlwintaghandler}
|
||||
(or directly from \helpref{wxHtmlTagHandler}{wxhtmltaghandler})
|
||||
|
||||
You can use set of macros to define the handler (see src/html/m\_*.cpp files
|
||||
for details). Handler definition must start with {\bf TAG\_HANDLER\_BEGIN} macro
|
||||
and end with {\bf TAG\_HANDLER\_END} macro. I strongly recommend to have a look
|
||||
at {\it include/wxhtml/mod\_templ.h} file. Otherwise you won't understand
|
||||
the structure of macros. See macros reference:
|
||||
|
||||
{\bf TAG\_HANDLER\_BEGIN}({\it name}, {\it tags})
|
||||
|
||||
Starts handler definition. {\it name} is handler identifier (in fact
|
||||
part of class name), {\it tags} is string containing list of tags
|
||||
supported by this handler (in uppercase). This macro derives new class from
|
||||
wxHtmlWinTagHandler and implements it is
|
||||
\helpref{GetSupportedTags}{wxhtmltaghandlergetsupportedtags} method.
|
||||
|
||||
Example: TAG\_HANDLER\_BEGIN(FONTS, "B,I,U,T")
|
||||
|
||||
{\bf TAG\_HANDLER\_VARS}
|
||||
|
||||
This macro starts block of variables definitions. (Variables are identical
|
||||
to class attributes.) Example:
|
||||
|
||||
\begin{verbatim}
|
||||
TAG_HANDLER_BEGIN(VARS_ONLY, "CRAZYTAG")
|
||||
TAG_HANDLER_VARS
|
||||
int my_int_var;
|
||||
wxString something_else;
|
||||
TAG_HANDLER_END(VARS_ONLY)
|
||||
\end{verbatim}
|
||||
|
||||
This macro is used only in rare cases.
|
||||
|
||||
{\bf TAG\_HANDLER\_CONSTR}({\it name})
|
||||
|
||||
This macro supplies object constructor. {\it name} is same name as the one
|
||||
from TAG\_HANDLER\_BEGIN macro. Body of constructor follow after
|
||||
this macro (you must use { and } ). Example:
|
||||
|
||||
\begin{verbatim}
|
||||
TAG_HANDLER_BEGIN(VARS2, "CRAZYTAG")
|
||||
TAG_HANDLER_VARS
|
||||
int my_int_var;
|
||||
TAG_HANDLER_CONSTR(vars2)
|
||||
{ // !!!!!!
|
||||
my_int_var = 666;
|
||||
} // !!!!!!
|
||||
TAG_HANDLER_END(VARS2)
|
||||
\end{verbatim}
|
||||
|
||||
Never used in wxHTML :-)
|
||||
|
||||
{\bf TAG\_HANDLER\_PROC}({\it varib})
|
||||
|
||||
This is very important macro. It defines \helpref{HandleTag}{wxhtmltaghandlerhandletag}
|
||||
method. {\it varib} is name of parameter passed to the method, usually
|
||||
{\it tag}. Body of method follows after this macro.
|
||||
Note than you must use { and } ! Example:
|
||||
|
||||
\begin{verbatim}
|
||||
TAG_HANDLER_BEGIN(TITLE, "TITLE")
|
||||
TAG_HANDLER_PROC(tag)
|
||||
{
|
||||
printf("TITLE found...\n");
|
||||
}
|
||||
TAG_HANDLER_END(TITLE)
|
||||
\end{verbatim}
|
||||
|
||||
{\bf TAG\_HANDLER\_END}({\it name})
|
||||
|
||||
Ends definition of tag handler {\it name}.
|
||||
|
||||
\wxheading{Tags Modules}
|
||||
|
||||
You can use set of 3 macros TAGS\_MODULE\_BEGIN, TAGS\_MODULE\_ADD and
|
||||
TAGS\_MODULE\_END to inherit new module from
|
||||
\helpref{wxHtmlTagsModule}{wxhtmltagsmodule} and to create instance of it.
|
||||
See macros reference:
|
||||
|
||||
{\bf TAGS\_MODULE\_BEGIN}({\it modname})
|
||||
|
||||
Begins module definition. {\it modname} is part of class name and must
|
||||
be unique.
|
||||
|
||||
{\bf TAGS\_MODULE\_ADD}({\it name})
|
||||
|
||||
Adds the handler to this module. {\it name} is the identifier from
|
||||
TAG\_HANDLER\_BEGIN.
|
||||
|
||||
{\bf TAGS\_MODULE\_END}({\it modname})
|
||||
|
||||
Ends the definition of module.
|
||||
|
||||
{\bf Example:}
|
||||
|
||||
\begin{verbatim}
|
||||
TAGS_MODULE_BEGIN(Examples)
|
||||
TAGS_MODULE_ADD(VARS_ONLY)
|
||||
TAGS_MODULE_ADD(VARS2)
|
||||
TAGS_MODULE_ADD(TITLE)
|
||||
TAGS_MODULE_END(Examples)
|
||||
\end{verbatim}
|
||||
|
@@ -1,96 +0,0 @@
|
||||
\subsection{Help Files Format}\label{helpformat}
|
||||
|
||||
wxHTML library uses a reduced version of MS HTML Workshop format.
|
||||
Tex2RTF can produce these files when generating HTML, if you set {\bf htmlWorkshopFiles} to {\bf true} in
|
||||
your tex2rtf.ini file.
|
||||
|
||||
(See \helpref{wxHtmlHelpController}{wxhtmlhelpcontroller} for help controller description.)
|
||||
|
||||
A {\bf book} consists of three files: header file, contents file and index file.
|
||||
You can make a regular zip archive of these files, plus the HTML and any image files,
|
||||
for wxHTML (or helpview) to read; and the .zip file can optionally be renamed to .htb.
|
||||
|
||||
\wxheading{Header file (.hhp)}
|
||||
|
||||
Header file must contain these lines (and may contain additional lines which are ignored) :
|
||||
|
||||
\begin{verbatim}
|
||||
Contents file=<filename.hhc>
|
||||
Index file=<filename.hhk>
|
||||
Title=<title of your book>
|
||||
Default topic=<default page to be displayed.htm>
|
||||
\end{verbatim}
|
||||
|
||||
All filenames (including the Default topic) are relative to the
|
||||
location of .hhp file.
|
||||
|
||||
{\bf Localization note:} In addition, .hhp file may contain line
|
||||
|
||||
\begin{verbatim}
|
||||
Charset=<rfc_charset>
|
||||
\end{verbatim}
|
||||
|
||||
which specifies what charset (e.g. "iso8859\_1") was used in contents
|
||||
and index files. Please note that this line is incompatible with
|
||||
MS HTML Help Workshop and it would either silently remove it or complain
|
||||
with some error. See also
|
||||
\helpref{Writing non-English applications}{nonenglishoverview}.
|
||||
|
||||
\wxheading{Contents file (.hhc)}
|
||||
|
||||
Contents file has HTML syntax and it can be parsed by regular HTML parser. It contains exactly one list
|
||||
({\tt <ul>}....{\tt </ul>} statement):
|
||||
|
||||
\begin{verbatim}
|
||||
<ul>
|
||||
|
||||
<li> <object type="text/sitemap">
|
||||
<param name="Name" value="@topic name@">
|
||||
<param name="ID" value=@numeric_id@>
|
||||
<param name="Local" value="@filename.htm@">
|
||||
</object>
|
||||
<li> <object type="text/sitemap">
|
||||
<param name="Name" value="@topic name@">
|
||||
<param name="ID" value=@numeric_id@>
|
||||
<param name="Local" value="@filename.htm@">
|
||||
</object>
|
||||
...
|
||||
|
||||
</ul>
|
||||
\end{verbatim}
|
||||
|
||||
You can modify value attributes of param tags. {\it topic name} is name of chapter/topic as is displayed in
|
||||
contents, {\it filename.htm} is HTML page name (relative to .hhp file) and {\it numeric\_id} is optional
|
||||
- it is used only when you use \helpref{wxHtmlHelpController::Display(int)}{wxhtmlhelpcontrollerdisplay}
|
||||
|
||||
Items in the list may be nested - one {\tt <li>} statement may contain a {\tt <ul>} sub-statement:
|
||||
|
||||
\begin{verbatim}
|
||||
<ul>
|
||||
|
||||
<li> <object type="text/sitemap">
|
||||
<param name="Name" value="Top node">
|
||||
<param name="Local" value="top.htm">
|
||||
</object>
|
||||
<ul>
|
||||
<li> <object type="text/sitemap">
|
||||
<param name="Name" value="subnode in topnode">
|
||||
<param name="Local" value="subnode1.htm">
|
||||
</object>
|
||||
...
|
||||
</ul>
|
||||
|
||||
<li> <object type="text/sitemap">
|
||||
<param name="Name" value="Another Top">
|
||||
<param name="Local" value="top2.htm">
|
||||
</object>
|
||||
...
|
||||
|
||||
</ul>
|
||||
\end{verbatim}
|
||||
|
||||
\wxheading{Index file (.hhk)}
|
||||
|
||||
Index files have same format as contents file except that ID params are ignored and sublists are {\bf not}
|
||||
allowed.
|
||||
|
@@ -1,82 +0,0 @@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%% Name: htmllbox.tex
|
||||
%% Purpose: wxHtmlListBox documentation
|
||||
%% Author: Vadim Zeitlin
|
||||
%% Modified by:
|
||||
%% Created: 01.06.03
|
||||
%% RCS-ID: $Id$
|
||||
%% Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwindows.org>
|
||||
%% License: wxWindows license
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
\section{\class{wxHtmlListBox}}\label{wxhtmllistbox}
|
||||
|
||||
wxHtmlListBox is an implementation of \helpref{wxVListBox}{wxvlistbox} which
|
||||
shows HTML content in the listbox rows. This is still an abstract base class
|
||||
and you will need to derive your own class from it (see htlbox sample for the
|
||||
example) but you will only need to override a single
|
||||
\helpref{OnGetItem()}{wxhtmllistboxongetitem} function.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxVListBox}{wxvlistbox}
|
||||
|
||||
\wxheading{Include files}
|
||||
|
||||
<wx/htmllbox.h>
|
||||
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
|
||||
\membersection{wxHtmlListBox::wxHtmlListBox}\label{wxhtmllistboxwxhtmllistbox}
|
||||
|
||||
\func{}{wxHtmlListBox}{\param{wxWindow* }{parent}, \param{wxWindowID }{id = wxID\_ANY}, \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize}, \param{size\_t }{countItems = 0}, \param{long }{style = 0}, \param{const wxString\& }{name = wxVListBoxNameStr}}
|
||||
|
||||
Normal constructor which calls \helpref{Create()}{wxhtmllistboxcreate}
|
||||
internally.
|
||||
|
||||
\func{}{wxHtmlListBox}{\void}
|
||||
|
||||
Default constructor, you must call \helpref{Create()}{wxhtmllistboxcreate}
|
||||
later.
|
||||
|
||||
|
||||
\membersection{wxHtmlListBox::\destruct{wxHtmlListBox}}\label{wxhtmllistboxdtor}
|
||||
|
||||
\func{}{\destruct{wxHtmlListBox}}{\void}
|
||||
|
||||
Destructor cleans up whatever resources we use.
|
||||
|
||||
|
||||
\membersection{wxHtmlListBox::Create}\label{wxhtmllistboxcreate}
|
||||
|
||||
\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID }{id = wxID\_ANY}, \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize}, \param{size\_t }{countItems = 0}, \param{long }{style = 0}, \param{const wxString\& }{name = wxVListBoxNameStr}}
|
||||
|
||||
Creates the control and optionally sets the initial number of items in it
|
||||
(it may also be set or changed later with
|
||||
\helpref{SetItemCount()}{wxvlistboxsetitemcount}).
|
||||
|
||||
There are no special styles defined for wxHtmlListBox, in particular the
|
||||
wxListBox styles can not be used here.
|
||||
|
||||
Returns {\tt true} on success or {\tt false} if the control couldn't be created
|
||||
|
||||
|
||||
|
||||
\membersection{wxHtmlListBox::OnGetItem}\label{wxhtmllistboxongetitem}
|
||||
|
||||
\constfunc{wxString}{OnGetItem}{\param{size\_t }{n}}
|
||||
|
||||
This method must be implemented in the derived class and should return
|
||||
the body (i.e. without {\tt <html>} nor {\tt <body>} tags) of the HTML fragment
|
||||
for the given item.
|
||||
|
||||
|
||||
\membersection{wxHtmlListBox::OnGetItemMarkup}\label{wxhtmllistboxongetitemmarkup}
|
||||
|
||||
\constfunc{wxString}{OnGetItemMarkup}{\param{size\_t }{n}}
|
||||
|
||||
This function may be overridden to decorate HTML returned by
|
||||
\helpref{OnGetItem()}{wxhtmllistboxongetitem}.
|
||||
|
@@ -1,13 +0,0 @@
|
||||
\subsection{HTML Printing}\label{printing}
|
||||
|
||||
The wxHTML library provides printing facilities with several levels of complexity.
|
||||
|
||||
The easiest way to print an HTML document is to use
|
||||
\helpref{wxHtmlEasyPrinting class}{wxhtmleasyprinting}. It lets you print HTML documents with only one
|
||||
command and you don't have to worry about deriving from the wxPrintout class at all. It is only a simple wrapper around the
|
||||
\helpref{wxHtmlPrintout}{wxhtmlprintout}, normal wxWindows printout class.
|
||||
|
||||
And finally there is the low level class \helpref{wxHtmlDCRenderer}{wxhtmldcrenderer} which you can use to
|
||||
render HTML into a rectangular area on any DC. It supports rendering into multiple rectangles with the same
|
||||
width. (The most common use of this is placing one rectangle on each page or printing into two columns.)
|
||||
|
@@ -1,68 +0,0 @@
|
||||
\subsection{wxHTML quick start}\label{wxhtmlquickstart}
|
||||
|
||||
\wxheading{Displaying HMTL}
|
||||
|
||||
First of all, you must include <wx/wxhtml.h>.
|
||||
|
||||
Class \helpref{wxHtmlWindow}{wxhtmlwindow} (derived from wxScrolledWindow)
|
||||
is used to display HTML documents.
|
||||
It has two important methods: \helpref{LoadPage}{wxhtmlwindowloadpage}
|
||||
and \helpref{SetPage}{wxhtmlwindowsetpage}.
|
||||
LoadPage loads and displays HTML file while SetPage displays directly the
|
||||
passed {\bf string}. See the example:
|
||||
|
||||
\begin{verbatim}
|
||||
mywin -> LoadPage("test.htm");
|
||||
mywin -> SetPage("<html><body>"
|
||||
"<h1>Error</h1>"
|
||||
"Some error occurred :-H)"
|
||||
"</body></hmtl>");
|
||||
\end{verbatim}
|
||||
|
||||
I think the difference is quite clear.
|
||||
|
||||
\wxheading{Displaying Help}
|
||||
|
||||
See \helpref{wxHtmlHelpController}{wxhtmlhelpcontroller}.
|
||||
|
||||
\wxheading{Setting up wxHtmlWindow}
|
||||
|
||||
Because wxHtmlWindow is derived from wxScrolledWindow and not from
|
||||
wxFrame, it doesn't have visible frame. But the user usually want to see
|
||||
the title of HTML page displayed somewhere and frame's titlebar is
|
||||
ideal place for it.
|
||||
|
||||
wxHtmlWindow provides 2 methods in order to handle this:
|
||||
\helpref{SetRelatedFrame}{wxhtmlwindowsetrelatedframe} and
|
||||
\helpref{SetRelatedStatusBar}{wxhtmlwindowsetrelatedstatusbar}.
|
||||
See the example:
|
||||
|
||||
\begin{verbatim}
|
||||
html = new wxHtmlWindow(this);
|
||||
html -> SetRelatedFrame(this, "HTML : %%s");
|
||||
html -> SetRelatedStatusBar(0);
|
||||
\end{verbatim}
|
||||
|
||||
The first command associates html object with it is parent frame
|
||||
(this points to wxFrame object there) and sets format of title.
|
||||
Page title "Hello, world!" will be displayed as "HTML : Hello, world!"
|
||||
in this example.
|
||||
|
||||
The second command sets which frame's status bar should be used to display
|
||||
browser's messages (such as "Loading..." or "Done" or hypertext links).
|
||||
|
||||
\wxheading{Customizing wxHtmlWindow}
|
||||
|
||||
You can customize wxHtmlWindow by setting font size, font face and
|
||||
borders (space between border of window and displayed HTML). Related functions:
|
||||
|
||||
\begin{itemize}\itemsep=0pt
|
||||
\item \helpref{SetFonts}{wxhtmlwindowsetfonts}
|
||||
\item \helpref{SetBorders}{wxhtmlwindowsetborders}
|
||||
\item \helpref{ReadCustomization}{wxhtmlwindowreadcustomization}
|
||||
\item \helpref{WriteCustomization}{wxhtmlwindowwritecustomization}
|
||||
\end{itemize}
|
||||
|
||||
The last two functions are used to store user customization info wxConfig stuff
|
||||
(for example in the registry under Windows, or in a dotfile under Unix).
|
||||
|
@@ -1,148 +0,0 @@
|
||||
\subsection{Tags supported by wxHTML}\label{htmltagssupported}
|
||||
|
||||
wxHTML is not full implementation of HTML standard. Instead, it supports most common tags so that it
|
||||
is possible to display {\it simple} HTML documents with it. (For example it works fine with pages created
|
||||
in Netscape Composer or generated by tex2rtf).
|
||||
|
||||
Following tables list all tags known to wxHTML, together with supported parameters.
|
||||
A tag has general form of {\tt <tagname param\_1 param\_2 ... param\_n>} where param\_i is
|
||||
either {\tt paramname="paramvalue"} or {\tt paramname=paramvalue} - these two are equivalent. Unless stated
|
||||
otherwise, wxHTML is case-insensitive.
|
||||
|
||||
\wxheading{Table of common parameter values}
|
||||
|
||||
We will use these substitutions in tags descriptions:
|
||||
|
||||
\begin{verbatim}
|
||||
[alignment] CENTER
|
||||
LEFT
|
||||
RIGHT
|
||||
JUSTIFY
|
||||
|
||||
[v_alignment] TOP
|
||||
BOTTOM
|
||||
CENTER
|
||||
|
||||
[color] HTML 4.0-compliant colour specification
|
||||
|
||||
[fontsize] -2
|
||||
-1
|
||||
+0
|
||||
+1
|
||||
+2
|
||||
+3
|
||||
+4
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
|
||||
[pixels] integer value that represents dimension in pixels
|
||||
|
||||
[percent] i%
|
||||
where i is integer
|
||||
|
||||
[url] an URL
|
||||
|
||||
[string] text string
|
||||
|
||||
[coords] c(1),c(2),c(3),...,c(n)
|
||||
where c(i) is integer
|
||||
|
||||
\end{verbatim}
|
||||
|
||||
|
||||
\wxheading{List of supported tags}
|
||||
|
||||
\begin{verbatim}
|
||||
|
||||
A NAME=[string]
|
||||
HREF=[url]
|
||||
TARGET=[target window spec]
|
||||
ADDRESS
|
||||
AREA SHAPE=POLY
|
||||
SHAPE=CIRCLE
|
||||
SHAPE=RECT
|
||||
COORDS=[coords]
|
||||
HREF=[url]
|
||||
B
|
||||
BIG
|
||||
BLOCKQUOTE
|
||||
BODY TEXT=[color]
|
||||
LINK=[color]
|
||||
BGCOLOR=[color]
|
||||
BR ALIGN=[alignment]
|
||||
CENTER
|
||||
CITE
|
||||
CODE
|
||||
DD
|
||||
DIV ALIGN=[alignment]
|
||||
DL
|
||||
DT
|
||||
EM
|
||||
FONT COLOR=[color]
|
||||
SIZE=[fontsize]
|
||||
FACE=[comma-separated list of facenames]
|
||||
HR ALIGN=[alignment]
|
||||
SIZE=[pixels]
|
||||
WIDTH=[percent|pixels]
|
||||
NOSHADE
|
||||
H1
|
||||
H2
|
||||
H3
|
||||
H4
|
||||
H5
|
||||
H6
|
||||
I
|
||||
IMG SRC=[url]
|
||||
WIDTH=[pixels]
|
||||
HEIGHT=[pixels]
|
||||
ALIGN=TEXTTOP
|
||||
ALIGN=CENTER
|
||||
ALIGN=ABSCENTER
|
||||
ALIGN=BOTTOM
|
||||
USEMAP=[url]
|
||||
KBD
|
||||
LI
|
||||
MAP NAME=[string]
|
||||
META HTTP-EQUIV="Content-Type"
|
||||
CONTENT=[string]
|
||||
OL
|
||||
P ALIGN=[alignment]
|
||||
PRE
|
||||
SAMP
|
||||
SMALL
|
||||
STRIKE
|
||||
STRONG
|
||||
TABLE ALIGN=[alignment]
|
||||
WIDTH=[percent|pixels]
|
||||
BORDER=[pixels]
|
||||
VALIGN=[v_alignment]
|
||||
BGCOLOR=[color]
|
||||
CELLSPACING=[pixels]
|
||||
CELLPADDING=[pixels]
|
||||
TD ALIGN=[alignment]
|
||||
VALIGN=[v_alignment]
|
||||
BGCOLOR=[color]
|
||||
WIDTH=[percent|pixels]
|
||||
COLSPAN=[pixels]
|
||||
ROWSPAN=[pixels]
|
||||
TH ALIGN=[alignment]
|
||||
VALIGN=[v_alignment]
|
||||
BGCOLOR=[color]
|
||||
WIDTH=[percent|pixels]
|
||||
COLSPAN=[pixels]
|
||||
ROWSPAN=[pixels]
|
||||
TITLE
|
||||
TR ALIGN=[alignment]
|
||||
VALIGN=[v_alignment]
|
||||
BGCOLOR=[color]
|
||||
TT
|
||||
U
|
||||
UL
|
||||
|
||||
\end{verbatim}
|
||||
|
@@ -1,267 +0,0 @@
|
||||
%
|
||||
% automatically generated by HelpGen from
|
||||
% htmlparser.tex at 14/Mar/99 20:13:37
|
||||
%
|
||||
|
||||
\section{\class{wxHtmlParser}}\label{wxhtmlparser}
|
||||
|
||||
This class handles the {\bf generic} parsing of HTML document: it scans
|
||||
the document and divide it into blocks of tags (where one block
|
||||
consists of beginning and ending tag and of text between these
|
||||
two tags).
|
||||
|
||||
It is independent from wxHtmlWindow and can be used as stand-alone parser
|
||||
(Julian Smart's idea of speech-only HTML viewer or wget-like utility -
|
||||
see InetGet sample for example).
|
||||
|
||||
It uses system of tag handlers to parse the HTML document. Tag handlers
|
||||
are not statically shared by all instances but are created for each
|
||||
wxHtmlParser instance. The reason is that the handler may contain
|
||||
document-specific temporary data used during parsing (e.g. complicated
|
||||
structures like tables).
|
||||
|
||||
Typically the user calls only the \helpref{Parse}{wxhtmlparserparse} method.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
wxObject
|
||||
|
||||
\wxheading{Include files}
|
||||
|
||||
<wx/html/htmlpars.h>
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{Cells Overview}{cells},
|
||||
\helpref{Tag Handlers Overview}{handlers},
|
||||
\helpref{wxHtmlTag}{wxhtmltag}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxHtmlParser::wxHtmlParser}\label{wxhtmlparserwxhtmlparser}
|
||||
|
||||
\func{}{wxHtmlParser}{\void}
|
||||
|
||||
Constructor.
|
||||
|
||||
\membersection{wxHtmlParser::AddTag}\label{wxhtmlparseraddtag}
|
||||
|
||||
\func{void}{AddTag}{\param{const wxHtmlTag\& }{tag}}
|
||||
|
||||
This may (and may not) be overwritten in derived class.
|
||||
|
||||
This method is called each time new tag is about to be added.
|
||||
{\it tag} contains information about the tag. (See \helpref{wxHtmlTag}{wxhtmltag}
|
||||
for details.)
|
||||
|
||||
Default (wxHtmlParser) behaviour is this:
|
||||
First it finds a handler capable of handling this tag and then it calls
|
||||
handler's HandleTag method.
|
||||
|
||||
\membersection{wxHtmlParser::AddTagHandler}\label{wxhtmlparseraddtaghandler}
|
||||
|
||||
\func{virtual void}{AddTagHandler}{\param{wxHtmlTagHandler }{*handler}}
|
||||
|
||||
Adds handler to the internal list (\& hash table) of handlers. This
|
||||
method should not be called directly by user but rather by derived class'
|
||||
constructor.
|
||||
|
||||
This adds the handler to this {\bf instance} of wxHtmlParser, not to
|
||||
all objects of this class! (Static front-end to AddTagHandler is provided
|
||||
by wxHtmlWinParser).
|
||||
|
||||
All handlers are deleted on object deletion.
|
||||
|
||||
\membersection{wxHtmlParser::AddText}\label{wxhtmlparseraddword}
|
||||
|
||||
\func{virtual void}{AddWord}{\param{const char* }{txt}}
|
||||
|
||||
Must be overwritten in derived class.
|
||||
|
||||
This method is called by \helpref{DoParsing}{wxhtmlparserdoparsing}
|
||||
each time a part of text is parsed. {\it txt} is NOT only one word, it is
|
||||
substring of input. It is not formatted or preprocessed (so white spaces are
|
||||
unmodified).
|
||||
|
||||
\membersection{wxHtmlParser::DoParsing}\label{wxhtmlparserdoparsing}
|
||||
|
||||
\func{void}{DoParsing}{\param{int }{begin\_pos}, \param{int }{end\_pos}}
|
||||
|
||||
\func{void}{DoParsing}{\void}
|
||||
|
||||
Parses the m\_Source from begin\_pos to end\_pos-1.
|
||||
(in noparams version it parses whole m\_Source)
|
||||
|
||||
\membersection{wxHtmlParser::DoneParser}\label{wxhtmlparserdoneparser}
|
||||
|
||||
\func{virtual void}{DoneParser}{\void}
|
||||
|
||||
This must be called after DoParsing().
|
||||
|
||||
\membersection{wxHtmlParser::GetFS}\label{wxhtmlparsergetfs}
|
||||
|
||||
\constfunc{wxFileSystem*}{GetFS}{\void}
|
||||
|
||||
Returns pointer to the file system. Because each tag handler has
|
||||
reference to it is parent parser it can easily request the file by
|
||||
calling
|
||||
|
||||
\begin{verbatim}
|
||||
wxFSFile *f = m_Parser -> GetFS() -> OpenFile("image.jpg");
|
||||
\end{verbatim}
|
||||
|
||||
\membersection{wxHtmlParser::GetProduct}\label{wxhtmlparsergetproduct}
|
||||
|
||||
\func{virtual wxObject*}{GetProduct}{\void}
|
||||
|
||||
Returns product of parsing. Returned value is result of parsing
|
||||
of the document. The type of this result depends on internal
|
||||
representation in derived parser (but it must be derived from wxObject!).
|
||||
|
||||
See wxHtmlWinParser for details.
|
||||
|
||||
\membersection{wxHtmlParser::GetSource}\label{wxhtmlparsergetsource}
|
||||
|
||||
\func{wxString*}{GetSource}{\void}
|
||||
|
||||
Returns pointer to the source being parsed.
|
||||
|
||||
|
||||
\membersection{wxHtmlParser::InitParser}\label{wxhtmlparserinitparser}
|
||||
|
||||
\func{virtual void}{InitParser}{\param{const wxString\& }{source}}
|
||||
|
||||
Setups the parser for parsing the {\it source} string. (Should be overridden
|
||||
in derived class)
|
||||
|
||||
\membersection{wxHtmlParser::OpenURL}\label{wxhtmlparseropenurl}
|
||||
|
||||
\func{virtual wxFSFile*}{OpenURL}{\param{wxHtmlURLType }{type}, \param{const wxString\& }{url}}
|
||||
|
||||
Opens given URL and returns {\tt wxFSFile} object that can be used to read data
|
||||
from it. This method may return NULL in one of two cases: either the URL doesn't
|
||||
point to any valid resource or the URL is blocked by overridden implementation
|
||||
of {\it OpenURL} in derived class.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{type}{Indicates type of the resource. Is one of
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{{\bf wxHTML\_URL\_PAGE}}{Opening a HTML page.}
|
||||
\twocolitem{{\bf wxHTML\_URL\_IMAGE}}{Opening an image.}
|
||||
\twocolitem{{\bf wxHTML\_URL\_OTHER}}{Opening a resource that doesn't fall into
|
||||
any other category.}
|
||||
\end{twocollist}}
|
||||
|
||||
\docparam{url}{URL being opened.}
|
||||
|
||||
\wxheading{Notes}
|
||||
|
||||
Always use this method in tag handlers instead of {\tt GetFS()->OpenFile()}
|
||||
because it can block the URL and is thus more secure.
|
||||
|
||||
Default behaviour is to call \helpref{wxHtmlWindow::OnOpeningURL}{wxhtmlwindowonopeningurl}
|
||||
of the associated wxHtmlWindow object (which may decide to block the URL or
|
||||
redirect it to another one),if there's any, and always open the URL if the
|
||||
parser is not used with wxHtmlWindow.
|
||||
|
||||
Returned {\tt wxFSFile} object is not guaranteed to point to {\it url}, it might
|
||||
have been redirected!
|
||||
|
||||
\membersection{wxHtmlParser::Parse}\label{wxhtmlparserparse}
|
||||
|
||||
\func{wxObject*}{Parse}{\param{const wxString\& }{source}}
|
||||
|
||||
Proceeds parsing of the document. This is end-user method. You can simply
|
||||
call it when you need to obtain parsed output (which is parser-specific)
|
||||
|
||||
The method does these things:
|
||||
|
||||
\begin{enumerate}\itemsep=0pt
|
||||
\item calls \helpref{InitParser(source)}{wxhtmlparserinitparser}
|
||||
\item calls \helpref{DoParsing}{wxhtmlparserdoparsing}
|
||||
\item calls \helpref{GetProduct}{wxhtmlparsergetproduct}
|
||||
\item calls \helpref{DoneParser}{wxhtmlparserdoneparser}
|
||||
\item returns value returned by GetProduct
|
||||
\end{enumerate}
|
||||
|
||||
You shouldn't use InitParser, DoParsing, GetProduct or DoneParser directly.
|
||||
|
||||
|
||||
|
||||
\membersection{wxHtmlParser::PushTagHandler}\label{wxhtmlparserpushtaghandler}
|
||||
|
||||
\func{void}{PushTagHandler}{\param{wxHtmlTagHandler* }{handler}, \param{wxString }{tags}}
|
||||
|
||||
Forces the handler to handle additional tags
|
||||
(not returned by \helpref{GetSupportedTags}{wxhtmltaghandlergetsupportedtags}).
|
||||
The handler should already be added to this parser.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{handler}{the handler}
|
||||
\docparam{tags}{List of tags (in same format as GetSupportedTags's return value). The parser
|
||||
will redirect these tags to {\it handler} (until call to \helpref{PopTagHandler}{wxhtmlparserpoptaghandler}). }
|
||||
|
||||
\wxheading{Example}
|
||||
|
||||
Imagine you want to parse following pseudo-html structure:
|
||||
|
||||
\begin{verbatim}
|
||||
<myitems>
|
||||
<param name="one" value="1">
|
||||
<param name="two" value="2">
|
||||
</myitems>
|
||||
|
||||
<execute>
|
||||
<param program="text.exe">
|
||||
</execute>
|
||||
\end{verbatim}
|
||||
|
||||
It is obvious that you cannot use only one tag handler for <param> tag.
|
||||
Instead you must use context-sensitive handlers for <param> inside <myitems>
|
||||
and <param> inside <execute>.
|
||||
|
||||
This is the preferred solution:
|
||||
|
||||
\begin{verbatim}
|
||||
TAG_HANDLER_BEGIN(MYITEM, "MYITEMS")
|
||||
TAG_HANDLER_PROC(tag)
|
||||
{
|
||||
// ...something...
|
||||
|
||||
m_Parser -> PushTagHandler(this, "PARAM");
|
||||
ParseInner(tag);
|
||||
m_Parser -> PopTagHandler();
|
||||
|
||||
// ...something...
|
||||
}
|
||||
TAG_HANDLER_END(MYITEM)
|
||||
\end{verbatim}
|
||||
|
||||
|
||||
\membersection{wxHtmlParser::PopTagHandler}\label{wxhtmlparserpoptaghandler}
|
||||
|
||||
\func{void}{PopTagHandler}{\void}
|
||||
|
||||
Restores parser's state before last call to
|
||||
\helpref{PushTagHandler}{wxhtmlparserpushtaghandler}.
|
||||
|
||||
|
||||
\membersection{wxHtmlParser::SetFS}\label{wxhtmlparsersetfs}
|
||||
|
||||
\func{void}{SetFS}{\param{wxFileSystem }{*fs}}
|
||||
|
||||
Sets the virtual file system that will be used to request additional
|
||||
files. (For example {\tt <IMG>} tag handler requests wxFSFile with the
|
||||
image data.)
|
||||
|
||||
\membersection{wxHtmlParser::StopParsing}\label{wxhtmlparserstopparsing}
|
||||
|
||||
\func{void}{StopParsing}{\void}
|
||||
|
||||
Call this function to interrupt parsing from a tag handler. No more tags
|
||||
will be parsed afterward. This function may only be called from
|
||||
\helpref{wxHtmlParser::Parse}{wxhtmlparserparse} or any function called
|
||||
by it (i.e. from tag handlers).
|
||||
|
@@ -1,106 +0,0 @@
|
||||
%
|
||||
% automatically generated by HelpGen from
|
||||
% htmprint.h at 17/Oct/99 12:48:02
|
||||
%
|
||||
|
||||
|
||||
\section{\class{wxHtmlPrintout}}\label{wxhtmlprintout}
|
||||
|
||||
This class serves as printout class for HTML documents.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxPrintout}{wxprintout}
|
||||
|
||||
|
||||
\wxheading{Include files}
|
||||
|
||||
<wx/html/htmprint.h>
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
|
||||
\membersection{wxHtmlPrintout::wxHtmlPrintout}\label{wxhtmlprintoutwxhtmlprintout}
|
||||
|
||||
\func{}{wxHtmlPrintout}{\param{const wxString\& }{title = "Printout"}}
|
||||
|
||||
Constructor.
|
||||
|
||||
|
||||
\membersection{wxHtmlPrintout::SetFonts}\label{wxhtmlprintoutsetfonts}
|
||||
|
||||
\func{void}{SetFonts}{\param{wxString }{normal\_face}, \param{wxString }{fixed\_face}, \param{const int }{*sizes = NULL}}
|
||||
|
||||
Sets fonts. See \helpref{wxHtmlWindow::SetFonts}{wxhtmlwindowsetfonts} for
|
||||
detailed description.
|
||||
|
||||
\membersection{wxHtmlPrintout::SetFooter}\label{wxhtmlprintoutsetfooter}
|
||||
|
||||
\func{void}{SetFooter}{\param{const wxString\& }{footer}, \param{int }{pg = wxPAGE\_ALL}}
|
||||
|
||||
Sets page footer.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{footer}{HTML text to be used as footer. You can use macros in it:
|
||||
\begin{itemize}
|
||||
\item @PAGENUM@ is replaced by page number
|
||||
\item @PAGESCNT@ is replaced by total number of pages
|
||||
\end{itemize}
|
||||
}
|
||||
|
||||
\docparam{pg}{one of wxPAGE\_ODD, wxPAGE\_EVEN and wxPAGE\_ALL constants.}
|
||||
|
||||
|
||||
\membersection{wxHtmlPrintout::SetHeader}\label{wxhtmlprintoutsetheader}
|
||||
|
||||
\func{void}{SetHeader}{\param{const wxString\& }{header}, \param{int }{pg = wxPAGE\_ALL}}
|
||||
|
||||
Sets page header.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{header}{HTML text to be used as header. You can use macros in it:
|
||||
\begin{itemize}
|
||||
\item @PAGENUM@ is replaced by page number
|
||||
\item @PAGESCNT@ is replaced by total number of pages
|
||||
\end{itemize}
|
||||
}
|
||||
|
||||
\docparam{pg}{one of wxPAGE\_ODD, wxPAGE\_EVEN and wxPAGE\_ALL constants.}
|
||||
|
||||
|
||||
\membersection{wxHtmlPrintout::SetHtmlFile}\label{wxhtmlprintoutsethtmlfile}
|
||||
|
||||
\func{void}{SetHtmlFile}{\param{const wxString\& }{htmlfile}}
|
||||
|
||||
Prepare the class for printing this HTML {\bf file}. The file may be located on
|
||||
any virtual file system or it may be normal file.
|
||||
|
||||
|
||||
|
||||
\membersection{wxHtmlPrintout::SetHtmlText}\label{wxhtmlprintoutsethtmltext}
|
||||
|
||||
\func{void}{SetHtmlText}{\param{const wxString\& }{html}, \param{const wxString\& }{basepath = wxEmptyString}, \param{bool }{isdir = true}}
|
||||
|
||||
Prepare the class for printing this HTML text.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{html}{HTML text. (NOT file!)}
|
||||
|
||||
\docparam{basepath}{base directory (html string would be stored there if it was in
|
||||
file). It is used to determine path for loading images, for example.}
|
||||
|
||||
\docparam{isdir}{false if basepath is filename, true if it is directory name
|
||||
(see \helpref{wxFileSystem}{wxfilesystem} for detailed explanation)}
|
||||
|
||||
|
||||
|
||||
\membersection{wxHtmlPrintout::SetMargins}\label{wxhtmlprintoutsetmargins}
|
||||
|
||||
\func{void}{SetMargins}{\param{float }{top = 25.2}, \param{float }{bottom = 25.2}, \param{float }{left = 25.2}, \param{float }{right = 25.2}, \param{float }{spaces = 5}}
|
||||
|
||||
Sets margins in millimeters. Defaults to 1 inch for margins and 0.5cm for space
|
||||
between text and header and/or footer
|
||||
|
@@ -1,194 +0,0 @@
|
||||
%
|
||||
% automatically generated by HelpGen from
|
||||
% htmltag.tex at 14/Mar/99 20:13:37
|
||||
%
|
||||
|
||||
\section{\class{wxHtmlTag}}\label{wxhtmltag}
|
||||
|
||||
This class represents a single HTML tag.
|
||||
It is used by \helpref{tag handlers}{handlers}.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
wxObject
|
||||
|
||||
\wxheading{Include files}
|
||||
|
||||
<wx/html/htmltag.h>
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxHtmlTag::wxHtmlTag}\label{wxhtmltagwxhtmltag}
|
||||
|
||||
\func{}{wxHtmlTag}{\param{const wxString\& }{source}, \param{int }{pos}, \param{int }{end\_pos}, \param{wxHtmlTagsCache* }{cache}}
|
||||
|
||||
Constructor. You will probably never have to construct a wxHtmlTag object
|
||||
yourself. Feel free to ignore the constructor parameters.
|
||||
Have a look at src/html/htmlpars.cpp if you're interested in creating it.
|
||||
|
||||
\membersection{wxHtmlTag::GetAllParams}\label{wxhtmltaggetallparams}
|
||||
|
||||
\constfunc{const wxString\&}{GetAllParams}{\void}
|
||||
|
||||
Returns a string containing all parameters.
|
||||
|
||||
Example : tag contains {\tt <FONT SIZE=+2 COLOR="\#000000">}. Call to
|
||||
tag.GetAllParams() would return {\tt SIZE=+2 COLOR="\#000000"}.
|
||||
|
||||
|
||||
\membersection{wxHtmlTag::GetBeginPos}\label{wxhtmltaggetbeginpos}
|
||||
|
||||
\constfunc{int}{GetBeginPos}{\void}
|
||||
|
||||
Returns beginning position of the text {\it between} this tag and paired
|
||||
ending tag.
|
||||
See explanation (returned position is marked with `|'):
|
||||
|
||||
\begin{verbatim}
|
||||
bla bla bla <MYTAG> bla bla internal text</MYTAG> bla bla
|
||||
|
|
||||
\end{verbatim}
|
||||
|
||||
|
||||
\membersection{wxHtmlTag::GetEndPos1}\label{wxhtmltaggetendpos1}
|
||||
|
||||
\constfunc{int}{GetEndPos1}{\void}
|
||||
|
||||
Returns ending position of the text {\it between} this tag and paired
|
||||
ending tag.
|
||||
See explanation (returned position is marked with `|'):
|
||||
|
||||
\begin{verbatim}
|
||||
bla bla bla <MYTAG> bla bla internal text</MYTAG> bla bla
|
||||
|
|
||||
\end{verbatim}
|
||||
|
||||
|
||||
\membersection{wxHtmlTag::GetEndPos2}\label{wxhtmltaggetendpos2}
|
||||
|
||||
\constfunc{int}{GetEndPos2}{\void}
|
||||
|
||||
Returns ending position 2 of the text {\it between} this tag and paired
|
||||
ending tag.
|
||||
See explanation (returned position is marked with `|'):
|
||||
|
||||
\begin{verbatim}
|
||||
bla bla bla <MYTAG> bla bla internal text</MYTAG> bla bla
|
||||
|
|
||||
\end{verbatim}
|
||||
|
||||
\membersection{wxHtmlTag::GetName}\label{wxhtmltaggetname}
|
||||
|
||||
\constfunc{wxString}{GetName}{\void}
|
||||
|
||||
Returns tag's name. The name is always in uppercase and it doesn't contain
|
||||
'<' or '/' characters. (So the name of {\tt <FONT SIZE=+2>} tag is "FONT"
|
||||
and name of {\tt </table>} is "TABLE")
|
||||
|
||||
|
||||
\membersection{wxHtmlTag::GetParam}\label{wxhtmltaggetparam}
|
||||
|
||||
\constfunc{wxString}{GetParam}{\param{const wxString\& }{par}, \param{bool }{with\_commas = false}}
|
||||
|
||||
Returns the value of the parameter. You should check whether the
|
||||
parameter exists or not (use \helpref{HasParam}{wxhtmltaghasparam}) first.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{par}{The parameter's name.}
|
||||
|
||||
\docparam{with\_commas}{true if you want to get commas as well. See example.}
|
||||
|
||||
\wxheading{Example}
|
||||
|
||||
\begin{verbatim}
|
||||
...
|
||||
/* you have wxHtmlTag variable tag which is equal to
|
||||
HTML tag <FONT SIZE=+2 COLOR="#0000FF"> */
|
||||
dummy = tag.GetParam("SIZE");
|
||||
// dummy == "+2"
|
||||
dummy = tag.GetParam("COLOR");
|
||||
// dummy == "#0000FF"
|
||||
dummy = tag.GetParam("COLOR", true);
|
||||
// dummy == "\"#0000FF\"" -- see the difference!!
|
||||
\end{verbatim}
|
||||
|
||||
\membersection{wxHtmlTag::GetParamAsColour}\label{wxhtmltaggetparamascolour}
|
||||
|
||||
\constfunc{bool}{GetParamAsColour}{\param{const wxString\& }{par}, \param{wxColour *}{clr}}
|
||||
|
||||
Interprets tag parameter {\it par} as colour specification and saves its value
|
||||
into wxColour variable pointed by {\it clr}.
|
||||
|
||||
Returns true on success and false if {\it par} is not colour specification or
|
||||
if the tag has no such parameter.
|
||||
|
||||
\membersection{wxHtmlTag::GetParamAsInt}\label{wxhtmltaggetparamasint}
|
||||
|
||||
\constfunc{bool}{GetParamAsInt}{\param{const wxString\& }{par}, \param{int *}{value}}
|
||||
|
||||
Interprets tag parameter {\it par} as an integer and saves its value
|
||||
into int variable pointed by {\it value}.
|
||||
|
||||
Returns true on success and false if {\it par} is not an integer or
|
||||
if the tag has no such parameter.
|
||||
|
||||
\membersection{wxHtmlTag::HasEnding}\label{wxhtmltaghasending}
|
||||
|
||||
\constfunc{bool}{HasEnding}{\void}
|
||||
|
||||
Returns true if this tag is paired with ending tag, false otherwise.
|
||||
|
||||
See the example of HTML document:
|
||||
|
||||
\begin{verbatim}
|
||||
<html><body>
|
||||
Hello<p>
|
||||
How are you?
|
||||
<p align=center>This is centered...</p>
|
||||
Oops<br>Oooops!
|
||||
</body></html>
|
||||
\end{verbatim}
|
||||
|
||||
In this example tags HTML and BODY have ending tags, first P and BR
|
||||
doesn't have ending tag while the second P has. The third P tag (which
|
||||
is ending itself) of course doesn't have ending tag.
|
||||
|
||||
\membersection{wxHtmlTag::HasParam}\label{wxhtmltaghasparam}
|
||||
|
||||
\constfunc{bool}{HasParam}{\param{const wxString\& }{par}}
|
||||
|
||||
Returns true if the tag has a parameter of the given name.
|
||||
Example : {\tt <FONT SIZE=+2 COLOR="\#FF00FF">} has two parameters named
|
||||
"SIZE" and "COLOR".
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{par}{the parameter you're looking for.}
|
||||
|
||||
\membersection{wxHtmlTag::IsEnding}\label{wxhtmltagisending}
|
||||
|
||||
\constfunc{bool}{IsEnding}{\void}
|
||||
|
||||
Returns true if this tag is ending one.
|
||||
({\tt </FONT>} is ending tag, {\tt <FONT>} is not)
|
||||
|
||||
\membersection{wxHtmlTag::ScanParam}\label{wxhtmltagscanparam}
|
||||
|
||||
\constfunc{wxString}{ScanParam}{\param{const wxString\& }{par}, \param{const wxChar *}{format}, \param{void *}{value}}
|
||||
|
||||
This method scans the given parameter. Usage is exactly the same as sscanf's
|
||||
usage except that you don't pass a string but a parameter name as the first
|
||||
argument
|
||||
and you can only retrieve one value (i.e. you can use only one "\%" element
|
||||
in {\it format}).
|
||||
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{par}{The name of the tag you want to query}
|
||||
|
||||
\docparam{format}{scanf()-like format string.}
|
||||
|
||||
\docparam{value}{pointer to a variable to store the value in }
|
||||
|
@@ -1,91 +0,0 @@
|
||||
%
|
||||
% automatically generated by HelpGen from
|
||||
% htmltaghandler.tex at 18/Mar/99 19:20:29
|
||||
%
|
||||
|
||||
\section{\class{wxHtmlTagHandler}}\label{wxhtmltaghandler}
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
\wxheading{Include files}
|
||||
|
||||
<wx/html/htmlpars.h>
|
||||
|
||||
\wxheading{See Also}
|
||||
|
||||
\helpref{Overview}{handlers},
|
||||
\helpref{wxHtmlTag}{wxhtmltag}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxHtmlTagHandler::m\_Parser}\label{wxhtmltaghandlermparser}
|
||||
|
||||
{\bf wxHtmlParser* m\_Parser}
|
||||
|
||||
This attribute is used to access parent parser. It is protected so that
|
||||
it can't be accessed by user but can be accessed from derived classes.
|
||||
|
||||
\membersection{wxHtmlTagHandler::wxHtmlTagHandler}\label{wxhtmltaghandlerwxhtmltaghandler}
|
||||
|
||||
\func{}{wxHtmlTagHandler}{\void}
|
||||
|
||||
Constructor.
|
||||
|
||||
\membersection{wxHtmlTagHandler::GetSupportedTags}\label{wxhtmltaghandlergetsupportedtags}
|
||||
|
||||
\func{virtual wxString}{GetSupportedTags}{\void}
|
||||
|
||||
Returns list of supported tags. The list is in uppercase and tags
|
||||
are delimited by ','. Example : {\tt "I,B,FONT,P" }
|
||||
|
||||
\membersection{wxHtmlTagHandler::HandleTag}\label{wxhtmltaghandlerhandletag}
|
||||
|
||||
\func{virtual bool}{HandleTag}{\param{const wxHtmlTag\& }{tag}}
|
||||
|
||||
This is the core method of each handler. It is called each time
|
||||
one of supported tags is detected. {\it tag} contains all necessary
|
||||
info (see \helpref{wxHtmlTag}{wxhtmltag} for details).
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
true if \helpref{ParseInner}{wxhtmltaghandlerparseinner} was called,
|
||||
false otherwise.
|
||||
|
||||
\wxheading{Example}
|
||||
|
||||
\begin{verbatim}
|
||||
bool MyHandler::HandleTag(const wxHtmlTag& tag)
|
||||
{
|
||||
...
|
||||
// change state of parser (e.g. set bold face)
|
||||
ParseInner(tag);
|
||||
...
|
||||
// restore original state of parser
|
||||
}
|
||||
\end{verbatim}
|
||||
|
||||
You shouldn't call ParseInner if the tag is not paired with an ending one.
|
||||
|
||||
\membersection{wxHtmlTagHandler::ParseInner}\label{wxhtmltaghandlerparseinner}
|
||||
|
||||
\func{void}{ParseInner}{\param{const wxHtmlTag\& }{tag}}
|
||||
|
||||
This method calls parser's \helpref{DoParsing}{wxhtmlparserdoparsing} method
|
||||
for the string between this tag and the paired ending tag:
|
||||
|
||||
\begin{verbatim}
|
||||
...<A HREF="x.htm">Hello, world!</A>...
|
||||
\end{verbatim}
|
||||
|
||||
In this example, a call to ParseInner (with {\it tag} pointing to A tag)
|
||||
will parse 'Hello, world!'.
|
||||
|
||||
\membersection{wxHtmlTagHandler::SetParser}\label{wxhtmltaghandlersetparser}
|
||||
|
||||
\func{virtual void}{SetParser}{\param{wxHtmlParser }{*parser}}
|
||||
|
||||
Assigns {\it parser} to this handler. Each {\bf instance} of handler
|
||||
is guaranteed to be called only from the parser.
|
||||
|
@@ -1,43 +0,0 @@
|
||||
%
|
||||
% automatically generated by HelpGen from
|
||||
% htmltagsmodule.tex at 14/Mar/99 20:13:37
|
||||
|
||||
\section{\class{wxHtmlTagsModule}}\label{wxhtmltagsmodule}
|
||||
|
||||
This class provides easy way of filling wxHtmlWinParser's table of
|
||||
tag handlers. It is used almost exclusively together with the set of
|
||||
\helpref{TAGS\_MODULE\_* macros}{handlers}
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxModule}{wxmodule}
|
||||
|
||||
\wxheading{Include files}
|
||||
|
||||
<wx/html/winpars.h>
|
||||
|
||||
\wxheading{See Also}
|
||||
|
||||
\helpref{Tag Handlers}{handlers},
|
||||
\helpref{wxHtmlTagHandler}{wxhtmltaghandler},
|
||||
\helpref{wxHtmlWinTagHandler}{wxhtmlwintaghandler},
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxHtmlTagsModule::FillHandlersTable}\label{wxhtmltagsmodulefillhandlerstable}
|
||||
|
||||
\func{virtual void}{FillHandlersTable}{\param{wxHtmlWinParser }{*parser}}
|
||||
|
||||
You must override this method. In most common case its body consists
|
||||
only of lines of the following type:
|
||||
|
||||
\begin{verbatim}
|
||||
parser -> AddTagHandler(new MyHandler);
|
||||
\end{verbatim}
|
||||
|
||||
I recommend using the {\bf TAGS\_MODULE\_*} macros.
|
||||
|
||||
\wxheading{Paremeters}
|
||||
|
||||
\docparam{parser}{Pointer to the parser that requested tables filling.}
|
||||
|
@@ -1,70 +0,0 @@
|
||||
\section{\class{wxHTTP}}\label{wxhttp}
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxProtocol}{wxprotocol}
|
||||
|
||||
\wxheading{Include files}
|
||||
|
||||
<wx/protocol/http.h>
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxSocketBase}{wxsocketbase}, \helpref{wxURL}{wxurl}
|
||||
|
||||
% ----------------------------------------------------------------------------
|
||||
% Members
|
||||
% ----------------------------------------------------------------------------
|
||||
|
||||
% ----------------------------------------------------------------------------
|
||||
\membersection{wxHTTP::GetInputStream}\label{wxhttpgetinputstream}
|
||||
|
||||
\func{wxInputStream *}{GetInputStream}{\param{const wxString\&}{ path}}
|
||||
|
||||
Creates a new input stream on the the specified path. You can use all except the seek
|
||||
functionality of wxStream. Seek isn't available on all streams. For example,
|
||||
http or ftp streams doesn't deal with it. Other functions like Tell and SeekI
|
||||
for this sort of stream.
|
||||
You will be notified when the EOF is reached by an error.
|
||||
|
||||
\wxheading{Note}
|
||||
|
||||
You can know the size of the file you are getting using \helpref{wxStreamBase::GetSize()}{wxstreambasegetsize}.
|
||||
But there is a limitation: as HTTP servers aren't obliged to pass the size of
|
||||
the file, in some case, you will be returned 0xfffffff by GetSize(). In these
|
||||
cases, you should use the value returned by \helpref{wxInputStream::LastRead()}{wxinputstreamlastread}:
|
||||
this value will be 0 when the stream is finished.
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
Returns the initialized stream. You will have to delete it yourself once you
|
||||
don't use it anymore. The destructor closes the network connection.
|
||||
The next time you will try to get a file the network connection will have
|
||||
to be reestablished: but you don't have to take care of this wxHTTP reestablishes it automatically.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxInputStream}{wxinputstream}
|
||||
|
||||
% ----------------------------------------------------------------------------
|
||||
|
||||
\membersection{wxHTTP::SetHeader}
|
||||
|
||||
\func{void}{SetHeader}{\param{const wxString\&}{ header}, \param{const wxString\&}{ h\_data}}
|
||||
|
||||
It sets data of a field to be sent during the next request to the HTTP server. The field
|
||||
name is specified by {\it header} and the content by {\it h\_data}.
|
||||
This is a low level function and it assumes that you know what you are doing.
|
||||
|
||||
\membersection{wxHTTP::GetHeader}
|
||||
|
||||
\func{wxString}{GetHeader}{\param{const wxString\&}{ header}}
|
||||
|
||||
Returns the data attached with a field whose name is specified by {\it header}.
|
||||
If the field doesn't exist, it will return an empty string and not a NULL string.
|
||||
|
||||
\wxheading{Note}
|
||||
|
||||
The header is not case-sensitive: I mean that "CONTENT-TYPE" and "content-type"
|
||||
represent the same header.
|
||||
|
@@ -1,37 +0,0 @@
|
||||
%
|
||||
% automatically generated by HelpGen from
|
||||
% htmlcell.h at 14/Apr/99 20:12:40
|
||||
%
|
||||
|
||||
\section{\class{wxHtmlWidgetCell}}\label{wxhtmlwidgetcell}
|
||||
|
||||
wxHtmlWidgetCell is a class that provides a connection between HTML cells and widgets (an object derived
|
||||
from wxWindow). You can use it to display things like forms, input boxes etc. in an HTML window.
|
||||
|
||||
wxHtmlWidgetCell takes care of resizing and moving window.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxHtmlCell}{wxhtmlcell}
|
||||
|
||||
\wxheading{Include files}
|
||||
|
||||
<wx/html/htmlcell.h>
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxHtmlWidgetCell::wxHtmlWidgetCell}\label{wxhtmlwidgetcellwxhtmlwidgetcell}
|
||||
|
||||
\func{}{wxHtmlWidgetCell}{\param{wxWindow* }{wnd}, \param{int }{w = 0}}
|
||||
|
||||
Constructor.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{wnd}{Connected window. It is parent window {\bf must} be the wxHtmlWindow object within
|
||||
which it is displayed!}
|
||||
|
||||
\docparam{w}{Floating width. If non-zero width of {\it wnd} window is adjusted so that it is
|
||||
always {\it w} percents of parent container's width. (For example w = 100 means that the window
|
||||
will always have same width as parent container)}
|
||||
|
@@ -1,383 +0,0 @@
|
||||
%
|
||||
% automatically generated by HelpGen from
|
||||
% htmlwindow.tex at 14/Mar/99 20:13:37
|
||||
%
|
||||
|
||||
\section{\class{wxHtmlWindow}}\label{wxhtmlwindow}
|
||||
|
||||
wxHtmlWindow is probably the only class you will directly use
|
||||
unless you want to do something special (like adding new tag
|
||||
handlers or MIME filters).
|
||||
|
||||
The purpose of this class is to display HTML pages (either local
|
||||
file or downloaded via HTTP protocol) in a window. The width
|
||||
of the window is constant - given in the constructor - and virtual height
|
||||
is changed dynamically depending on page size.
|
||||
Once the window is created you can set its content by calling
|
||||
\helpref{SetPage(text)}{wxhtmlwindowsetpage},
|
||||
\helpref{LoadPage(filename)}{wxhtmlwindowloadpage} or
|
||||
\helpref{LoadFile}{wxhtmlwindowloadfile}.
|
||||
|
||||
\wxheading{Note}
|
||||
|
||||
wxHtmlWindow uses the \helpref{wxImage}{wximage} class for displaying images.
|
||||
Don't forget to initialize all image formats you need before loading any page!
|
||||
(See \helpref{wxInitAllImageHandlers}{wxinitallimagehandlers} and
|
||||
\helpref{wxImage::AddHandler}{wximageaddhandler}.)
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxScrolledWindow}{wxscrolledwindow}
|
||||
|
||||
\wxheading{Include files}
|
||||
|
||||
<wx/html/htmlwin.h>
|
||||
|
||||
\membersection{wxHtmlWindow::wxHtmlWindow}\label{wxhtmlwindowwxhtmlwindow}
|
||||
|
||||
\func{}{wxHtmlWindow}{\void}
|
||||
|
||||
Default constructor.
|
||||
|
||||
\func{}{wxHtmlWindow}{\param{wxWindow }{*parent}, \param{wxWindowID }{id = -1}, \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize}, \param{long }{style = wxHW\_SCROLLBAR\_AUTO}, \param{const wxString\& }{name = "htmlWindow"}}
|
||||
|
||||
Constructor. The parameters are the same as for the \helpref{wxScrolledWindow}{wxscrolledwindow} constructor.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{style}{wxHW\_SCROLLBAR\_NEVER, or wxHW\_SCROLLBAR\_AUTO.
|
||||
Affects the appearance of vertical scrollbar in the window.}
|
||||
|
||||
\membersection{wxHtmlWindow::AddFilter}\label{wxhtmlwindowaddfilter}
|
||||
|
||||
\func{static void}{AddFilter}{\param{wxHtmlFilter }{*filter}}
|
||||
|
||||
Adds \helpref{input filter}{filters} to the static list of available
|
||||
filters. These filters are present by default:
|
||||
|
||||
\begin{itemize}\itemsep=0pt
|
||||
\item {\tt text/html} MIME type
|
||||
\item {\tt image/*} MIME types
|
||||
\item Plain Text filter (this filter is used if no other filter matches)
|
||||
\end{itemize}
|
||||
|
||||
\membersection{wxHtmlWindow::AppendToPage}\label{wxhtmlwindowappendtopage}
|
||||
|
||||
\func{bool}{AppendToPage}{\param{const wxString\& }{source}}
|
||||
|
||||
Appends HTML fragment to currently displayed text and refreshes the window.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{source}{HTML code fragment}
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
false if an error occurred, true otherwise.
|
||||
|
||||
\membersection{wxHtmlWindow::GetInternalRepresentation}\label{wxhtmlwindowgetinternalrepresentation}
|
||||
|
||||
\constfunc{wxHtmlContainerCell*}{GetInternalRepresentation}{\void}
|
||||
|
||||
Returns pointer to the top-level container.
|
||||
|
||||
See also: \helpref{Cells Overview}{cells},
|
||||
\helpref{Printing Overview}{printing}
|
||||
|
||||
\membersection{wxHtmlWindow::GetOpenedAnchor}\label{wxhtmlwindowgetopenedanchor}
|
||||
|
||||
\func{wxString}{GetOpenedAnchor}{\void}
|
||||
|
||||
Returns anchor within currently opened page
|
||||
(see \helpref{GetOpenedPage}{wxhtmlwindowgetopenedpage}).
|
||||
If no page is opened or if the displayed page wasn't
|
||||
produced by call to LoadPage, empty string is returned.
|
||||
|
||||
|
||||
\membersection{wxHtmlWindow::GetOpenedPage}\label{wxhtmlwindowgetopenedpage}
|
||||
|
||||
\func{wxString}{GetOpenedPage}{\void}
|
||||
|
||||
Returns full location of the opened page. If no page is opened or if the displayed page wasn't
|
||||
produced by call to LoadPage, empty string is returned.
|
||||
|
||||
\membersection{wxHtmlWindow::GetOpenedPageTitle}\label{wxhtmlwindowgetopenedpagetitle}
|
||||
|
||||
\func{wxString}{GetOpenedPageTitle}{\void}
|
||||
|
||||
Returns title of the opened page or wxEmptyString if current page does not contain {\tt <TITLE>} tag.
|
||||
|
||||
\membersection{wxHtmlWindow::GetRelatedFrame}\label{wxhtmlwindowgetrelatedframe}
|
||||
|
||||
\constfunc{wxFrame*}{GetRelatedFrame}{\void}
|
||||
|
||||
Returns the related frame.
|
||||
|
||||
\membersection{wxHtmlWindow::HistoryBack}\label{wxhtmlwindowhistoryback}
|
||||
|
||||
\func{bool}{HistoryBack}{\void}
|
||||
|
||||
Moves back to the previous page. (each page displayed using
|
||||
\helpref{LoadPage}{wxhtmlwindowloadpage} is stored in history list.)
|
||||
|
||||
\membersection{wxHtmlWindow::HistoryCanBack}\label{wxhtmlwindowhistorycanback}
|
||||
|
||||
\func{bool}{HistoryCanBack}{\void}
|
||||
|
||||
Returns true if it is possible to go back in the history (i.e. HistoryBack()
|
||||
won't fail).
|
||||
|
||||
\membersection{wxHtmlWindow::HistoryCanForward}\label{wxhtmlwindowhistorycanforward}
|
||||
|
||||
\func{bool}{HistoryCanForward}{\void}
|
||||
|
||||
Returns true if it is possible to go forward in the history (i.e. HistoryBack()
|
||||
won't fail).
|
||||
|
||||
|
||||
\membersection{wxHtmlWindow::HistoryClear}\label{wxhtmlwindowhistoryclear}
|
||||
|
||||
\func{void}{HistoryClear}{\void}
|
||||
|
||||
Clears history.
|
||||
|
||||
\membersection{wxHtmlWindow::HistoryForward}\label{wxhtmlwindowhistoryforward}
|
||||
|
||||
\func{bool}{HistoryForward}{\void}
|
||||
|
||||
Moves to next page in history.
|
||||
|
||||
\membersection{wxHtmlWindow::LoadFile}\label{wxhtmlwindowloadfile}
|
||||
|
||||
\func{virtual bool}{LoadFile}{\param{const wxFileName\& }{filename}}
|
||||
|
||||
Loads HTML page from file and displays it.
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
false if an error occurred, true otherwise
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{LoadPage}{wxhtmlwindowloadpage}
|
||||
|
||||
\membersection{wxHtmlWindow::LoadPage}\label{wxhtmlwindowloadpage}
|
||||
|
||||
\func{virtual bool}{LoadPage}{\param{const wxString\& }{location}}
|
||||
|
||||
Unlike SetPage this function first loads HTML page from {\it location}
|
||||
and then displays it. See example:
|
||||
|
||||
\begin{verbatim}
|
||||
htmlwin->LoadPage("help/myproject/index.htm");
|
||||
\end{verbatim}
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{location}{The address of document. See \helpref{wxFileSystem}{wxfilesystem} for details on address format and behaviour of "opener".}
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
false if an error occurred, true otherwise
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{LoadFile}{wxhtmlwindowloadfile}
|
||||
|
||||
\membersection{wxHtmlWindow::OnCellClicked}\label{wxhtmlwindowoncellclicked}
|
||||
|
||||
\func{virtual void}{OnCellClicked}{\param{wxHtmlCell }{*cell}, \param{wxCoord }{x}, \param{wxCoord }{y}, \param{const wxMouseEvent\& }{event}}
|
||||
|
||||
This method is called when a mouse button is clicked inside wxHtmlWindow.
|
||||
The default behaviour is to call
|
||||
\helpref{OnLinkClicked}{wxhtmlwindowonlinkclicked} if the cell contains a
|
||||
hypertext link.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{cell}{The cell inside which the mouse was clicked, always a simple
|
||||
(i.e. non container) cell}
|
||||
|
||||
\docparam{x, y}{The logical coordinates of the click point}
|
||||
|
||||
\docparam{event}{The mouse event containing other information about the click}
|
||||
|
||||
\membersection{wxHtmlWindow::OnCellMouseHover}\label{wxhtmlwindowoncellmousehover}
|
||||
|
||||
\func{virtual void}{OnCellMouseHover}{\param{wxHtmlCell }{*cell}, \param{wxCoord }{x}, \param{wxCoord }{y}}
|
||||
|
||||
This method is called when a mouse moves over an HTML cell.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{cell}{The cell inside which the mouse is currently, always a simple
|
||||
(i.e. non container) cell}
|
||||
|
||||
\docparam{x, y}{The logical coordinates of the click point}
|
||||
|
||||
\membersection{wxHtmlWindow::OnLinkClicked}\label{wxhtmlwindowonlinkclicked}
|
||||
|
||||
\func{virtual void}{OnLinkClicked}{\param{const wxHtmlLinkInfo\& }{link}}
|
||||
|
||||
Called when user clicks on hypertext link. Default behaviour is to call
|
||||
\helpref{LoadPage}{wxhtmlwindowloadpage} and do nothing else.
|
||||
|
||||
Also see \helpref{wxHtmlLinkInfo}{wxhtmllinkinfo}.
|
||||
|
||||
\membersection{wxHtmlWindow::OnOpeningURL}\label{wxhtmlwindowonopeningurl}
|
||||
|
||||
\func{virtual wxHtmlOpeningStatus}{OnOpeningURL}{\param{wxHtmlURLType }{type},\param{const wxString\& }{url}, \param{wxString *}{redirect}}
|
||||
|
||||
Called when an URL is being opened (either when the user clicks on a link or
|
||||
an image is loaded). The URL will be opened only if OnOpeningURL returns
|
||||
{\tt wxHTML\_OPEN}. This method is called by
|
||||
\helpref{wxHtmlParser::OpenURL}{wxhtmlparseropenurl}.
|
||||
You can override OnOpeningURL to selectively block some
|
||||
URLs (e.g. for security reasons) or to redirect them elsewhere. Default
|
||||
behaviour is to always return {\tt wxHTML\_OPEN}.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{type}{Indicates type of the resource. Is one of
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{{\bf wxHTML\_URL\_PAGE}}{Opening a HTML page.}
|
||||
\twocolitem{{\bf wxHTML\_URL\_IMAGE}}{Opening an image.}
|
||||
\twocolitem{{\bf wxHTML\_URL\_OTHER}}{Opening a resource that doesn't fall into
|
||||
any other category.}
|
||||
\end{twocollist}}
|
||||
|
||||
\docparam{url}{URL being opened.}
|
||||
|
||||
\docparam{redirect}{Pointer to wxString variable that must be filled with an
|
||||
URL if OnOpeningURL returns {\tt wxHTML\_REDIRECT}.}
|
||||
|
||||
\wxheading{Return value}
|
||||
\begin{twocollist}\itemsep=0pt
|
||||
\twocolitem{{\bf wxHTML\_OPEN}}{Open the URL.}
|
||||
\twocolitem{{\bf wxHTML\_BLOCK}}{Deny access to the URL, \helpref{wxHtmlParser::OpenURL}{wxhtmlparseropenurl} will return NULL.}
|
||||
\twocolitem{{\bf wxHTML\_REDIRECT}}{Don't open {\it url}, redirect to another
|
||||
URL. OnOpeningURL must fill {\it *redirect} with the new URL. OnOpeningURL will
|
||||
be called again on returned URL.}
|
||||
\end{twocollist}
|
||||
|
||||
\membersection{wxHtmlWindow::OnSetTitle}\label{wxhtmlwindowonsettitle}
|
||||
|
||||
\func{virtual void}{OnSetTitle}{\param{const wxString\& }{title}}
|
||||
|
||||
Called on parsing {\tt <TITLE>} tag.
|
||||
|
||||
|
||||
\membersection{wxHtmlWindow::ReadCustomization}\label{wxhtmlwindowreadcustomization}
|
||||
|
||||
\func{virtual void}{ReadCustomization}{\param{wxConfigBase }{*cfg}, \param{wxString }{path = wxEmptyString}}
|
||||
|
||||
This reads custom settings from wxConfig. It uses the path 'path'
|
||||
if given, otherwise it saves info into currently selected path.
|
||||
The values are stored in sub-path {\tt wxHtmlWindow}
|
||||
|
||||
Read values: all things set by SetFonts, SetBorders.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{cfg}{wxConfig from which you want to read the configuration.}
|
||||
|
||||
\docparam{path}{Optional path in config tree. If not given current path is used.}
|
||||
|
||||
\membersection{wxHtmlWindow::SetBorders}\label{wxhtmlwindowsetborders}
|
||||
|
||||
\func{void}{SetBorders}{\param{int }{b}}
|
||||
|
||||
This function sets the space between border of window and HTML contents. See image:
|
||||
|
||||
\helponly{\image{}{border.bmp}}
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{b}{indentation from borders in pixels}
|
||||
|
||||
\membersection{wxHtmlWindow::SetFonts}\label{wxhtmlwindowsetfonts}
|
||||
|
||||
\func{void}{SetFonts}{\param{wxString }{normal\_face}, \param{wxString }{fixed\_face}, \param{const int }{*sizes = NULL}}
|
||||
|
||||
This function sets font sizes and faces.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{normal\_face}{This is face name for normal (i.e. non-fixed) font.
|
||||
It can be either empty string (then the default face is chosen) or
|
||||
platform-specific face name. Examples are "helvetica" under Unix or
|
||||
"Times New Roman" under Windows.}
|
||||
|
||||
\docparam{fixed\_face}{The same thing for fixed face ( <TT>..</TT> )}
|
||||
|
||||
\docparam{sizes}{This is an array of 7 items of {\it int} type.
|
||||
The values represent size of font with HTML size from -2 to +4
|
||||
( <FONT SIZE=-2> to <FONT SIZE=+4> ). Default sizes are used if {\it sizes}
|
||||
is NULL.}
|
||||
|
||||
\wxheading{Defaults}
|
||||
|
||||
Default font sizes are defined by constants wxHTML\_FONT\_SIZE\_1,
|
||||
wxHTML\_FONT\_SIZE\_2, ..., wxHTML\_FONT\_SIZE\_7. Note that they differ among
|
||||
platforms. Default face names are empty strings.
|
||||
|
||||
\membersection{wxHtmlWindow::SetPage}\label{wxhtmlwindowsetpage}
|
||||
|
||||
\func{bool}{SetPage}{\param{const wxString\& }{source}}
|
||||
|
||||
Sets HTML page and display it. This won't {\bf load} the page!!
|
||||
It will display the {\it source}. See example:
|
||||
|
||||
\begin{verbatim}
|
||||
htmlwin -> SetPage("<html><body>Hello, world!</body></html>");
|
||||
\end{verbatim}
|
||||
|
||||
If you want to load a document from some location use
|
||||
\helpref{LoadPage}{wxhtmlwindowloadpage} instead.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{source}{The HTML document source to be displayed.}
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
false if an error occurred, true otherwise.
|
||||
|
||||
\membersection{wxHtmlWindow::SetRelatedFrame}\label{wxhtmlwindowsetrelatedframe}
|
||||
|
||||
\func{void}{SetRelatedFrame}{\param{wxFrame* }{frame}, \param{const wxString\& }{format}}
|
||||
|
||||
Sets the frame in which page title will be displayed. {\it format} is format of
|
||||
frame title, e.g. "HtmlHelp : \%s". It must contain exactly one \%s. This
|
||||
\%s is substituted with HTML page title.
|
||||
|
||||
\membersection{wxHtmlWindow::SetRelatedStatusBar}\label{wxhtmlwindowsetrelatedstatusbar}
|
||||
|
||||
\func{void}{SetRelatedStatusBar}{\param{int }{bar}}
|
||||
|
||||
{\bf After} calling \helpref{SetRelatedFrame}{wxhtmlwindowsetrelatedframe},
|
||||
this sets statusbar slot where messages will be displayed.
|
||||
(Default is -1 = no messages.)
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{bar}{statusbar slot number (0..n)}
|
||||
|
||||
|
||||
\membersection{wxHtmlWindow::WriteCustomization}\label{wxhtmlwindowwritecustomization}
|
||||
|
||||
\func{virtual void}{WriteCustomization}{\param{wxConfigBase }{*cfg}, \param{wxString }{path = wxEmptyString}}
|
||||
|
||||
Saves custom settings into wxConfig. It uses the path 'path'
|
||||
if given, otherwise it saves info into currently selected path.
|
||||
Regardless of whether the path is given or not, the function creates sub-path
|
||||
{\tt wxHtmlWindow}.
|
||||
|
||||
Saved values: all things set by SetFonts, SetBorders.
|
||||
|
||||
\wxheading{Parameters}
|
||||
|
||||
\docparam{cfg}{wxConfig to which you want to save the configuration.}
|
||||
|
||||
\docparam{path}{Optional path in config tree. If not given, the current path is used.}
|
||||
|
@@ -1,31 +0,0 @@
|
||||
%
|
||||
% automatically generated by HelpGen from
|
||||
% htmlwintaghandler.tex at 14/Mar/99 20:13:37
|
||||
%
|
||||
|
||||
\section{\class{wxHtmlWinTagHandler}}\label{wxhtmlwintaghandler}
|
||||
|
||||
This is basically wxHtmlTagHandler except that
|
||||
it is extended with protected member m\_WParser pointing to
|
||||
the wxHtmlWinParser object (value of this member is identical
|
||||
to wxHtmlParser's m\_Parser).
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxHtmlTagHandler}{wxhtmltaghandler}
|
||||
|
||||
\wxheading{Include files}
|
||||
|
||||
<wx/html/winpars.h>
|
||||
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxHtmlWinTagHandler::m\_WParser}\label{wxhtmlwintaghandlerwxhtmlwintaghandlermwparser}
|
||||
|
||||
{\bf wxHtmlWinParser* m\_WParser}
|
||||
|
||||
Value of this attribute is identical to value of m\_Parser. The only different
|
||||
is that m\_WParser points to wxHtmlWinParser object while m\_Parser
|
||||
points to wxHtmlParser object. (The same object, but overcast.)
|
||||
|
@@ -1,298 +0,0 @@
|
||||
%
|
||||
% automatically generated by HelpGen from
|
||||
% htmlwinparser.tex at 14/Mar/99 20:13:37
|
||||
%
|
||||
|
||||
\section{\class{wxHtmlWinParser}}\label{wxhtmlwinparser}
|
||||
|
||||
This class is derived from \helpref{wxHtmlParser}{wxhtmlparser} and
|
||||
its main goal is to parse HTML input so that it can be displayed in
|
||||
\helpref{wxHtmlWindow}{wxhtmlwindow}. It uses a special
|
||||
\helpref{wxHtmlWinTagHandler}{wxhtmlwintaghandler}.
|
||||
|
||||
\wxheading{Notes}
|
||||
|
||||
The product of parsing is a wxHtmlCell (resp. wxHtmlContainer) object.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxHtmlParser}{wxhtmlparser}
|
||||
|
||||
\wxheading{Include files}
|
||||
|
||||
<wx/html/winpars.h>
|
||||
|
||||
\wxheading{See Also}
|
||||
|
||||
\helpref{Handlers overview}{handlers}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
\membersection{wxHtmlWinParser::wxHtmlWinParser}\label{wxhtmlwinparserwxhtmlwinparser}
|
||||
|
||||
\func{}{wxHtmlWinParser}{\void}
|
||||
|
||||
\func{}{wxHtmlWinParser}{\param{wxHtmlWindow }{*wnd}}
|
||||
|
||||
Constructor. Don't use the default one, use constructor with
|
||||
{\it wnd} parameter ({\it wnd} is pointer to associated \helpref{wxHtmlWindow}{wxhtmlwindow})
|
||||
|
||||
\membersection{wxHtmlWinParser::AddModule}\label{wxhtmlwinparseraddmodule}
|
||||
|
||||
\func{static void}{AddModule}{\param{wxHtmlTagsModule }{*module}}
|
||||
|
||||
Adds \helpref{module}{handlers} to the list of wxHtmlWinParser tag handler.
|
||||
|
||||
\membersection{wxHtmlWinParser::CloseContainer}\label{wxhtmlwinparserclosecontainer}
|
||||
|
||||
\func{wxHtmlContainerCell*}{CloseContainer}{\void}
|
||||
|
||||
Closes the container, sets actual container to the parent one
|
||||
and returns pointer to it (see \helpref{Overview}{cells}).
|
||||
|
||||
\membersection{wxHtmlWinParser::CreateCurrentFont}\label{wxhtmlwinparsercreatecurrentfont}
|
||||
|
||||
\func{virtual wxFont*}{CreateCurrentFont}{\void}
|
||||
|
||||
Creates font based on current setting (see
|
||||
\helpref{SetFontSize}{wxhtmlwinparsersetfontsize},
|
||||
\helpref{SetFontBold}{wxhtmlwinparsersetfontbold},
|
||||
\helpref{SetFontItalic}{wxhtmlwinparsersetfontitalic},
|
||||
\helpref{SetFontFixed}{wxhtmlwinparsersetfontfixed},
|
||||
\helpref{SetFontUnderlined}{wxhtmlwinparsersetfontunderlined})
|
||||
and returns pointer to it.
|
||||
If the font was already created only a pointer is returned.
|
||||
|
||||
|
||||
\membersection{wxHtmlWinParser::GetActualColor}\label{wxhtmlwinparsergetactualcolor}
|
||||
|
||||
\constfunc{const wxColour\&}{GetActualColor}{\void}
|
||||
|
||||
Returns actual text colour.
|
||||
|
||||
\membersection{wxHtmlWinParser::GetAlign}\label{wxhtmlwinparsergetalign}
|
||||
|
||||
\constfunc{int}{GetAlign}{\void}
|
||||
|
||||
Returns default horizontal alignment.
|
||||
|
||||
\membersection{wxHtmlWinParser::GetCharHeight}\label{wxhtmlwinparsergetcharheight}
|
||||
|
||||
\constfunc{int}{GetCharHeight}{\void}
|
||||
|
||||
Returns (average) char height in standard font. It is used as DC-independent metrics.
|
||||
|
||||
{\bf Note:} This function doesn't return the {\it actual} height. If you want to
|
||||
know the height of the current font, call {\tt GetDC -> GetCharHeight()}.
|
||||
|
||||
\membersection{wxHtmlWinParser::GetCharWidth}\label{wxhtmlwinparsergetcharwidth}
|
||||
|
||||
\constfunc{int}{GetCharWidth}{\void}
|
||||
|
||||
Returns average char width in standard font. It is used as DC-independent metrics.
|
||||
|
||||
{\bf Note:} This function doesn't return the {\it actual} width. If you want to
|
||||
know the height of the current font, call {\tt GetDC -> GetCharWidth()}
|
||||
|
||||
\membersection{wxHtmlWinParser::GetContainer}\label{wxhtmlwinparsergetcontainer}
|
||||
|
||||
\constfunc{wxHtmlContainerCell*}{GetContainer}{\void}
|
||||
|
||||
Returns pointer to the currently opened container (see \helpref{Overview}{cells}).
|
||||
Common use:
|
||||
|
||||
\begin{verbatim}
|
||||
m_WParser -> GetContainer() -> InsertCell(new ...);
|
||||
\end{verbatim}
|
||||
|
||||
\membersection{wxHtmlWinParser::GetDC}\label{wxhtmlwinparsergetdc}
|
||||
|
||||
\func{wxDC*}{GetDC}{\void}
|
||||
|
||||
Returns pointer to the DC used during parsing.
|
||||
|
||||
\membersection{wxHtmlWinParser::GetEncodingConverter}\label{wxhtmlwinparsergetencodingconverter}
|
||||
|
||||
\constfunc{wxEncodingConverter *}{GetEncodingConverter}{\void}
|
||||
|
||||
Returns \helpref{wxEncodingConverter}{wxencodingconverter} class used
|
||||
to do conversion between \helpref{input encoding}{wxhtmlwinparsergetinputencoding}
|
||||
and \helpref{output encoding}{wxhtmlwinparsergetoutputencoding}.
|
||||
|
||||
\membersection{wxHtmlWinParser::GetFontBold}\label{wxhtmlwinparsergetfontbold}
|
||||
|
||||
\constfunc{int}{GetFontBold}{\void}
|
||||
|
||||
Returns true if actual font is bold, false otherwise.
|
||||
|
||||
\membersection{wxHtmlWinParser::GetFontFace}\label{wxhtmlwinparsergetfontface}
|
||||
|
||||
\constfunc{wxString}{GetFontFace}{\void}
|
||||
|
||||
Returns actual font face name.
|
||||
|
||||
\membersection{wxHtmlWinParser::GetFontFixed}\label{wxhtmlwinparsergetfontfixed}
|
||||
|
||||
\constfunc{int}{GetFontFixed}{\void}
|
||||
|
||||
Returns true if actual font is fixed face, false otherwise.
|
||||
|
||||
\membersection{wxHtmlWinParser::GetFontItalic}\label{wxhtmlwinparsergetfontitalic}
|
||||
|
||||
\constfunc{int}{GetFontItalic}{\void}
|
||||
|
||||
Returns true if actual font is italic, false otherwise.
|
||||
|
||||
\membersection{wxHtmlWinParser::GetFontSize}\label{wxhtmlwinparsergetfontsize}
|
||||
|
||||
\constfunc{int}{GetFontSize}{\void}
|
||||
|
||||
Returns actual font size (HTML size varies from -2 to +4)
|
||||
|
||||
\membersection{wxHtmlWinParser::GetFontUnderlined}\label{wxhtmlwinparsergetfontunderlined}
|
||||
|
||||
\constfunc{int}{GetFontUnderlined}{\void}
|
||||
|
||||
Returns true if actual font is underlined, false otherwise.
|
||||
|
||||
\membersection{wxHtmlWinParser::GetInputEncoding}\label{wxhtmlwinparsergetinputencoding}
|
||||
|
||||
\constfunc{wxFontEncoding}{GetInputEncoding}{\void}
|
||||
|
||||
Returns input encoding.
|
||||
|
||||
\membersection{wxHtmlWinParser::GetLink}\label{wxhtmlwinparsergetlink}
|
||||
|
||||
\constfunc{const wxHtmlLinkInfo\&}{GetLink}{\void}
|
||||
|
||||
Returns actual hypertext link. (This value has a non-empty
|
||||
\helpref{Href}{wxhtmllinkinfogethref} string
|
||||
if the parser is between {\tt <A>} and {\tt </A>} tags,
|
||||
wxEmptyString otherwise.)
|
||||
|
||||
\membersection{wxHtmlWinParser::GetLinkColor}\label{wxhtmlwinparsergetlinkcolor}
|
||||
|
||||
\constfunc{const wxColour\&}{GetLinkColor}{\void}
|
||||
|
||||
Returns the colour of hypertext link text.
|
||||
|
||||
\membersection{wxHtmlWinParser::GetOutputEncoding}\label{wxhtmlwinparsergetoutputencoding}
|
||||
|
||||
\constfunc{wxFontEncoding}{GetOutputEncoding}{\void}
|
||||
|
||||
Returns output encoding, i.e. closest match to document's input encoding
|
||||
that is supported by operating system.
|
||||
|
||||
\membersection{wxHtmlWinParser::GetWindow}\label{wxhtmlwinparsergetwindow}
|
||||
|
||||
\func{wxHtmlWindow*}{GetWindow}{\void}
|
||||
|
||||
Returns associated window (wxHtmlWindow). This may be NULL! (You should always
|
||||
test if it is non-NULL. For example {\tt TITLE} handler sets window
|
||||
title only if some window is associated, otherwise it does nothing)
|
||||
|
||||
\membersection{wxHtmlWinParser::OpenContainer}\label{wxhtmlwinparseropencontainer}
|
||||
|
||||
\func{wxHtmlContainerCell*}{OpenContainer}{\void}
|
||||
|
||||
Opens new container and returns pointer to it (see \helpref{Overview}{cells}).
|
||||
|
||||
\membersection{wxHtmlWinParser::SetActualColor}\label{wxhtmlwinparsersetactualcolor}
|
||||
|
||||
\func{void}{SetActualColor}{\param{const wxColour\& }{clr}}
|
||||
|
||||
Sets actual text colour. Note: this DOESN'T change the colour!
|
||||
You must create \helpref{wxHtmlColourCell}{wxhtmlcolourcell} yourself.
|
||||
|
||||
\membersection{wxHtmlWinParser::SetAlign}\label{wxhtmlwinparsersetalign}
|
||||
|
||||
\func{void}{SetAlign}{\param{int }{a}}
|
||||
|
||||
Sets default horizontal alignment (see
|
||||
\helpref{wxHtmlContainerCell::SetAlignHor}{wxhtmlcontainercellsetalignhor}.)
|
||||
Alignment of newly opened container is set to this value.
|
||||
|
||||
\membersection{wxHtmlWinParser::SetContainer}\label{wxhtmlwinparsersetcontainer}
|
||||
|
||||
\func{wxHtmlContainerCell*}{SetContainer}{\param{wxHtmlContainerCell *}{c}}
|
||||
|
||||
Allows you to directly set opened container. This is not recommended - you should use OpenContainer
|
||||
wherever possible.
|
||||
|
||||
\membersection{wxHtmlWinParser::SetDC}\label{wxhtmlwinparsersetdc}
|
||||
|
||||
\func{virtual void}{SetDC}{\param{wxDC }{*dc}, \param{double }{pixel\_scale = 1.0}}
|
||||
|
||||
Sets the DC. This must be called before \helpref{Parse}{wxhtmlparserparse}!
|
||||
{\it pixel\_scale} can be used when rendering to high-resolution
|
||||
DCs (e.g. printer) to adjust size of pixel metrics. (Many dimensions in
|
||||
HTML are given in pixels -- e.g. image sizes. 300x300 image would be only one
|
||||
inch wide on typical printer. With pixel\_scale = 3.0 it would be 3 inches.)
|
||||
|
||||
\membersection{wxHtmlWinParser::SetFontBold}\label{wxhtmlwinparsersetfontbold}
|
||||
|
||||
\func{void}{SetFontBold}{\param{int }{x}}
|
||||
|
||||
Sets bold flag of actualfont. {\it x} is either true of false.
|
||||
|
||||
\membersection{wxHtmlWinParser::SetFontFace}\label{wxhtmlwinparsersetfontface}
|
||||
|
||||
\func{void}{SetFontFace}{\param{const wxString\& }{face}}
|
||||
|
||||
Sets current font face to {\it face}. This affects either fixed size
|
||||
font or proportional, depending on context (whether the parser is
|
||||
inside {\tt <TT>} tag or not).
|
||||
|
||||
\membersection{wxHtmlWinParser::SetFontFixed}\label{wxhtmlwinparsersetfontfixed}
|
||||
|
||||
\func{void}{SetFontFixed}{\param{int }{x}}
|
||||
|
||||
Sets fixed face flag of actualfont. {\it x} is either true of false.
|
||||
|
||||
\membersection{wxHtmlWinParser::SetFontItalic}\label{wxhtmlwinparsersetfontitalic}
|
||||
|
||||
\func{void}{SetFontItalic}{\param{int }{x}}
|
||||
|
||||
Sets italic flag of actualfont. {\it x} is either true of false.
|
||||
|
||||
\membersection{wxHtmlWinParser::SetFontSize}\label{wxhtmlwinparsersetfontsize}
|
||||
|
||||
\func{void}{SetFontSize}{\param{int }{s}}
|
||||
|
||||
Sets actual font size (HTML size varies from 1 to 7)
|
||||
|
||||
\membersection{wxHtmlWinParser::SetFontUnderlined}\label{wxhtmlwinparsersetfontunderlined}
|
||||
|
||||
\func{void}{SetFontUnderlined}{\param{int }{x}}
|
||||
|
||||
Sets underlined flag of actualfont. {\it x} is either true of false.
|
||||
|
||||
\membersection{wxHtmlWinParser::SetFonts}\label{wxhtmlwinparsersetfonts}
|
||||
|
||||
\func{void}{SetFonts}{\param{wxString }{normal\_face}, \param{wxString }{fixed\_face}, \param{const int }{*sizes = NULL}}
|
||||
|
||||
Sets fonts. See \helpref{wxHtmlWindow::SetFonts}{wxhtmlwindowsetfonts} for
|
||||
detailed description.
|
||||
|
||||
\membersection{wxHtmlWinParser::SetInputEncoding}\label{wxhtmlwinparsersetinputencoding}
|
||||
|
||||
\func{void}{SetInputEncoding}{\param{wxFontEncoding }{enc}}
|
||||
|
||||
Sets input encoding. The parser uses this information to build conversion
|
||||
tables from document's encoding to some encoding supported by operating
|
||||
system.
|
||||
|
||||
\membersection{wxHtmlWinParser::SetLink}\label{wxhtmlwinparsersetlink}
|
||||
|
||||
\func{void}{SetLink}{\param{const wxHtmlLinkInfo\& }{link}}
|
||||
|
||||
Sets actual hypertext link. Empty link is represented
|
||||
by \helpref{wxHtmlLinkInfo}{wxhtmllinkinfo} with {\it Href} equal
|
||||
to wxEmptyString.
|
||||
|
||||
\membersection{wxHtmlWinParser::SetLinkColor}\label{wxhtmlwinparsersetlinkcolor}
|
||||
|
||||
\func{void}{SetLinkColor}{\param{const wxColour\& }{clr}}
|
||||
|
||||
Sets colour of hypertext link.
|
||||
|
@@ -1,73 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: forcelnk.h
|
||||
// Purpose: see bellow
|
||||
// Author: Vaclav Slavik
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Vaclav Slavik
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/*
|
||||
|
||||
DESCRPITON:
|
||||
|
||||
mod_*.cpp files contain handlers for tags. These files are modules - they contain
|
||||
one wxTagModule class and it's OnInit() method is called from wxApp's init method.
|
||||
The module is called even if you only link it into the executable, so everything
|
||||
seems wonderful.
|
||||
|
||||
The problem is that we have these modules in LIBRARY and mod_*.cpp files contain
|
||||
no method nor class which is known out of the module. So the linker won't
|
||||
link these .o/.obj files into executable because it detected that it is not used
|
||||
by the program.
|
||||
|
||||
To workaround this I introduced set of macros FORCE_LINK_ME and FORCE_LINK. These
|
||||
macros are generic and are not limited to mod_*.cpp files. You may find them quite
|
||||
useful somewhere else...
|
||||
|
||||
How to use them:
|
||||
let's suppose you want to always link file foo.cpp and that you have module
|
||||
always.cpp that is certainly always linked (e.g. the one with main() function
|
||||
or htmlwin.cpp in wxHtml library).
|
||||
|
||||
Place FORCE_LINK_ME(foo) somewhere in foo.cpp and FORCE_LINK(foo) somewhere
|
||||
in always.cpp
|
||||
See mod_*.cpp and htmlwin.cpp for example :-)
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _WX_FORCELNK_H_
|
||||
#define _WX_FORCELNK_H_
|
||||
|
||||
|
||||
|
||||
// This must be part of the module you want to force:
|
||||
#define FORCE_LINK_ME(module_name) \
|
||||
int _link_dummy_func_##module_name (); \
|
||||
int _link_dummy_func_##module_name () \
|
||||
{ \
|
||||
return 1; \
|
||||
}
|
||||
|
||||
|
||||
// And this must be somewhere where it certainly will be linked:
|
||||
#define FORCE_LINK(module_name) \
|
||||
extern int _link_dummy_func_##module_name (); \
|
||||
static int _link_dummy_var_##module_name = \
|
||||
_link_dummy_func_##module_name ();
|
||||
|
||||
#define FORCE_WXHTML_MODULES() \
|
||||
FORCE_LINK(m_layout) \
|
||||
FORCE_LINK(m_fonts) \
|
||||
FORCE_LINK(m_image) \
|
||||
FORCE_LINK(m_list) \
|
||||
FORCE_LINK(m_dflist) \
|
||||
FORCE_LINK(m_pre) \
|
||||
FORCE_LINK(m_hline) \
|
||||
FORCE_LINK(m_links) \
|
||||
FORCE_LINK(m_tables) \
|
||||
FORCE_LINK(m_style)
|
||||
|
||||
|
||||
#endif // _WX_FORCELNK_H_
|
@@ -1,108 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: helpctrl.h
|
||||
// Purpose: wxHtmlHelpController
|
||||
// Notes: Based on htmlhelp.cpp, implementing a monolithic
|
||||
// HTML Help controller class, by Vaclav Slavik
|
||||
// Author: Harm van der Heijden and Vaclav Slavik
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Harm van der Heijden and Vaclav Slavik
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_HELPCTRL_H_
|
||||
#define _WX_HELPCTRL_H_
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if defined(__GNUG__) && !defined(__APPLE__)
|
||||
#pragma interface "helpctrl.h"
|
||||
#endif
|
||||
|
||||
#if wxUSE_WXHTML_HELP
|
||||
|
||||
#include "wx/html/helpfrm.h"
|
||||
#include "wx/helpbase.h"
|
||||
|
||||
#define wxID_HTML_HELPFRAME (wxID_HIGHEST + 1)
|
||||
|
||||
class WXDLLEXPORT wxHtmlHelpController : public wxHelpControllerBase // wxEvtHandler
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxHtmlHelpController)
|
||||
|
||||
public:
|
||||
wxHtmlHelpController(int style = wxHF_DEFAULT_STYLE);
|
||||
virtual ~wxHtmlHelpController();
|
||||
|
||||
void SetTitleFormat(const wxString& format);
|
||||
void SetTempDir(const wxString& path) { m_helpData.SetTempDir(path); }
|
||||
bool AddBook(const wxString& book_url, bool show_wait_msg = FALSE);
|
||||
bool AddBook(const wxFileName& book_file, bool show_wait_msg = FALSE);
|
||||
|
||||
bool Display(const wxString& x);
|
||||
bool Display(int id);
|
||||
bool DisplayContents();
|
||||
bool DisplayIndex();
|
||||
bool KeywordSearch(const wxString& keyword);
|
||||
|
||||
wxHtmlHelpFrame* GetFrame() { return m_helpFrame; }
|
||||
void UseConfig(wxConfigBase *config, const wxString& rootpath = wxEmptyString);
|
||||
|
||||
// Assigns config object to the Ctrl. This config is then
|
||||
// used in subsequent calls to Read/WriteCustomization of both help
|
||||
// Ctrl and it's wxHtmlWindow
|
||||
virtual void ReadCustomization(wxConfigBase *cfg, const wxString& path = wxEmptyString);
|
||||
virtual void WriteCustomization(wxConfigBase *cfg, const wxString& path = wxEmptyString);
|
||||
|
||||
//// Backward compatibility with wxHelpController API
|
||||
|
||||
virtual bool Initialize(const wxString& file, int WXUNUSED(server) ) { return Initialize(file); }
|
||||
virtual bool Initialize(const wxString& file);
|
||||
virtual void SetViewer(const wxString& WXUNUSED(viewer), long WXUNUSED(flags) = 0) {}
|
||||
virtual bool LoadFile(const wxString& file = wxT(""));
|
||||
virtual bool DisplaySection(int sectionNo);
|
||||
virtual bool DisplaySection(const wxString& section) { return Display(section); }
|
||||
virtual bool DisplayBlock(long blockNo) { return DisplaySection(blockNo); }
|
||||
virtual bool DisplayTextPopup(const wxString& text, const wxPoint& pos);
|
||||
|
||||
virtual void SetFrameParameters(const wxString& title,
|
||||
const wxSize& size,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
bool newFrameEachTime = FALSE);
|
||||
/// Obtains the latest settings used by the help frame and the help
|
||||
/// frame.
|
||||
virtual wxFrame *GetFrameParameters(wxSize *size = NULL,
|
||||
wxPoint *pos = NULL,
|
||||
bool *newFrameEachTime = NULL);
|
||||
|
||||
// Get direct access to help data:
|
||||
wxHtmlHelpData *GetHelpData() { return &m_helpData; }
|
||||
|
||||
virtual bool Quit() ;
|
||||
virtual void OnQuit() {};
|
||||
|
||||
void OnCloseFrame(wxCloseEvent& evt);
|
||||
|
||||
// Make the help controller's frame 'modal' if
|
||||
// needed
|
||||
void AddGrabIfNeeded();
|
||||
|
||||
protected:
|
||||
virtual wxHtmlHelpFrame* CreateHelpFrame(wxHtmlHelpData *data);
|
||||
|
||||
virtual void CreateHelpWindow();
|
||||
virtual void DestroyHelpWindow();
|
||||
|
||||
wxHtmlHelpData m_helpData;
|
||||
wxHtmlHelpFrame* m_helpFrame;
|
||||
wxConfigBase * m_Config;
|
||||
wxString m_ConfigRoot;
|
||||
wxString m_titleFormat;
|
||||
int m_FrameStyle;
|
||||
// DECLARE_EVENT_TABLE()
|
||||
|
||||
DECLARE_NO_COPY_CLASS(wxHtmlHelpController)
|
||||
};
|
||||
|
||||
#endif // wxUSE_WXHTML_HELP
|
||||
|
||||
#endif // _WX_HELPCTRL_H_
|
@@ -1,218 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: helpdata.h
|
||||
// Purpose: wxHtmlHelpData
|
||||
// Notes: Based on htmlhelp.cpp, implementing a monolithic
|
||||
// HTML Help controller class, by Vaclav Slavik
|
||||
// Author: Harm van der Heijden and Vaclav Slavik
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Harm van der Heijden and Vaclav Slavik
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_HELPDATA_H_
|
||||
#define _WX_HELPDATA_H_
|
||||
|
||||
#if defined(__GNUG__) && !defined(__APPLE__)
|
||||
#pragma interface "helpdata.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_HTML
|
||||
|
||||
#include "wx/object.h"
|
||||
#include "wx/string.h"
|
||||
#include "wx/filesys.h"
|
||||
#include "wx/dynarray.h"
|
||||
#include "wx/font.h"
|
||||
|
||||
class WXDLLEXPORT wxHtmlHelpData;
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// helper classes & structs
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxHtmlBookRecord
|
||||
{
|
||||
public:
|
||||
wxHtmlBookRecord(const wxString& bookfile, const wxString& basepath,
|
||||
const wxString& title, const wxString& start)
|
||||
{
|
||||
m_BookFile = bookfile;
|
||||
m_BasePath = basepath;
|
||||
m_Title = title;
|
||||
m_Start = start;
|
||||
// for debugging, give the contents index obvious default values
|
||||
m_ContentsStart = m_ContentsEnd = -1;
|
||||
}
|
||||
wxString GetBookFile() const { return m_BookFile; }
|
||||
wxString GetTitle() const { return m_Title; }
|
||||
wxString GetStart() const { return m_Start; }
|
||||
wxString GetBasePath() const { return m_BasePath; }
|
||||
/* SetContentsRange: store in the bookrecord where in the index/contents lists the
|
||||
* book's records are stored. This to facilitate searching in a specific book.
|
||||
* This code will have to be revised when loading/removing books becomes dynamic.
|
||||
* (as opposed to appending only)
|
||||
* Note that storing index range is pointless, because the index is alphab. sorted. */
|
||||
void SetContentsRange(int start, int end) { m_ContentsStart = start; m_ContentsEnd = end; }
|
||||
int GetContentsStart() const { return m_ContentsStart; }
|
||||
int GetContentsEnd() const { return m_ContentsEnd; }
|
||||
|
||||
void SetTitle(const wxString& title) { m_Title = title; }
|
||||
void SetBasePath(const wxString& path) { m_BasePath = path; }
|
||||
void SetStart(const wxString& start) { m_Start = start; }
|
||||
|
||||
// returns full filename of page (which is part of the book),
|
||||
// i.e. with book's basePath prepended. If page is already absolute
|
||||
// path, basePath is _not_ prepended.
|
||||
wxString GetFullPath(const wxString &page) const;
|
||||
|
||||
protected:
|
||||
wxString m_BookFile;
|
||||
wxString m_BasePath;
|
||||
wxString m_Title;
|
||||
wxString m_Start;
|
||||
int m_ContentsStart;
|
||||
int m_ContentsEnd;
|
||||
};
|
||||
|
||||
|
||||
WX_DECLARE_EXPORTED_OBJARRAY(wxHtmlBookRecord, wxHtmlBookRecArray);
|
||||
|
||||
|
||||
struct wxHtmlContentsItem
|
||||
{
|
||||
short int m_Level;
|
||||
int m_ID;
|
||||
wxChar* m_Name;
|
||||
wxChar* m_Page;
|
||||
wxHtmlBookRecord *m_Book;
|
||||
|
||||
// returns full filename of m_Page, i.e. with book's basePath prepended
|
||||
wxString GetFullPath() const { return m_Book->GetFullPath(m_Page); }
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// wxHtmlSearchEngine
|
||||
// This class takes input streams and scans them for occurence
|
||||
// of keyword(s)
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxHtmlSearchEngine : public wxObject
|
||||
{
|
||||
public:
|
||||
wxHtmlSearchEngine() : wxObject() {m_Keyword = NULL; }
|
||||
~wxHtmlSearchEngine() {if (m_Keyword) delete[] m_Keyword; }
|
||||
|
||||
// Sets the keyword we will be searching for
|
||||
virtual void LookFor(const wxString& keyword, bool case_sensitive, bool whole_words_only);
|
||||
|
||||
// Scans the stream for the keyword.
|
||||
// Returns TRUE if the stream contains keyword, fALSE otherwise
|
||||
virtual bool Scan(const wxFSFile& file);
|
||||
|
||||
private:
|
||||
wxChar *m_Keyword;
|
||||
bool m_CaseSensitive;
|
||||
bool m_WholeWords;
|
||||
|
||||
DECLARE_NO_COPY_CLASS(wxHtmlSearchEngine)
|
||||
};
|
||||
|
||||
|
||||
// State information of a search action. I'd have prefered to make this a nested
|
||||
// class inside wxHtmlHelpData, but that's against coding standards :-(
|
||||
// Never construct this class yourself, obtain a copy from
|
||||
// wxHtmlHelpData::PrepareKeywordSearch(const wxString& key)
|
||||
class WXDLLEXPORT wxHtmlSearchStatus
|
||||
{
|
||||
public:
|
||||
// constructor; supply wxHtmlHelpData ptr, the keyword and (optionally) the
|
||||
// title of the book to search. By default, all books are searched.
|
||||
wxHtmlSearchStatus(wxHtmlHelpData* base, const wxString& keyword,
|
||||
bool case_sensitive, bool whole_words_only,
|
||||
const wxString& book = wxEmptyString);
|
||||
bool Search(); // do the next iteration
|
||||
bool IsActive() { return m_Active; }
|
||||
int GetCurIndex() { return m_CurIndex; }
|
||||
int GetMaxIndex() { return m_MaxIndex; }
|
||||
const wxString& GetName() { return m_Name; }
|
||||
wxHtmlContentsItem* GetContentsItem() { return m_ContentsItem; }
|
||||
|
||||
private:
|
||||
wxHtmlHelpData* m_Data;
|
||||
wxHtmlSearchEngine m_Engine;
|
||||
wxString m_Keyword, m_Name;
|
||||
wxChar *m_LastPage;
|
||||
wxHtmlContentsItem* m_ContentsItem;
|
||||
bool m_Active; // search is not finished
|
||||
int m_CurIndex; // where we are now
|
||||
int m_MaxIndex; // number of files we search
|
||||
// For progress bar: 100*curindex/maxindex = % complete
|
||||
|
||||
DECLARE_NO_COPY_CLASS(wxHtmlSearchStatus)
|
||||
};
|
||||
|
||||
class WXDLLEXPORT wxHtmlHelpData : public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxHtmlHelpData)
|
||||
friend class wxHtmlSearchStatus;
|
||||
|
||||
public:
|
||||
wxHtmlHelpData();
|
||||
~wxHtmlHelpData();
|
||||
|
||||
// Sets directory where temporary files are stored.
|
||||
// These temp files are index & contents file in binary (much faster to read)
|
||||
// form. These files are NOT deleted on program's exit.
|
||||
void SetTempDir(const wxString& path);
|
||||
|
||||
// Adds new book. 'book' is location of .htb file (stands for "html book").
|
||||
// See documentation for details on its format.
|
||||
// Returns success.
|
||||
bool AddBook(const wxString& book);
|
||||
bool AddBookParam(const wxFSFile& bookfile,
|
||||
wxFontEncoding encoding,
|
||||
const wxString& title, const wxString& contfile,
|
||||
const wxString& indexfile = wxEmptyString,
|
||||
const wxString& deftopic = wxEmptyString,
|
||||
const wxString& path = wxEmptyString);
|
||||
|
||||
// Some accessing stuff:
|
||||
|
||||
// returns URL of page on basis of (file)name
|
||||
wxString FindPageByName(const wxString& page);
|
||||
// returns URL of page on basis of MS id
|
||||
wxString FindPageById(int id);
|
||||
|
||||
const wxHtmlBookRecArray& GetBookRecArray() { return m_BookRecords; }
|
||||
wxHtmlContentsItem* GetContents() { return m_Contents; }
|
||||
int GetContentsCnt() { return m_ContentsCnt; }
|
||||
wxHtmlContentsItem* GetIndex() { return m_Index; }
|
||||
int GetIndexCnt() { return m_IndexCnt; }
|
||||
|
||||
protected:
|
||||
wxString m_TempPath;
|
||||
|
||||
wxHtmlBookRecArray m_BookRecords;
|
||||
// each book has one record in this array:
|
||||
wxHtmlContentsItem* m_Contents;
|
||||
int m_ContentsCnt;
|
||||
wxHtmlContentsItem* m_Index; // list of all available books and pages.
|
||||
int m_IndexCnt; // list of index items
|
||||
|
||||
protected:
|
||||
// Imports .hhp files (MS HTML Help Workshop)
|
||||
bool LoadMSProject(wxHtmlBookRecord *book, wxFileSystem& fsys,
|
||||
const wxString& indexfile, const wxString& contentsfile);
|
||||
// Reads binary book
|
||||
bool LoadCachedBook(wxHtmlBookRecord *book, wxInputStream *f);
|
||||
// Writes binary book
|
||||
bool SaveCachedBook(wxHtmlBookRecord *book, wxOutputStream *f);
|
||||
|
||||
DECLARE_NO_COPY_CLASS(wxHtmlHelpData)
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
@@ -1,239 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: helpfrm.h
|
||||
// Purpose: wxHtmlHelpFrame
|
||||
// Notes: Based on htmlhelp.cpp, implementing a monolithic
|
||||
// HTML Help controller class, by Vaclav Slavik
|
||||
// Author: Harm van der Heijden and Vaclav Slavik
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Harm van der Heijden and Vaclav Slavik
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_HELPFRM_H_
|
||||
#define _WX_HELPFRM_H_
|
||||
|
||||
#if defined(__GNUG__) && !defined(__APPLE__)
|
||||
#pragma interface "helpfrm.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_WXHTML_HELP
|
||||
|
||||
#include "wx/html/helpdata.h"
|
||||
#include "wx/window.h"
|
||||
#include "wx/frame.h"
|
||||
#include "wx/config.h"
|
||||
#include "wx/splitter.h"
|
||||
#include "wx/notebook.h"
|
||||
#include "wx/listbox.h"
|
||||
#include "wx/choice.h"
|
||||
#include "wx/combobox.h"
|
||||
#include "wx/checkbox.h"
|
||||
#include "wx/stattext.h"
|
||||
#include "wx/html/htmlwin.h"
|
||||
#include "wx/html/htmprint.h"
|
||||
|
||||
class WXDLLEXPORT wxButton;
|
||||
class WXDLLEXPORT wxTextCtrl;
|
||||
|
||||
|
||||
// style flags for the Help Frame
|
||||
#define wxHF_TOOLBAR 0x0001
|
||||
#define wxHF_CONTENTS 0x0002
|
||||
#define wxHF_INDEX 0x0004
|
||||
#define wxHF_SEARCH 0x0008
|
||||
#define wxHF_BOOKMARKS 0x0010
|
||||
#define wxHF_OPEN_FILES 0x0020
|
||||
#define wxHF_PRINT 0x0040
|
||||
#define wxHF_FLAT_TOOLBAR 0x0080
|
||||
#define wxHF_MERGE_BOOKS 0x0100
|
||||
#define wxHF_ICONS_BOOK 0x0200
|
||||
#define wxHF_ICONS_BOOK_CHAPTER 0x0400
|
||||
#define wxHF_ICONS_FOLDER 0x0000 // this is 0 since it is default
|
||||
#define wxHF_DEFAULT_STYLE (wxHF_TOOLBAR | wxHF_CONTENTS | \
|
||||
wxHF_INDEX | wxHF_SEARCH | \
|
||||
wxHF_BOOKMARKS | wxHF_PRINT)
|
||||
//compatibility:
|
||||
#define wxHF_OPENFILES wxHF_OPEN_FILES
|
||||
#define wxHF_FLATTOOLBAR wxHF_FLAT_TOOLBAR
|
||||
#define wxHF_DEFAULTSTYLE wxHF_DEFAULT_STYLE
|
||||
|
||||
|
||||
struct wxHtmlHelpFrameCfg
|
||||
{
|
||||
int x, y, w, h;
|
||||
long sashpos;
|
||||
bool navig_on;
|
||||
};
|
||||
|
||||
|
||||
class WXDLLEXPORT wxHelpControllerBase;
|
||||
|
||||
class WXDLLEXPORT wxHtmlHelpFrame : public wxFrame
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxHtmlHelpFrame)
|
||||
|
||||
public:
|
||||
wxHtmlHelpFrame(wxHtmlHelpData* data = NULL) { Init(data); }
|
||||
wxHtmlHelpFrame(wxWindow* parent, wxWindowID wxWindowID,
|
||||
const wxString& title = wxEmptyString,
|
||||
int style = wxHF_DEFAULT_STYLE, wxHtmlHelpData* data = NULL);
|
||||
bool Create(wxWindow* parent, wxWindowID id, const wxString& title = wxEmptyString,
|
||||
int style = wxHF_DEFAULT_STYLE);
|
||||
~wxHtmlHelpFrame();
|
||||
|
||||
wxHtmlHelpData* GetData() { return m_Data; }
|
||||
wxHelpControllerBase* GetController() const { return m_helpController; }
|
||||
void SetController(wxHelpControllerBase* controller) { m_helpController = controller; }
|
||||
|
||||
// Sets format of title of the frame. Must contain exactly one "%s"
|
||||
// (for title of displayed HTML page)
|
||||
void SetTitleFormat(const wxString& format);
|
||||
|
||||
// Displays page x. If not found it will offect the user a choice of
|
||||
// searching books.
|
||||
// Looking for the page runs in these steps:
|
||||
// 1. try to locate file named x (if x is for example "doc/howto.htm")
|
||||
// 2. try to open starting page of book x
|
||||
// 3. try to find x in contents (if x is for example "How To ...")
|
||||
// 4. try to find x in index (if x is for example "How To ...")
|
||||
bool Display(const wxString& x);
|
||||
|
||||
// Alternative version that works with numeric ID.
|
||||
// (uses extension to MS format, <param name="ID" value=id>, see docs)
|
||||
bool Display(const int id);
|
||||
|
||||
// Displays help window and focuses contents.
|
||||
bool DisplayContents();
|
||||
|
||||
// Displays help window and focuses index.
|
||||
bool DisplayIndex();
|
||||
|
||||
// Searches for keyword. Returns TRUE and display page if found, return
|
||||
// FALSE otherwise
|
||||
// Syntax of keyword is Altavista-like:
|
||||
// * words are separated by spaces
|
||||
// (but "\"hello world\"" is only one world "hello world")
|
||||
// * word may be pretended by + or -
|
||||
// (+ : page must contain the word ; - : page can't contain the word)
|
||||
// * if there is no + or - before the word, + is default
|
||||
bool KeywordSearch(const wxString& keyword);
|
||||
|
||||
void UseConfig(wxConfigBase *config, const wxString& rootpath = wxEmptyString)
|
||||
{
|
||||
m_Config = config;
|
||||
m_ConfigRoot = rootpath;
|
||||
ReadCustomization(config, rootpath);
|
||||
}
|
||||
|
||||
// Saves custom settings into cfg config. it will use the path 'path'
|
||||
// if given, otherwise it will save info into currently selected path.
|
||||
// saved values : things set by SetFonts, SetBorders.
|
||||
void ReadCustomization(wxConfigBase *cfg, const wxString& path = wxEmptyString);
|
||||
void WriteCustomization(wxConfigBase *cfg, const wxString& path = wxEmptyString);
|
||||
|
||||
// call this to let wxHtmlHelpFrame know page changed
|
||||
void NotifyPageChanged();
|
||||
|
||||
// Refreshes Contents and Index tabs
|
||||
void RefreshLists();
|
||||
|
||||
protected:
|
||||
void Init(wxHtmlHelpData* data = NULL);
|
||||
|
||||
// Adds items to m_Contents tree control
|
||||
void CreateContents();
|
||||
|
||||
// Adds items to m_IndexList
|
||||
void CreateIndex();
|
||||
|
||||
// Add books to search choice panel
|
||||
void CreateSearch();
|
||||
|
||||
// Add custom buttons to toolbar
|
||||
virtual void AddToolbarButtons(wxToolBar *toolBar, int style);
|
||||
|
||||
// Displays options dialog (fonts etc.)
|
||||
virtual void OptionsDialog();
|
||||
|
||||
void OnToolbar(wxCommandEvent& event);
|
||||
void OnContentsSel(wxTreeEvent& event);
|
||||
void OnIndexSel(wxCommandEvent& event);
|
||||
void OnIndexFind(wxCommandEvent& event);
|
||||
void OnIndexAll(wxCommandEvent& event);
|
||||
void OnSearchSel(wxCommandEvent& event);
|
||||
void OnSearch(wxCommandEvent& event);
|
||||
void OnBookmarksSel(wxCommandEvent& event);
|
||||
void OnCloseWindow(wxCloseEvent& event);
|
||||
void OnActivate(wxActivateEvent& event);
|
||||
|
||||
#ifdef __WXMAC__
|
||||
void OnClose(wxCommandEvent& event);
|
||||
void OnAbout(wxCommandEvent& event);
|
||||
#endif
|
||||
|
||||
// Images:
|
||||
enum {
|
||||
IMG_Book = 0,
|
||||
IMG_Folder,
|
||||
IMG_Page
|
||||
};
|
||||
|
||||
protected:
|
||||
wxHtmlHelpData* m_Data;
|
||||
bool m_DataCreated; // m_Data created by frame, or supplied?
|
||||
wxString m_TitleFormat; // title of the help frame
|
||||
// below are various pointers to GUI components
|
||||
wxHtmlWindow *m_HtmlWin;
|
||||
wxSplitterWindow *m_Splitter;
|
||||
wxPanel *m_NavigPan;
|
||||
wxNotebook *m_NavigNotebook;
|
||||
wxTreeCtrl *m_ContentsBox;
|
||||
wxTextCtrl *m_IndexText;
|
||||
wxButton *m_IndexButton;
|
||||
wxButton *m_IndexButtonAll;
|
||||
wxListBox *m_IndexList;
|
||||
wxTextCtrl *m_SearchText;
|
||||
wxButton *m_SearchButton;
|
||||
wxListBox *m_SearchList;
|
||||
wxChoice *m_SearchChoice;
|
||||
wxStaticText *m_IndexCountInfo;
|
||||
wxCheckBox *m_SearchCaseSensitive;
|
||||
wxCheckBox *m_SearchWholeWords;
|
||||
|
||||
wxComboBox *m_Bookmarks;
|
||||
wxArrayString m_BookmarksNames, m_BookmarksPages;
|
||||
|
||||
wxHtmlHelpFrameCfg m_Cfg;
|
||||
|
||||
wxConfigBase *m_Config;
|
||||
wxString m_ConfigRoot;
|
||||
|
||||
// pagenumbers of controls in notebook (usually 0,1,2)
|
||||
int m_ContentsPage;
|
||||
int m_IndexPage;
|
||||
int m_SearchPage;
|
||||
|
||||
// lists of available fonts (used in options dialog)
|
||||
wxArrayString *m_NormalFonts, *m_FixedFonts;
|
||||
int m_FontSize; // 0,1,2 = small,medium,big
|
||||
wxString m_NormalFace, m_FixedFace;
|
||||
|
||||
bool m_UpdateContents;
|
||||
|
||||
#if wxUSE_PRINTING_ARCHITECTURE
|
||||
wxHtmlEasyPrinting *m_Printer;
|
||||
#endif
|
||||
wxHashTable *m_PagesHash;
|
||||
wxHelpControllerBase* m_helpController;
|
||||
|
||||
int m_hfStyle;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
DECLARE_NO_COPY_CLASS(wxHtmlHelpFrame)
|
||||
};
|
||||
|
||||
#endif // wxUSE_WXHTML_HELP
|
||||
|
||||
#endif
|
@@ -1,382 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: htmlcell.h
|
||||
// Purpose: wxHtmlCell class is used by wxHtmlWindow/wxHtmlWinParser
|
||||
// as a basic visual element of HTML page
|
||||
// Author: Vaclav Slavik
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 1999 Vaclav Slavik
|
||||
// Licence: wxWindows Licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef _WX_HTMLCELL_H_
|
||||
#define _WX_HTMLCELL_H_
|
||||
|
||||
#if defined(__GNUG__) && !defined(__APPLE__)
|
||||
#pragma interface "htmlcell.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_HTML
|
||||
|
||||
#include "wx/html/htmltag.h"
|
||||
#include "wx/html/htmldefs.h"
|
||||
#include "wx/window.h"
|
||||
|
||||
|
||||
class WXDLLEXPORT wxHtmlLinkInfo;
|
||||
class WXDLLEXPORT wxHtmlCell;
|
||||
class WXDLLEXPORT wxHtmlContainerCell;
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// wxHtmlCell
|
||||
// Internal data structure. It represents fragments of parsed HTML
|
||||
// page - a word, picture, table, horizontal line and so on.
|
||||
// It is used by wxHtmlWindow to represent HTML page in memory.
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
|
||||
class WXDLLEXPORT wxHtmlCell : public wxObject
|
||||
{
|
||||
public:
|
||||
wxHtmlCell();
|
||||
virtual ~wxHtmlCell();
|
||||
|
||||
void SetParent(wxHtmlContainerCell *p) {m_Parent = p;}
|
||||
wxHtmlContainerCell *GetParent() const {return m_Parent;}
|
||||
|
||||
int GetPosX() const {return m_PosX;}
|
||||
int GetPosY() const {return m_PosY;}
|
||||
int GetWidth() const {return m_Width;}
|
||||
int GetHeight() const {return m_Height;}
|
||||
int GetDescent() const {return m_Descent;}
|
||||
|
||||
const wxString& GetId() const { return m_id; }
|
||||
void SetId(const wxString& id) { m_id = id; }
|
||||
|
||||
// returns the link associated with this cell. The position is position within
|
||||
// the cell so it varies from 0 to m_Width, from 0 to m_Height
|
||||
virtual wxHtmlLinkInfo* GetLink(int WXUNUSED(x) = 0, int WXUNUSED(y) = 0) const
|
||||
{ return m_Link; }
|
||||
|
||||
// members access methods
|
||||
wxHtmlCell *GetNext() const {return m_Next;}
|
||||
|
||||
// members writing methods
|
||||
virtual void SetPos(int x, int y) {m_PosX = x, m_PosY = y;}
|
||||
void SetLink(const wxHtmlLinkInfo& link);
|
||||
void SetNext(wxHtmlCell *cell) {m_Next = cell;}
|
||||
|
||||
// 1. adjust cell's width according to the fact that maximal possible width is w.
|
||||
// (this has sense when working with horizontal lines, tables etc.)
|
||||
// 2. prepare layout (=fill-in m_PosX, m_PosY (and sometime m_Height) members)
|
||||
// = place items to fit window, according to the width w
|
||||
virtual void Layout(int w);
|
||||
|
||||
// renders the cell
|
||||
virtual void Draw(wxDC& WXUNUSED(dc), int WXUNUSED(x), int WXUNUSED(y), int WXUNUSED(view_y1), int WXUNUSED(view_y2)) {}
|
||||
|
||||
// proceed drawing actions in case the cell is not visible (scrolled out of screen).
|
||||
// This is needed to change fonts, colors and so on
|
||||
virtual void DrawInvisible(wxDC& WXUNUSED(dc), int WXUNUSED(x), int WXUNUSED(y)) {}
|
||||
|
||||
// This method returns pointer to the FIRST cell for that
|
||||
// the condition
|
||||
// is true. It first checks if the condition is true for this
|
||||
// cell and then calls m_Next->Find(). (Note: it checks
|
||||
// all subcells if the cell is container)
|
||||
// Condition is unique condition identifier (see htmldefs.h)
|
||||
// (user-defined condition IDs should start from 10000)
|
||||
// and param is optional parameter
|
||||
// Example : m_Cell->Find(wxHTML_COND_ISANCHOR, "news");
|
||||
// returns pointer to anchor news
|
||||
virtual const wxHtmlCell* Find(int condition, const void* param) const;
|
||||
|
||||
// This function is called when mouse button is clicked over the cell.
|
||||
//
|
||||
// Parent is pointer to wxHtmlWindow that generated the event
|
||||
// HINT: if this handling is not enough for you you should use
|
||||
// wxHtmlWidgetCell
|
||||
virtual void OnMouseClick(wxWindow *parent, int x, int y, const wxMouseEvent& event);
|
||||
|
||||
// This method used to adjust pagebreak position. The parameter is
|
||||
// variable that contains y-coordinate of page break (= horizontal line that
|
||||
// should not be crossed by words, images etc.). If this cell cannot be divided
|
||||
// into two pieces (each one on another page) then it moves the pagebreak
|
||||
// few pixels up.
|
||||
//
|
||||
// Returned value : true if pagebreak was modified, false otherwise
|
||||
// Usage : while (container->AdjustPagebreak(&p)) {}
|
||||
virtual bool AdjustPagebreak(int *pagebreak, int *known_pagebreaks = NULL, int number_of_pages = 0) const;
|
||||
|
||||
// Sets cell's behaviour on pagebreaks (see AdjustPagebreak). Default
|
||||
// is true - the cell can be split on two pages
|
||||
void SetCanLiveOnPagebreak(bool can) { m_CanLiveOnPagebreak = can; }
|
||||
|
||||
// Returns y-coordinates that contraint the cell, i.e. left is highest
|
||||
// and right lowest coordinate such that the cell lays between then.
|
||||
// Note: this method does not return meaningful values if you haven't
|
||||
// called Layout() before!
|
||||
virtual void GetHorizontalConstraints(int *left, int *right) const;
|
||||
|
||||
// Returns true for simple == terminal cells, i.e. not composite ones.
|
||||
// This if for internal usage only and may disappear in future versions!
|
||||
virtual bool IsTerminalCell() const { return TRUE; }
|
||||
|
||||
// Find the terminal cell inside this cell at the given position (relative
|
||||
// to this cell)
|
||||
//
|
||||
// Returns NULL if not found
|
||||
virtual wxHtmlCell *FindCellByPos(wxCoord x, wxCoord y) const;
|
||||
|
||||
protected:
|
||||
wxHtmlCell *m_Next;
|
||||
// pointer to the next cell
|
||||
wxHtmlContainerCell *m_Parent;
|
||||
// pointer to parent cell
|
||||
long m_Width, m_Height, m_Descent;
|
||||
// dimensions of fragment
|
||||
// m_Descent is used to position text&images..
|
||||
long m_PosX, m_PosY;
|
||||
// position where the fragment is drawn
|
||||
wxHtmlLinkInfo *m_Link;
|
||||
// destination address if this fragment is hypertext link, NULL otherwise
|
||||
bool m_CanLiveOnPagebreak;
|
||||
// true if this cell can be placed on pagebreak, false otherwise
|
||||
wxString m_id;
|
||||
// unique identifier of the cell, generated from "id" property of tags
|
||||
|
||||
DECLARE_NO_COPY_CLASS(wxHtmlCell)
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// Inherited cells:
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// wxHtmlWordCell
|
||||
// Single word in input stream.
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxHtmlWordCell : public wxHtmlCell
|
||||
{
|
||||
public:
|
||||
wxHtmlWordCell(const wxString& word, wxDC& dc);
|
||||
void Draw(wxDC& dc, int x, int y, int view_y1, int view_y2);
|
||||
|
||||
protected:
|
||||
wxString m_Word;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// wxHtmlContainerCell
|
||||
// Container - it contains other cells. Basic of layout algorithm.
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxHtmlContainerCell : public wxHtmlCell
|
||||
{
|
||||
public:
|
||||
wxHtmlContainerCell(wxHtmlContainerCell *parent);
|
||||
~wxHtmlContainerCell();
|
||||
|
||||
virtual void Layout(int w);
|
||||
virtual void Draw(wxDC& dc, int x, int y, int view_y1, int view_y2);
|
||||
virtual void DrawInvisible(wxDC& dc, int x, int y);
|
||||
virtual bool AdjustPagebreak(int *pagebreak, int *known_pagebreaks = NULL, int number_of_pages = 0) const;
|
||||
|
||||
// insert cell at the end of m_Cells list
|
||||
void InsertCell(wxHtmlCell *cell);
|
||||
|
||||
// sets horizontal/vertical alignment
|
||||
void SetAlignHor(int al) {m_AlignHor = al; m_LastLayout = -1;}
|
||||
int GetAlignHor() const {return m_AlignHor;}
|
||||
void SetAlignVer(int al) {m_AlignVer = al; m_LastLayout = -1;}
|
||||
int GetAlignVer() const {return m_AlignVer;}
|
||||
|
||||
// sets left-border indentation. units is one of wxHTML_UNITS_* constants
|
||||
// what is combination of wxHTML_INDENT_*
|
||||
void SetIndent(int i, int what, int units = wxHTML_UNITS_PIXELS);
|
||||
// returns the indentation. ind is one of wxHTML_INDENT_* constants
|
||||
int GetIndent(int ind) const;
|
||||
// returns type of value returned by GetIndent(ind)
|
||||
int GetIndentUnits(int ind) const;
|
||||
|
||||
// sets alignment info based on given tag's params
|
||||
void SetAlign(const wxHtmlTag& tag);
|
||||
// sets floating width adjustment
|
||||
// (examples : 32 percent of parent container,
|
||||
// -15 pixels percent (this means 100 % - 15 pixels)
|
||||
void SetWidthFloat(int w, int units) {m_WidthFloat = w; m_WidthFloatUnits = units; m_LastLayout = -1;}
|
||||
void SetWidthFloat(const wxHtmlTag& tag, double pixel_scale = 1.0);
|
||||
// sets minimal height of this container.
|
||||
void SetMinHeight(int h, int align = wxHTML_ALIGN_TOP) {m_MinHeight = h; m_MinHeightAlign = align; m_LastLayout = -1;}
|
||||
|
||||
void SetBackgroundColour(const wxColour& clr) {m_UseBkColour = TRUE; m_BkColour = clr;}
|
||||
// returns background colour (of wxNullColour if none set), so that widgets can
|
||||
// adapt to it:
|
||||
wxColour GetBackgroundColour();
|
||||
void SetBorder(const wxColour& clr1, const wxColour& clr2) {m_UseBorder = TRUE; m_BorderColour1 = clr1, m_BorderColour2 = clr2;}
|
||||
virtual wxHtmlLinkInfo* GetLink(int x = 0, int y = 0) const;
|
||||
virtual const wxHtmlCell* Find(int condition, const void* param) const;
|
||||
virtual void OnMouseClick(wxWindow *parent, int x, int y, const wxMouseEvent& event);
|
||||
virtual void GetHorizontalConstraints(int *left, int *right) const;
|
||||
|
||||
// returns pointer to the first cell in container or NULL
|
||||
wxHtmlCell* GetFirstCell() const {return m_Cells;}
|
||||
|
||||
// see comment in wxHtmlCell about this method
|
||||
virtual bool IsTerminalCell() const { return FALSE; }
|
||||
|
||||
virtual wxHtmlCell *FindCellByPos(wxCoord x, wxCoord y) const;
|
||||
|
||||
protected:
|
||||
int m_IndentLeft, m_IndentRight, m_IndentTop, m_IndentBottom;
|
||||
// indentation of subcells. There is always m_Indent pixels
|
||||
// big space between given border of the container and the subcells
|
||||
// it m_Indent < 0 it is in PERCENTS, otherwise it is in pixels
|
||||
int m_MinHeight, m_MinHeightAlign;
|
||||
// minimal height.
|
||||
wxHtmlCell *m_Cells, *m_LastCell;
|
||||
// internal cells, m_Cells points to the first of them, m_LastCell to the last one.
|
||||
// (LastCell is needed only to speed-up InsertCell)
|
||||
int m_AlignHor, m_AlignVer;
|
||||
// alignment horizontal and vertical (left, center, right)
|
||||
int m_WidthFloat, m_WidthFloatUnits;
|
||||
// width float is used in adjustWidth
|
||||
bool m_UseBkColour;
|
||||
wxColour m_BkColour;
|
||||
// background color of this container
|
||||
bool m_UseBorder;
|
||||
wxColour m_BorderColour1, m_BorderColour2;
|
||||
// borders color of this container
|
||||
int m_LastLayout;
|
||||
// if != -1 then call to Layout may be no-op
|
||||
// if previous call to Layout has same argument
|
||||
|
||||
DECLARE_NO_COPY_CLASS(wxHtmlContainerCell)
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// wxHtmlColourCell
|
||||
// Color changer.
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxHtmlColourCell : public wxHtmlCell
|
||||
{
|
||||
public:
|
||||
wxHtmlColourCell(const wxColour& clr, int flags = wxHTML_CLR_FOREGROUND) : wxHtmlCell() {m_Colour = clr; m_Flags = flags;}
|
||||
virtual void Draw(wxDC& dc, int x, int y, int view_y1, int view_y2);
|
||||
virtual void DrawInvisible(wxDC& dc, int x, int y);
|
||||
|
||||
protected:
|
||||
wxColour m_Colour;
|
||||
unsigned m_Flags;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// wxHtmlFontCell
|
||||
// Sets actual font used for text rendering
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxHtmlFontCell : public wxHtmlCell
|
||||
{
|
||||
public:
|
||||
wxHtmlFontCell(wxFont *font) : wxHtmlCell() { m_Font = (*font); }
|
||||
virtual void Draw(wxDC& dc, int x, int y, int view_y1, int view_y2);
|
||||
virtual void DrawInvisible(wxDC& dc, int x, int y);
|
||||
|
||||
protected:
|
||||
wxFont m_Font;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// wxHtmlwidgetCell
|
||||
// This cell is connected with wxWindow object
|
||||
// You can use it to insert windows into HTML page
|
||||
// (buttons, input boxes etc.)
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxHtmlWidgetCell : public wxHtmlCell
|
||||
{
|
||||
public:
|
||||
// !!! wnd must have correct parent!
|
||||
// if w != 0 then the m_Wnd has 'floating' width - it adjust
|
||||
// it's width according to parent container's width
|
||||
// (w is percent of parent's width)
|
||||
wxHtmlWidgetCell(wxWindow *wnd, int w = 0);
|
||||
~wxHtmlWidgetCell() { m_Wnd->Destroy(); }
|
||||
virtual void Draw(wxDC& dc, int x, int y, int view_y1, int view_y2);
|
||||
virtual void DrawInvisible(wxDC& dc, int x, int y);
|
||||
virtual void Layout(int w);
|
||||
|
||||
protected:
|
||||
wxWindow* m_Wnd;
|
||||
int m_WidthFloat;
|
||||
// width float is used in adjustWidth (it is in percents)
|
||||
|
||||
DECLARE_NO_COPY_CLASS(wxHtmlWidgetCell)
|
||||
};
|
||||
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// wxHtmlLinkInfo
|
||||
// Internal data structure. It represents hypertext link
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxHtmlLinkInfo : public wxObject
|
||||
{
|
||||
public:
|
||||
wxHtmlLinkInfo() : wxObject()
|
||||
{ m_Href = m_Target = wxEmptyString; m_Event = NULL, m_Cell = NULL; }
|
||||
wxHtmlLinkInfo(const wxString& href, const wxString& target = wxEmptyString) : wxObject()
|
||||
{ m_Href = href; m_Target = target; m_Event = NULL, m_Cell = NULL; }
|
||||
wxHtmlLinkInfo(const wxHtmlLinkInfo& l) : wxObject()
|
||||
{ m_Href = l.m_Href, m_Target = l.m_Target, m_Event = l.m_Event;
|
||||
m_Cell = l.m_Cell; }
|
||||
wxHtmlLinkInfo& operator=(const wxHtmlLinkInfo& l)
|
||||
{ m_Href = l.m_Href, m_Target = l.m_Target, m_Event = l.m_Event;
|
||||
m_Cell = l.m_Cell; return *this; }
|
||||
|
||||
void SetEvent(const wxMouseEvent *e) { m_Event = e; }
|
||||
void SetHtmlCell(const wxHtmlCell *e) { m_Cell = e; }
|
||||
|
||||
wxString GetHref() const { return m_Href; }
|
||||
wxString GetTarget() const { return m_Target; }
|
||||
const wxMouseEvent* GetEvent() const { return m_Event; }
|
||||
const wxHtmlCell* GetHtmlCell() const { return m_Cell; }
|
||||
|
||||
private:
|
||||
wxString m_Href, m_Target;
|
||||
const wxMouseEvent *m_Event;
|
||||
const wxHtmlCell *m_Cell;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // wxUSE_HTML
|
||||
|
||||
#endif // _WX_HTMLCELL_H_
|
||||
|
@@ -1,157 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: htmldefs.h
|
||||
// Purpose: constants for wxhtml library
|
||||
// Author: Vaclav Slavik
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 1999 Vaclav Slavik
|
||||
// Licence: wxWindows Licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef _WX_HTMLDEFS_H_
|
||||
#define _WX_HTMLDEFS_H_
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_HTML
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// ALIGNMENTS
|
||||
// Describes alignment of text etc. in containers
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
#define wxHTML_ALIGN_LEFT 0x0000
|
||||
#define wxHTML_ALIGN_RIGHT 0x0002
|
||||
#define wxHTML_ALIGN_JUSTIFY 0x0010
|
||||
|
||||
#define wxHTML_ALIGN_TOP 0x0004
|
||||
#define wxHTML_ALIGN_BOTTOM 0x0008
|
||||
|
||||
#define wxHTML_ALIGN_CENTER 0x0001
|
||||
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// COLOR MODES
|
||||
// Used by wxHtmlColourCell to determine clr of what is changing
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
#define wxHTML_CLR_FOREGROUND 0x0001
|
||||
#define wxHTML_CLR_BACKGROUND 0x0002
|
||||
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// UNITS
|
||||
// Used to specify units
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
#define wxHTML_UNITS_PIXELS 0x0001
|
||||
#define wxHTML_UNITS_PERCENT 0x0002
|
||||
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// INDENTS
|
||||
// Used to specify indetation relatives
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
#define wxHTML_INDENT_LEFT 0x0010
|
||||
#define wxHTML_INDENT_RIGHT 0x0020
|
||||
#define wxHTML_INDENT_TOP 0x0040
|
||||
#define wxHTML_INDENT_BOTTOM 0x0080
|
||||
|
||||
#define wxHTML_INDENT_HORIZONTAL wxHTML_INDENT_LEFT | wxHTML_INDENT_RIGHT
|
||||
#define wxHTML_INDENT_VERTICAL wxHTML_INDENT_TOP | wxHTML_INDENT_BOTTOM
|
||||
#define wxHTML_INDENT_ALL wxHTML_INDENT_VERTICAL | wxHTML_INDENT_HORIZONTAL
|
||||
|
||||
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// FIND CONDITIONS
|
||||
// Identifiers of wxHtmlCell's Find() conditions
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
#define wxHTML_COND_ISANCHOR 1
|
||||
// Finds the anchor of 'param' name (pointer to wxString).
|
||||
|
||||
#define wxHTML_COND_ISIMAGEMAP 2
|
||||
// Finds imagemap of 'param' name (pointer to wxString).
|
||||
// (used exclusively by m_image.cpp)
|
||||
|
||||
#define wxHTML_COND_USER 10000
|
||||
// User-defined conditions should start from this number
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// INTERNALS
|
||||
// wxHTML internal constants
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
#define wxHTML_SCROLL_STEP 16
|
||||
/* size of one scroll step of wxHtmlWindow in pixels */
|
||||
#define wxHTML_BUFLEN 1024
|
||||
/* size of temporary buffer used during parsing */
|
||||
#define wxHTML_REALLOC_STEP 32
|
||||
/* steps of array reallocation */
|
||||
#define wxHTML_PRINT_MAX_PAGES 999
|
||||
/* maximum number of pages printable via html printing */
|
||||
|
||||
|
||||
/* default font sizes */
|
||||
#ifdef __WXMSW__
|
||||
#define wxHTML_FONT_SIZE_1 7
|
||||
#define wxHTML_FONT_SIZE_2 8
|
||||
#define wxHTML_FONT_SIZE_3 10
|
||||
#define wxHTML_FONT_SIZE_4 12
|
||||
#define wxHTML_FONT_SIZE_5 16
|
||||
#define wxHTML_FONT_SIZE_6 22
|
||||
#define wxHTML_FONT_SIZE_7 30
|
||||
#elif defined(__WXMAC__)
|
||||
#define wxHTML_FONT_SIZE_1 9
|
||||
#define wxHTML_FONT_SIZE_2 12
|
||||
#define wxHTML_FONT_SIZE_3 14
|
||||
#define wxHTML_FONT_SIZE_4 18
|
||||
#define wxHTML_FONT_SIZE_5 24
|
||||
#define wxHTML_FONT_SIZE_6 30
|
||||
#define wxHTML_FONT_SIZE_7 36
|
||||
#else
|
||||
#define wxHTML_FONT_SIZE_1 10
|
||||
#define wxHTML_FONT_SIZE_2 12
|
||||
#define wxHTML_FONT_SIZE_3 14
|
||||
#define wxHTML_FONT_SIZE_4 16
|
||||
#define wxHTML_FONT_SIZE_5 19
|
||||
#define wxHTML_FONT_SIZE_6 24
|
||||
#define wxHTML_FONT_SIZE_7 32
|
||||
#endif
|
||||
|
||||
|
||||
#if WXWIN_COMPATIBILITY_2
|
||||
|
||||
#define HTML_ALIGN_LEFT wxHTML_ALIGN_LEFT
|
||||
#define HTML_ALIGN_RIGHT wxHTML_ALIGN_RIGHT
|
||||
#define HTML_ALIGN_TOP wxHTML_ALIGN_TOP
|
||||
#define HTML_ALIGN_BOTTOM wxHTML_ALIGN_BOTTOM
|
||||
#define HTML_ALIGN_CENTER wxHTML_ALIGN_CENTER
|
||||
#define HTML_CLR_FOREGROUND wxHTML_CLR_FOREGROUND
|
||||
#define HTML_CLR_BACKGROUND wxHTML_CLR_BACKGROUND
|
||||
#define HTML_UNITS_PIXELS wxHTML_UNITS_PIXELS
|
||||
#define HTML_UNITS_PERCENT wxHTML_UNITS_PERCENT
|
||||
#define HTML_INDENT_LEFT wxHTML_INDENT_LEFT
|
||||
#define HTML_INDENT_RIGHT wxHTML_INDENT_RIGHT
|
||||
#define HTML_INDENT_TOP wxHTML_INDENT_TOP
|
||||
#define HTML_INDENT_BOTTOM wxHTML_INDENT_BOTTOM
|
||||
#define HTML_INDENT_HORIZONTAL wxHTML_INDENT_HORIZONTAL
|
||||
#define HTML_INDENT_VERTICAL wxHTML_INDENT_VERTICAL
|
||||
#define HTML_INDENT_ALL wxHTML_INDENT_ALL
|
||||
#define HTML_COND_ISANCHOR wxHTML_COND_ISANCHOR
|
||||
#define HTML_COND_ISIMAGEMAP wxHTML_COND_ISIMAGEMAP
|
||||
#define HTML_COND_USER wxHTML_COND_USER
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
@@ -1,87 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: htmlfilt.h
|
||||
// Purpose: filters
|
||||
// Author: Vaclav Slavik
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 1999 Vaclav Slavik
|
||||
// Licence: wxWindows Licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef _WX_HTMLFILT_H_
|
||||
#define _WX_HTMLFILT_H_
|
||||
|
||||
#if defined(__GNUG__) && !defined(__APPLE__)
|
||||
#pragma interface "htmlfilt.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_HTML
|
||||
|
||||
#include "wx/filesys.h"
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// wxHtmlFilter
|
||||
// This class is input filter. It can "translate" files
|
||||
// in non-HTML format to HTML format
|
||||
// interface to access certain
|
||||
// kinds of files (HTPP, FTP, local, tar.gz etc..)
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxHtmlFilter : public wxObject
|
||||
{
|
||||
DECLARE_ABSTRACT_CLASS(wxHtmlFilter)
|
||||
|
||||
public:
|
||||
wxHtmlFilter() : wxObject() {}
|
||||
virtual ~wxHtmlFilter() {}
|
||||
|
||||
// returns TRUE if this filter is able to open&read given file
|
||||
virtual bool CanRead(const wxFSFile& file) const = 0;
|
||||
|
||||
// Reads given file and returns HTML document.
|
||||
// Returns empty string if opening failed
|
||||
virtual wxString ReadFile(const wxFSFile& file) const = 0;
|
||||
};
|
||||
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// wxHtmlFilterPlainText
|
||||
// This filter is used as default filter if no other can
|
||||
// be used (= uknown type of file). It is used by
|
||||
// wxHtmlWindow itself.
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
|
||||
class WXDLLEXPORT wxHtmlFilterPlainText : public wxHtmlFilter
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxHtmlFilterPlainText)
|
||||
|
||||
public:
|
||||
virtual bool CanRead(const wxFSFile& file) const;
|
||||
virtual wxString ReadFile(const wxFSFile& file) const;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// wxHtmlFilterHTML
|
||||
// filter for text/html
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
class wxHtmlFilterHTML : public wxHtmlFilter
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxHtmlFilterHTML)
|
||||
|
||||
public:
|
||||
virtual bool CanRead(const wxFSFile& file) const;
|
||||
virtual wxString ReadFile(const wxFSFile& file) const;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif // wxUSE_HTML
|
||||
|
||||
#endif // _WX_HTMLFILT_H_
|
||||
|
@@ -1,278 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: htmlpars.h
|
||||
// Purpose: wxHtmlParser class (generic parser)
|
||||
// Author: Vaclav Slavik
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 1999 Vaclav Slavik
|
||||
// Licence: wxWindows Licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef _WX_HTMLPARS_H_
|
||||
#define _WX_HTMLPARS_H_
|
||||
|
||||
#if defined(__GNUG__) && !defined(__APPLE__)
|
||||
#pragma interface "htmlpars.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#if wxUSE_HTML
|
||||
|
||||
#include "wx/html/htmltag.h"
|
||||
#include "wx/filesys.h"
|
||||
#include "wx/hash.h"
|
||||
#include "wx/fontenc.h"
|
||||
|
||||
class WXDLLEXPORT wxMBConv;
|
||||
class WXDLLEXPORT wxHtmlParser;
|
||||
class WXDLLEXPORT wxHtmlTagHandler;
|
||||
class WXDLLEXPORT wxHtmlEntitiesParser;
|
||||
|
||||
class wxHtmlTextPieces;
|
||||
class wxHtmlParserState;
|
||||
|
||||
|
||||
enum wxHtmlURLType
|
||||
{
|
||||
wxHTML_URL_PAGE,
|
||||
wxHTML_URL_IMAGE,
|
||||
wxHTML_URL_OTHER
|
||||
};
|
||||
|
||||
// This class handles generic parsing of HTML document : it scans
|
||||
// the document and divide it into blocks of tags (where one block
|
||||
// consists of starting and ending tag and of text between these
|
||||
// 2 tags.
|
||||
class WXDLLEXPORT wxHtmlParser : public wxObject
|
||||
{
|
||||
DECLARE_ABSTRACT_CLASS(wxHtmlParser)
|
||||
|
||||
public:
|
||||
wxHtmlParser();
|
||||
virtual ~wxHtmlParser();
|
||||
|
||||
// Sets the class which will be used for opening files
|
||||
void SetFS(wxFileSystem *fs) { m_FS = fs; }
|
||||
|
||||
wxFileSystem* GetFS() const { return m_FS; }
|
||||
|
||||
// Opens file if the parser is allowed to open given URL (may be forbidden
|
||||
// for security reasons)
|
||||
virtual wxFSFile *OpenURL(wxHtmlURLType type, const wxString& url) const;
|
||||
|
||||
// You can simply call this method when you need parsed output.
|
||||
// This method does these things:
|
||||
// 1. call InitParser(source);
|
||||
// 2. call DoParsing();
|
||||
// 3. call GetProduct(); (it's return value is then returned)
|
||||
// 4. call DoneParser();
|
||||
wxObject* Parse(const wxString& source);
|
||||
|
||||
// Sets the source. This must be called before running Parse() method.
|
||||
virtual void InitParser(const wxString& source);
|
||||
// This must be called after Parse().
|
||||
virtual void DoneParser();
|
||||
|
||||
// May be called during parsing to immediately return from Parse().
|
||||
virtual void StopParsing() { m_stopParsing = TRUE; }
|
||||
|
||||
// Parses the m_Source from begin_pos to end_pos-1.
|
||||
// (in noparams version it parses whole m_Source)
|
||||
void DoParsing(int begin_pos, int end_pos);
|
||||
void DoParsing();
|
||||
|
||||
// Returns pointer to the tag at parser's current position
|
||||
wxHtmlTag *GetCurrentTag() const { return m_CurTag; }
|
||||
|
||||
// Returns product of parsing
|
||||
// Returned value is result of parsing of the part. The type of this result
|
||||
// depends on internal representation in derived parser
|
||||
// (see wxHtmlWinParser for details).
|
||||
virtual wxObject* GetProduct() = 0;
|
||||
|
||||
// adds handler to the list & hash table of handlers.
|
||||
virtual void AddTagHandler(wxHtmlTagHandler *handler);
|
||||
|
||||
// Forces the handler to handle additional tags (not returned by GetSupportedTags).
|
||||
// The handler should already be in use by this parser.
|
||||
// Example: you want to parse following pseudo-html structure:
|
||||
// <myitems>
|
||||
// <it name="one" value="1">
|
||||
// <it name="two" value="2">
|
||||
// </myitems>
|
||||
// <it> This last it has different meaning, we don't want it to be parsed by myitems handler!
|
||||
// handler can handle only 'myitems' (e.g. it's GetSupportedTags returns "MYITEMS")
|
||||
// you can call PushTagHandler(handler, "IT") when you find <myitems>
|
||||
// and call PopTagHandler() when you find </myitems>
|
||||
void PushTagHandler(wxHtmlTagHandler *handler, wxString tags);
|
||||
|
||||
// Restores state before last call to PushTagHandler
|
||||
void PopTagHandler();
|
||||
|
||||
wxString* GetSource() {return &m_Source;}
|
||||
void SetSource(const wxString& src);
|
||||
|
||||
// Sets HTML source and remebers current parser's state so that it can
|
||||
// later be restored. This is useful for on-line modifications of
|
||||
// HTML source (for example, <pre> handler replaces spaces with
|
||||
// and newlines with <br>)
|
||||
virtual void SetSourceAndSaveState(const wxString& src);
|
||||
// Restores parser's state from stack or returns FALSE if the stack is
|
||||
// empty
|
||||
virtual bool RestoreState();
|
||||
|
||||
// Parses HTML string 'markup' and extracts charset info from <meta> tag
|
||||
// if present. Returns empty string if the tag is missing.
|
||||
// For wxHTML's internal use.
|
||||
static wxString ExtractCharsetInformation(const wxString& markup);
|
||||
|
||||
protected:
|
||||
// DOM structure
|
||||
void CreateDOMTree();
|
||||
void DestroyDOMTree();
|
||||
void CreateDOMSubTree(wxHtmlTag *cur,
|
||||
int begin_pos, int end_pos,
|
||||
wxHtmlTagsCache *cache);
|
||||
|
||||
// Adds text to the output.
|
||||
// This is called from Parse() and must be overriden in derived classes.
|
||||
// txt is not guaranteed to be only one word. It is largest continuous part of text
|
||||
// (= not broken by tags)
|
||||
// NOTE : using char* because of speed improvements
|
||||
virtual void AddText(const wxChar* txt) = 0;
|
||||
|
||||
// Adds tag and proceeds it. Parse() may (and usually is) called from this method.
|
||||
// This is called from Parse() and may be overriden.
|
||||
// Default behavior is that it looks for proper handler in m_Handlers. The tag is
|
||||
// ignored if no hander is found.
|
||||
// Derived class is *responsible* for filling in m_Handlers table.
|
||||
virtual void AddTag(const wxHtmlTag& tag);
|
||||
|
||||
// Returns entity parser object, used to substitute HTML &entities;
|
||||
wxHtmlEntitiesParser *GetEntitiesParser() const { return m_entitiesParser; }
|
||||
|
||||
protected:
|
||||
// DOM tree:
|
||||
wxHtmlTag *m_CurTag;
|
||||
wxHtmlTag *m_Tags;
|
||||
wxHtmlTextPieces *m_TextPieces;
|
||||
size_t m_CurTextPiece;
|
||||
|
||||
wxString m_Source;
|
||||
|
||||
wxHtmlParserState *m_SavedStates;
|
||||
|
||||
// handlers that handle particular tags. The table is accessed by
|
||||
// key = tag's name.
|
||||
// This attribute MUST be filled by derived class otherwise it would
|
||||
// be empty and no tags would be recognized
|
||||
// (see wxHtmlWinParser for details about filling it)
|
||||
// m_HandlersHash is for random access based on knowledge of tag name (BR, P, etc.)
|
||||
// it may (and often does) contain more references to one object
|
||||
// m_HandlersList is list of all handlers and it is guaranteed to contain
|
||||
// only one reference to each handler instance.
|
||||
wxList m_HandlersList;
|
||||
wxHashTable m_HandlersHash;
|
||||
|
||||
DECLARE_NO_COPY_CLASS(wxHtmlParser)
|
||||
|
||||
// class for opening files (file system)
|
||||
wxFileSystem *m_FS;
|
||||
// handlers stack used by PushTagHandler and PopTagHandler
|
||||
wxList *m_HandlersStack;
|
||||
|
||||
// entity parse
|
||||
wxHtmlEntitiesParser *m_entitiesParser;
|
||||
|
||||
// flag indicating that the parser should stop
|
||||
bool m_stopParsing;
|
||||
};
|
||||
|
||||
|
||||
|
||||
// This class (and derived classes) cooperates with wxHtmlParser.
|
||||
// Each recognized tag is passed to handler which is capable
|
||||
// of handling it. Each tag is handled in 3 steps:
|
||||
// 1. Handler will modifies state of parser
|
||||
// (using it's public methods)
|
||||
// 2. Parser parses source between starting and ending tag
|
||||
// 3. Handler restores original state of the parser
|
||||
class WXDLLEXPORT wxHtmlTagHandler : public wxObject
|
||||
{
|
||||
DECLARE_ABSTRACT_CLASS(wxHtmlTagHandler)
|
||||
|
||||
public:
|
||||
wxHtmlTagHandler() : wxObject () { m_Parser = NULL; }
|
||||
|
||||
// Sets the parser.
|
||||
// NOTE : each _instance_ of handler is guaranteed to be called
|
||||
// only by one parser. This means you don't have to care about
|
||||
// reentrancy.
|
||||
virtual void SetParser(wxHtmlParser *parser)
|
||||
{ m_Parser = parser; }
|
||||
|
||||
// Returns list of supported tags. The list is in uppercase and
|
||||
// tags are delimited by ','.
|
||||
// Example : "I,B,FONT,P"
|
||||
// is capable of handling italic, bold, font and paragraph tags
|
||||
virtual wxString GetSupportedTags() = 0;
|
||||
|
||||
// This is hadling core method. It does all the Steps 1-3.
|
||||
// To process step 2, you can call ParseInner()
|
||||
// returned value : TRUE if it called ParseInner(),
|
||||
// FALSE etherwise
|
||||
virtual bool HandleTag(const wxHtmlTag& tag) = 0;
|
||||
|
||||
protected:
|
||||
// parses input between beginning and ending tag.
|
||||
// m_Parser must be set.
|
||||
void ParseInner(const wxHtmlTag& tag)
|
||||
{ m_Parser->DoParsing(tag.GetBeginPos(), tag.GetEndPos1()); }
|
||||
|
||||
wxHtmlParser *m_Parser;
|
||||
|
||||
DECLARE_NO_COPY_CLASS(wxHtmlTagHandler)
|
||||
};
|
||||
|
||||
|
||||
// This class is used to parse HTML entities in strings. It can handle
|
||||
// both named entities and &#xxxx entries where xxxx is Unicode code.
|
||||
class WXDLLEXPORT wxHtmlEntitiesParser : public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxHtmlEntitiesParser)
|
||||
|
||||
public:
|
||||
wxHtmlEntitiesParser();
|
||||
virtual ~wxHtmlEntitiesParser();
|
||||
|
||||
// Sets encoding of output string.
|
||||
// Has no effect if wxUSE_WCHAR_T==0 or wxUSE_UNICODE==1
|
||||
void SetEncoding(wxFontEncoding encoding);
|
||||
|
||||
// Parses entities in input and replaces them with respective characters
|
||||
// (with respect to output encoding)
|
||||
wxString Parse(const wxString& input);
|
||||
|
||||
// Returns character for given entity or 0 if the enity is unknown
|
||||
wxChar GetEntityChar(const wxString& entity);
|
||||
|
||||
// Returns character that represents given Unicode code
|
||||
#if wxUSE_UNICODE
|
||||
wxChar GetCharForCode(unsigned code) { return (wxChar)code; }
|
||||
#else
|
||||
wxChar GetCharForCode(unsigned code);
|
||||
#endif
|
||||
|
||||
protected:
|
||||
#if wxUSE_WCHAR_T && !wxUSE_UNICODE
|
||||
wxMBConv *m_conv;
|
||||
wxFontEncoding m_encoding;
|
||||
#endif
|
||||
|
||||
DECLARE_NO_COPY_CLASS(wxHtmlEntitiesParser)
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#endif // _WX_HTMLPARS_H_
|
@@ -1,64 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: htmlprep.h
|
||||
// Purpose: HTML processor
|
||||
// Author: Vaclav Slavik
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2001 Vaclav Slavik
|
||||
// Licence: wxWindows Licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef _WX_HTMLPREP_H_
|
||||
#define _WX_HTMLPREP_H_
|
||||
|
||||
#if defined(__GNUG__) && !defined(__APPLE__)
|
||||
#pragma interface "htmlproc.h"
|
||||
// (implementation is in htmlwin.cpp, there's no htmlprep.cpp!)
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_HTML
|
||||
|
||||
#include "wx/string.h"
|
||||
|
||||
// Priority of preprocessor in the chain. The higher, the earlier it is used
|
||||
enum
|
||||
{
|
||||
wxHTML_PRIORITY_DONTCARE = 128, // if the order doesn't matter, use this
|
||||
// priority
|
||||
wxHTML_PRIORITY_SYSTEM = 256 // >=256 is only for wxHTML's internals
|
||||
};
|
||||
|
||||
// Classes derived from this class serve as simple text processors for
|
||||
// wxHtmlWindow. wxHtmlWindow runs HTML markup through all registered
|
||||
// processors before displaying it, thus allowing for on-the-fly
|
||||
// modifications of the markup.
|
||||
|
||||
class WXDLLEXPORT wxHtmlProcessor : public wxObject
|
||||
{
|
||||
DECLARE_ABSTRACT_CLASS(wxHtmlProcessor)
|
||||
|
||||
public:
|
||||
wxHtmlProcessor() : wxObject(), m_enabled(TRUE) {}
|
||||
virtual ~wxHtmlProcessor() {}
|
||||
|
||||
// Process input text and return processed result
|
||||
virtual wxString Process(const wxString& text) const = 0;
|
||||
|
||||
// Return priority value of this processor. The higher, the sooner
|
||||
// is the processor applied to the text.
|
||||
virtual int GetPriority() const { return wxHTML_PRIORITY_DONTCARE; }
|
||||
|
||||
// Enable/disable the processor. wxHtmlWindow won't use a disabled
|
||||
// processor even if it is in its processors queue.
|
||||
virtual void Enable(bool enable = TRUE) { m_enabled = enable; }
|
||||
bool IsEnabled() const { return m_enabled; }
|
||||
|
||||
protected:
|
||||
bool m_enabled;
|
||||
};
|
||||
|
||||
#endif // wxUSE_HTML
|
||||
|
||||
#endif // _WX_HTMLPROC_H_
|
@@ -1,158 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: htmltag.h
|
||||
// Purpose: wxHtmlTag class (represents single tag)
|
||||
// Author: Vaclav Slavik
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 1999 Vaclav Slavik
|
||||
// Licence: wxWindows Licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef _WX_HTMLTAG_H_
|
||||
#define _WX_HTMLTAG_H_
|
||||
|
||||
#if defined(__GNUG__) && !defined(__APPLE__)
|
||||
#pragma interface "htmltag.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_HTML
|
||||
|
||||
#include "wx/object.h"
|
||||
|
||||
class WXDLLEXPORT wxColour;
|
||||
class WXDLLEXPORT wxHtmlEntitiesParser;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxHtmlTagsCache
|
||||
// - internal wxHTML class, do not use!
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
struct wxHtmlCacheItem;
|
||||
|
||||
class WXDLLEXPORT wxHtmlTagsCache : public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxHtmlTagsCache)
|
||||
|
||||
private:
|
||||
wxHtmlCacheItem *m_Cache;
|
||||
int m_CacheSize;
|
||||
int m_CachePos;
|
||||
|
||||
public:
|
||||
wxHtmlTagsCache() : wxObject() {m_CacheSize = 0; m_Cache = NULL;}
|
||||
wxHtmlTagsCache(const wxString& source);
|
||||
~wxHtmlTagsCache() {free(m_Cache);}
|
||||
|
||||
// Finds parameters for tag starting at at and fills the variables
|
||||
void QueryTag(int at, int* end1, int* end2);
|
||||
|
||||
DECLARE_NO_COPY_CLASS(wxHtmlTagsCache)
|
||||
};
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// wxHtmlTag
|
||||
// This represents single tag. It is used as internal structure
|
||||
// by wxHtmlParser.
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxHtmlTag : public wxObject
|
||||
{
|
||||
DECLARE_CLASS(wxHtmlTag)
|
||||
|
||||
protected:
|
||||
// constructs wxHtmlTag object based on HTML tag.
|
||||
// The tag begins (with '<' character) at position pos in source
|
||||
// end_pos is position where parsing ends (usually end of document)
|
||||
wxHtmlTag(wxHtmlTag *parent,
|
||||
const wxString& source, int pos, int end_pos,
|
||||
wxHtmlTagsCache *cache,
|
||||
wxHtmlEntitiesParser *entParser);
|
||||
friend class wxHtmlParser;
|
||||
public:
|
||||
~wxHtmlTag();
|
||||
|
||||
wxHtmlTag *GetParent() const {return m_Parent;}
|
||||
wxHtmlTag *GetFirstSibling() const;
|
||||
wxHtmlTag *GetLastSibling() const;
|
||||
wxHtmlTag *GetChildren() const { return m_FirstChild; }
|
||||
wxHtmlTag *GetPreviousSibling() const { return m_Prev; }
|
||||
wxHtmlTag *GetNextSibling() const {return m_Next; }
|
||||
// Return next tag, as if tree had been flattened
|
||||
wxHtmlTag *GetNextTag() const;
|
||||
|
||||
// Returns tag's name in uppercase.
|
||||
inline wxString GetName() const {return m_Name;}
|
||||
|
||||
// Returns TRUE if the tag has given parameter. Parameter
|
||||
// should always be in uppercase.
|
||||
// Example : <IMG SRC="test.jpg"> HasParam("SRC") returns TRUE
|
||||
bool HasParam(const wxString& par) const;
|
||||
|
||||
// Returns value of the param. Value is in uppercase unless it is
|
||||
// enclosed with "
|
||||
// Example : <P align=right> GetParam("ALIGN") returns (RIGHT)
|
||||
// <P IMG SRC="WhaT.jpg"> GetParam("SRC") returns (WhaT.jpg)
|
||||
// (or ("WhaT.jpg") if with_commas == TRUE)
|
||||
wxString GetParam(const wxString& par, bool with_commas = FALSE) const;
|
||||
|
||||
// Convenience functions:
|
||||
bool GetParamAsColour(const wxString& par, wxColour *clr) const;
|
||||
bool GetParamAsInt(const wxString& par, int *clr) const;
|
||||
|
||||
// Scans param like scanf() functions family does.
|
||||
// Example : ScanParam("COLOR", "\"#%X\"", &clr);
|
||||
// This is always with with_commas=FALSE
|
||||
// Returns number of scanned values
|
||||
// (like sscanf() does)
|
||||
// NOTE: unlike scanf family, this function only accepts
|
||||
// *one* parameter !
|
||||
int ScanParam(const wxString& par, const wxChar *format, void *param) const;
|
||||
|
||||
// Returns string containing all params.
|
||||
wxString GetAllParams() const;
|
||||
|
||||
#if WXWIN_COMPATIBILITY_2_2
|
||||
// return TRUE if this is ending tag (</something>) or FALSE
|
||||
// if it isn't (<something>)
|
||||
inline bool IsEnding() const {return FALSE;}
|
||||
#endif
|
||||
|
||||
// return TRUE if this there is matching ending tag
|
||||
inline bool HasEnding() const {return m_End1 >= 0;}
|
||||
|
||||
// returns beginning position of _internal_ block of text
|
||||
// See explanation (returned value is marked with *):
|
||||
// bla bla bla <MYTAG>* bla bla intenal text</MYTAG> bla bla
|
||||
inline int GetBeginPos() const {return m_Begin;}
|
||||
// returns ending position of _internal_ block of text.
|
||||
// bla bla bla <MYTAG> bla bla intenal text*</MYTAG> bla bla
|
||||
inline int GetEndPos1() const {return m_End1;}
|
||||
// returns end position 2 :
|
||||
// bla bla bla <MYTAG> bla bla internal text</MYTAG>* bla bla
|
||||
inline int GetEndPos2() const {return m_End2;}
|
||||
|
||||
private:
|
||||
wxString m_Name;
|
||||
int m_Begin, m_End1, m_End2;
|
||||
wxArrayString m_ParamNames, m_ParamValues;
|
||||
|
||||
// DOM tree relations:
|
||||
wxHtmlTag *m_Next;
|
||||
wxHtmlTag *m_Prev;
|
||||
wxHtmlTag *m_FirstChild, *m_LastChild;
|
||||
wxHtmlTag *m_Parent;
|
||||
|
||||
DECLARE_NO_COPY_CLASS(wxHtmlTag)
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#endif // _WX_HTMLTAG_H_
|
||||
|
@@ -1,284 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: htmlwin.h
|
||||
// Purpose: wxHtmlWindow class for parsing & displaying HTML
|
||||
// Author: Vaclav Slavik
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 1999 Vaclav Slavik
|
||||
// Licence: wxWindows Licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef _WX_HTMLWIN_H_
|
||||
#define _WX_HTMLWIN_H_
|
||||
|
||||
#if defined(__GNUG__) && !defined(__APPLE__)
|
||||
#pragma interface "htmlwin.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#if wxUSE_HTML
|
||||
|
||||
#include "wx/window.h"
|
||||
#include "wx/scrolwin.h"
|
||||
#include "wx/config.h"
|
||||
#include "wx/treectrl.h"
|
||||
#include "wx/html/winpars.h"
|
||||
#include "wx/html/htmlcell.h"
|
||||
#include "wx/filesys.h"
|
||||
#include "wx/html/htmlfilt.h"
|
||||
#include "wx/filename.h"
|
||||
|
||||
class wxHtmlProcessor;
|
||||
class wxHtmlWinModule;
|
||||
class wxHtmlHistoryArray;
|
||||
class wxHtmlProcessorList;
|
||||
|
||||
|
||||
// wxHtmlWindow flags:
|
||||
#define wxHW_SCROLLBAR_NEVER 0x0002
|
||||
#define wxHW_SCROLLBAR_AUTO 0x0004
|
||||
|
||||
// enums for wxHtmlWindow::OnOpeningURL
|
||||
enum wxHtmlOpeningStatus
|
||||
{
|
||||
wxHTML_OPEN,
|
||||
wxHTML_BLOCK,
|
||||
wxHTML_REDIRECT
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// wxHtmlWindow
|
||||
// (This is probably the only class you will directly use.)
|
||||
// Purpose of this class is to display HTML page (either local
|
||||
// file or downloaded via HTTP protocol) in a window. Width
|
||||
// of window is constant - given in constructor - virtual height
|
||||
// is changed dynamicly depending on page size.
|
||||
// Once the window is created you can set it's content by calling
|
||||
// SetPage(text) or LoadPage(filename).
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxHtmlWindow : public wxScrolledWindow
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxHtmlWindow)
|
||||
friend class wxHtmlWinModule;
|
||||
|
||||
public:
|
||||
wxHtmlWindow() { Init(); }
|
||||
wxHtmlWindow(wxWindow *parent, wxWindowID id = -1,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxHW_SCROLLBAR_AUTO,
|
||||
const wxString& name = wxT("htmlWindow"))
|
||||
{
|
||||
Init();
|
||||
Create(parent, id, pos, size, style, name);
|
||||
}
|
||||
~wxHtmlWindow();
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id = -1,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxHW_SCROLLBAR_AUTO,
|
||||
const wxString& name = wxT("htmlWindow"));
|
||||
|
||||
// Set HTML page and display it. !! source is HTML document itself,
|
||||
// it is NOT address/filename of HTML document. If you want to
|
||||
// specify document location, use LoadPage() istead
|
||||
// Return value : FALSE if an error occured, TRUE otherwise
|
||||
bool SetPage(const wxString& source);
|
||||
|
||||
// Append to current page
|
||||
bool AppendToPage(const wxString& source);
|
||||
|
||||
// Load HTML page from given location. Location can be either
|
||||
// a) /usr/wxGTK2/docs/html/wx.htm
|
||||
// b) http://www.somewhere.uk/document.htm
|
||||
// c) ftp://ftp.somesite.cz/pub/something.htm
|
||||
// In case there is no prefix (http:,ftp:), the method
|
||||
// will try to find it itself (1. local file, then http or ftp)
|
||||
// After the page is loaded, the method calls SetPage() to display it.
|
||||
// Note : you can also use path relative to previously loaded page
|
||||
// Return value : same as SetPage
|
||||
virtual bool LoadPage(const wxString& location);
|
||||
|
||||
// Loads HTML page from file
|
||||
bool LoadFile(const wxFileName& filename);
|
||||
|
||||
// Returns full location of opened page
|
||||
wxString GetOpenedPage() const {return m_OpenedPage;}
|
||||
// Returns anchor within opened page
|
||||
wxString GetOpenedAnchor() const {return m_OpenedAnchor;}
|
||||
// Returns <TITLE> of opened page or empty string otherwise
|
||||
wxString GetOpenedPageTitle() const {return m_OpenedPageTitle;}
|
||||
|
||||
// Sets frame in which page title will be displayed. Format is format of
|
||||
// frame title, e.g. "HtmlHelp : %s". It must contain exactly one %s
|
||||
void SetRelatedFrame(wxFrame* frame, const wxString& format);
|
||||
wxFrame* GetRelatedFrame() const {return m_RelatedFrame;}
|
||||
|
||||
// After(!) calling SetRelatedFrame, this sets statusbar slot where messages
|
||||
// will be displayed. Default is -1 = no messages.
|
||||
void SetRelatedStatusBar(int bar);
|
||||
|
||||
// Sets fonts to be used when displaying HTML page.
|
||||
void SetFonts(wxString normal_face, wxString fixed_face,
|
||||
const int *sizes = NULL);
|
||||
|
||||
// Sets space between text and window borders.
|
||||
void SetBorders(int b) {m_Borders = b;}
|
||||
|
||||
// Saves custom settings into cfg config. it will use the path 'path'
|
||||
// if given, otherwise it will save info into currently selected path.
|
||||
// saved values : things set by SetFonts, SetBorders.
|
||||
virtual void ReadCustomization(wxConfigBase *cfg, wxString path = wxEmptyString);
|
||||
// ...
|
||||
virtual void WriteCustomization(wxConfigBase *cfg, wxString path = wxEmptyString);
|
||||
|
||||
// Goes to previous/next page (in browsing history)
|
||||
// Returns TRUE if successful, FALSE otherwise
|
||||
bool HistoryBack();
|
||||
bool HistoryForward();
|
||||
bool HistoryCanBack();
|
||||
bool HistoryCanForward();
|
||||
// Resets history
|
||||
void HistoryClear();
|
||||
|
||||
// Returns pointer to conteiners/cells structure.
|
||||
// It should be used ONLY when printing
|
||||
wxHtmlContainerCell* GetInternalRepresentation() const {return m_Cell;}
|
||||
|
||||
// Adds input filter
|
||||
static void AddFilter(wxHtmlFilter *filter);
|
||||
|
||||
// Returns a pointer to the parser.
|
||||
wxHtmlWinParser *GetParser() const { return m_Parser; }
|
||||
|
||||
// Adds HTML processor to this instance of wxHtmlWindow:
|
||||
void AddProcessor(wxHtmlProcessor *processor);
|
||||
// Adds HTML processor to wxHtmlWindow class as whole:
|
||||
static void AddGlobalProcessor(wxHtmlProcessor *processor);
|
||||
|
||||
// what would we do with it?
|
||||
virtual bool AcceptsFocusFromKeyboard() const { return FALSE; }
|
||||
|
||||
// -- Callbacks --
|
||||
|
||||
// Sets the title of the window
|
||||
// (depending on the information passed to SetRelatedFrame() method)
|
||||
virtual void OnSetTitle(const wxString& title);
|
||||
|
||||
// Called when the mouse hovers over a cell: (x, y) are logical coords
|
||||
// Default behaviour is to do nothing at all
|
||||
virtual void OnCellMouseHover(wxHtmlCell *cell, wxCoord x, wxCoord y);
|
||||
|
||||
// Called when user clicks on a cell. Default behavior is to call
|
||||
// OnLinkClicked() if this cell corresponds to a hypertext link
|
||||
virtual void OnCellClicked(wxHtmlCell *cell,
|
||||
wxCoord x, wxCoord y,
|
||||
const wxMouseEvent& event);
|
||||
|
||||
// Called when user clicked on hypertext link. Default behavior is to
|
||||
// call LoadPage(loc)
|
||||
virtual void OnLinkClicked(const wxHtmlLinkInfo& link);
|
||||
|
||||
// Called when wxHtmlWindow wants to fetch data from an URL (e.g. when
|
||||
// loading a page or loading an image). The data are downloaded if and only if
|
||||
// OnOpeningURL returns TRUE. If OnOpeningURL returns wxHTML_REDIRECT,
|
||||
// it must set *redirect to the new URL
|
||||
virtual wxHtmlOpeningStatus OnOpeningURL(wxHtmlURLType WXUNUSED(type),
|
||||
const wxString& WXUNUSED(url),
|
||||
wxString *WXUNUSED(redirect)) const
|
||||
{ return wxHTML_OPEN; }
|
||||
|
||||
protected:
|
||||
void Init();
|
||||
|
||||
// Scrolls to anchor of this name. (Anchor is #news
|
||||
// or #features etc. it is part of address sometimes:
|
||||
// http://www.ms.mff.cuni.cz/~vsla8348/wxhtml/index.html#news)
|
||||
// Return value : TRUE if anchor exists, FALSE otherwise
|
||||
bool ScrollToAnchor(const wxString& anchor);
|
||||
|
||||
// Prepares layout (= fill m_PosX, m_PosY for fragments) based on
|
||||
// actual size of window. This method also setup scrollbars
|
||||
void CreateLayout();
|
||||
|
||||
void OnDraw(wxDC& dc);
|
||||
void OnSize(wxSizeEvent& event);
|
||||
void OnMouseEvent(wxMouseEvent& event);
|
||||
void OnIdle(wxIdleEvent& event);
|
||||
|
||||
// Returns new filter (will be stored into m_DefaultFilter variable)
|
||||
virtual wxHtmlFilter *GetDefaultFilter() {return new wxHtmlFilterPlainText;}
|
||||
|
||||
// cleans static variables
|
||||
static void CleanUpStatics();
|
||||
|
||||
protected:
|
||||
// This is pointer to the first cell in parsed data.
|
||||
// (Note: the first cell is usually top one = all other cells are sub-cells of this one)
|
||||
wxHtmlContainerCell *m_Cell;
|
||||
// parser which is used to parse HTML input.
|
||||
// Each wxHtmlWindow has it's own parser because sharing one global
|
||||
// parser would be problematic (because of reentrancy)
|
||||
wxHtmlWinParser *m_Parser;
|
||||
// contains name of actualy opened page or empty string if no page opened
|
||||
wxString m_OpenedPage;
|
||||
// contains name of current anchor within m_OpenedPage
|
||||
wxString m_OpenedAnchor;
|
||||
// contains title of actualy opened page or empty string if no <TITLE> tag
|
||||
wxString m_OpenedPageTitle;
|
||||
// class for opening files (file system)
|
||||
wxFileSystem* m_FS;
|
||||
|
||||
wxFrame *m_RelatedFrame;
|
||||
wxString m_TitleFormat;
|
||||
// frame in which page title should be displayed & number of it's statusbar
|
||||
// reserved for usage with this html window
|
||||
int m_RelatedStatusBar;
|
||||
|
||||
// borders (free space between text and window borders)
|
||||
// defaults to 10 pixels.
|
||||
int m_Borders;
|
||||
|
||||
int m_Style;
|
||||
|
||||
private:
|
||||
// a flag indicated if mouse moved
|
||||
// (if TRUE we will try to change cursor in last call to OnIdle)
|
||||
bool m_tmpMouseMoved;
|
||||
// contains last link name
|
||||
wxHtmlLinkInfo *m_tmpLastLink;
|
||||
// contains the last (terminal) cell which contained the mouse
|
||||
wxHtmlCell *m_tmpLastCell;
|
||||
// if >0 contents of the window is not redrawn
|
||||
// (in order to avoid ugly blinking)
|
||||
int m_tmpCanDrawLocks;
|
||||
|
||||
// list of HTML filters
|
||||
static wxList m_Filters;
|
||||
// this filter is used when no filter is able to read some file
|
||||
static wxHtmlFilter *m_DefaultFilter;
|
||||
|
||||
static wxCursor *s_cur_hand;
|
||||
static wxCursor *s_cur_arrow;
|
||||
|
||||
wxHtmlHistoryArray *m_History;
|
||||
// browser history
|
||||
int m_HistoryPos;
|
||||
// if this FLAG is false, items are not added to history
|
||||
bool m_HistoryOn;
|
||||
|
||||
// html processors array:
|
||||
wxHtmlProcessorList *m_Processors;
|
||||
static wxHtmlProcessorList *m_GlobalProcessors;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
DECLARE_NO_COPY_CLASS(wxHtmlWindow)
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#endif // _WX_HTMLWIN_H_
|
||||
|
@@ -1,258 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: htmprint.h
|
||||
// Purpose: html printing classes
|
||||
// Author: Vaclav Slavik
|
||||
// Created: 25/09/99
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c)
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_HTMPRINT_H_
|
||||
#define _WX_HTMPRINT_H_
|
||||
|
||||
#if defined(__GNUG__) && !defined(__APPLE__)
|
||||
#pragma interface "htmprint.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_HTML & wxUSE_PRINTING_ARCHITECTURE
|
||||
|
||||
#include "wx/html/htmlcell.h"
|
||||
#include "wx/html/winpars.h"
|
||||
|
||||
#include "wx/print.h"
|
||||
#include "wx/printdlg.h"
|
||||
|
||||
#include <limits.h> // INT_MAX
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// wxHtmlDCRenderer
|
||||
// This class is capable of rendering HTML into specified
|
||||
// portion of DC
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxHtmlDCRenderer : public wxObject
|
||||
{
|
||||
public:
|
||||
wxHtmlDCRenderer();
|
||||
~wxHtmlDCRenderer();
|
||||
|
||||
// Following 3 methods *must* be called before any call to Render:
|
||||
|
||||
// Assign DC to this render
|
||||
void SetDC(wxDC *dc, double pixel_scale = 1.0);
|
||||
|
||||
// Sets size of output rectangle, in pixels. Note that you *can't* change
|
||||
// width of the rectangle between calls to Render! (You can freely change height.)
|
||||
void SetSize(int width, int height);
|
||||
|
||||
// Sets the text to be displayed.
|
||||
// Basepath is base directory (html string would be stored there if it was in
|
||||
// file). It is used to determine path for loading images, for example.
|
||||
// isdir is FALSE if basepath is filename, TRUE if it is directory name
|
||||
// (see wxFileSystem for detailed explanation)
|
||||
void SetHtmlText(const wxString& html, const wxString& basepath = wxEmptyString, bool isdir = TRUE);
|
||||
|
||||
// Sets fonts to be used when displaying HTML page. (if size null then default sizes used).
|
||||
void SetFonts(wxString normal_face, wxString fixed_face, const int *sizes = NULL);
|
||||
|
||||
// [x,y] is position of upper-left corner of printing rectangle (see SetSize)
|
||||
// from is y-coordinate of the very first visible cell
|
||||
// to is y-coordinate of the next following page break, if any
|
||||
// Returned value is y coordinate of first cell than didn't fit onto page.
|
||||
// Use this value as 'from' in next call to Render in order to print multiple pages
|
||||
// document
|
||||
// If dont_render is TRUE then nothing is rendered into DC and it only counts
|
||||
// pixels and return y coord of the next page
|
||||
//
|
||||
// known_pagebreaks and number_of_pages are used only when counting pages;
|
||||
// otherwise, their default values should be used. Their purpose is to
|
||||
// support pagebreaks using a subset of CSS2's <DIV>. The <DIV> handler
|
||||
// needs to know what pagebreaks have already been set so that it doesn't
|
||||
// set the same pagebreak twice.
|
||||
//
|
||||
// CAUTION! Render() changes DC's user scale and does NOT restore it!
|
||||
int Render(int x, int y, int from = 0, int dont_render = FALSE, int to = INT_MAX,
|
||||
int *known_pagebreaks = NULL, int number_of_pages = 0);
|
||||
|
||||
// returns total height of the html document
|
||||
// (compare Render's return value with this)
|
||||
int GetTotalHeight();
|
||||
|
||||
private:
|
||||
wxDC *m_DC;
|
||||
wxHtmlWinParser *m_Parser;
|
||||
wxFileSystem *m_FS;
|
||||
wxHtmlContainerCell *m_Cells;
|
||||
int m_MaxWidth, m_Width, m_Height;
|
||||
|
||||
DECLARE_NO_COPY_CLASS(wxHtmlDCRenderer)
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
enum {
|
||||
wxPAGE_ODD,
|
||||
wxPAGE_EVEN,
|
||||
wxPAGE_ALL
|
||||
};
|
||||
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// wxHtmlPrintout
|
||||
// This class is derived from standard wxWindows printout class
|
||||
// and is used to print HTML documents.
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
|
||||
class WXDLLEXPORT wxHtmlPrintout : public wxPrintout
|
||||
{
|
||||
public:
|
||||
wxHtmlPrintout(const wxString& title = wxT("Printout"));
|
||||
~wxHtmlPrintout();
|
||||
|
||||
void SetHtmlText(const wxString& html, const wxString &basepath = wxEmptyString, bool isdir = TRUE);
|
||||
// prepares the class for printing this html document.
|
||||
// Must be called before using the class, in fact just after constructor
|
||||
//
|
||||
// basepath is base directory (html string would be stored there if it was in
|
||||
// file). It is used to determine path for loading images, for example.
|
||||
// isdir is FALSE if basepath is filename, TRUE if it is directory name
|
||||
// (see wxFileSystem for detailed explanation)
|
||||
|
||||
void SetHtmlFile(const wxString &htmlfile);
|
||||
// same as SetHtmlText except that it takes regular file as the parameter
|
||||
|
||||
void SetHeader(const wxString& header, int pg = wxPAGE_ALL);
|
||||
void SetFooter(const wxString& footer, int pg = wxPAGE_ALL);
|
||||
// sets header/footer for the document. The argument is interpreted as HTML document.
|
||||
// You can use macros in it:
|
||||
// @PAGENUM@ is replaced by page number
|
||||
// @PAGESCNT@ is replaced by total number of pages
|
||||
//
|
||||
// pg is one of wxPAGE_ODD, wxPAGE_EVEN and wx_PAGE_ALL constants.
|
||||
// You can set different header/footer for odd and even pages
|
||||
|
||||
// Sets fonts to be used when displaying HTML page. (if size null then default sizes used).
|
||||
void SetFonts(wxString normal_face, wxString fixed_face, const int *sizes = NULL);
|
||||
|
||||
void SetMargins(float top = 25.2, float bottom = 25.2, float left = 25.2, float right = 25.2,
|
||||
float spaces = 5);
|
||||
// sets margins in milimeters. Defaults to 1 inch for margins and 0.5cm for space
|
||||
// between text and header and/or footer
|
||||
|
||||
// wxPrintout stuff:
|
||||
bool OnPrintPage(int page);
|
||||
bool HasPage(int page);
|
||||
void GetPageInfo(int *minPage, int *maxPage, int *selPageFrom, int *selPageTo);
|
||||
bool OnBeginDocument(int startPage, int endPage);
|
||||
|
||||
private:
|
||||
|
||||
void RenderPage(wxDC *dc, int page);
|
||||
// renders one page into dc
|
||||
wxString TranslateHeader(const wxString& instr, int page);
|
||||
// substitute @PAGENUM@ and @PAGESCNT@ by real values
|
||||
void CountPages();
|
||||
// counts pages and fills m_NumPages and m_PageBreaks
|
||||
|
||||
|
||||
private:
|
||||
int m_NumPages;
|
||||
int m_PageBreaks[wxHTML_PRINT_MAX_PAGES];
|
||||
|
||||
wxString m_Document, m_BasePath;
|
||||
bool m_BasePathIsDir;
|
||||
wxString m_Headers[2], m_Footers[2];
|
||||
|
||||
int m_HeaderHeight, m_FooterHeight;
|
||||
wxHtmlDCRenderer *m_Renderer, *m_RendererHdr;
|
||||
float m_MarginTop, m_MarginBottom, m_MarginLeft, m_MarginRight, m_MarginSpace;
|
||||
|
||||
DECLARE_NO_COPY_CLASS(wxHtmlPrintout)
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// wxHtmlEasyPrinting
|
||||
// This class provides very simple interface to printing
|
||||
// architecture. It allows you to print HTML documents only
|
||||
// with very few commands.
|
||||
//
|
||||
// Note : do not create this class on stack only.
|
||||
// You should create an instance on app startup and
|
||||
// use this instance for all printing. Why? The class
|
||||
// stores page&printer settings in it.
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxHtmlEasyPrinting : public wxObject
|
||||
{
|
||||
public:
|
||||
wxHtmlEasyPrinting(const wxString& name = wxT("Printing"), wxFrame *parent_frame = NULL);
|
||||
~wxHtmlEasyPrinting();
|
||||
|
||||
bool PreviewFile(const wxString &htmlfile);
|
||||
bool PreviewText(const wxString &htmltext, const wxString& basepath = wxEmptyString);
|
||||
// Preview file / html-text for printing
|
||||
// (and offers printing)
|
||||
// basepath is base directory for opening subsequent files (e.g. from <img> tag)
|
||||
|
||||
bool PrintFile(const wxString &htmlfile);
|
||||
bool PrintText(const wxString &htmltext, const wxString& basepath = wxEmptyString);
|
||||
// Print file / html-text w/o preview
|
||||
|
||||
void PrinterSetup();
|
||||
void PageSetup();
|
||||
// pop up printer or page setup dialog
|
||||
|
||||
void SetHeader(const wxString& header, int pg = wxPAGE_ALL);
|
||||
void SetFooter(const wxString& footer, int pg = wxPAGE_ALL);
|
||||
// sets header/footer for the document. The argument is interpreted as HTML document.
|
||||
// You can use macros in it:
|
||||
// @PAGENUM@ is replaced by page number
|
||||
// @PAGESCNT@ is replaced by total number of pages
|
||||
//
|
||||
// pg is one of wxPAGE_ODD, wxPAGE_EVEN and wx_PAGE_ALL constants.
|
||||
// You can set different header/footer for odd and even pages
|
||||
|
||||
void SetFonts(wxString normal_face, wxString fixed_face, const int *sizes = 0);
|
||||
// Sets fonts to be used when displaying HTML page. (if size null then default sizes used)
|
||||
|
||||
wxPrintData *GetPrintData() {return m_PrintData;}
|
||||
wxPageSetupDialogData *GetPageSetupData() {return m_PageSetupData;}
|
||||
// return page setting data objects.
|
||||
// (You can set their parameters.)
|
||||
|
||||
protected:
|
||||
virtual wxHtmlPrintout *CreatePrintout();
|
||||
virtual bool DoPreview(wxHtmlPrintout *printout1, wxHtmlPrintout *printout2);
|
||||
virtual bool DoPrint(wxHtmlPrintout *printout);
|
||||
|
||||
private:
|
||||
wxPrintData *m_PrintData;
|
||||
wxPageSetupDialogData *m_PageSetupData;
|
||||
wxString m_Name;
|
||||
int m_FontsSizesArr[7];
|
||||
int *m_FontsSizes;
|
||||
wxString m_FontFaceFixed, m_FontFaceNormal;
|
||||
wxString m_Headers[2], m_Footers[2];
|
||||
wxFrame *m_Frame;
|
||||
|
||||
DECLARE_NO_COPY_CLASS(wxHtmlEasyPrinting)
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // wxUSE_HTML & wxUSE_PRINTING_ARCHITECTURE
|
||||
|
||||
#endif // _WX_HTMPRINT_H_
|
||||
|
@@ -1,84 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: m_templ.h
|
||||
// Purpose: Modules template file
|
||||
// Author: Vaclav Slavik
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Vaclav Slavik
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/*
|
||||
|
||||
DESCRIPTION:
|
||||
This is set of macros for easier writing of tag handlers. How to use it?
|
||||
See mod_fonts.cpp for example...
|
||||
|
||||
Attention! This is quite strange C++ bastard. Before using it,
|
||||
I STRONGLY recommend reading and understanding these macros!!
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _WX_M_TEMPL_H_
|
||||
#define _WX_M_TEMPL_H_
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_HTML
|
||||
|
||||
#include "wx/html/winpars.h"
|
||||
|
||||
#define TAG_HANDLER_BEGIN(name,tags) \
|
||||
class HTML_Handler_##name : public wxHtmlWinTagHandler \
|
||||
{ \
|
||||
public: \
|
||||
wxString GetSupportedTags() {return wxT(tags);}
|
||||
|
||||
|
||||
|
||||
#define TAG_HANDLER_VARS \
|
||||
private:
|
||||
|
||||
#define TAG_HANDLER_CONSTR(name) \
|
||||
public: \
|
||||
HTML_Handler_##name () : wxHtmlWinTagHandler()
|
||||
|
||||
|
||||
#define TAG_HANDLER_PROC(varib) \
|
||||
public: \
|
||||
bool HandleTag(const wxHtmlTag& varib)
|
||||
|
||||
|
||||
|
||||
#define TAG_HANDLER_END(name) \
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
#define TAGS_MODULE_BEGIN(name) \
|
||||
class HTML_Module##name : public wxHtmlTagsModule \
|
||||
{ \
|
||||
DECLARE_DYNAMIC_CLASS(HTML_Module##name ) \
|
||||
public: \
|
||||
void FillHandlersTable(wxHtmlWinParser *parser) \
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
#define TAGS_MODULE_ADD(handler) \
|
||||
parser->AddTagHandler(new HTML_Handler_##handler);
|
||||
|
||||
|
||||
|
||||
|
||||
#define TAGS_MODULE_END(name) \
|
||||
} \
|
||||
}; \
|
||||
IMPLEMENT_DYNAMIC_CLASS(HTML_Module##name , wxHtmlTagsModule)
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
@@ -1,252 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: winpars.h
|
||||
// Purpose: wxHtmlWinParser class (parser to be used with wxHtmlWindow)
|
||||
// Author: Vaclav Slavik
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 1999 Vaclav Slavik
|
||||
// Licence: wxWindows Licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef _WX_WINPARS_H_
|
||||
#define _WX_WINPARS_H_
|
||||
|
||||
#if defined(__GNUG__) && !defined(__APPLE__)
|
||||
#pragma interface "winpars.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
#if wxUSE_HTML
|
||||
|
||||
#include "wx/module.h"
|
||||
#include "wx/font.h"
|
||||
#include "wx/html/htmlpars.h"
|
||||
#include "wx/html/htmlcell.h"
|
||||
#include "wx/encconv.h"
|
||||
|
||||
class WXDLLEXPORT wxHtmlWindow;
|
||||
class WXDLLEXPORT wxHtmlWinParser;
|
||||
class WXDLLEXPORT wxHtmlWinTagHandler;
|
||||
class WXDLLEXPORT wxHtmlTagsModule;
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// wxHtmlWinParser
|
||||
// This class is derived from wxHtmlParser and its mail goal
|
||||
// is to parse HTML input so that it can be displayed in
|
||||
// wxHtmlWindow. It uses special wxHtmlWinTagHandler.
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxHtmlWinParser : public wxHtmlParser
|
||||
{
|
||||
friend class wxHtmlWindow;
|
||||
|
||||
public:
|
||||
wxHtmlWinParser(wxHtmlWindow *wnd = NULL);
|
||||
~wxHtmlWinParser();
|
||||
|
||||
virtual void InitParser(const wxString& source);
|
||||
virtual void DoneParser();
|
||||
virtual wxObject* GetProduct();
|
||||
|
||||
virtual wxFSFile *OpenURL(wxHtmlURLType type, const wxString& url) const;
|
||||
|
||||
// Set's the DC used for parsing. If SetDC() is not called,
|
||||
// parsing won't proceed
|
||||
virtual void SetDC(wxDC *dc, double pixel_scale = 1.0)
|
||||
{ m_DC = dc; m_PixelScale = pixel_scale; }
|
||||
|
||||
wxDC *GetDC() {return m_DC;}
|
||||
double GetPixelScale() {return m_PixelScale;}
|
||||
int GetCharHeight() const {return m_CharHeight;}
|
||||
int GetCharWidth() const {return m_CharWidth;}
|
||||
|
||||
// NOTE : these functions do _not_ return _actual_
|
||||
// height/width. They return h/w of default font
|
||||
// for this DC. If you want actual values, call
|
||||
// GetDC()->GetChar...()
|
||||
|
||||
// returns associated wxWindow
|
||||
wxHtmlWindow *GetWindow() {return m_Window;}
|
||||
|
||||
// Sets fonts to be used when displaying HTML page. (if size null then default sizes used).
|
||||
void SetFonts(wxString normal_face, wxString fixed_face, const int *sizes = NULL);
|
||||
|
||||
// Adds tags module. see wxHtmlTagsModule for details.
|
||||
static void AddModule(wxHtmlTagsModule *module);
|
||||
|
||||
static void RemoveModule(wxHtmlTagsModule *module);
|
||||
|
||||
// parsing-related methods. These methods are called by tag handlers:
|
||||
|
||||
// Returns pointer to actual container. Common use in tag handler is :
|
||||
// m_WParser->GetContainer()->InsertCell(new ...);
|
||||
wxHtmlContainerCell *GetContainer() const {return m_Container;}
|
||||
|
||||
// opens new container. This container is sub-container of opened
|
||||
// container. Sets GetContainer to newly created container
|
||||
// and returns it.
|
||||
wxHtmlContainerCell *OpenContainer();
|
||||
|
||||
// works like OpenContainer except that new container is not created
|
||||
// but c is used. You can use this to directly set actual container
|
||||
wxHtmlContainerCell *SetContainer(wxHtmlContainerCell *c);
|
||||
|
||||
// closes the container and sets actual Container to upper-level
|
||||
// container
|
||||
wxHtmlContainerCell *CloseContainer();
|
||||
|
||||
int GetFontSize() const {return m_FontSize;}
|
||||
void SetFontSize(int s);
|
||||
int GetFontBold() const {return m_FontBold;}
|
||||
void SetFontBold(int x) {m_FontBold = x;}
|
||||
int GetFontItalic() const {return m_FontItalic;}
|
||||
void SetFontItalic(int x) {m_FontItalic = x;}
|
||||
int GetFontUnderlined() const {return m_FontUnderlined;}
|
||||
void SetFontUnderlined(int x) {m_FontUnderlined = x;}
|
||||
int GetFontFixed() const {return m_FontFixed;}
|
||||
void SetFontFixed(int x) {m_FontFixed = x;}
|
||||
wxString GetFontFace() const {return GetFontFixed() ? m_FontFaceFixed : m_FontFaceNormal;}
|
||||
void SetFontFace(const wxString& face);
|
||||
|
||||
int GetAlign() const {return m_Align;}
|
||||
void SetAlign(int a) {m_Align = a;}
|
||||
const wxColour& GetLinkColor() const { return m_LinkColor; }
|
||||
void SetLinkColor(const wxColour& clr) { m_LinkColor = clr; }
|
||||
const wxColour& GetActualColor() const { return m_ActualColor; }
|
||||
void SetActualColor(const wxColour& clr) { m_ActualColor = clr ;}
|
||||
const wxHtmlLinkInfo& GetLink() const { return m_Link; }
|
||||
void SetLink(const wxHtmlLinkInfo& link);
|
||||
|
||||
#if !wxUSE_UNICODE
|
||||
void SetInputEncoding(wxFontEncoding enc);
|
||||
wxFontEncoding GetInputEncoding() const { return m_InputEnc; }
|
||||
wxFontEncoding GetOutputEncoding() const { return m_OutputEnc; }
|
||||
wxEncodingConverter *GetEncodingConverter() const { return m_EncConv; }
|
||||
#endif
|
||||
|
||||
// creates font depending on m_Font* members.
|
||||
virtual wxFont* CreateCurrentFont();
|
||||
|
||||
protected:
|
||||
virtual void AddText(const wxChar* txt);
|
||||
|
||||
private:
|
||||
bool m_tmpLastWasSpace;
|
||||
wxChar *m_tmpStrBuf;
|
||||
size_t m_tmpStrBufSize;
|
||||
// temporary variables used by AddText
|
||||
wxHtmlWindow *m_Window;
|
||||
// window we're parsing for
|
||||
double m_PixelScale;
|
||||
wxDC *m_DC;
|
||||
// Device Context we're parsing for
|
||||
static wxList m_Modules;
|
||||
// list of tags modules (see wxHtmlTagsModule for details)
|
||||
// This list is used to initialize m_Handlers member.
|
||||
|
||||
wxHtmlContainerCell *m_Container;
|
||||
// actual container. See Open/CloseContainer for details.
|
||||
|
||||
int m_FontBold, m_FontItalic, m_FontUnderlined, m_FontFixed; // this is not TRUE,FALSE but 1,0, we need it for indexing
|
||||
int m_FontSize; /* -2 to +4, 0 is default */
|
||||
wxColour m_LinkColor;
|
||||
wxColour m_ActualColor;
|
||||
// basic font parameters.
|
||||
wxHtmlLinkInfo m_Link;
|
||||
// actual hypertext link or empty string
|
||||
bool m_UseLink;
|
||||
// TRUE if m_Link is not empty
|
||||
long m_CharHeight, m_CharWidth;
|
||||
// average height of normal-sized text
|
||||
int m_Align;
|
||||
// actual alignment
|
||||
|
||||
wxFont* m_FontsTable[2][2][2][2][7];
|
||||
wxString m_FontsFacesTable[2][2][2][2][7];
|
||||
#if !wxUSE_UNICODE
|
||||
wxFontEncoding m_FontsEncTable[2][2][2][2][7];
|
||||
#endif
|
||||
// table of loaded fonts. 1st four indexes are 0 or 1, depending on on/off
|
||||
// state of these flags (from left to right):
|
||||
// [bold][italic][underlined][fixed_size]
|
||||
// last index is font size : from 0 to 6 (remapped from html sizes 1 to 7)
|
||||
// Note : this table covers all possible combinations of fonts, but not
|
||||
// all of them are used, so many items in table are usually NULL.
|
||||
int m_FontsSizes[7];
|
||||
wxString m_FontFaceFixed, m_FontFaceNormal;
|
||||
// html font sizes and faces of fixed and proportional fonts
|
||||
|
||||
DECLARE_NO_COPY_CLASS(wxHtmlWinParser)
|
||||
|
||||
#if !wxUSE_UNICODE
|
||||
wxFontEncoding m_InputEnc, m_OutputEnc;
|
||||
// I/O font encodings
|
||||
wxEncodingConverter *m_EncConv;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// wxHtmlWinTagHandler
|
||||
// This is basicly wxHtmlTagHandler except
|
||||
// it is extended with protected member m_Parser pointing to
|
||||
// the wxHtmlWinParser object
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxHtmlWinTagHandler : public wxHtmlTagHandler
|
||||
{
|
||||
DECLARE_ABSTRACT_CLASS(wxHtmlWinTagHandler)
|
||||
|
||||
public:
|
||||
wxHtmlWinTagHandler() : wxHtmlTagHandler() {};
|
||||
|
||||
virtual void SetParser(wxHtmlParser *parser) {wxHtmlTagHandler::SetParser(parser); m_WParser = (wxHtmlWinParser*) parser;};
|
||||
|
||||
protected:
|
||||
wxHtmlWinParser *m_WParser; // same as m_Parser, but overcasted
|
||||
|
||||
DECLARE_NO_COPY_CLASS(wxHtmlWinTagHandler)
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// wxHtmlTagsModule
|
||||
// This is basic of dynamic tag handlers binding.
|
||||
// The class provides methods for filling parser's handlers
|
||||
// hash table.
|
||||
// (See documentation for details)
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxHtmlTagsModule : public wxModule
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxHtmlTagsModule)
|
||||
|
||||
public:
|
||||
wxHtmlTagsModule() : wxModule() {};
|
||||
|
||||
virtual bool OnInit();
|
||||
virtual void OnExit();
|
||||
|
||||
// This is called by wxHtmlWinParser.
|
||||
// The method must simply call parser->AddTagHandler(new <handler_class_name>);
|
||||
// for each handler
|
||||
virtual void FillHandlersTable(wxHtmlWinParser * WXUNUSED(parser)) { }
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#endif // _WX_WINPARS_H_
|
||||
|
||||
|
||||
|
||||
|
||||
|
250
install-sh
Executable file
250
install-sh
Executable file
@@ -0,0 +1,250 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# install - install a program, script, or datafile
|
||||
# This comes from X11R5 (mit/util/scripts/install.sh).
|
||||
#
|
||||
# Copyright 1991 by the Massachusetts Institute of Technology
|
||||
#
|
||||
# Permission to use, copy, modify, distribute, and sell this software and its
|
||||
# documentation for any purpose is hereby granted without fee, provided that
|
||||
# the above copyright notice appear in all copies and that both that
|
||||
# copyright notice and this permission notice appear in supporting
|
||||
# documentation, and that the name of M.I.T. not be used in advertising or
|
||||
# publicity pertaining to distribution of the software without specific,
|
||||
# written prior permission. M.I.T. makes no representations about the
|
||||
# suitability of this software for any purpose. It is provided "as is"
|
||||
# without express or implied warranty.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# `make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch. It can only install one file at a time, a restriction
|
||||
# shared with many OS's install programs.
|
||||
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit="${DOITPROG-}"
|
||||
|
||||
|
||||
# put in absolute paths if you don't have them in your path; or use env. vars.
|
||||
|
||||
mvprog="${MVPROG-mv}"
|
||||
cpprog="${CPPROG-cp}"
|
||||
chmodprog="${CHMODPROG-chmod}"
|
||||
chownprog="${CHOWNPROG-chown}"
|
||||
chgrpprog="${CHGRPPROG-chgrp}"
|
||||
stripprog="${STRIPPROG-strip}"
|
||||
rmprog="${RMPROG-rm}"
|
||||
mkdirprog="${MKDIRPROG-mkdir}"
|
||||
|
||||
transformbasename=""
|
||||
transform_arg=""
|
||||
instcmd="$mvprog"
|
||||
chmodcmd="$chmodprog 0755"
|
||||
chowncmd=""
|
||||
chgrpcmd=""
|
||||
stripcmd=""
|
||||
rmcmd="$rmprog -f"
|
||||
mvcmd="$mvprog"
|
||||
src=""
|
||||
dst=""
|
||||
dir_arg=""
|
||||
|
||||
while [ x"$1" != x ]; do
|
||||
case $1 in
|
||||
-c) instcmd="$cpprog"
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-d) dir_arg=true
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-m) chmodcmd="$chmodprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-s) stripcmd="$stripprog"
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
|
||||
shift
|
||||
continue;;
|
||||
|
||||
*) if [ x"$src" = x ]
|
||||
then
|
||||
src=$1
|
||||
else
|
||||
# this colon is to work around a 386BSD /bin/sh bug
|
||||
:
|
||||
dst=$1
|
||||
fi
|
||||
shift
|
||||
continue;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ x"$src" = x ]
|
||||
then
|
||||
echo "install: no input file specified"
|
||||
exit 1
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]; then
|
||||
dst=$src
|
||||
src=""
|
||||
|
||||
if [ -d $dst ]; then
|
||||
instcmd=:
|
||||
else
|
||||
instcmd=mkdir
|
||||
fi
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
|
||||
if [ -f $src -o -d $src ]
|
||||
then
|
||||
true
|
||||
else
|
||||
echo "install: $src does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ x"$dst" = x ]
|
||||
then
|
||||
echo "install: no destination specified"
|
||||
exit 1
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
# If destination is a directory, append the input filename; if your system
|
||||
# does not like double slashes in filenames, you may need to add some logic
|
||||
|
||||
if [ -d $dst ]
|
||||
then
|
||||
dst="$dst"/`basename $src`
|
||||
else
|
||||
true
|
||||
fi
|
||||
fi
|
||||
|
||||
## this sed command emulates the dirname command
|
||||
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
|
||||
|
||||
# Make sure that the destination directory exists.
|
||||
# this part is taken from Noah Friedman's mkinstalldirs script
|
||||
|
||||
# Skip lots of stat calls in the usual case.
|
||||
if [ ! -d "$dstdir" ]; then
|
||||
defaultIFS='
|
||||
'
|
||||
IFS="${IFS-${defaultIFS}}"
|
||||
|
||||
oIFS="${IFS}"
|
||||
# Some sh's can't handle IFS=/ for some reason.
|
||||
IFS='%'
|
||||
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
|
||||
IFS="${oIFS}"
|
||||
|
||||
pathcomp=''
|
||||
|
||||
while [ $# -ne 0 ] ; do
|
||||
pathcomp="${pathcomp}${1}"
|
||||
shift
|
||||
|
||||
if [ ! -d "${pathcomp}" ] ;
|
||||
then
|
||||
$mkdirprog "${pathcomp}"
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
pathcomp="${pathcomp}/"
|
||||
done
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]
|
||||
then
|
||||
$doit $instcmd $dst &&
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
|
||||
else
|
||||
|
||||
# If we're going to rename the final executable, determine the name now.
|
||||
|
||||
if [ x"$transformarg" = x ]
|
||||
then
|
||||
dstfile=`basename $dst`
|
||||
else
|
||||
dstfile=`basename $dst $transformbasename |
|
||||
sed $transformarg`$transformbasename
|
||||
fi
|
||||
|
||||
# don't allow the sed command to completely eliminate the filename
|
||||
|
||||
if [ x"$dstfile" = x ]
|
||||
then
|
||||
dstfile=`basename $dst`
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
# Make a temp file name in the proper directory.
|
||||
|
||||
dsttmp=$dstdir/#inst.$$#
|
||||
|
||||
# Move or copy the file name to the temp name
|
||||
|
||||
$doit $instcmd $src $dsttmp &&
|
||||
|
||||
trap "rm -f ${dsttmp}" 0 &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits
|
||||
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $instcmd $src $dsttmp" command.
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
|
||||
$doit $rmcmd -f $dstdir/$dstfile &&
|
||||
$doit $mvcmd $dsttmp $dstdir/$dstfile
|
||||
|
||||
fi &&
|
||||
|
||||
|
||||
exit 0
|
36
mkinstalldirs
Normal file
36
mkinstalldirs
Normal file
@@ -0,0 +1,36 @@
|
||||
#! /bin/sh
|
||||
# mkinstalldirs --- make directory hierarchy
|
||||
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
|
||||
# Created: 1993-05-16
|
||||
# Last modified: 1994-03-25
|
||||
# Public domain
|
||||
|
||||
errstatus=0
|
||||
|
||||
for file in ${1+"$@"} ; do
|
||||
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
|
||||
shift
|
||||
|
||||
pathcomp=
|
||||
for d in ${1+"$@"} ; do
|
||||
pathcomp="$pathcomp$d"
|
||||
case "$pathcomp" in
|
||||
-* ) pathcomp=./$pathcomp ;;
|
||||
esac
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
echo "mkdir $pathcomp" 1>&2
|
||||
mkdir "$pathcomp" > /dev/null 2>&1 || lasterr=$?
|
||||
fi
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
errstatus=$lasterr
|
||||
fi
|
||||
|
||||
pathcomp="$pathcomp/"
|
||||
done
|
||||
done
|
||||
|
||||
exit $errstatus
|
||||
|
||||
# mkinstalldirs ends here
|
1
samples/Makefile
Normal file
1
samples/Makefile
Normal file
@@ -0,0 +1 @@
|
||||
include ../setup/general/makedirs
|
1
samples/bombs/Makefile
Normal file
1
samples/bombs/Makefile
Normal file
@@ -0,0 +1 @@
|
||||
include ../../setup/general/makeapp
|
26
samples/bombs/Makefile.in
Normal file
26
samples/bombs/Makefile.in
Normal file
@@ -0,0 +1,26 @@
|
||||
# WXXT base directory
|
||||
WXBASEDIR=@WXBASEDIR@
|
||||
|
||||
# set the OS type for compilation
|
||||
OS=@OS@
|
||||
# compile a library only
|
||||
RULE=bin
|
||||
|
||||
# define library name
|
||||
BIN_TARGET=bombs
|
||||
# define library sources
|
||||
BIN_SRC=\
|
||||
bombs.cpp bombs1.cpp game.cpp
|
||||
|
||||
#define library objects
|
||||
BIN_OBJ=\
|
||||
bombs.o bombs1.o game.o
|
||||
|
||||
# additional things needed to link
|
||||
BIN_LINK=
|
||||
|
||||
# additional things needed to compile
|
||||
ADD_COMPILE=
|
||||
|
||||
# include the definitions now
|
||||
include ../../../template.mak
|
1
samples/caret/Makefile
Normal file
1
samples/caret/Makefile
Normal file
@@ -0,0 +1 @@
|
||||
include ../../setup/general/makeapp
|
24
samples/caret/Makefile.in
Normal file
24
samples/caret/Makefile.in
Normal file
@@ -0,0 +1,24 @@
|
||||
# WXXT base directory
|
||||
WXBASEDIR=@WXBASEDIR@
|
||||
|
||||
# set the OS type for compilation
|
||||
OS=@OS@
|
||||
# compile a library only
|
||||
RULE=bin
|
||||
|
||||
# define library name
|
||||
BIN_TARGET=caret
|
||||
# define library sources
|
||||
BIN_SRC=caret.cpp
|
||||
|
||||
#define library objects
|
||||
BIN_OBJ=caret.o
|
||||
|
||||
# additional things needed to link
|
||||
BIN_LINK=
|
||||
|
||||
# additional things needed to compile
|
||||
ADD_COMPILE=
|
||||
|
||||
# include the definitions now
|
||||
include ../../../template.mak
|
1
samples/checklst/Makefile
Normal file
1
samples/checklst/Makefile
Normal file
@@ -0,0 +1 @@
|
||||
include ../../setup/general/makeapp
|
26
samples/checklst/Makefile.in
Normal file
26
samples/checklst/Makefile.in
Normal file
@@ -0,0 +1,26 @@
|
||||
# WXXT base directory
|
||||
WXBASEDIR=@WXBASEDIR@
|
||||
|
||||
# set the OS type for compilation
|
||||
OS=@OS@
|
||||
# compile a library only
|
||||
RULE=bin
|
||||
|
||||
# define library name
|
||||
BIN_TARGET=checklst
|
||||
# define library sources
|
||||
BIN_SRC=\
|
||||
checklst.cpp
|
||||
|
||||
#define library objects
|
||||
BIN_OBJ=\
|
||||
checklst.o
|
||||
|
||||
# additional things needed to link
|
||||
BIN_LINK=
|
||||
|
||||
# additional things needed to compile
|
||||
ADD_COMPILE=
|
||||
|
||||
# include the definitions now
|
||||
include ../../../template.mak
|
1
samples/config/Makefile
Normal file
1
samples/config/Makefile
Normal file
@@ -0,0 +1 @@
|
||||
include ../../setup/general/makeapp
|
24
samples/config/Makefile.in
Normal file
24
samples/config/Makefile.in
Normal file
@@ -0,0 +1,24 @@
|
||||
# WXXT base directory
|
||||
WXBASEDIR=@WXBASEDIR@
|
||||
|
||||
# set the OS type for compilation
|
||||
OS=@OS@
|
||||
# compile a library only
|
||||
RULE=bin
|
||||
|
||||
# define library name
|
||||
BIN_TARGET=conftest
|
||||
# define library sources
|
||||
BIN_SRC=conftest.cpp
|
||||
|
||||
#define library objects
|
||||
BIN_OBJ=conftest.o
|
||||
|
||||
# additional things needed to link
|
||||
BIN_LINK=
|
||||
|
||||
# additional things needed to compile
|
||||
ADD_COMPILE=
|
||||
|
||||
# include the definitions now
|
||||
include ../../../template.mak
|
1
samples/controls/Makefile
Normal file
1
samples/controls/Makefile
Normal file
@@ -0,0 +1 @@
|
||||
include ../../setup/general/makeapp
|
26
samples/controls/Makefile.in
Normal file
26
samples/controls/Makefile.in
Normal file
@@ -0,0 +1,26 @@
|
||||
# WXXT base directory
|
||||
WXBASEDIR=@WXBASEDIR@
|
||||
|
||||
# set the OS type for compilation
|
||||
OS=@OS@
|
||||
# compile a library only
|
||||
RULE=bin
|
||||
|
||||
# define library name
|
||||
BIN_TARGET=controls
|
||||
# define library sources
|
||||
BIN_SRC=\
|
||||
controls.cpp
|
||||
|
||||
#define library objects
|
||||
BIN_OBJ=\
|
||||
controls.o
|
||||
|
||||
# additional things needed to link
|
||||
BIN_LINK=
|
||||
|
||||
# additional things needed to compile
|
||||
ADD_COMPILE=
|
||||
|
||||
# include the definitions now
|
||||
include ../../../template.mak
|
1
samples/db/Makefile
Normal file
1
samples/db/Makefile
Normal file
@@ -0,0 +1 @@
|
||||
include ../../setup/general/makeapp
|
26
samples/db/Makefile.in
Normal file
26
samples/db/Makefile.in
Normal file
@@ -0,0 +1,26 @@
|
||||
# WXXT base directory
|
||||
WXBASEDIR=@WXBASEDIR@
|
||||
|
||||
# set the OS type for compilation
|
||||
OS=@OS@
|
||||
# compile a library only
|
||||
RULE=bin
|
||||
|
||||
# define library name
|
||||
BIN_TARGET=dbtest
|
||||
# define library sources
|
||||
BIN_SRC=\
|
||||
dbtest.cpp listdb.cpp
|
||||
|
||||
#define library objects
|
||||
BIN_OBJ=\
|
||||
dbtest.o listdb.o
|
||||
|
||||
# additional things needed to link
|
||||
BIN_LINK=
|
||||
|
||||
# additional things needed to compile
|
||||
ADD_COMPILE=
|
||||
|
||||
# include the definitions now
|
||||
include ../../../template.mak
|
1
samples/dde/Makefile
Normal file
1
samples/dde/Makefile
Normal file
@@ -0,0 +1 @@
|
||||
include ../../setup/general/makeapp
|
28
samples/dde/Makefile.in
Normal file
28
samples/dde/Makefile.in
Normal file
@@ -0,0 +1,28 @@
|
||||
# WXXT base directory
|
||||
WXBASEDIR=@WXBASEDIR@
|
||||
|
||||
# set the OS type for compilation
|
||||
OS=@OS@
|
||||
# compile a library only
|
||||
RULE=bin2
|
||||
|
||||
# define library name
|
||||
BIN_TARGET=client
|
||||
BIN2_TARGET=server
|
||||
# define library sources
|
||||
BIN_SRC= client.cpp
|
||||
BIN2_SRC= server.cpp
|
||||
|
||||
#define library objects
|
||||
BIN_OBJ= client.o
|
||||
BIN2_OBJ= server.o
|
||||
|
||||
# additional things needed to link
|
||||
BIN_LINK=
|
||||
BIN2_LINK=
|
||||
|
||||
# additional things needed to compile
|
||||
ADD_COMPILE=
|
||||
|
||||
# include the definitions now
|
||||
include ../../../template.mak
|
1
samples/dialogs/Makefile
Normal file
1
samples/dialogs/Makefile
Normal file
@@ -0,0 +1 @@
|
||||
include ../../setup/general/makeapp
|
26
samples/dialogs/Makefile.in
Normal file
26
samples/dialogs/Makefile.in
Normal file
@@ -0,0 +1,26 @@
|
||||
# WXXT base directory
|
||||
WXBASEDIR=@WXBASEDIR@
|
||||
|
||||
# set the OS type for compilation
|
||||
OS=@OS@
|
||||
# compile a library only
|
||||
RULE=bin
|
||||
|
||||
# define library name
|
||||
BIN_TARGET=dialogs
|
||||
# define library sources
|
||||
BIN_SRC=\
|
||||
dialogs.cpp
|
||||
|
||||
#define library objects
|
||||
BIN_OBJ=\
|
||||
dialogs.o
|
||||
|
||||
# additional things needed to link
|
||||
BIN_LINK=
|
||||
|
||||
# additional things needed to compile
|
||||
ADD_COMPILE=
|
||||
|
||||
# include the definitions now
|
||||
include ../../../template.mak
|
1
samples/dnd/Makefile
Normal file
1
samples/dnd/Makefile
Normal file
@@ -0,0 +1 @@
|
||||
include ../../setup/general/makeapp
|
26
samples/dnd/Makefile.in
Normal file
26
samples/dnd/Makefile.in
Normal file
@@ -0,0 +1,26 @@
|
||||
# WXXT base directory
|
||||
WXBASEDIR=@WXBASEDIR@
|
||||
|
||||
# set the OS type for compilation
|
||||
OS=@OS@
|
||||
# compile a library only
|
||||
RULE=bin
|
||||
|
||||
# define library name
|
||||
BIN_TARGET=dnd
|
||||
# define library sources
|
||||
BIN_SRC=\
|
||||
dnd.cpp
|
||||
|
||||
#define library objects
|
||||
BIN_OBJ=\
|
||||
dnd.o
|
||||
|
||||
# additional things needed to link
|
||||
BIN_LINK=
|
||||
|
||||
# additional things needed to compile
|
||||
ADD_COMPILE=
|
||||
|
||||
# include the definitions now
|
||||
include ../../../template.mak
|
1
samples/docview/Makefile
Normal file
1
samples/docview/Makefile
Normal file
@@ -0,0 +1 @@
|
||||
include ../../setup/general/makeapp
|
26
samples/docview/Makefile.in
Normal file
26
samples/docview/Makefile.in
Normal file
@@ -0,0 +1,26 @@
|
||||
# WXXT base directory
|
||||
WXBASEDIR=@WXBASEDIR@
|
||||
|
||||
# set the OS type for compilation
|
||||
OS=@OS@
|
||||
# compile a library only
|
||||
RULE=bin
|
||||
|
||||
# define library name
|
||||
BIN_TARGET=test
|
||||
# define library sources
|
||||
BIN_SRC=\
|
||||
doc.cpp view.cpp docview.cpp
|
||||
|
||||
#define library objects
|
||||
BIN_OBJ=\
|
||||
doc.o view.o docview.o
|
||||
|
||||
# additional things needed to link
|
||||
BIN_LINK=
|
||||
|
||||
# additional things needed to compile
|
||||
ADD_COMPILE=
|
||||
|
||||
# include the definitions now
|
||||
include ../../../template.mak
|
1
samples/docvwmdi/Makefile
Normal file
1
samples/docvwmdi/Makefile
Normal file
@@ -0,0 +1 @@
|
||||
include ../../setup/general/makeapp
|
26
samples/docvwmdi/Makefile.in
Normal file
26
samples/docvwmdi/Makefile.in
Normal file
@@ -0,0 +1,26 @@
|
||||
# WXXT base directory
|
||||
WXBASEDIR=@WXBASEDIR@
|
||||
|
||||
# set the OS type for compilation
|
||||
OS=@OS@
|
||||
# compile a library only
|
||||
RULE=bin
|
||||
|
||||
# define library name
|
||||
BIN_TARGET=test
|
||||
# define library sources
|
||||
BIN_SRC=\
|
||||
doc.cpp view.cpp docview.cpp
|
||||
|
||||
#define library objects
|
||||
BIN_OBJ=\
|
||||
doc.o view.o docview.o
|
||||
|
||||
# additional things needed to link
|
||||
BIN_LINK=
|
||||
|
||||
# additional things needed to compile
|
||||
ADD_COMPILE=
|
||||
|
||||
# include the definitions now
|
||||
include ../../../template.mak
|
1
samples/drawing/Makefile
Normal file
1
samples/drawing/Makefile
Normal file
@@ -0,0 +1 @@
|
||||
include ../../setup/general/makeapp
|
26
samples/drawing/Makefile.in
Normal file
26
samples/drawing/Makefile.in
Normal file
@@ -0,0 +1,26 @@
|
||||
# WXXT base directory
|
||||
WXBASEDIR=@WXBASEDIR@
|
||||
|
||||
# set the OS type for compilation
|
||||
OS=@OS@
|
||||
# compile a library only
|
||||
RULE=bin
|
||||
|
||||
# define library name
|
||||
BIN_TARGET=drawing
|
||||
# define library sources
|
||||
BIN_SRC=\
|
||||
drawing.cpp
|
||||
|
||||
#define library objects
|
||||
BIN_OBJ=\
|
||||
drawing.o
|
||||
|
||||
# additional things needed to link
|
||||
BIN_LINK=
|
||||
|
||||
# additional things needed to compile
|
||||
ADD_COMPILE=
|
||||
|
||||
# include the definitions now
|
||||
include ../../../template.mak
|
1
samples/dynamic/Makefile
Normal file
1
samples/dynamic/Makefile
Normal file
@@ -0,0 +1 @@
|
||||
include ../../setup/general/makeapp
|
26
samples/dynamic/Makefile.in
Normal file
26
samples/dynamic/Makefile.in
Normal file
@@ -0,0 +1,26 @@
|
||||
# WXXT base directory
|
||||
WXBASEDIR=@WXBASEDIR@
|
||||
|
||||
# set the OS type for compilation
|
||||
OS=@OS@
|
||||
# compile a library only
|
||||
RULE=bin
|
||||
|
||||
# define library name
|
||||
BIN_TARGET=dynamic
|
||||
# define library sources
|
||||
BIN_SRC=\
|
||||
dynamic.cpp
|
||||
|
||||
#define library objects
|
||||
BIN_OBJ=\
|
||||
dynamic.o
|
||||
|
||||
# additional things needed to link
|
||||
BIN_LINK=
|
||||
|
||||
# additional things needed to compile
|
||||
ADD_COMPILE=
|
||||
|
||||
# include the definitions now
|
||||
include ../../../template.mak
|
1
samples/forty/Makefile
Normal file
1
samples/forty/Makefile
Normal file
@@ -0,0 +1 @@
|
||||
include ../../setup/general/makeapp
|
40
samples/forty/Makefile.in
Normal file
40
samples/forty/Makefile.in
Normal file
@@ -0,0 +1,40 @@
|
||||
# WXXT base directory
|
||||
WXBASEDIR=@WXBASEDIR@
|
||||
|
||||
# set the OS type for compilation
|
||||
OS=@OS@
|
||||
# compile a library only
|
||||
RULE=bin
|
||||
|
||||
# define library name
|
||||
BIN_TARGET=forty
|
||||
# define library sources
|
||||
BIN_SRC=\
|
||||
canvas.cpp \
|
||||
card.cpp \
|
||||
forty.cpp \
|
||||
game.cpp \
|
||||
pile.cpp \
|
||||
playerdg.cpp \
|
||||
scoredg.cpp \
|
||||
scorefil.cpp
|
||||
|
||||
#define library objects
|
||||
BIN_OBJ=\
|
||||
canvas.o \
|
||||
card.o \
|
||||
forty.o \
|
||||
game.o \
|
||||
pile.o \
|
||||
playerdg.o \
|
||||
scoredg.o \
|
||||
scorefil.o
|
||||
|
||||
# additional things needed to link
|
||||
BIN_LINK=
|
||||
|
||||
# additional things needed to compile
|
||||
ADD_COMPILE=
|
||||
|
||||
# include the definitions now
|
||||
include ../../../template.mak
|
1
samples/fractal/Makefile
Normal file
1
samples/fractal/Makefile
Normal file
@@ -0,0 +1 @@
|
||||
include ../../setup/general/makeapp
|
26
samples/fractal/Makefile.in
Normal file
26
samples/fractal/Makefile.in
Normal file
@@ -0,0 +1,26 @@
|
||||
# WXXT base directory
|
||||
WXBASEDIR=@WXBASEDIR@
|
||||
|
||||
# set the OS type for compilation
|
||||
OS=@OS@
|
||||
# compile a library only
|
||||
RULE=bin
|
||||
|
||||
# define library name
|
||||
BIN_TARGET=fractal
|
||||
# define library sources
|
||||
BIN_SRC=\
|
||||
fractal.cpp
|
||||
|
||||
#define library objects
|
||||
BIN_OBJ=\
|
||||
fractal.o
|
||||
|
||||
# additional things needed to link
|
||||
BIN_LINK=
|
||||
|
||||
# additional things needed to compile
|
||||
ADD_COMPILE=
|
||||
|
||||
# include the definitions now
|
||||
include ../../../template.mak
|
1
samples/grid/Makefile
Normal file
1
samples/grid/Makefile
Normal file
@@ -0,0 +1 @@
|
||||
include ../../setup/general/makeapp
|
26
samples/grid/Makefile.in
Normal file
26
samples/grid/Makefile.in
Normal file
@@ -0,0 +1,26 @@
|
||||
# WXXT base directory
|
||||
WXBASEDIR=@WXBASEDIR@
|
||||
|
||||
# set the OS type for compilation
|
||||
OS=@OS@
|
||||
# compile a library only
|
||||
RULE=bin
|
||||
|
||||
# define library name
|
||||
BIN_TARGET=grid
|
||||
# define library sources
|
||||
BIN_SRC=\
|
||||
test.cpp
|
||||
|
||||
#define library objects
|
||||
BIN_OBJ=\
|
||||
test.o
|
||||
|
||||
# additional things needed to link
|
||||
BIN_LINK=
|
||||
|
||||
# additional things needed to compile
|
||||
ADD_COMPILE=
|
||||
|
||||
# include the definitions now
|
||||
include ../../../template.mak
|
1
samples/help/Makefile
Normal file
1
samples/help/Makefile
Normal file
@@ -0,0 +1 @@
|
||||
include ../../setup/general/makeapp
|
26
samples/help/Makefile.in
Normal file
26
samples/help/Makefile.in
Normal file
@@ -0,0 +1,26 @@
|
||||
# WXXT base directory
|
||||
WXBASEDIR=@WXBASEDIR@
|
||||
|
||||
# set the OS type for compilation
|
||||
OS=@OS@
|
||||
# compile a library only
|
||||
RULE=bin
|
||||
|
||||
# define library name
|
||||
BIN_TARGET=demo
|
||||
# define library sources
|
||||
BIN_SRC=\
|
||||
demo.cpp kbList.cpp wxexthlp.cpp
|
||||
|
||||
#define library objects
|
||||
BIN_OBJ=\
|
||||
demo.o
|
||||
|
||||
# additional things needed to link
|
||||
BIN_LINK=
|
||||
|
||||
# additional things needed to compile
|
||||
ADD_COMPILE=
|
||||
|
||||
# include the definitions now
|
||||
include ../../../template.mak
|
1
samples/image/Makefile
Normal file
1
samples/image/Makefile
Normal file
@@ -0,0 +1 @@
|
||||
include ../../setup/general/makeapp
|
26
samples/image/Makefile.in
Normal file
26
samples/image/Makefile.in
Normal file
@@ -0,0 +1,26 @@
|
||||
# WXXT base directory
|
||||
WXBASEDIR=@WXBASEDIR@
|
||||
|
||||
# set the OS type for compilation
|
||||
OS=@OS@
|
||||
# compile a library only
|
||||
RULE=bin
|
||||
|
||||
# define library name
|
||||
BIN_TARGET=image
|
||||
# define library sources
|
||||
BIN_SRC=\
|
||||
image.cpp
|
||||
|
||||
#define library objects
|
||||
BIN_OBJ=\
|
||||
image.o
|
||||
|
||||
# additional things needed to link
|
||||
BIN_LINK=
|
||||
|
||||
# additional things needed to compile
|
||||
ADD_COMPILE=
|
||||
|
||||
# include the definitions now
|
||||
include ../../../template.mak
|
1
samples/internat/Makefile
Normal file
1
samples/internat/Makefile
Normal file
@@ -0,0 +1 @@
|
||||
include ../../setup/general/makeapp
|
26
samples/internat/Makefile.in
Normal file
26
samples/internat/Makefile.in
Normal file
@@ -0,0 +1,26 @@
|
||||
# WXXT base directory
|
||||
WXBASEDIR=@WXBASEDIR@
|
||||
|
||||
# set the OS type for compilation
|
||||
OS=@OS@
|
||||
# compile a library only
|
||||
RULE=bin
|
||||
|
||||
# define library name
|
||||
BIN_TARGET=internat
|
||||
# define library sources
|
||||
BIN_SRC=\
|
||||
internat.cpp
|
||||
|
||||
#define library objects
|
||||
BIN_OBJ=\
|
||||
internat.o
|
||||
|
||||
# additional things needed to link
|
||||
BIN_LINK=
|
||||
|
||||
# additional things needed to compile
|
||||
ADD_COMPILE=
|
||||
|
||||
# include the definitions now
|
||||
include ../../../template.mak
|
1
samples/layout/Makefile
Normal file
1
samples/layout/Makefile
Normal file
@@ -0,0 +1 @@
|
||||
include ../../setup/general/makeapp
|
26
samples/layout/Makefile.in
Normal file
26
samples/layout/Makefile.in
Normal file
@@ -0,0 +1,26 @@
|
||||
# WXXT base directory
|
||||
WXBASEDIR=@WXBASEDIR@
|
||||
|
||||
# set the OS type for compilation
|
||||
OS=@OS@
|
||||
# compile a library only
|
||||
RULE=bin
|
||||
|
||||
# define library name
|
||||
BIN_TARGET=layout
|
||||
# define library sources
|
||||
BIN_SRC=\
|
||||
layout.cpp
|
||||
|
||||
#define library objects
|
||||
BIN_OBJ=\
|
||||
layout.o
|
||||
|
||||
# additional things needed to link
|
||||
BIN_LINK=
|
||||
|
||||
# additional things needed to compile
|
||||
ADD_COMPILE=
|
||||
|
||||
# include the definitions now
|
||||
include ../../../template.mak
|
1
samples/listctrl/Makefile
Normal file
1
samples/listctrl/Makefile
Normal file
@@ -0,0 +1 @@
|
||||
include ../../setup/general/makeapp
|
26
samples/listctrl/Makefile.in
Normal file
26
samples/listctrl/Makefile.in
Normal file
@@ -0,0 +1,26 @@
|
||||
# WXXT base directory
|
||||
WXBASEDIR=@WXBASEDIR@
|
||||
|
||||
# set the OS type for compilation
|
||||
OS=@OS@
|
||||
# compile a library only
|
||||
RULE=bin
|
||||
|
||||
# define library name
|
||||
BIN_TARGET=listtest
|
||||
# define library sources
|
||||
BIN_SRC=\
|
||||
listtest.cpp
|
||||
|
||||
#define library objects
|
||||
BIN_OBJ=\
|
||||
listtest.o
|
||||
|
||||
# additional things needed to link
|
||||
BIN_LINK=
|
||||
|
||||
# additional things needed to compile
|
||||
ADD_COMPILE=
|
||||
|
||||
# include the definitions now
|
||||
include ../../../template.mak
|
1
samples/mdi/Makefile
Normal file
1
samples/mdi/Makefile
Normal file
@@ -0,0 +1 @@
|
||||
include ../../setup/general/makeapp
|
26
samples/mdi/Makefile.in
Normal file
26
samples/mdi/Makefile.in
Normal file
@@ -0,0 +1,26 @@
|
||||
# WXXT base directory
|
||||
WXBASEDIR=@WXBASEDIR@
|
||||
|
||||
# set the OS type for compilation
|
||||
OS=@OS@
|
||||
# compile a library only
|
||||
RULE=bin
|
||||
|
||||
# define library name
|
||||
BIN_TARGET=mdi
|
||||
# define library sources
|
||||
BIN_SRC=\
|
||||
mdi.cpp
|
||||
|
||||
#define library objects
|
||||
BIN_OBJ=\
|
||||
mdi.o
|
||||
|
||||
# additional things needed to link
|
||||
BIN_LINK=
|
||||
|
||||
# additional things needed to compile
|
||||
ADD_COMPILE=
|
||||
|
||||
# include the definitions now
|
||||
include ../../../template.mak
|
1
samples/memcheck/Makefile
Normal file
1
samples/memcheck/Makefile
Normal file
@@ -0,0 +1 @@
|
||||
include ../../setup/general/makeapp
|
26
samples/memcheck/Makefile.in
Normal file
26
samples/memcheck/Makefile.in
Normal file
@@ -0,0 +1,26 @@
|
||||
# WXXT base directory
|
||||
WXBASEDIR=@WXBASEDIR@
|
||||
|
||||
# set the OS type for compilation
|
||||
OS=@OS@
|
||||
# compile a library only
|
||||
RULE=bin
|
||||
|
||||
# define library name
|
||||
BIN_TARGET=memcheck
|
||||
# define library sources
|
||||
BIN_SRC=\
|
||||
memcheck.cpp
|
||||
|
||||
#define library objects
|
||||
BIN_OBJ=\
|
||||
memcheck.o
|
||||
|
||||
# additional things needed to link
|
||||
BIN_LINK=
|
||||
|
||||
# additional things needed to compile
|
||||
ADD_COMPILE=
|
||||
|
||||
# include the definitions now
|
||||
include ../../../template.mak
|
1
samples/minifram/Makefile
Normal file
1
samples/minifram/Makefile
Normal file
@@ -0,0 +1 @@
|
||||
include ../../setup/general/makeapp
|
26
samples/minifram/Makefile.in
Normal file
26
samples/minifram/Makefile.in
Normal file
@@ -0,0 +1,26 @@
|
||||
# WXXT base directory
|
||||
WXBASEDIR=@WXBASEDIR@
|
||||
|
||||
# set the OS type for compilation
|
||||
OS=@OS@
|
||||
# compile a library only
|
||||
RULE=bin
|
||||
|
||||
# define library name
|
||||
BIN_TARGET=minifram
|
||||
# define library sources
|
||||
BIN_SRC=\
|
||||
test.cpp
|
||||
|
||||
#define library objects
|
||||
BIN_OBJ=\
|
||||
test.o
|
||||
|
||||
# additional things needed to link
|
||||
BIN_LINK=
|
||||
|
||||
# additional things needed to compile
|
||||
ADD_COMPILE=
|
||||
|
||||
# include the definitions now
|
||||
include ../../../template.mak
|
1
samples/minimal/Makefile
Normal file
1
samples/minimal/Makefile
Normal file
@@ -0,0 +1 @@
|
||||
include ../../setup/general/makeapp
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user